From e22a5b45bd70c3cc27887d498e7a7d149de86b7b Mon Sep 17 00:00:00 2001 From: Vishwaraj Anand Date: Fri, 5 Apr 2024 17:12:25 +0530 Subject: [PATCH 01/86] chore(Storage): fix IAM system tests (#7206) --- Storage/tests/System/IamTest.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Storage/tests/System/IamTest.php b/Storage/tests/System/IamTest.php index 0c4fc1a5e9f3..8d3080a30058 100644 --- a/Storage/tests/System/IamTest.php +++ b/Storage/tests/System/IamTest.php @@ -106,10 +106,7 @@ public function testGetModifySetConditionalPolicy() $policy['bindings'][] = $conditionalBinding; $iam->setPolicy($policy); $policy = $iam->reload(['requestedPolicyVersion' => 3]); - $this->assertContains( - $conditionalBinding, - $policy['bindings'] - ); + $this->assertTrue(in_array($conditionalBinding, $policy['bindings'])); } private function bucketConfig($enabled = true) From e4937daef2711f3ca5214243af1ed9d1657a27a1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:28:42 -0700 Subject: [PATCH 02/86] feat: add new final state fields to Network Management API version v1 (#7153) feat: add new final state fields to Network Management API version v1 docs: update final state comments in Network Management API version v1 PiperOrigin-RevId: 616187354 Source-Link: https://github.com/googleapis/googleapis/commit/6cfc5530a5198d6b509d7045cb8f632e289cb547 Source-Link: https://github.com/googleapis/googleapis-gen/commit/80fc3a7b9c779b2aa42d8ed017f75b9ad43923a3 Copy-Tag: eyJwIjoiTmV0d29ya01hbmFnZW1lbnQvLk93bEJvdC55YW1sIiwiaCI6IjgwZmMzYTdiOWM3NzliMmFhNDJkOGVkMDE3Zjc1YjlhZDQzOTIzYTMifQ== feat: add new enum values related to Google services PiperOrigin-RevId: 617556344 Source-Link: https://github.com/googleapis/googleapis/commit/232e5625d4ab08129843ab5a6402ae1f0fe3f585 Source-Link: https://github.com/googleapis/googleapis-gen/commit/28ae5679496ceaa9944430245a504f2baebb4854 Copy-Tag: eyJwIjoiTmV0d29ya01hbmFnZW1lbnQvLk93bEJvdC55YW1sIiwiaCI6IjI4YWU1Njc5NDk2Y2VhYTk5NDQ0MzAyNDVhNTA0ZjJiYWViYjQ4NTQifQ== chore: deprecate legacy fields related to load balancing\ docs: update comments for fields related to load balancing PiperOrigin-RevId: 618165773 Source-Link: https://github.com/googleapis/googleapis/commit/2bc2029fdf248f25274fe628c95fe638906f9706 Source-Link: https://github.com/googleapis/googleapis-gen/commit/675cc52d356a14e5a798078100b0eb2f7e1d79da Copy-Tag: eyJwIjoiTmV0d29ya01hbmFnZW1lbnQvLk93bEJvdC55YW1sIiwiaCI6IjY3NWNjNTJkMzU2YTE0ZTVhNzk4MDc4MTAwYjBlYjJmN2UxZDc5ZGEifQ== feat: add new fields and enum values related to round-trip docs: update a few outdated comments PiperOrigin-RevId: 618911579 Source-Link: https://github.com/googleapis/googleapis/commit/efad09c9f0d46ae0786d810a88024363e06c6ca3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/704c5930d16097a405d4c1defa554be20cbd0b06 Copy-Tag: eyJwIjoiTmV0d29ya01hbmFnZW1lbnQvLk93bEJvdC55YW1sIiwiaCI6IjcwNGM1OTMwZDE2MDk3YTQwNWQ0YzFkZWZhNTU0YmUyMGNiZDBiMDYifQ== feat: add an "unsupported" type of firewall policy rule PiperOrigin-RevId: 619524306 Source-Link: https://github.com/googleapis/googleapis/commit/b99801549985c5631d1e79d2d3e932b3a52aa3ad Source-Link: https://github.com/googleapis/googleapis-gen/commit/be13df91518b4d10aea475e5a0e7141f41aaef42 Copy-Tag: eyJwIjoiTmV0d29ya01hbmFnZW1lbnQvLk93bEJvdC55YW1sIiwiaCI6ImJlMTNkZjkxNTE4YjRkMTBhZWE0NzVlNWEwZTcxNDFmNDFhYWVmNDIifQ== docs: update possible firewall rule actions comment PiperOrigin-RevId: 619808134 Source-Link: https://github.com/googleapis/googleapis/commit/58017ef35e81f53d80215c5bfb7bfc358b421b36 Source-Link: https://github.com/googleapis/googleapis-gen/commit/98e6bdffb90bfbe86e2abd791cce70ea665e6943 Copy-Tag: eyJwIjoiTmV0d29ya01hbmFnZW1lbnQvLk93bEJvdC55YW1sIiwiaCI6Ijk4ZTZiZGZmYjkwYmZiZTg2ZTJhYmQ3OTFjY2U3MGVhNjY1ZTY5NDMifQ== --- .../metadata/V1/ConnectivityTest.php | Bin 4728 -> 4760 bytes NetworkManagement/metadata/V1/Trace.php | Bin 13191 -> 15054 bytes .../create_connectivity_test.php | 2 +- .../update_connectivity_test.php | 2 +- NetworkManagement/src/V1/AbortInfo.php | 54 +++-- NetworkManagement/src/V1/AbortInfo/Cause.php | 202 ++++++++++++------ NetworkManagement/src/V1/ConnectivityTest.php | 46 +++- NetworkManagement/src/V1/DeliverInfo.php | 34 +++ .../src/V1/DeliverInfo/Target.php | 28 +++ NetworkManagement/src/V1/DropInfo.php | 102 +++++++++ NetworkManagement/src/V1/DropInfo/Cause.php | 177 ++++++++++++++- NetworkManagement/src/V1/Endpoint.php | 12 -- NetworkManagement/src/V1/FirewallInfo.php | 8 +- .../src/V1/FirewallInfo/FirewallRuleType.php | 20 ++ NetworkManagement/src/V1/ForwardInfo.php | 34 +++ .../src/V1/ForwardInfo/Target.php | 11 +- .../GoogleServiceInfo/GoogleServiceType.php | 25 ++- .../src/V1/LoadBalancerBackendInfo.php | 40 ++-- NetworkManagement/src/V1/LoadBalancerInfo.php | 29 ++- .../src/V1/ReachabilityDetails/Result.php | 4 +- NetworkManagement/src/V1/Step.php | 18 +- NetworkManagement/src/V1/Step/State.php | 27 ++- NetworkManagement/src/V1/Trace.php | 42 ++++ .../Client/ReachabilityServiceClientTest.php | 10 + .../Unit/V1/ReachabilityServiceClientTest.php | 8 + 25 files changed, 785 insertions(+), 150 deletions(-) diff --git a/NetworkManagement/metadata/V1/ConnectivityTest.php b/NetworkManagement/metadata/V1/ConnectivityTest.php index 10855029f8cfbc5cfe08f03fcac733bb17d8eee7..841f6d992685d1dc82ed3c21740516097179786f 100644 GIT binary patch delta 58 zcmeyNGDCHPCNtyW$y&@$77%Q6xKRUn@mGGof5}Q;v{yQ)J;j!|CUxlTCXS0HtU&XcGn@I(hxOHnzpKg zlNJtuZ=mvXKy%{;J-~qj;39DV6_o=Z5S6&}P$5<2&;vpsap20EwVhZ_C2q4b-@JM6 zd*A!^t<_(yfA)`|zA_R~``Sub{btbUN9$Geu^vz+=+y&AbWMB)gqlq;_+RhH#uW$9u`t}Vx-qeiAP^|02_5sMnG8rXe4 znvKMb+VbvnN94y{wYSl6V=93Tc)lroIV*TUdOjCsp2}=s%~KyINE(f{94kH?GltdI zd%iU?>h+%Vu7OCGK{D!APdciXweNd=HH<%NAM~aS#YhX|M#xGony&B<9? z&;`?Rq{|)KT9hJiC|)K6_4>lJ=53aTEKHx`QtckT95wE!vwiPHJ~z}4eK*dLUWD?T z=N&3d*TzwOZTnlgo`pL}AKKTlS9C22+q=|rv0KJn^(b~DF@*4?($dwPLd&n*4E|H@^YoLu@UbGL0ymDy?4JW(iKhJj;Q;I z2QQNSXs;{mB4jNY^%uC9$9r^Ymcs+6IAE4G@RPupR2nk@3NSW@ztuN7@XyWfsL@ z=hWSi)B*A|!h#2I2`F_PJ3Q`Aec7!ZkCcF_*7~)gy0csLtNGE1$U9x?{MbmfAMFj; zJmU*&ivlB5N6UdL_<3sixFbA>pWyS~U5!a~GnuF_C)6j&RCD=rGF1)lgM^xy!kZCt7+pBn z2xz;~%;g02JP7FnTe5M`>}tOjmrF&#_H>6JJ7&`y=x`EE?AV4Fvffq5Us{}y5UaOKp)X$)JjWn|`irci|SV-pUV;=)Z^4k{bV2N-Y8$MXs27R&m{~|uUeYw1CQ8M zDXp%Ruf;pHUQ^%g1BHHEg%;IoW1u-X$K95^Lk6Mm+$lmkC&@TUwqf;QC^{{SI@gEE zAvE3wYYv!P5FDJWshgu@vbyv6#xTO;3@EV+rdZTtaEwf&$+oz&Tr8L(r`=H-rcNC+ zSTKES4jvzH*g`Q6V)k&Z0)I;mD-Qua{{NQKE1WL7J;bgf5Q|?g*9Ds}M?5D_ugJ`S;DQJO% zk?urJtG~zQPM$zVnh!Qz-m>(>7Hw0uglUl#o>8aM#o8C?l@9e@dR)ab$*P_~&)Ob0 zGYq2tPx?RTQYv8GY~LZ>5e?T93gXQL7T9Hr{m8t-vrt|=3O+)PqnRD}R*tK>iG{%N zZ5I~$*XZF>B#9Dr!_Z#cyx&^LS>0;rgfI#Ei$uUn^vQnp@cvbr*(;KP$z6z{X#qbj5?FqoYsc1ZE=uT!#=5p WGX$d^tr)FYhjSO7t9_bzfc^vEN^}zd delta 439 zcmYk0ziSgw0LOXn5+g6hTuypDgxK86MQJbuS{KLQJ<2uByKuSm2ZbIKQ)!h#e+3FE zf?##1TD}!r#X)dUcv}aBg3zHjw9utX|ASgObg)COgW&Xq58q$ESJobVKP4#BD*Z5x zNg7bThF$uG@^@-MGZSP4uT#V7AmwQEJgLsvAi?srpTxnvj6)3vQyE9S%Ip!M)I^pO zvZ0>p22ne?xdeHML35pSv2Av-)ccwIK(Ey$7T#Kx`f8me(>s)<-OiKQZf6nmh5OjL zlE$A~dCCuQT;TBgwkZFGhlR(KZ^vXbd!4bNx`-OJRwx2JfpNP;Ogy(ue6+d7|0c0- zcQDFJ^f-ZMysvqKW!thY{V^Fy5svvmT_;A|@(+4Vof`j{nt?wo9)!AP^sro01P!m% z@_ZS&LVCiD7wgWzUFk<+JU$?6BT-zCGHx=nEj<|u=?XXYwn9(V!Z@d2#j4X!@<HVk4+7 JsnhBqy8t4|guws+ diff --git a/NetworkManagement/samples/V1/ReachabilityServiceClient/create_connectivity_test.php b/NetworkManagement/samples/V1/ReachabilityServiceClient/create_connectivity_test.php index d1fdc3503c26..b2032d2d9485 100644 --- a/NetworkManagement/samples/V1/ReachabilityServiceClient/create_connectivity_test.php +++ b/NetworkManagement/samples/V1/ReachabilityServiceClient/create_connectivity_test.php @@ -57,7 +57,7 @@ * * Must end with a number or a letter. * * Must be unique within the customer project * @param string $resourceName Unique name of the resource using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test}` + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` */ function create_connectivity_test_sample( string $parent, diff --git a/NetworkManagement/samples/V1/ReachabilityServiceClient/update_connectivity_test.php b/NetworkManagement/samples/V1/ReachabilityServiceClient/update_connectivity_test.php index 75af9ece2af9..03bd16e73d41 100644 --- a/NetworkManagement/samples/V1/ReachabilityServiceClient/update_connectivity_test.php +++ b/NetworkManagement/samples/V1/ReachabilityServiceClient/update_connectivity_test.php @@ -49,7 +49,7 @@ * in `ConnectivityTest` for for more details. * * @param string $resourceName Unique name of the resource using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test}` + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` */ function update_connectivity_test_sample(string $resourceName): void { diff --git a/NetworkManagement/src/V1/AbortInfo.php b/NetworkManagement/src/V1/AbortInfo.php index 272f7ae3691b..b593863f024f 100644 --- a/NetworkManagement/src/V1/AbortInfo.php +++ b/NetworkManagement/src/V1/AbortInfo.php @@ -28,9 +28,14 @@ class AbortInfo extends \Google\Protobuf\Internal\Message */ private $resource_uri = ''; /** - * List of project IDs that the user has specified in the request but does - * not have permission to access network configs. Analysis is aborted in this - * case with the PERMISSION_DENIED cause. + * IP address that caused the abort. + * + * Generated from protobuf field string ip_address = 4 [(.google.api.field_info) = { + */ + private $ip_address = ''; + /** + * List of project IDs the user specified in the request but lacks access to. + * In this case, analysis is aborted with the PERMISSION_DENIED cause. * * Generated from protobuf field repeated string projects_missing_permission = 3; */ @@ -46,10 +51,11 @@ class AbortInfo extends \Google\Protobuf\Internal\Message * Causes that the analysis is aborted. * @type string $resource_uri * URI of the resource that caused the abort. + * @type string $ip_address + * IP address that caused the abort. * @type array|\Google\Protobuf\Internal\RepeatedField $projects_missing_permission - * List of project IDs that the user has specified in the request but does - * not have permission to access network configs. Analysis is aborted in this - * case with the PERMISSION_DENIED cause. + * List of project IDs the user specified in the request but lacks access to. + * In this case, analysis is aborted with the PERMISSION_DENIED cause. * } */ public function __construct($data = NULL) { @@ -110,9 +116,34 @@ public function setResourceUri($var) } /** - * List of project IDs that the user has specified in the request but does - * not have permission to access network configs. Analysis is aborted in this - * case with the PERMISSION_DENIED cause. + * IP address that caused the abort. + * + * Generated from protobuf field string ip_address = 4 [(.google.api.field_info) = { + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * IP address that caused the abort. + * + * Generated from protobuf field string ip_address = 4 [(.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + + /** + * List of project IDs the user specified in the request but lacks access to. + * In this case, analysis is aborted with the PERMISSION_DENIED cause. * * Generated from protobuf field repeated string projects_missing_permission = 3; * @return \Google\Protobuf\Internal\RepeatedField @@ -123,9 +154,8 @@ public function getProjectsMissingPermission() } /** - * List of project IDs that the user has specified in the request but does - * not have permission to access network configs. Analysis is aborted in this - * case with the PERMISSION_DENIED cause. + * List of project IDs the user specified in the request but lacks access to. + * In this case, analysis is aborted with the PERMISSION_DENIED cause. * * Generated from protobuf field repeated string projects_missing_permission = 3; * @param array|\Google\Protobuf\Internal\RepeatedField $var diff --git a/NetworkManagement/src/V1/AbortInfo/Cause.php b/NetworkManagement/src/V1/AbortInfo/Cause.php index 2267edd13e36..4ad6af599b68 100644 --- a/NetworkManagement/src/V1/AbortInfo/Cause.php +++ b/NetworkManagement/src/V1/AbortInfo/Cause.php @@ -20,104 +20,128 @@ class Cause */ const CAUSE_UNSPECIFIED = 0; /** - * Aborted due to unknown network. - * The reachability analysis cannot proceed because the user does not have - * access to the host project's network configurations, including firewall - * rules and routes. This happens when the project is a service project and - * the endpoints being traced are in the host project's network. + * Aborted due to unknown network. Deprecated, not used in the new tests. * - * Generated from protobuf enum UNKNOWN_NETWORK = 1; + * Generated from protobuf enum UNKNOWN_NETWORK = 1 [deprecated = true]; */ const UNKNOWN_NETWORK = 1; /** - * Aborted because the IP address(es) are unknown. + * Aborted because no project information can be derived from the test + * input. Deprecated, not used in the new tests. * - * Generated from protobuf enum UNKNOWN_IP = 2; + * Generated from protobuf enum UNKNOWN_PROJECT = 3 [deprecated = true]; */ - const UNKNOWN_IP = 2; + const UNKNOWN_PROJECT = 3; /** - * Aborted because no project information can be derived from the test - * input. + * Aborted because traffic is sent from a public IP to an instance without + * an external IP. Deprecated, not used in the new tests. * - * Generated from protobuf enum UNKNOWN_PROJECT = 3; + * Generated from protobuf enum NO_EXTERNAL_IP = 7 [deprecated = true]; */ - const UNKNOWN_PROJECT = 3; + const NO_EXTERNAL_IP = 7; /** - * Aborted because the user lacks the permission to access all or part of - * the network configurations required to run the test. + * Aborted because none of the traces matches destination information + * specified in the input test request. Deprecated, not used in the new + * tests. * - * Generated from protobuf enum PERMISSION_DENIED = 4; + * Generated from protobuf enum UNINTENDED_DESTINATION = 8 [deprecated = true]; */ - const PERMISSION_DENIED = 4; + const UNINTENDED_DESTINATION = 8; /** - * Aborted because no valid source endpoint is derived from the input test - * request. + * Aborted because the source endpoint could not be found. Deprecated, not + * used in the new tests. * - * Generated from protobuf enum NO_SOURCE_LOCATION = 5; + * Generated from protobuf enum SOURCE_ENDPOINT_NOT_FOUND = 11 [deprecated = true]; */ - const NO_SOURCE_LOCATION = 5; + const SOURCE_ENDPOINT_NOT_FOUND = 11; /** - * Aborted because the source and/or destination endpoint specified in - * the test are invalid. The possible reasons that an endpoint is - * invalid include: malformed IP address; nonexistent instance or - * network URI; IP address not in the range of specified network URI; and - * instance not owning the network interface in the specified network. + * Aborted because the source network does not match the source endpoint. + * Deprecated, not used in the new tests. * - * Generated from protobuf enum INVALID_ARGUMENT = 6; + * Generated from protobuf enum MISMATCHED_SOURCE_NETWORK = 12 [deprecated = true]; */ - const INVALID_ARGUMENT = 6; + const MISMATCHED_SOURCE_NETWORK = 12; /** - * Aborted because traffic is sent from a public IP to an instance without - * an external IP. + * Aborted because the destination endpoint could not be found. Deprecated, + * not used in the new tests. * - * Generated from protobuf enum NO_EXTERNAL_IP = 7; + * Generated from protobuf enum DESTINATION_ENDPOINT_NOT_FOUND = 13 [deprecated = true]; */ - const NO_EXTERNAL_IP = 7; + const DESTINATION_ENDPOINT_NOT_FOUND = 13; /** - * Aborted because none of the traces matches destination information - * specified in the input test request. + * Aborted because the destination network does not match the destination + * endpoint. Deprecated, not used in the new tests. * - * Generated from protobuf enum UNINTENDED_DESTINATION = 8; + * Generated from protobuf enum MISMATCHED_DESTINATION_NETWORK = 14 [deprecated = true]; */ - const UNINTENDED_DESTINATION = 8; + const MISMATCHED_DESTINATION_NETWORK = 14; /** - * Aborted because the number of steps in the trace exceeding a certain - * limit which may be caused by routing loop. + * Aborted because no endpoint with the packet's destination IP address is + * found. * - * Generated from protobuf enum TRACE_TOO_LONG = 9; + * Generated from protobuf enum UNKNOWN_IP = 2; */ - const TRACE_TOO_LONG = 9; + const UNKNOWN_IP = 2; /** - * Aborted due to internal server error. + * Aborted because the source IP address doesn't belong to any of the + * subnets of the source VPC network. * - * Generated from protobuf enum INTERNAL_ERROR = 10; + * Generated from protobuf enum SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23; */ - const INTERNAL_ERROR = 10; + const SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23; /** - * Aborted because the source endpoint could not be found. + * Aborted because user lacks permission to access all or part of the + * network configurations required to run the test. * - * Generated from protobuf enum SOURCE_ENDPOINT_NOT_FOUND = 11; + * Generated from protobuf enum PERMISSION_DENIED = 4; */ - const SOURCE_ENDPOINT_NOT_FOUND = 11; + const PERMISSION_DENIED = 4; /** - * Aborted because the source network does not match the source endpoint. + * Aborted because user lacks permission to access Cloud NAT configs + * required to run the test. * - * Generated from protobuf enum MISMATCHED_SOURCE_NETWORK = 12; + * Generated from protobuf enum PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28; */ - const MISMATCHED_SOURCE_NETWORK = 12; + const PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28; /** - * Aborted because the destination endpoint could not be found. + * Aborted because user lacks permission to access Network endpoint group + * endpoint configs required to run the test. * - * Generated from protobuf enum DESTINATION_ENDPOINT_NOT_FOUND = 13; + * Generated from protobuf enum PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29; */ - const DESTINATION_ENDPOINT_NOT_FOUND = 13; + const PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29; /** - * Aborted because the destination network does not match the destination - * endpoint. + * Aborted because no valid source or destination endpoint is derived from + * the input test request. * - * Generated from protobuf enum MISMATCHED_DESTINATION_NETWORK = 14; + * Generated from protobuf enum NO_SOURCE_LOCATION = 5; */ - const MISMATCHED_DESTINATION_NETWORK = 14; + const NO_SOURCE_LOCATION = 5; + /** + * Aborted because the source or destination endpoint specified in + * the request is invalid. Some examples: + * - The request might contain malformed resource URI, project ID, or IP + * address. + * - The request might contain inconsistent information (for example, the + * request might include both the instance and the network, but the instance + * might not have a NIC in that network). + * + * Generated from protobuf enum INVALID_ARGUMENT = 6; + */ + const INVALID_ARGUMENT = 6; + /** + * Aborted because the number of steps in the trace exceeds a certain + * limit. It might be caused by a routing loop. + * + * Generated from protobuf enum TRACE_TOO_LONG = 9; + */ + const TRACE_TOO_LONG = 9; + /** + * Aborted due to internal server error. + * + * Generated from protobuf enum INTERNAL_ERROR = 10; + */ + const INTERNAL_ERROR = 10; /** * Aborted because the test scenario is not supported. * @@ -145,6 +169,30 @@ class Cause * Generated from protobuf enum RESOURCE_CONFIG_NOT_FOUND = 18; */ const RESOURCE_CONFIG_NOT_FOUND = 18; + /** + * Aborted because expected VM instance configuration was missing. + * + * Generated from protobuf enum VM_INSTANCE_CONFIG_NOT_FOUND = 24; + */ + const VM_INSTANCE_CONFIG_NOT_FOUND = 24; + /** + * Aborted because expected network configuration was missing. + * + * Generated from protobuf enum NETWORK_CONFIG_NOT_FOUND = 25; + */ + const NETWORK_CONFIG_NOT_FOUND = 25; + /** + * Aborted because expected firewall configuration was missing. + * + * Generated from protobuf enum FIREWALL_CONFIG_NOT_FOUND = 26; + */ + const FIREWALL_CONFIG_NOT_FOUND = 26; + /** + * Aborted because expected route configuration was missing. + * + * Generated from protobuf enum ROUTE_CONFIG_NOT_FOUND = 27; + */ + const ROUTE_CONFIG_NOT_FOUND = 27; /** * Aborted because a PSC endpoint selection for the Google-managed service * is ambiguous (several PSC endpoints satisfy test input). @@ -166,30 +214,60 @@ class Cause * Generated from protobuf enum SOURCE_FORWARDING_RULE_UNSUPPORTED = 21; */ const SOURCE_FORWARDING_RULE_UNSUPPORTED = 21; + /** + * Aborted because one of the endpoints is a non-routable IP address + * (loopback, link-local, etc). + * + * Generated from protobuf enum NON_ROUTABLE_IP_ADDRESS = 22; + */ + const NON_ROUTABLE_IP_ADDRESS = 22; + /** + * Aborted due to an unknown issue in the Google-managed project. + * + * Generated from protobuf enum UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30; + */ + const UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30; + /** + * Aborted due to an unsupported configuration of the Google-managed + * project. + * + * Generated from protobuf enum UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31; + */ + const UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31; private static $valueToName = [ self::CAUSE_UNSPECIFIED => 'CAUSE_UNSPECIFIED', self::UNKNOWN_NETWORK => 'UNKNOWN_NETWORK', - self::UNKNOWN_IP => 'UNKNOWN_IP', self::UNKNOWN_PROJECT => 'UNKNOWN_PROJECT', - self::PERMISSION_DENIED => 'PERMISSION_DENIED', - self::NO_SOURCE_LOCATION => 'NO_SOURCE_LOCATION', - self::INVALID_ARGUMENT => 'INVALID_ARGUMENT', self::NO_EXTERNAL_IP => 'NO_EXTERNAL_IP', self::UNINTENDED_DESTINATION => 'UNINTENDED_DESTINATION', - self::TRACE_TOO_LONG => 'TRACE_TOO_LONG', - self::INTERNAL_ERROR => 'INTERNAL_ERROR', self::SOURCE_ENDPOINT_NOT_FOUND => 'SOURCE_ENDPOINT_NOT_FOUND', self::MISMATCHED_SOURCE_NETWORK => 'MISMATCHED_SOURCE_NETWORK', self::DESTINATION_ENDPOINT_NOT_FOUND => 'DESTINATION_ENDPOINT_NOT_FOUND', self::MISMATCHED_DESTINATION_NETWORK => 'MISMATCHED_DESTINATION_NETWORK', + self::UNKNOWN_IP => 'UNKNOWN_IP', + self::SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK => 'SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK', + self::PERMISSION_DENIED => 'PERMISSION_DENIED', + self::PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS => 'PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS', + self::PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS => 'PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS', + self::NO_SOURCE_LOCATION => 'NO_SOURCE_LOCATION', + self::INVALID_ARGUMENT => 'INVALID_ARGUMENT', + self::TRACE_TOO_LONG => 'TRACE_TOO_LONG', + self::INTERNAL_ERROR => 'INTERNAL_ERROR', self::UNSUPPORTED => 'UNSUPPORTED', self::MISMATCHED_IP_VERSION => 'MISMATCHED_IP_VERSION', self::GKE_KONNECTIVITY_PROXY_UNSUPPORTED => 'GKE_KONNECTIVITY_PROXY_UNSUPPORTED', self::RESOURCE_CONFIG_NOT_FOUND => 'RESOURCE_CONFIG_NOT_FOUND', + self::VM_INSTANCE_CONFIG_NOT_FOUND => 'VM_INSTANCE_CONFIG_NOT_FOUND', + self::NETWORK_CONFIG_NOT_FOUND => 'NETWORK_CONFIG_NOT_FOUND', + self::FIREWALL_CONFIG_NOT_FOUND => 'FIREWALL_CONFIG_NOT_FOUND', + self::ROUTE_CONFIG_NOT_FOUND => 'ROUTE_CONFIG_NOT_FOUND', self::GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT => 'GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT', self::SOURCE_PSC_CLOUD_SQL_UNSUPPORTED => 'SOURCE_PSC_CLOUD_SQL_UNSUPPORTED', self::SOURCE_FORWARDING_RULE_UNSUPPORTED => 'SOURCE_FORWARDING_RULE_UNSUPPORTED', + self::NON_ROUTABLE_IP_ADDRESS => 'NON_ROUTABLE_IP_ADDRESS', + self::UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT => 'UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT', + self::UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG => 'UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG', ]; public static function name($value) diff --git a/NetworkManagement/src/V1/ConnectivityTest.php b/NetworkManagement/src/V1/ConnectivityTest.php index 099919eb49e3..b66913a23271 100644 --- a/NetworkManagement/src/V1/ConnectivityTest.php +++ b/NetworkManagement/src/V1/ConnectivityTest.php @@ -17,7 +17,7 @@ class ConnectivityTest extends \Google\Protobuf\Internal\Message { /** * Required. Unique name of the resource using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test}` + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; */ @@ -124,6 +124,13 @@ class ConnectivityTest extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.networkmanagement.v1.ProbingDetails probing_details = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $probing_details = null; + /** + * Whether the test should skip firewall checking. + * If not provided, we assume false. + * + * Generated from protobuf field bool bypass_firewall_checks = 17; + */ + private $bypass_firewall_checks = false; /** * Constructor. @@ -133,7 +140,7 @@ class ConnectivityTest extends \Google\Protobuf\Internal\Message * * @type string $name * Required. Unique name of the resource using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test}` + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` * @type string $description * The user-supplied description of the Connectivity Test. * Maximum of 512 characters. @@ -192,6 +199,9 @@ class ConnectivityTest extends \Google\Protobuf\Internal\Message * for applicable tests only. The details are updated when creating a new * test, updating an existing test, or triggering a one-time rerun of an * existing test. + * @type bool $bypass_firewall_checks + * Whether the test should skip firewall checking. + * If not provided, we assume false. * } */ public function __construct($data = NULL) { @@ -201,7 +211,7 @@ public function __construct($data = NULL) { /** * Required. Unique name of the resource using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test}` + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -213,7 +223,7 @@ public function getName() /** * Required. Unique name of the resource using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test}` + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; * @param string $var @@ -645,5 +655,33 @@ public function setProbingDetails($var) return $this; } + /** + * Whether the test should skip firewall checking. + * If not provided, we assume false. + * + * Generated from protobuf field bool bypass_firewall_checks = 17; + * @return bool + */ + public function getBypassFirewallChecks() + { + return $this->bypass_firewall_checks; + } + + /** + * Whether the test should skip firewall checking. + * If not provided, we assume false. + * + * Generated from protobuf field bool bypass_firewall_checks = 17; + * @param bool $var + * @return $this + */ + public function setBypassFirewallChecks($var) + { + GPBUtil::checkBool($var); + $this->bypass_firewall_checks = $var; + + return $this; + } + } diff --git a/NetworkManagement/src/V1/DeliverInfo.php b/NetworkManagement/src/V1/DeliverInfo.php index 155568b2c510..0db79fde2603 100644 --- a/NetworkManagement/src/V1/DeliverInfo.php +++ b/NetworkManagement/src/V1/DeliverInfo.php @@ -27,6 +27,12 @@ class DeliverInfo extends \Google\Protobuf\Internal\Message * Generated from protobuf field string resource_uri = 2; */ private $resource_uri = ''; + /** + * IP address of the target (if applicable). + * + * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { + */ + private $ip_address = ''; /** * Constructor. @@ -38,6 +44,8 @@ class DeliverInfo extends \Google\Protobuf\Internal\Message * Target type where the packet is delivered to. * @type string $resource_uri * URI of the resource that the packet is delivered to. + * @type string $ip_address + * IP address of the target (if applicable). * } */ public function __construct($data = NULL) { @@ -97,5 +105,31 @@ public function setResourceUri($var) return $this; } + /** + * IP address of the target (if applicable). + * + * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * IP address of the target (if applicable). + * + * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + } diff --git a/NetworkManagement/src/V1/DeliverInfo/Target.php b/NetworkManagement/src/V1/DeliverInfo/Target.php index 79d3c14e06c7..9f2f8e775efb 100644 --- a/NetworkManagement/src/V1/DeliverInfo/Target.php +++ b/NetworkManagement/src/V1/DeliverInfo/Target.php @@ -82,6 +82,30 @@ class Target * Generated from protobuf enum STORAGE_BUCKET = 10; */ const STORAGE_BUCKET = 10; + /** + * Target is a private network. Used only for return traces. + * + * Generated from protobuf enum PRIVATE_NETWORK = 11; + */ + const PRIVATE_NETWORK = 11; + /** + * Target is a Cloud Function. Used only for return traces. + * + * Generated from protobuf enum CLOUD_FUNCTION = 12; + */ + const CLOUD_FUNCTION = 12; + /** + * Target is a App Engine service version. Used only for return traces. + * + * Generated from protobuf enum APP_ENGINE_VERSION = 13; + */ + const APP_ENGINE_VERSION = 13; + /** + * Target is a Cloud Run revision. Used only for return traces. + * + * Generated from protobuf enum CLOUD_RUN_REVISION = 14; + */ + const CLOUD_RUN_REVISION = 14; private static $valueToName = [ self::TARGET_UNSPECIFIED => 'TARGET_UNSPECIFIED', @@ -95,6 +119,10 @@ class Target self::PSC_VPC_SC => 'PSC_VPC_SC', self::SERVERLESS_NEG => 'SERVERLESS_NEG', self::STORAGE_BUCKET => 'STORAGE_BUCKET', + self::PRIVATE_NETWORK => 'PRIVATE_NETWORK', + self::CLOUD_FUNCTION => 'CLOUD_FUNCTION', + self::APP_ENGINE_VERSION => 'APP_ENGINE_VERSION', + self::CLOUD_RUN_REVISION => 'CLOUD_RUN_REVISION', ]; public static function name($value) diff --git a/NetworkManagement/src/V1/DropInfo.php b/NetworkManagement/src/V1/DropInfo.php index b6c769a9e020..7c242bb56e5c 100644 --- a/NetworkManagement/src/V1/DropInfo.php +++ b/NetworkManagement/src/V1/DropInfo.php @@ -27,6 +27,24 @@ class DropInfo extends \Google\Protobuf\Internal\Message * Generated from protobuf field string resource_uri = 2; */ private $resource_uri = ''; + /** + * Source IP address of the dropped packet (if relevant). + * + * Generated from protobuf field string source_ip = 3; + */ + private $source_ip = ''; + /** + * Destination IP address of the dropped packet (if relevant). + * + * Generated from protobuf field string destination_ip = 4; + */ + private $destination_ip = ''; + /** + * Region of the dropped packet (if relevant). + * + * Generated from protobuf field string region = 5; + */ + private $region = ''; /** * Constructor. @@ -38,6 +56,12 @@ class DropInfo extends \Google\Protobuf\Internal\Message * Cause that the packet is dropped. * @type string $resource_uri * URI of the resource that caused the drop. + * @type string $source_ip + * Source IP address of the dropped packet (if relevant). + * @type string $destination_ip + * Destination IP address of the dropped packet (if relevant). + * @type string $region + * Region of the dropped packet (if relevant). * } */ public function __construct($data = NULL) { @@ -97,5 +121,83 @@ public function setResourceUri($var) return $this; } + /** + * Source IP address of the dropped packet (if relevant). + * + * Generated from protobuf field string source_ip = 3; + * @return string + */ + public function getSourceIp() + { + return $this->source_ip; + } + + /** + * Source IP address of the dropped packet (if relevant). + * + * Generated from protobuf field string source_ip = 3; + * @param string $var + * @return $this + */ + public function setSourceIp($var) + { + GPBUtil::checkString($var, True); + $this->source_ip = $var; + + return $this; + } + + /** + * Destination IP address of the dropped packet (if relevant). + * + * Generated from protobuf field string destination_ip = 4; + * @return string + */ + public function getDestinationIp() + { + return $this->destination_ip; + } + + /** + * Destination IP address of the dropped packet (if relevant). + * + * Generated from protobuf field string destination_ip = 4; + * @param string $var + * @return $this + */ + public function setDestinationIp($var) + { + GPBUtil::checkString($var, True); + $this->destination_ip = $var; + + return $this; + } + + /** + * Region of the dropped packet (if relevant). + * + * Generated from protobuf field string region = 5; + * @return string + */ + public function getRegion() + { + return $this->region; + } + + /** + * Region of the dropped packet (if relevant). + * + * Generated from protobuf field string region = 5; + * @param string $var + * @return $this + */ + public function setRegion($var) + { + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + } diff --git a/NetworkManagement/src/V1/DropInfo/Cause.php b/NetworkManagement/src/V1/DropInfo/Cause.php index bd07f7b1f235..ea2af29e0c9d 100644 --- a/NetworkManagement/src/V1/DropInfo/Cause.php +++ b/NetworkManagement/src/V1/DropInfo/Cause.php @@ -42,7 +42,7 @@ class Cause */ const FIREWALL_RULE = 3; /** - * Dropped due to no routes. + * Dropped due to no matching routes. * * Generated from protobuf enum NO_ROUTE = 4; */ @@ -56,11 +56,73 @@ class Cause /** * Packet is sent to a wrong (unintended) network. Example: you trace a * packet from VM1:Network1 to VM2:Network2, however, the route configured - * in Network1 sends the packet destined for VM2's IP addresss to Network3. + * in Network1 sends the packet destined for VM2's IP address to Network3. * * Generated from protobuf enum ROUTE_WRONG_NETWORK = 6; */ const ROUTE_WRONG_NETWORK = 6; + /** + * Route's next hop IP address cannot be resolved to a GCP resource. + * + * Generated from protobuf enum ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42; + */ + const ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42; + /** + * Route's next hop resource is not found. + * + * Generated from protobuf enum ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43; + */ + const ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43; + /** + * Route's next hop instance doesn't have a NIC in the route's network. + * + * Generated from protobuf enum ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49; + */ + const ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49; + /** + * Route's next hop IP address is not a primary IP address of the next hop + * instance. + * + * Generated from protobuf enum ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50; + */ + const ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50; + /** + * Route's next hop forwarding rule doesn't match next hop IP address. + * + * Generated from protobuf enum ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51; + */ + const ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51; + /** + * Route's next hop VPN tunnel is down (does not have valid IKE SAs). + * + * Generated from protobuf enum ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52; + */ + const ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52; + /** + * Route's next hop forwarding rule type is invalid (it's not a forwarding + * rule of the internal passthrough load balancer). + * + * Generated from protobuf enum ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53; + */ + const ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53; + /** + * Packet is sent from the Internet to the private IPv6 address. + * + * Generated from protobuf enum NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44; + */ + const NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44; + /** + * The packet does not match a policy-based VPN tunnel local selector. + * + * Generated from protobuf enum VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45; + */ + const VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45; + /** + * The packet does not match a policy-based VPN tunnel remote selector. + * + * Generated from protobuf enum VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46; + */ + const VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46; /** * Packet with internal destination address sent to the internet gateway. * @@ -69,11 +131,19 @@ class Cause const PRIVATE_TRAFFIC_TO_INTERNET = 7; /** * Instance with only an internal IP address tries to access Google API and - * services, but private Google access is not enabled. + * services, but private Google access is not enabled in the subnet. * * Generated from protobuf enum PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; */ const PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; + /** + * Source endpoint tries to access Google API and services through the VPN + * tunnel to another network, but Private Google Access needs to be enabled + * in the source endpoint network. + * + * Generated from protobuf enum PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47; + */ + const PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47; /** * Instance with only an internal IP address tries to access external hosts, * but Cloud NAT is not enabled in the subnet, unless special configurations @@ -97,13 +167,6 @@ class Cause * Generated from protobuf enum FORWARDING_RULE_MISMATCH = 11; */ const FORWARDING_RULE_MISMATCH = 11; - /** - * Packet could be dropped because it was sent from a different region - * to a regional forwarding without global access. - * - * Generated from protobuf enum FORWARDING_RULE_REGION_MISMATCH = 25; - */ - const FORWARDING_RULE_REGION_MISMATCH = 25; /** * Forwarding rule does not have backends configured. * @@ -268,6 +331,13 @@ class Cause * Generated from protobuf enum VPC_CONNECTOR_NOT_RUNNING = 24; */ const VPC_CONNECTOR_NOT_RUNNING = 24; + /** + * Packet could be dropped because it was sent from a different region + * to a regional forwarding without global access. + * + * Generated from protobuf enum FORWARDING_RULE_REGION_MISMATCH = 25; + */ + const FORWARDING_RULE_REGION_MISMATCH = 25; /** * The Private Service Connect endpoint is in a project that is not approved * to connect to the service. @@ -275,6 +345,59 @@ class Cause * Generated from protobuf enum PSC_CONNECTION_NOT_ACCEPTED = 26; */ const PSC_CONNECTION_NOT_ACCEPTED = 26; + /** + * The packet is sent to the Private Service Connect endpoint over the + * peering, but [it's not + * supported](https://cloud.google.com/vpc/docs/configure-private-service-connect-services#on-premises). + * + * Generated from protobuf enum PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41; + */ + const PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41; + /** + * The packet is sent to the Private Service Connect backend (network + * endpoint group), but the producer PSC forwarding rule does not have + * global access enabled. + * + * Generated from protobuf enum PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48; + */ + const PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48; + /** + * The packet is sent to the Private Service Connect backend (network + * endpoint group), but the producer PSC forwarding rule has multiple ports + * specified. + * + * Generated from protobuf enum PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54; + */ + const PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54; + /** + * The packet is sent to the Private Service Connect backend (network + * endpoint group) targeting a Cloud SQL service attachment, but this + * configuration is not supported. + * + * Generated from protobuf enum CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58; + */ + const CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58; + /** + * No NAT subnets are defined for the PSC service attachment. + * + * Generated from protobuf enum NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57; + */ + const NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57; + /** + * The packet sent from the hybrid NEG proxy matches a non-dynamic route, + * but such a configuration is not supported. + * + * Generated from protobuf enum HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55; + */ + const HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55; + /** + * The packet sent from the hybrid NEG proxy matches a dynamic route with a + * next hop in a different region, but such a configuration is not + * supported. + * + * Generated from protobuf enum HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56; + */ + const HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56; /** * Packet sent from a Cloud Run revision that is not ready. * @@ -294,6 +417,18 @@ class Cause * Generated from protobuf enum LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39; */ const LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39; + /** + * Packet sent to Cloud Nat without active NAT IPs. + * + * Generated from protobuf enum CLOUD_NAT_NO_ADDRESSES = 40; + */ + const CLOUD_NAT_NO_ADDRESSES = 40; + /** + * Packet is stuck in a routing loop. + * + * Generated from protobuf enum ROUTING_LOOP = 59; + */ + const ROUTING_LOOP = 59; private static $valueToName = [ self::CAUSE_UNSPECIFIED => 'CAUSE_UNSPECIFIED', @@ -303,12 +438,22 @@ class Cause self::NO_ROUTE => 'NO_ROUTE', self::ROUTE_BLACKHOLE => 'ROUTE_BLACKHOLE', self::ROUTE_WRONG_NETWORK => 'ROUTE_WRONG_NETWORK', + self::ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED => 'ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED', + self::ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND => 'ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND', + self::ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK => 'ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK', + self::ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP => 'ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP', + self::ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH => 'ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH', + self::ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED => 'ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED', + self::ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID => 'ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID', + self::NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS => 'NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS', + self::VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH => 'VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH', + self::VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH => 'VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH', self::PRIVATE_TRAFFIC_TO_INTERNET => 'PRIVATE_TRAFFIC_TO_INTERNET', self::PRIVATE_GOOGLE_ACCESS_DISALLOWED => 'PRIVATE_GOOGLE_ACCESS_DISALLOWED', + self::PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED => 'PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED', self::NO_EXTERNAL_ADDRESS => 'NO_EXTERNAL_ADDRESS', self::UNKNOWN_INTERNAL_ADDRESS => 'UNKNOWN_INTERNAL_ADDRESS', self::FORWARDING_RULE_MISMATCH => 'FORWARDING_RULE_MISMATCH', - self::FORWARDING_RULE_REGION_MISMATCH => 'FORWARDING_RULE_REGION_MISMATCH', self::FORWARDING_RULE_NO_INSTANCES => 'FORWARDING_RULE_NO_INSTANCES', self::FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK => 'FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK', self::INSTANCE_NOT_RUNNING => 'INSTANCE_NOT_RUNNING', @@ -332,10 +477,20 @@ class Cause self::CLOUD_FUNCTION_NOT_ACTIVE => 'CLOUD_FUNCTION_NOT_ACTIVE', self::VPC_CONNECTOR_NOT_SET => 'VPC_CONNECTOR_NOT_SET', self::VPC_CONNECTOR_NOT_RUNNING => 'VPC_CONNECTOR_NOT_RUNNING', + self::FORWARDING_RULE_REGION_MISMATCH => 'FORWARDING_RULE_REGION_MISMATCH', self::PSC_CONNECTION_NOT_ACCEPTED => 'PSC_CONNECTION_NOT_ACCEPTED', + self::PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK => 'PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK', + self::PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS => 'PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS', + self::PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS => 'PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS', + self::CLOUD_SQL_PSC_NEG_UNSUPPORTED => 'CLOUD_SQL_PSC_NEG_UNSUPPORTED', + self::NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT => 'NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT', + self::HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED => 'HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED', + self::HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED => 'HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED', self::CLOUD_RUN_REVISION_NOT_READY => 'CLOUD_RUN_REVISION_NOT_READY', self::DROPPED_INSIDE_PSC_SERVICE_PRODUCER => 'DROPPED_INSIDE_PSC_SERVICE_PRODUCER', self::LOAD_BALANCER_HAS_NO_PROXY_SUBNET => 'LOAD_BALANCER_HAS_NO_PROXY_SUBNET', + self::CLOUD_NAT_NO_ADDRESSES => 'CLOUD_NAT_NO_ADDRESSES', + self::ROUTING_LOOP => 'ROUTING_LOOP', ]; public static function name($value) diff --git a/NetworkManagement/src/V1/Endpoint.php b/NetworkManagement/src/V1/Endpoint.php index 4b1566524ae0..7dea81ef5bac 100644 --- a/NetworkManagement/src/V1/Endpoint.php +++ b/NetworkManagement/src/V1/Endpoint.php @@ -17,9 +17,6 @@ class Endpoint extends \Google\Protobuf\Internal\Message { /** * The IP address of the endpoint, which can be an external or internal IP. - * An IPv6 address is only allowed when the test's destination is a - * [global load balancer - * VIP](https://cloud.google.com/load-balancing/docs/load-balancing-overview). * * Generated from protobuf field string ip_address = 1; */ @@ -137,9 +134,6 @@ class Endpoint extends \Google\Protobuf\Internal\Message * * @type string $ip_address * The IP address of the endpoint, which can be an external or internal IP. - * An IPv6 address is only allowed when the test's destination is a - * [global load balancer - * VIP](https://cloud.google.com/load-balancing/docs/load-balancing-overview). * @type int $port * The IP protocol port of the endpoint. * Only applicable when protocol is TCP or UDP. @@ -197,9 +191,6 @@ public function __construct($data = NULL) { /** * The IP address of the endpoint, which can be an external or internal IP. - * An IPv6 address is only allowed when the test's destination is a - * [global load balancer - * VIP](https://cloud.google.com/load-balancing/docs/load-balancing-overview). * * Generated from protobuf field string ip_address = 1; * @return string @@ -211,9 +202,6 @@ public function getIpAddress() /** * The IP address of the endpoint, which can be an external or internal IP. - * An IPv6 address is only allowed when the test's destination is a - * [global load balancer - * VIP](https://cloud.google.com/load-balancing/docs/load-balancing-overview). * * Generated from protobuf field string ip_address = 1; * @param string $var diff --git a/NetworkManagement/src/V1/FirewallInfo.php b/NetworkManagement/src/V1/FirewallInfo.php index 8b0de490b084..ff173ddc6107 100644 --- a/NetworkManagement/src/V1/FirewallInfo.php +++ b/NetworkManagement/src/V1/FirewallInfo.php @@ -37,7 +37,7 @@ class FirewallInfo extends \Google\Protobuf\Internal\Message */ private $direction = ''; /** - * Possible values: ALLOW, DENY + * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP * * Generated from protobuf field string action = 4; */ @@ -97,7 +97,7 @@ class FirewallInfo extends \Google\Protobuf\Internal\Message * @type string $direction * Possible values: INGRESS, EGRESS * @type string $action - * Possible values: ALLOW, DENY + * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP * @type int $priority * The priority of the firewall rule. * @type string $network_uri @@ -203,7 +203,7 @@ public function setDirection($var) } /** - * Possible values: ALLOW, DENY + * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP * * Generated from protobuf field string action = 4; * @return string @@ -214,7 +214,7 @@ public function getAction() } /** - * Possible values: ALLOW, DENY + * Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP * * Generated from protobuf field string action = 4; * @param string $var diff --git a/NetworkManagement/src/V1/FirewallInfo/FirewallRuleType.php b/NetworkManagement/src/V1/FirewallInfo/FirewallRuleType.php index 50c782e97ab2..e5afede198bd 100644 --- a/NetworkManagement/src/V1/FirewallInfo/FirewallRuleType.php +++ b/NetworkManagement/src/V1/FirewallInfo/FirewallRuleType.php @@ -68,6 +68,24 @@ class FirewallRuleType * Generated from protobuf enum NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6; */ const NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6; + /** + * Firewall policy rule containing attributes not yet supported in + * Connectivity tests. Firewall analysis is skipped if such a rule can + * potentially be matched. Please see the [list of unsupported + * configurations](https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs). + * + * Generated from protobuf enum UNSUPPORTED_FIREWALL_POLICY_RULE = 100; + */ + const UNSUPPORTED_FIREWALL_POLICY_RULE = 100; + /** + * Tracking state for response traffic created when request traffic goes + * through allow firewall rule. + * For details, see [firewall rules + * specifications](https://cloud.google.com/firewall/docs/firewalls#specifications) + * + * Generated from protobuf enum TRACKING_STATE = 101; + */ + const TRACKING_STATE = 101; private static $valueToName = [ self::FIREWALL_RULE_TYPE_UNSPECIFIED => 'FIREWALL_RULE_TYPE_UNSPECIFIED', @@ -77,6 +95,8 @@ class FirewallRuleType self::SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE => 'SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE', self::NETWORK_FIREWALL_POLICY_RULE => 'NETWORK_FIREWALL_POLICY_RULE', self::NETWORK_REGIONAL_FIREWALL_POLICY_RULE => 'NETWORK_REGIONAL_FIREWALL_POLICY_RULE', + self::UNSUPPORTED_FIREWALL_POLICY_RULE => 'UNSUPPORTED_FIREWALL_POLICY_RULE', + self::TRACKING_STATE => 'TRACKING_STATE', ]; public static function name($value) diff --git a/NetworkManagement/src/V1/ForwardInfo.php b/NetworkManagement/src/V1/ForwardInfo.php index 60f29d92b909..4cf237f2a403 100644 --- a/NetworkManagement/src/V1/ForwardInfo.php +++ b/NetworkManagement/src/V1/ForwardInfo.php @@ -27,6 +27,12 @@ class ForwardInfo extends \Google\Protobuf\Internal\Message * Generated from protobuf field string resource_uri = 2; */ private $resource_uri = ''; + /** + * IP address of the target (if applicable). + * + * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { + */ + private $ip_address = ''; /** * Constructor. @@ -38,6 +44,8 @@ class ForwardInfo extends \Google\Protobuf\Internal\Message * Target type where this packet is forwarded to. * @type string $resource_uri * URI of the resource that the packet is forwarded to. + * @type string $ip_address + * IP address of the target (if applicable). * } */ public function __construct($data = NULL) { @@ -97,5 +105,31 @@ public function setResourceUri($var) return $this; } + /** + * IP address of the target (if applicable). + * + * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * IP address of the target (if applicable). + * + * Generated from protobuf field string ip_address = 3 [(.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + } diff --git a/NetworkManagement/src/V1/ForwardInfo/Target.php b/NetworkManagement/src/V1/ForwardInfo/Target.php index fd7f27fd004b..69e484be4b27 100644 --- a/NetworkManagement/src/V1/ForwardInfo/Target.php +++ b/NetworkManagement/src/V1/ForwardInfo/Target.php @@ -40,7 +40,7 @@ class Target /** * Forwarded to a Google Kubernetes Engine Container cluster master. * - * Generated from protobuf enum GKE_MASTER = 4; + * Generated from protobuf enum GKE_MASTER = 4 [deprecated = true]; */ const GKE_MASTER = 4; /** @@ -52,7 +52,7 @@ class Target /** * Forwarded to a Cloud SQL instance. * - * Generated from protobuf enum CLOUD_SQL_INSTANCE = 6; + * Generated from protobuf enum CLOUD_SQL_INSTANCE = 6 [deprecated = true]; */ const CLOUD_SQL_INSTANCE = 6; /** @@ -67,6 +67,12 @@ class Target * Generated from protobuf enum NCC_HUB = 8; */ const NCC_HUB = 8; + /** + * Forwarded to a router appliance. + * + * Generated from protobuf enum ROUTER_APPLIANCE = 9; + */ + const ROUTER_APPLIANCE = 9; private static $valueToName = [ self::TARGET_UNSPECIFIED => 'TARGET_UNSPECIFIED', @@ -78,6 +84,7 @@ class Target self::CLOUD_SQL_INSTANCE => 'CLOUD_SQL_INSTANCE', self::ANOTHER_PROJECT => 'ANOTHER_PROJECT', self::NCC_HUB => 'NCC_HUB', + self::ROUTER_APPLIANCE => 'ROUTER_APPLIANCE', ]; public static function name($value) diff --git a/NetworkManagement/src/V1/GoogleServiceInfo/GoogleServiceType.php b/NetworkManagement/src/V1/GoogleServiceInfo/GoogleServiceType.php index 8952beb2ebae..0b9d95f8e71d 100644 --- a/NetworkManagement/src/V1/GoogleServiceInfo/GoogleServiceType.php +++ b/NetworkManagement/src/V1/GoogleServiceInfo/GoogleServiceType.php @@ -14,7 +14,7 @@ class GoogleServiceType { /** - * Unspecified Google Service. Includes most of Google APIs and services. + * Unspecified Google Service. * * Generated from protobuf enum GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0; */ @@ -44,12 +44,35 @@ class GoogleServiceType * Generated from protobuf enum CLOUD_DNS = 3; */ const CLOUD_DNS = 3; + /** + * private.googleapis.com and restricted.googleapis.com + * + * Generated from protobuf enum GOOGLE_API = 4; + */ + const GOOGLE_API = 4; + /** + * Google API via Private Service Connect. + * https://cloud.google.com/vpc/docs/configure-private-service-connect-apis + * + * Generated from protobuf enum GOOGLE_API_PSC = 5; + */ + const GOOGLE_API_PSC = 5; + /** + * Google API via VPC Service Controls. + * https://cloud.google.com/vpc/docs/configure-private-service-connect-apis + * + * Generated from protobuf enum GOOGLE_API_VPC_SC = 6; + */ + const GOOGLE_API_VPC_SC = 6; private static $valueToName = [ self::GOOGLE_SERVICE_TYPE_UNSPECIFIED => 'GOOGLE_SERVICE_TYPE_UNSPECIFIED', self::IAP => 'IAP', self::GFE_PROXY_OR_HEALTH_CHECK_PROBER => 'GFE_PROXY_OR_HEALTH_CHECK_PROBER', self::CLOUD_DNS => 'CLOUD_DNS', + self::GOOGLE_API => 'GOOGLE_API', + self::GOOGLE_API_PSC => 'GOOGLE_API_PSC', + self::GOOGLE_API_VPC_SC => 'GOOGLE_API_VPC_SC', ]; public static function name($value) diff --git a/NetworkManagement/src/V1/LoadBalancerBackendInfo.php b/NetworkManagement/src/V1/LoadBalancerBackendInfo.php index 54a6e4a71743..af3cbff5cd2c 100644 --- a/NetworkManagement/src/V1/LoadBalancerBackendInfo.php +++ b/NetworkManagement/src/V1/LoadBalancerBackendInfo.php @@ -74,11 +74,11 @@ class LoadBalancerBackendInfo extends \Google\Protobuf\Internal\Message */ private $health_check_uri = ''; /** - * Health check firewalls configuration state for the backend. This is a - * result of the static firewall analysis (verifying that health check traffic - * from required IP ranges to the backend is allowed or not). The backend - * might still be unhealthy even if these firewalls are configured. Please - * refer to the documentation for more information: + * Output only. Health check firewalls configuration state for the backend. + * This is a result of the static firewall analysis (verifying that health + * check traffic from required IP ranges to the backend is allowed or not). + * The backend might still be unhealthy even if these firewalls are + * configured. Please refer to the documentation for more information: * https://cloud.google.com/load-balancing/docs/firewall-rules * * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState health_check_firewalls_config_state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -114,11 +114,11 @@ class LoadBalancerBackendInfo extends \Google\Protobuf\Internal\Message * @type string $health_check_uri * URI of the health check attached to this backend (if applicable). * @type int $health_check_firewalls_config_state - * Health check firewalls configuration state for the backend. This is a - * result of the static firewall analysis (verifying that health check traffic - * from required IP ranges to the backend is allowed or not). The backend - * might still be unhealthy even if these firewalls are configured. Please - * refer to the documentation for more information: + * Output only. Health check firewalls configuration state for the backend. + * This is a result of the static firewall analysis (verifying that health + * check traffic from required IP ranges to the backend is allowed or not). + * The backend might still be unhealthy even if these firewalls are + * configured. Please refer to the documentation for more information: * https://cloud.google.com/load-balancing/docs/firewall-rules * } */ @@ -370,11 +370,11 @@ public function setHealthCheckUri($var) } /** - * Health check firewalls configuration state for the backend. This is a - * result of the static firewall analysis (verifying that health check traffic - * from required IP ranges to the backend is allowed or not). The backend - * might still be unhealthy even if these firewalls are configured. Please - * refer to the documentation for more information: + * Output only. Health check firewalls configuration state for the backend. + * This is a result of the static firewall analysis (verifying that health + * check traffic from required IP ranges to the backend is allowed or not). + * The backend might still be unhealthy even if these firewalls are + * configured. Please refer to the documentation for more information: * https://cloud.google.com/load-balancing/docs/firewall-rules * * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState health_check_firewalls_config_state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -386,11 +386,11 @@ public function getHealthCheckFirewallsConfigState() } /** - * Health check firewalls configuration state for the backend. This is a - * result of the static firewall analysis (verifying that health check traffic - * from required IP ranges to the backend is allowed or not). The backend - * might still be unhealthy even if these firewalls are configured. Please - * refer to the documentation for more information: + * Output only. Health check firewalls configuration state for the backend. + * This is a result of the static firewall analysis (verifying that health + * check traffic from required IP ranges to the backend is allowed or not). + * The backend might still be unhealthy even if these firewalls are + * configured. Please refer to the documentation for more information: * https://cloud.google.com/load-balancing/docs/firewall-rules * * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState health_check_firewalls_config_state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/NetworkManagement/src/V1/LoadBalancerInfo.php b/NetworkManagement/src/V1/LoadBalancerInfo.php index 1ed7cec9ee28..f659cf4cadb4 100644 --- a/NetworkManagement/src/V1/LoadBalancerInfo.php +++ b/NetworkManagement/src/V1/LoadBalancerInfo.php @@ -22,11 +22,14 @@ class LoadBalancerInfo extends \Google\Protobuf\Internal\Message */ private $load_balancer_type = 0; /** - * URI of the health check for the load balancer. + * URI of the health check for the load balancer. Deprecated and no longer + * populated as different load balancer backends might have different health + * checks. * - * Generated from protobuf field string health_check_uri = 2; + * Generated from protobuf field string health_check_uri = 2 [deprecated = true]; + * @deprecated */ - private $health_check_uri = ''; + protected $health_check_uri = ''; /** * Information for the loadbalancer backends. * @@ -55,7 +58,9 @@ class LoadBalancerInfo extends \Google\Protobuf\Internal\Message * @type int $load_balancer_type * Type of the load balancer. * @type string $health_check_uri - * URI of the health check for the load balancer. + * URI of the health check for the load balancer. Deprecated and no longer + * populated as different load balancer backends might have different health + * checks. * @type array<\Google\Cloud\NetworkManagement\V1\LoadBalancerBackend>|\Google\Protobuf\Internal\RepeatedField $backends * Information for the loadbalancer backends. * @type int $backend_type @@ -96,25 +101,33 @@ public function setLoadBalancerType($var) } /** - * URI of the health check for the load balancer. + * URI of the health check for the load balancer. Deprecated and no longer + * populated as different load balancer backends might have different health + * checks. * - * Generated from protobuf field string health_check_uri = 2; + * Generated from protobuf field string health_check_uri = 2 [deprecated = true]; * @return string + * @deprecated */ public function getHealthCheckUri() { + @trigger_error('health_check_uri is deprecated.', E_USER_DEPRECATED); return $this->health_check_uri; } /** - * URI of the health check for the load balancer. + * URI of the health check for the load balancer. Deprecated and no longer + * populated as different load balancer backends might have different health + * checks. * - * Generated from protobuf field string health_check_uri = 2; + * Generated from protobuf field string health_check_uri = 2 [deprecated = true]; * @param string $var * @return $this + * @deprecated */ public function setHealthCheckUri($var) { + @trigger_error('health_check_uri is deprecated.', E_USER_DEPRECATED); GPBUtil::checkString($var, True); $this->health_check_uri = $var; diff --git a/NetworkManagement/src/V1/ReachabilityDetails/Result.php b/NetworkManagement/src/V1/ReachabilityDetails/Result.php index 997974bb8096..636d1d443fe9 100644 --- a/NetworkManagement/src/V1/ReachabilityDetails/Result.php +++ b/NetworkManagement/src/V1/ReachabilityDetails/Result.php @@ -41,7 +41,9 @@ class Result * The source and destination endpoints do not uniquely identify * the test location in the network, and the reachability result contains * multiple traces. For some traces, a packet could be delivered, and for - * others, it would not be. + * others, it would not be. This result is also assigned to + * configuration analysis of return path if on its own it should be + * REACHABLE, but configuration analysis of forward path is AMBIGUOUS. * * Generated from protobuf enum AMBIGUOUS = 4; */ diff --git a/NetworkManagement/src/V1/Step.php b/NetworkManagement/src/V1/Step.php index a3901732fb38..752ae80eabf1 100644 --- a/NetworkManagement/src/V1/Step.php +++ b/NetworkManagement/src/V1/Step.php @@ -86,7 +86,8 @@ class Step extends \Google\Protobuf\Internal\Message * @type \Google\Cloud\NetworkManagement\V1\DropInfo $drop * Display information of the final state "drop" and reason. * @type \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo $load_balancer - * Display information of the load balancers. + * Display information of the load balancers. Deprecated in favor of the + * `load_balancer_backend_info` field, not used in new tests. * @type \Google\Cloud\NetworkManagement\V1\NetworkInfo $network * Display information of a Google Cloud network. * @type \Google\Cloud\NetworkManagement\V1\GKEMasterInfo $gke_master @@ -628,30 +629,37 @@ public function setDrop($var) } /** - * Display information of the load balancers. + * Display information of the load balancers. Deprecated in favor of the + * `load_balancer_backend_info` field, not used in new tests. * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16 [deprecated = true]; * @return \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo|null + * @deprecated */ public function getLoadBalancer() { + @trigger_error('load_balancer is deprecated.', E_USER_DEPRECATED); return $this->readOneof(16); } public function hasLoadBalancer() { + @trigger_error('load_balancer is deprecated.', E_USER_DEPRECATED); return $this->hasOneof(16); } /** - * Display information of the load balancers. + * Display information of the load balancers. Deprecated in favor of the + * `load_balancer_backend_info` field, not used in new tests. * - * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16; + * Generated from protobuf field .google.cloud.networkmanagement.v1.LoadBalancerInfo load_balancer = 16 [deprecated = true]; * @param \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo $var * @return $this + * @deprecated */ public function setLoadBalancer($var) { + @trigger_error('load_balancer is deprecated.', E_USER_DEPRECATED); GPBUtil::checkMessage($var, \Google\Cloud\NetworkManagement\V1\LoadBalancerInfo::class); $this->writeOneof(16, $var); diff --git a/NetworkManagement/src/V1/Step/State.php b/NetworkManagement/src/V1/Step/State.php index 064dafaf695e..83e44e0a16e2 100644 --- a/NetworkManagement/src/V1/Step/State.php +++ b/NetworkManagement/src/V1/Step/State.php @@ -35,10 +35,8 @@ class State */ const START_FROM_INTERNET = 2; /** - * Initial state: packet originating from a Google service. Some Google - * services, such as health check probers or Identity Aware Proxy use - * special routes, outside VPC routing configuration to reach Compute Engine - * Instances. + * Initial state: packet originating from a Google service. + * The google_service information is populated. * * Generated from protobuf enum START_FROM_GOOGLE_SERVICE = 27; */ @@ -87,6 +85,21 @@ class State * Generated from protobuf enum START_FROM_CLOUD_RUN_REVISION = 26; */ const START_FROM_CLOUD_RUN_REVISION = 26; + /** + * Initial state: packet originating from a Storage Bucket. Used only for + * return traces. + * The storage_bucket information is populated. + * + * Generated from protobuf enum START_FROM_STORAGE_BUCKET = 29; + */ + const START_FROM_STORAGE_BUCKET = 29; + /** + * Initial state: packet originating from a published service that uses + * Private Service Connect. Used only for return traces. + * + * Generated from protobuf enum START_FROM_PSC_PUBLISHED_SERVICE = 30; + */ + const START_FROM_PSC_PUBLISHED_SERVICE = 30; /** * Config checking state: verify ingress firewall rule. * @@ -133,13 +146,13 @@ class State /** * Forwarding state: arriving at a Compute Engine internal load balancer. * - * Generated from protobuf enum ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10; + * Generated from protobuf enum ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10 [deprecated = true]; */ const ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10; /** * Forwarding state: arriving at a Compute Engine external load balancer. * - * Generated from protobuf enum ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11; + * Generated from protobuf enum ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11 [deprecated = true]; */ const ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11; /** @@ -217,6 +230,8 @@ class State self::START_FROM_CLOUD_FUNCTION => 'START_FROM_CLOUD_FUNCTION', self::START_FROM_APP_ENGINE_VERSION => 'START_FROM_APP_ENGINE_VERSION', self::START_FROM_CLOUD_RUN_REVISION => 'START_FROM_CLOUD_RUN_REVISION', + self::START_FROM_STORAGE_BUCKET => 'START_FROM_STORAGE_BUCKET', + self::START_FROM_PSC_PUBLISHED_SERVICE => 'START_FROM_PSC_PUBLISHED_SERVICE', self::APPLY_INGRESS_FIREWALL_RULE => 'APPLY_INGRESS_FIREWALL_RULE', self::APPLY_EGRESS_FIREWALL_RULE => 'APPLY_EGRESS_FIREWALL_RULE', self::APPLY_ROUTE => 'APPLY_ROUTE', diff --git a/NetworkManagement/src/V1/Trace.php b/NetworkManagement/src/V1/Trace.php index c22f881c5142..b446a439f1d8 100644 --- a/NetworkManagement/src/V1/Trace.php +++ b/NetworkManagement/src/V1/Trace.php @@ -43,6 +43,14 @@ class Trace extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.cloud.networkmanagement.v1.Step steps = 2; */ private $steps; + /** + * ID of trace. For forward traces, this ID is unique for each trace. For + * return traces, it matches ID of associated forward trace. A single forward + * trace can be associated with none, one or more than one return trace. + * + * Generated from protobuf field int32 forward_trace_id = 4; + */ + private $forward_trace_id = 0; /** * Constructor. @@ -61,6 +69,10 @@ class Trace extends \Google\Protobuf\Internal\Message * The steps are ordered by the processing sequence within the simulated * network state machine. It is critical to preserve the order of the steps * and avoid reordering or sorting them. + * @type int $forward_trace_id + * ID of trace. For forward traces, this ID is unique for each trace. For + * return traces, it matches ID of associated forward trace. A single forward + * trace can be associated with none, one or more than one return trace. * } */ public function __construct($data = NULL) { @@ -144,5 +156,35 @@ public function setSteps($var) return $this; } + /** + * ID of trace. For forward traces, this ID is unique for each trace. For + * return traces, it matches ID of associated forward trace. A single forward + * trace can be associated with none, one or more than one return trace. + * + * Generated from protobuf field int32 forward_trace_id = 4; + * @return int + */ + public function getForwardTraceId() + { + return $this->forward_trace_id; + } + + /** + * ID of trace. For forward traces, this ID is unique for each trace. For + * return traces, it matches ID of associated forward trace. A single forward + * trace can be associated with none, one or more than one return trace. + * + * Generated from protobuf field int32 forward_trace_id = 4; + * @param int $var + * @return $this + */ + public function setForwardTraceId($var) + { + GPBUtil::checkInt32($var); + $this->forward_trace_id = $var; + + return $this; + } + } diff --git a/NetworkManagement/tests/Unit/V1/Client/ReachabilityServiceClientTest.php b/NetworkManagement/tests/Unit/V1/Client/ReachabilityServiceClientTest.php index 5d99b03416ce..bca71d4b45f9 100644 --- a/NetworkManagement/tests/Unit/V1/Client/ReachabilityServiceClientTest.php +++ b/NetworkManagement/tests/Unit/V1/Client/ReachabilityServiceClientTest.php @@ -107,11 +107,13 @@ public function createConnectivityTestTest() $description = 'description-1724546052'; $protocol = 'protocol-989163880'; $displayName = 'displayName1615086568'; + $bypassFirewallChecks = false; $expectedResponse = new ConnectivityTest(); $expectedResponse->setName($name); $expectedResponse->setDescription($description); $expectedResponse->setProtocol($protocol); $expectedResponse->setDisplayName($displayName); + $expectedResponse->setBypassFirewallChecks($bypassFirewallChecks); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); @@ -369,11 +371,13 @@ public function getConnectivityTestTest() $description = 'description-1724546052'; $protocol = 'protocol-989163880'; $displayName = 'displayName1615086568'; + $bypassFirewallChecks = false; $expectedResponse = new ConnectivityTest(); $expectedResponse->setName($name2); $expectedResponse->setDescription($description); $expectedResponse->setProtocol($protocol); $expectedResponse->setDisplayName($displayName); + $expectedResponse->setBypassFirewallChecks($bypassFirewallChecks); $transport->addResponse($expectedResponse); // Mock request $name = 'name3373707'; @@ -523,11 +527,13 @@ public function rerunConnectivityTestTest() $description = 'description-1724546052'; $protocol = 'protocol-989163880'; $displayName = 'displayName1615086568'; + $bypassFirewallChecks = false; $expectedResponse = new ConnectivityTest(); $expectedResponse->setName($name2); $expectedResponse->setDescription($description); $expectedResponse->setProtocol($protocol); $expectedResponse->setDisplayName($displayName); + $expectedResponse->setBypassFirewallChecks($bypassFirewallChecks); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); @@ -652,11 +658,13 @@ public function updateConnectivityTestTest() $description = 'description-1724546052'; $protocol = 'protocol-989163880'; $displayName = 'displayName1615086568'; + $bypassFirewallChecks = false; $expectedResponse = new ConnectivityTest(); $expectedResponse->setName($name); $expectedResponse->setDescription($description); $expectedResponse->setProtocol($protocol); $expectedResponse->setDisplayName($displayName); + $expectedResponse->setBypassFirewallChecks($bypassFirewallChecks); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); @@ -1129,11 +1137,13 @@ public function createConnectivityTestAsyncTest() $description = 'description-1724546052'; $protocol = 'protocol-989163880'; $displayName = 'displayName1615086568'; + $bypassFirewallChecks = false; $expectedResponse = new ConnectivityTest(); $expectedResponse->setName($name); $expectedResponse->setDescription($description); $expectedResponse->setProtocol($protocol); $expectedResponse->setDisplayName($displayName); + $expectedResponse->setBypassFirewallChecks($bypassFirewallChecks); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); diff --git a/NetworkManagement/tests/Unit/V1/ReachabilityServiceClientTest.php b/NetworkManagement/tests/Unit/V1/ReachabilityServiceClientTest.php index 1d62694a5d87..b65580ea02ff 100644 --- a/NetworkManagement/tests/Unit/V1/ReachabilityServiceClientTest.php +++ b/NetworkManagement/tests/Unit/V1/ReachabilityServiceClientTest.php @@ -96,11 +96,13 @@ public function createConnectivityTestTest() $description = 'description-1724546052'; $protocol = 'protocol-989163880'; $displayName = 'displayName1615086568'; + $bypassFirewallChecks = false; $expectedResponse = new ConnectivityTest(); $expectedResponse->setName($name); $expectedResponse->setDescription($description); $expectedResponse->setProtocol($protocol); $expectedResponse->setDisplayName($displayName); + $expectedResponse->setBypassFirewallChecks($bypassFirewallChecks); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); @@ -346,11 +348,13 @@ public function getConnectivityTestTest() $description = 'description-1724546052'; $protocol = 'protocol-989163880'; $displayName = 'displayName1615086568'; + $bypassFirewallChecks = false; $expectedResponse = new ConnectivityTest(); $expectedResponse->setName($name2); $expectedResponse->setDescription($description); $expectedResponse->setProtocol($protocol); $expectedResponse->setDisplayName($displayName); + $expectedResponse->setBypassFirewallChecks($bypassFirewallChecks); $transport->addResponse($expectedResponse); // Mock request $name = 'name3373707'; @@ -492,11 +496,13 @@ public function rerunConnectivityTestTest() $description = 'description-1724546052'; $protocol = 'protocol-989163880'; $displayName = 'displayName1615086568'; + $bypassFirewallChecks = false; $expectedResponse = new ConnectivityTest(); $expectedResponse->setName($name2); $expectedResponse->setDescription($description); $expectedResponse->setProtocol($protocol); $expectedResponse->setDisplayName($displayName); + $expectedResponse->setBypassFirewallChecks($bypassFirewallChecks); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); @@ -617,11 +623,13 @@ public function updateConnectivityTestTest() $description = 'description-1724546052'; $protocol = 'protocol-989163880'; $displayName = 'displayName1615086568'; + $bypassFirewallChecks = false; $expectedResponse = new ConnectivityTest(); $expectedResponse->setName($name); $expectedResponse->setDescription($description); $expectedResponse->setProtocol($protocol); $expectedResponse->setDisplayName($displayName); + $expectedResponse->setBypassFirewallChecks($bypassFirewallChecks); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); From 186ccde0f1eefd52133273bb715e42888860467a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:29:12 -0700 Subject: [PATCH 03/86] feat: GenAiTuningService aiplatform v1 initial release (#7176) feat: Add Optimized feature store proto feat: Add data_key field in feature online store service feat: Add dedicated_serving_endpoint feat: Add index_config field PiperOrigin-RevId: 618280080 Source-Link: https://github.com/googleapis/googleapis/commit/d81d0b9e6993d6ab425dff4d7c3d05fb2e59fa57 Source-Link: https://github.com/googleapis/googleapis-gen/commit/a96b4d818e3d157e6f529616ad7b147d3f8aa387 Copy-Tag: eyJwIjoiQWlQbGF0Zm9ybS8uT3dsQm90LnlhbWwiLCJoIjoiYTk2YjRkODE4ZTNkMTU3ZTZmNTI5NjE2YWQ3YjE0N2QzZjhhYTM4NyJ9 feat: add NotebookRuntime resource and APIs to public v1 client library PiperOrigin-RevId: 620353345 Source-Link: https://github.com/googleapis/googleapis/commit/98ae60929199d002c17806782584dcc3c3dc19f1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1690f0452f1f5f1c942fb8392afe224842132fe2 Copy-Tag: eyJwIjoiQWlQbGF0Zm9ybS8uT3dsQm90LnlhbWwiLCJoIjoiMTY5MGYwNDUyZjFmNWYxYzk0MmZiODM5MmFmZTIyNDg0MjEzMmZlMiJ9 feat: A new field `presence_penalty` is added to message `.google.cloud.aiplatform.v1.GenerationConfig` feat: A new field `frequency_penalty` is added to message `.google.cloud.aiplatform.v1.GenerationConfig` feat: A new field `response_mime_type` is added to message `.google.cloud.aiplatform.v1.GenerationConfig` feat: A new enum `HarmBlockMethod` is added feat: A new field `method` is added to message `.google.cloud.aiplatform.v1.SafetySetting` feat: A new field `persistent_resource_id` is added to message `.google.cloud.aiplatform.v1.CustomJobSpec` feat: A new field `disable_explanations` is added to message `.google.cloud.aiplatform.v1.DeployedModel` feat: A new field `title` is added to message `.google.cloud.aiplatform.v1.Schema` feat: A new field `default` is added to message `.google.cloud.aiplatform.v1.Schema` feat: A new field `min_items` is added to message `.google.cloud.aiplatform.v1.Schema` feat: A new field `max_items` is added to message `.google.cloud.aiplatform.v1.Schema` feat: A new field `min_properties` is added to message `.google.cloud.aiplatform.v1.Schema` feat: A new field `max_properties` is added to message `.google.cloud.aiplatform.v1.Schema` feat: A new field `minimum` is added to message `.google.cloud.aiplatform.v1.Schema` feat: A new field `maximum` is added to message `.google.cloud.aiplatform.v1.Schema` feat: A new field `min_length` is added to message `.google.cloud.aiplatform.v1.Schema` feat: A new field `max_length` is added to message `.google.cloud.aiplatform.v1.Schema` feat: A new field `pattern` is added to message `.google.cloud.aiplatform.v1.Schema` feat: A new message `PersistentResource` is added feat: A new resource_definition `aiplatform.googleapis.com/PersistentResource` is added feat: A new message `ResourcePool` is added feat: A new message `ResourceRuntimeSpec` is added feat: A new message `RaySpec` is added feat: A new message `ResourceRuntime` is added feat: A new message `ServiceAccountSpec` is added feat: A new service `PersistentResourceService` is added feat: A new message `CreatePersistentResourceRequest` is added feat: A new message `CreatePersistentResourceOperationMetadata` is added feat: A new message `UpdatePersistentResourceOperationMetadata` is added feat: A new message `RebootPersistentResourceOperationMetadata` is added feat: A new message `GetPersistentResourceRequest` is added feat: A new message `ListPersistentResourcesRequest` is added feat: A new message `ListPersistentResourcesResponse` is added feat: A new message `DeletePersistentResourceRequest` is added feat: A new message `UpdatePersistentResourceRequest` is added feat: A new message `RebootPersistentResourceRequest` is added feat: A new field `system_instruction` is added to message `.google.cloud.aiplatform.v1.GenerateContentRequest` feat: A new value `BLOCKLIST` is added to enum `BlockedReason` feat: A new value `PROHIBITED_CONTENT` is added to enum `BlockedReason` docs: documentation updates PiperOrigin-RevId: 620417078 Source-Link: https://github.com/googleapis/googleapis/commit/7efb929a17db307af763846620e712ad011c5b8e Source-Link: https://github.com/googleapis/googleapis-gen/commit/4fc4bc1e02644d2b45bc1bf71a8479220e9e0f2e Copy-Tag: eyJwIjoiQWlQbGF0Zm9ybS8uT3dsQm90LnlhbWwiLCJoIjoiNGZjNGJjMWUwMjY0NGQyYjQ1YmMxYmY3MWE4NDc5MjIwZTllMGYyZSJ9 feat: GenAiTuningService aiplatform v1 initial release PiperOrigin-RevId: 620892708 Source-Link: https://github.com/googleapis/googleapis/commit/152a4c157cc64f0b8236acd176a0315df2b25b12 Source-Link: https://github.com/googleapis/googleapis-gen/commit/c927ef1234d3be70628ec4f497df2648fd3ef04c Copy-Tag: eyJwIjoiQWlQbGF0Zm9ybS8uT3dsQm90LnlhbWwiLCJoIjoiYzkyN2VmMTIzNGQzYmU3MDYyOGVjNGY0OTdkZjI2NDhmZDNlZjA0YyJ9 --- AiPlatform/metadata/V1/Content.php | Bin 4621 -> 4935 bytes AiPlatform/metadata/V1/CustomJob.php | Bin 4220 -> 4306 bytes AiPlatform/metadata/V1/Endpoint.php | Bin 3650 -> 3680 bytes AiPlatform/metadata/V1/FeatureOnlineStore.php | Bin 1993 -> 2269 bytes .../metadata/V1/FeatureOnlineStoreService.php | Bin 4224 -> 4290 bytes AiPlatform/metadata/V1/FeatureView.php | Bin 2154 -> 2980 bytes AiPlatform/metadata/V1/GenaiTuningService.php | 60 + AiPlatform/metadata/V1/MachineResources.php | 6 +- AiPlatform/metadata/V1/NetworkSpec.php | 36 + AiPlatform/metadata/V1/NotebookEucConfig.php | 31 + .../V1/NotebookIdleShutdownConfig.php | 32 + AiPlatform/metadata/V1/NotebookRuntime.php | Bin 0 -> 4250 bytes .../V1/NotebookRuntimeTemplateRef.php | 32 + AiPlatform/metadata/V1/NotebookService.php | 120 + AiPlatform/metadata/V1/Openapi.php | Bin 1525 -> 1813 bytes AiPlatform/metadata/V1/PersistentResource.php | Bin 0 -> 3339 bytes .../metadata/V1/PersistentResourceService.php | 82 + AiPlatform/metadata/V1/PredictionService.php | Bin 8820 -> 8957 bytes AiPlatform/metadata/V1/TuningJob.php | Bin 0 -> 4115 bytes .../cancel_tuning_job.php | 81 + .../create_tuning_job.php | 75 + .../get_iam_policy.php | 72 + .../GenAiTuningServiceClient/get_location.php | 57 + .../get_tuning_job.php | 72 + .../list_locations.php | 62 + .../list_tuning_jobs.php | 77 + .../set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../assign_notebook_runtime.php | 113 + .../create_notebook_runtime_template.php | 93 + .../delete_notebook_runtime.php | 87 + .../delete_notebook_runtime_template.php | 86 + .../NotebookServiceClient/get_iam_policy.php | 72 + .../V1/NotebookServiceClient/get_location.php | 57 + .../get_notebook_runtime.php | 78 + .../get_notebook_runtime_template.php | 77 + .../NotebookServiceClient/list_locations.php | 62 + .../list_notebook_runtime_templates.php | 78 + .../list_notebook_runtimes.php | 78 + .../NotebookServiceClient/set_iam_policy.php | 77 + .../start_notebook_runtime.php | 90 + .../test_iam_permissions.php | 84 + .../upgrade_notebook_runtime.php | 90 + .../create_persistent_resource.php | 102 + .../delete_persistent_resource.php | 86 + .../get_iam_policy.php | 72 + .../get_location.php | 57 + .../get_persistent_resource.php | 77 + .../list_locations.php | 62 + .../list_persistent_resources.php | 77 + .../reboot_persistent_resource.php | 89 + .../set_iam_policy.php | 77 + .../test_iam_permissions.php | 84 + .../update_persistent_resource.php | 81 + ...AssignNotebookRuntimeOperationMetadata.php | 116 + .../src/V1/AssignNotebookRuntimeRequest.php | 216 ++ AiPlatform/src/V1/Blob.php | 13 +- AiPlatform/src/V1/CancelTuningJobRequest.php | 87 + .../V1/Client/GenAiTuningServiceClient.php | 611 +++++ AiPlatform/src/V1/Client/JobServiceClient.php | 20 + .../src/V1/Client/NotebookServiceClient.php | 766 +++++++ .../PersistentResourceServiceClient.php | 616 +++++ ...tebookRuntimeTemplateOperationMetadata.php | 78 + .../CreateNotebookRuntimeTemplateRequest.php | 169 ++ ...atePersistentResourceOperationMetadata.php | 111 + .../V1/CreatePersistentResourceRequest.php | 185 ++ AiPlatform/src/V1/CreateTuningJobRequest.php | 133 ++ AiPlatform/src/V1/CustomJobSpec.php | 54 + .../src/V1/DeleteNotebookRuntimeRequest.php | 97 + .../DeleteNotebookRuntimeTemplateRequest.php | 92 + .../V1/DeletePersistentResourceRequest.php | 92 + AiPlatform/src/V1/DeployedModel.php | 50 + AiPlatform/src/V1/FeatureOnlineStore.php | 93 + .../DedicatedServingEndpoint.php | 74 + .../src/V1/FeatureOnlineStore/Optimized.php | 34 + AiPlatform/src/V1/FeatureView.php | 56 + AiPlatform/src/V1/FeatureView/IndexConfig.php | 348 +++ .../IndexConfig/BruteForceConfig.php | 34 + .../IndexConfig/DistanceMeasureType.php | 74 + .../FeatureView/IndexConfig/TreeAHConfig.php | 82 + .../src/V1/FetchFeatureValuesResponse.php | 52 + AiPlatform/src/V1/FunctionDeclaration.php | 40 +- .../V1/Gapic/EndpointServiceGapicClient.php | 5 +- .../Gapic/GenAiTuningServiceGapicClient.php | 1084 +++++++++ .../src/V1/Gapic/JobServiceGapicClient.php | 37 + .../V1/Gapic/NotebookServiceGapicClient.php | 1678 ++++++++++++++ .../PersistentResourceServiceGapicClient.php | 1206 ++++++++++ .../V1/Gapic/PredictionServiceGapicClient.php | 16 + .../src/V1/GenAiTuningServiceClient.php | 34 + AiPlatform/src/V1/GenerateContentRequest.php | 52 + .../PromptFeedback/BlockedReason.php | 15 + AiPlatform/src/V1/GenerationConfig.php | 146 ++ .../src/V1/GetNotebookRuntimeRequest.php | 97 + .../V1/GetNotebookRuntimeTemplateRequest.php | 92 + .../src/V1/GetPersistentResourceRequest.php | 92 + AiPlatform/src/V1/GetTuningJobRequest.php | 87 + AiPlatform/src/V1/ListEndpointsRequest.php | 20 +- .../ListNotebookRuntimeTemplatesRequest.php | 380 ++++ .../ListNotebookRuntimeTemplatesResponse.php | 114 + .../src/V1/ListNotebookRuntimesRequest.php | 436 ++++ .../src/V1/ListNotebookRuntimesResponse.php | 114 + .../src/V1/ListPersistentResourcesRequest.php | 166 ++ .../V1/ListPersistentResourcesResponse.php | 107 + AiPlatform/src/V1/ListTuningJobsRequest.php | 197 ++ AiPlatform/src/V1/ListTuningJobsResponse.php | 114 + AiPlatform/src/V1/NetworkSpec.php | 147 ++ AiPlatform/src/V1/NotebookEucConfig.php | 133 ++ .../src/V1/NotebookIdleShutdownConfig.php | 120 + AiPlatform/src/V1/NotebookRuntime.php | 741 ++++++ .../src/V1/NotebookRuntime/HealthState.php | 62 + .../src/V1/NotebookRuntime/RuntimeState.php | 99 + AiPlatform/src/V1/NotebookRuntimeTemplate.php | 769 +++++++ .../src/V1/NotebookRuntimeTemplateRef.php | 67 + AiPlatform/src/V1/NotebookRuntimeType.php | 62 + AiPlatform/src/V1/NotebookServiceClient.php | 34 + AiPlatform/src/V1/PersistentResource.php | 698 ++++++ .../src/V1/PersistentResource/State.php | 94 + .../V1/PersistentResourceServiceClient.php | 34 + AiPlatform/src/V1/RaySpec.php | 36 + ...ootPersistentResourceOperationMetadata.php | 111 + .../V1/RebootPersistentResourceRequest.php | 92 + AiPlatform/src/V1/ResourcePool.php | 290 +++ .../src/V1/ResourcePool/AutoscalingSpec.php | 130 ++ AiPlatform/src/V1/ResourceRuntime.php | 33 + AiPlatform/src/V1/ResourceRuntimeSpec.php | 128 ++ AiPlatform/src/V1/SafetySetting.php | 38 + .../src/V1/SafetySetting/HarmBlockMethod.php | 62 + AiPlatform/src/V1/Schema.php | 440 +++- AiPlatform/src/V1/ServiceAccountSpec.php | 145 ++ AiPlatform/src/V1/ShieldedVmConfig.php | 89 + .../StartNotebookRuntimeOperationMetadata.php | 116 + .../src/V1/StartNotebookRuntimeRequest.php | 97 + .../src/V1/StartNotebookRuntimeResponse.php | 34 + .../src/V1/SupervisedHyperParameters.php | 135 ++ .../SupervisedHyperParameters/AdapterSize.php | 76 + .../src/V1/SupervisedTuningDataStats.php | 335 +++ .../SupervisedTuningDatasetDistribution.php | 305 +++ .../DatasetBucket.php | 137 ++ AiPlatform/src/V1/SupervisedTuningSpec.php | 153 ++ AiPlatform/src/V1/TunedModel.php | 110 + AiPlatform/src/V1/TuningDataStats.php | 76 + AiPlatform/src/V1/TuningJob.php | 717 ++++++ ...atePersistentResourceOperationMetadata.php | 111 + .../V1/UpdatePersistentResourceRequest.php | 157 ++ ...pgradeNotebookRuntimeOperationMetadata.php | 116 + .../src/V1/UpgradeNotebookRuntimeRequest.php | 97 + .../src/V1/UpgradeNotebookRuntimeResponse.php | 34 + AiPlatform/src/V1/VertexAISearch.php | 8 +- AiPlatform/src/V1/gapic_metadata.json | 202 ++ .../dataset_service_rest_client_config.php | 42 +- ...source_pool_service_rest_client_config.php | 42 +- .../endpoint_service_rest_client_config.php | 42 +- ...store_admin_service_rest_client_config.php | 42 +- ...nline_store_service_rest_client_config.php | 42 +- ...re_registry_service_rest_client_config.php | 42 +- ...ine_serving_service_rest_client_config.php | 42 +- ...eaturestore_service_rest_client_config.php | 42 +- .../gen_ai_tuning_service_client_config.json | 67 + ...en_ai_tuning_service_descriptor_config.php | 146 ++ ...n_ai_tuning_service_rest_client_config.php | 1953 ++++++++++++++++ ...ex_endpoint_service_rest_client_config.php | 42 +- .../index_service_rest_client_config.php | 42 +- .../job_service_descriptor_config.php | 1 + .../job_service_rest_client_config.php | 42 +- ...llm_utility_service_rest_client_config.php | 42 +- .../match_service_rest_client_config.php | 42 +- .../metadata_service_rest_client_config.php | 42 +- .../migration_service_rest_client_config.php | 42 +- ...odel_garden_service_rest_client_config.php | 42 +- .../model_service_rest_client_config.php | 42 +- .../notebook_service_client_config.json | 97 + .../notebook_service_descriptor_config.php | 266 +++ .../notebook_service_rest_client_config.php | 2021 +++++++++++++++++ ...istent_resource_service_client_config.json | 77 + ...ent_resource_service_descriptor_config.php | 195 ++ ...nt_resource_service_rest_client_config.php | 1983 ++++++++++++++++ .../pipeline_service_rest_client_config.php | 42 +- .../prediction_service_rest_client_config.php | 42 +- .../schedule_service_rest_client_config.php | 42 +- ...ialist_pool_service_rest_client_config.php | 42 +- ...tensorboard_service_rest_client_config.php | 42 +- .../vizier_service_rest_client_config.php | 42 +- .../Client/GenAiTuningServiceClientTest.php | 715 ++++++ .../V1/Client/NotebookServiceClientTest.php | 1592 +++++++++++++ .../PersistentResourceServiceClientTest.php | 1161 ++++++++++ .../Unit/V1/GenAiTuningServiceClientTest.php | 642 ++++++ .../Unit/V1/NotebookServiceClientTest.php | 1419 ++++++++++++ .../PersistentResourceServiceClientTest.php | 1020 +++++++++ 188 files changed, 35733 insertions(+), 82 deletions(-) create mode 100644 AiPlatform/metadata/V1/GenaiTuningService.php create mode 100644 AiPlatform/metadata/V1/NetworkSpec.php create mode 100644 AiPlatform/metadata/V1/NotebookEucConfig.php create mode 100644 AiPlatform/metadata/V1/NotebookIdleShutdownConfig.php create mode 100644 AiPlatform/metadata/V1/NotebookRuntime.php create mode 100644 AiPlatform/metadata/V1/NotebookRuntimeTemplateRef.php create mode 100644 AiPlatform/metadata/V1/NotebookService.php create mode 100644 AiPlatform/metadata/V1/PersistentResource.php create mode 100644 AiPlatform/metadata/V1/PersistentResourceService.php create mode 100644 AiPlatform/metadata/V1/TuningJob.php create mode 100644 AiPlatform/samples/V1/GenAiTuningServiceClient/cancel_tuning_job.php create mode 100644 AiPlatform/samples/V1/GenAiTuningServiceClient/create_tuning_job.php create mode 100644 AiPlatform/samples/V1/GenAiTuningServiceClient/get_iam_policy.php create mode 100644 AiPlatform/samples/V1/GenAiTuningServiceClient/get_location.php create mode 100644 AiPlatform/samples/V1/GenAiTuningServiceClient/get_tuning_job.php create mode 100644 AiPlatform/samples/V1/GenAiTuningServiceClient/list_locations.php create mode 100644 AiPlatform/samples/V1/GenAiTuningServiceClient/list_tuning_jobs.php create mode 100644 AiPlatform/samples/V1/GenAiTuningServiceClient/set_iam_policy.php create mode 100644 AiPlatform/samples/V1/GenAiTuningServiceClient/test_iam_permissions.php create mode 100644 AiPlatform/samples/V1/NotebookServiceClient/assign_notebook_runtime.php create mode 100644 AiPlatform/samples/V1/NotebookServiceClient/create_notebook_runtime_template.php create mode 100644 AiPlatform/samples/V1/NotebookServiceClient/delete_notebook_runtime.php create mode 100644 AiPlatform/samples/V1/NotebookServiceClient/delete_notebook_runtime_template.php create mode 100644 AiPlatform/samples/V1/NotebookServiceClient/get_iam_policy.php create mode 100644 AiPlatform/samples/V1/NotebookServiceClient/get_location.php create mode 100644 AiPlatform/samples/V1/NotebookServiceClient/get_notebook_runtime.php create mode 100644 AiPlatform/samples/V1/NotebookServiceClient/get_notebook_runtime_template.php create mode 100644 AiPlatform/samples/V1/NotebookServiceClient/list_locations.php create mode 100644 AiPlatform/samples/V1/NotebookServiceClient/list_notebook_runtime_templates.php create mode 100644 AiPlatform/samples/V1/NotebookServiceClient/list_notebook_runtimes.php create mode 100644 AiPlatform/samples/V1/NotebookServiceClient/set_iam_policy.php create mode 100644 AiPlatform/samples/V1/NotebookServiceClient/start_notebook_runtime.php create mode 100644 AiPlatform/samples/V1/NotebookServiceClient/test_iam_permissions.php create mode 100644 AiPlatform/samples/V1/NotebookServiceClient/upgrade_notebook_runtime.php create mode 100644 AiPlatform/samples/V1/PersistentResourceServiceClient/create_persistent_resource.php create mode 100644 AiPlatform/samples/V1/PersistentResourceServiceClient/delete_persistent_resource.php create mode 100644 AiPlatform/samples/V1/PersistentResourceServiceClient/get_iam_policy.php create mode 100644 AiPlatform/samples/V1/PersistentResourceServiceClient/get_location.php create mode 100644 AiPlatform/samples/V1/PersistentResourceServiceClient/get_persistent_resource.php create mode 100644 AiPlatform/samples/V1/PersistentResourceServiceClient/list_locations.php create mode 100644 AiPlatform/samples/V1/PersistentResourceServiceClient/list_persistent_resources.php create mode 100644 AiPlatform/samples/V1/PersistentResourceServiceClient/reboot_persistent_resource.php create mode 100644 AiPlatform/samples/V1/PersistentResourceServiceClient/set_iam_policy.php create mode 100644 AiPlatform/samples/V1/PersistentResourceServiceClient/test_iam_permissions.php create mode 100644 AiPlatform/samples/V1/PersistentResourceServiceClient/update_persistent_resource.php create mode 100644 AiPlatform/src/V1/AssignNotebookRuntimeOperationMetadata.php create mode 100644 AiPlatform/src/V1/AssignNotebookRuntimeRequest.php create mode 100644 AiPlatform/src/V1/CancelTuningJobRequest.php create mode 100644 AiPlatform/src/V1/Client/GenAiTuningServiceClient.php create mode 100644 AiPlatform/src/V1/Client/NotebookServiceClient.php create mode 100644 AiPlatform/src/V1/Client/PersistentResourceServiceClient.php create mode 100644 AiPlatform/src/V1/CreateNotebookRuntimeTemplateOperationMetadata.php create mode 100644 AiPlatform/src/V1/CreateNotebookRuntimeTemplateRequest.php create mode 100644 AiPlatform/src/V1/CreatePersistentResourceOperationMetadata.php create mode 100644 AiPlatform/src/V1/CreatePersistentResourceRequest.php create mode 100644 AiPlatform/src/V1/CreateTuningJobRequest.php create mode 100644 AiPlatform/src/V1/DeleteNotebookRuntimeRequest.php create mode 100644 AiPlatform/src/V1/DeleteNotebookRuntimeTemplateRequest.php create mode 100644 AiPlatform/src/V1/DeletePersistentResourceRequest.php create mode 100644 AiPlatform/src/V1/FeatureOnlineStore/DedicatedServingEndpoint.php create mode 100644 AiPlatform/src/V1/FeatureOnlineStore/Optimized.php create mode 100644 AiPlatform/src/V1/FeatureView/IndexConfig.php create mode 100644 AiPlatform/src/V1/FeatureView/IndexConfig/BruteForceConfig.php create mode 100644 AiPlatform/src/V1/FeatureView/IndexConfig/DistanceMeasureType.php create mode 100644 AiPlatform/src/V1/FeatureView/IndexConfig/TreeAHConfig.php create mode 100644 AiPlatform/src/V1/Gapic/GenAiTuningServiceGapicClient.php create mode 100644 AiPlatform/src/V1/Gapic/NotebookServiceGapicClient.php create mode 100644 AiPlatform/src/V1/Gapic/PersistentResourceServiceGapicClient.php create mode 100644 AiPlatform/src/V1/GenAiTuningServiceClient.php create mode 100644 AiPlatform/src/V1/GetNotebookRuntimeRequest.php create mode 100644 AiPlatform/src/V1/GetNotebookRuntimeTemplateRequest.php create mode 100644 AiPlatform/src/V1/GetPersistentResourceRequest.php create mode 100644 AiPlatform/src/V1/GetTuningJobRequest.php create mode 100644 AiPlatform/src/V1/ListNotebookRuntimeTemplatesRequest.php create mode 100644 AiPlatform/src/V1/ListNotebookRuntimeTemplatesResponse.php create mode 100644 AiPlatform/src/V1/ListNotebookRuntimesRequest.php create mode 100644 AiPlatform/src/V1/ListNotebookRuntimesResponse.php create mode 100644 AiPlatform/src/V1/ListPersistentResourcesRequest.php create mode 100644 AiPlatform/src/V1/ListPersistentResourcesResponse.php create mode 100644 AiPlatform/src/V1/ListTuningJobsRequest.php create mode 100644 AiPlatform/src/V1/ListTuningJobsResponse.php create mode 100644 AiPlatform/src/V1/NetworkSpec.php create mode 100644 AiPlatform/src/V1/NotebookEucConfig.php create mode 100644 AiPlatform/src/V1/NotebookIdleShutdownConfig.php create mode 100644 AiPlatform/src/V1/NotebookRuntime.php create mode 100644 AiPlatform/src/V1/NotebookRuntime/HealthState.php create mode 100644 AiPlatform/src/V1/NotebookRuntime/RuntimeState.php create mode 100644 AiPlatform/src/V1/NotebookRuntimeTemplate.php create mode 100644 AiPlatform/src/V1/NotebookRuntimeTemplateRef.php create mode 100644 AiPlatform/src/V1/NotebookRuntimeType.php create mode 100644 AiPlatform/src/V1/NotebookServiceClient.php create mode 100644 AiPlatform/src/V1/PersistentResource.php create mode 100644 AiPlatform/src/V1/PersistentResource/State.php create mode 100644 AiPlatform/src/V1/PersistentResourceServiceClient.php create mode 100644 AiPlatform/src/V1/RaySpec.php create mode 100644 AiPlatform/src/V1/RebootPersistentResourceOperationMetadata.php create mode 100644 AiPlatform/src/V1/RebootPersistentResourceRequest.php create mode 100644 AiPlatform/src/V1/ResourcePool.php create mode 100644 AiPlatform/src/V1/ResourcePool/AutoscalingSpec.php create mode 100644 AiPlatform/src/V1/ResourceRuntime.php create mode 100644 AiPlatform/src/V1/ResourceRuntimeSpec.php create mode 100644 AiPlatform/src/V1/SafetySetting/HarmBlockMethod.php create mode 100644 AiPlatform/src/V1/ServiceAccountSpec.php create mode 100644 AiPlatform/src/V1/ShieldedVmConfig.php create mode 100644 AiPlatform/src/V1/StartNotebookRuntimeOperationMetadata.php create mode 100644 AiPlatform/src/V1/StartNotebookRuntimeRequest.php create mode 100644 AiPlatform/src/V1/StartNotebookRuntimeResponse.php create mode 100644 AiPlatform/src/V1/SupervisedHyperParameters.php create mode 100644 AiPlatform/src/V1/SupervisedHyperParameters/AdapterSize.php create mode 100644 AiPlatform/src/V1/SupervisedTuningDataStats.php create mode 100644 AiPlatform/src/V1/SupervisedTuningDatasetDistribution.php create mode 100644 AiPlatform/src/V1/SupervisedTuningDatasetDistribution/DatasetBucket.php create mode 100644 AiPlatform/src/V1/SupervisedTuningSpec.php create mode 100644 AiPlatform/src/V1/TunedModel.php create mode 100644 AiPlatform/src/V1/TuningDataStats.php create mode 100644 AiPlatform/src/V1/TuningJob.php create mode 100644 AiPlatform/src/V1/UpdatePersistentResourceOperationMetadata.php create mode 100644 AiPlatform/src/V1/UpdatePersistentResourceRequest.php create mode 100644 AiPlatform/src/V1/UpgradeNotebookRuntimeOperationMetadata.php create mode 100644 AiPlatform/src/V1/UpgradeNotebookRuntimeRequest.php create mode 100644 AiPlatform/src/V1/UpgradeNotebookRuntimeResponse.php create mode 100644 AiPlatform/src/V1/resources/gen_ai_tuning_service_client_config.json create mode 100644 AiPlatform/src/V1/resources/gen_ai_tuning_service_descriptor_config.php create mode 100644 AiPlatform/src/V1/resources/gen_ai_tuning_service_rest_client_config.php create mode 100644 AiPlatform/src/V1/resources/notebook_service_client_config.json create mode 100644 AiPlatform/src/V1/resources/notebook_service_descriptor_config.php create mode 100644 AiPlatform/src/V1/resources/notebook_service_rest_client_config.php create mode 100644 AiPlatform/src/V1/resources/persistent_resource_service_client_config.json create mode 100644 AiPlatform/src/V1/resources/persistent_resource_service_descriptor_config.php create mode 100644 AiPlatform/src/V1/resources/persistent_resource_service_rest_client_config.php create mode 100644 AiPlatform/tests/Unit/V1/Client/GenAiTuningServiceClientTest.php create mode 100644 AiPlatform/tests/Unit/V1/Client/NotebookServiceClientTest.php create mode 100644 AiPlatform/tests/Unit/V1/Client/PersistentResourceServiceClientTest.php create mode 100644 AiPlatform/tests/Unit/V1/GenAiTuningServiceClientTest.php create mode 100644 AiPlatform/tests/Unit/V1/NotebookServiceClientTest.php create mode 100644 AiPlatform/tests/Unit/V1/PersistentResourceServiceClientTest.php diff --git a/AiPlatform/metadata/V1/Content.php b/AiPlatform/metadata/V1/Content.php index 39c8327aae2a7ce9e6ab32bbe92fab9b7fc5fcf1..9a92f19e33a259e9b0d3db07f2a4ea7320602820 100644 GIT binary patch delta 350 zcmeBGIj*+h1QXL%h0Uj!N|~8fGf#G8J5evB#3fKrlvv<#=G$TK8T afKiB_i#s65-^tO*(+4ELw0Sy587BZPHfRq3 delta 43 zcmV+`0M!4-CXFPp$N~cU9ka>;bpryH0+T@o$dhviP6Hyn0+a6trjz9en6uIebqR7% B5cmK9 diff --git a/AiPlatform/metadata/V1/CustomJob.php b/AiPlatform/metadata/V1/CustomJob.php index fc8b2bf84c8a0b7ed4bac734a5b92b95559cf4be..6ff7d2b5562e3292c6c2d976a067d814eb3887f2 100644 GIT binary patch delta 112 zcmeyPa7l4P5(~>>2`=r)e^{g^rU`7G$a0;MBuH&aW3u2e^{g^rU`7G$a0-U@DM8(uXAZ}Nq(+Zeo}BjYVzjuoXqS1 Dq2Lg} diff --git a/AiPlatform/metadata/V1/Endpoint.php b/AiPlatform/metadata/V1/Endpoint.php index d20863022730239ce5a0a920fc41338f5a46553a..9a807e5658a18279416caf445e5925e9061f68c2 100644 GIT binary patch delta 56 zcmX>k^FU_9dS=F_n>R4Gurl7-Y|8nMQC5aaBqg&rF)1fCKDDACCowOvBr`v+SVCBV MQG;W%5w`#{0An-~`~Uy| delta 26 icmaDLb4X^xdS=Gsn>R4Gurlu1Y|8nMadRLyKQjQ8+X=z| diff --git a/AiPlatform/metadata/V1/FeatureOnlineStore.php b/AiPlatform/metadata/V1/FeatureOnlineStore.php index 886edbb2599075b4e60a99390c11da1303a94ccb..9158a986f25346046075c3316e17ed88df014cf9 100644 GIT binary patch delta 231 zcmX@fe^+qBA|{rP++3y;y-g?IW{PC`&oSAIIZ4Eqi!;BVBr`X&Dm6udM}bj;+sI;a z9J4;BKTLGCc=1}OqGgASSi diff --git a/AiPlatform/metadata/V1/FeatureOnlineStoreService.php b/AiPlatform/metadata/V1/FeatureOnlineStoreService.php index 1c8db7faf37dc5de5155931752d826c2740602fc..5fd9ec59038e78a4c669d7ffe9c8f4ec38501d7b 100644 GIT binary patch delta 67 zcmV-J0KETzA;KZBasvc|8VWs;OFgr*18xEY{sRgclW_(blRpNS4iZ2L2xMV&VP9)y Zc^Cwfnguik8v6kX7?W@Z6tnOKkO{EU6chje delta 48 zcmX@4*r2$fh?(V}B$w?(Z`;kAne&)f_AqlvO)g}UnrzQDgH`G`BbUVFMs|tKX6!wj E0CE2gF#rGn diff --git a/AiPlatform/metadata/V1/FeatureView.php b/AiPlatform/metadata/V1/FeatureView.php index fa5b06137bef8265c3cae512dec1854d84b02d8c..c21fc2debe3ddc53162705a03d594a7a4ba7c5d8 100644 GIT binary patch delta 742 zcmZvazi-n(9K~~XP1SEp;$B*6(jr=o)lgc%9{3bCL`8aqR#lN(=BtMR!wj-XQ) z23F*Mp?^T7{sRn1{2L5NNQ`W3T--P@DC@oVK6>x&e#tjmw~4UyZ5@t2zd1_23SHqx z@$RYk8!5N}Yd-Vn2hs~!-ybNYUG#jl`XV`9-cG(q4`pj2>ZzuQ-&K^XOYXr>3089g zCQytcN{M@(VIHKIR~hDI&VB4~t6I-7>jgXjd=`ykO8Q~cqZws6r5G9II#1Ci_S(e# zFX;)$G&rN4=d%Il495Xe5a+C<_3<_o`~EPd(Nr5L!mgN!J5cIH;ro14oJaR-P@bbb zKcH;nhfG=G7Ad9I(IR(Ejwp$*E~z4MW3l>r;T&U{IJplv+@B&V z807z_R=Tj3zeIcpkB8Ll6Bc@u%q#Z7F^kjj;(fgWucz%mg{1E5MfPVO5tJ8{!TYdh zShk}!bd#Kzs@-Xu#Obz7(rMT&Q@3iCX~+e<1!eoRqqa?hyseTfAtPLdlHRnfhB-T| u%K}zl!)Q9B)ovOc-I+%~ygZ2nEa`R>{aQ9C7Bm4!$G2{OL delta 36 scmZ1?{z_oOWG0qgZZ6%4-nx^IFhw%0;@B+D{E2aLB5UI2H5@;f0O#@yzyJUM diff --git a/AiPlatform/metadata/V1/GenaiTuningService.php b/AiPlatform/metadata/V1/GenaiTuningService.php new file mode 100644 index 000000000000..b5113f67b5e1 --- /dev/null +++ b/AiPlatform/metadata/V1/GenaiTuningService.php @@ -0,0 +1,60 @@ +internalAddGeneratedFile( + ' +Ò +5google/cloud/aiplatform/v1/genai_tuning_service.protogoogle.cloud.aiplatform.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto+google/cloud/aiplatform/v1/tuning_job.protogoogle/protobuf/empty.proto"“ +CreateTuningJobRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location> + +tuning_job ( 2%.google.cloud.aiplatform.v1.TuningJobBàA"P +GetTuningJobRequest9 +name ( B+àAúA% +#aiplatform.googleapis.com/TuningJob"˜ +ListTuningJobsRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location +filter ( BàA + page_size (BàA + +page_token ( BàA"m +ListTuningJobsResponse: + tuning_jobs ( 2%.google.cloud.aiplatform.v1.TuningJob +next_page_token ( "S +CancelTuningJobRequest9 +name ( B+àAúA% +#aiplatform.googleapis.com/TuningJob2¶ +GenAiTuningServiceÄ +CreateTuningJob2.google.cloud.aiplatform.v1.CreateTuningJobRequest%.google.cloud.aiplatform.v1.TuningJob"VÚAparent,tuning_job‚Óä“<"./v1/{parent=projects/*/locations/*}/tuningJobs: +tuning_job¥ + GetTuningJob/.google.cloud.aiplatform.v1.GetTuningJobRequest%.google.cloud.aiplatform.v1.TuningJob"=ÚAname‚Óä“0./v1/{name=projects/*/locations/*/tuningJobs/*}¸ +ListTuningJobs1.google.cloud.aiplatform.v1.ListTuningJobsRequest2.google.cloud.aiplatform.v1.ListTuningJobsResponse"?ÚAparent‚Óä“0./v1/{parent=projects/*/locations/*}/tuningJobs¦ +CancelTuningJob2.google.cloud.aiplatform.v1.CancelTuningJobRequest.google.protobuf.Empty"GÚAname‚Óä“:"5/v1/{name=projects/*/locations/*/tuningJobs/*}:cancel:*MÊAaiplatform.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBÕ +com.google.cloud.aiplatform.v1BGenAiTuningServiceProtoPZ>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpbªGoogle.Cloud.AIPlatform.V1ÊGoogle\\Cloud\\AIPlatform\\V1êGoogle::Cloud::AIPlatform::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AiPlatform/metadata/V1/MachineResources.php b/AiPlatform/metadata/V1/MachineResources.php index 1adc07aab3c4..cfb116767575 100644 --- a/AiPlatform/metadata/V1/MachineResources.php +++ b/AiPlatform/metadata/V1/MachineResources.php @@ -18,7 +18,7 @@ public static function initOnce() { \GPBMetadata\Google\Cloud\Aiplatform\V1\AcceleratorType::initOnce(); $pool->internalAddGeneratedFile( ' -Ç +÷ 2google/cloud/aiplatform/v1/machine_resources.protogoogle.cloud.aiplatform.v11google/cloud/aiplatform/v1/accelerator_type.proto"ª MachineSpec @@ -52,7 +52,9 @@ public static function initOnce() { mount_point ( BàA"A AutoscalingMetricSpec metric_name ( BàA -target (BÓ +target (". +ShieldedVmConfig +enable_secure_boot (BÓ com.google.cloud.aiplatform.v1BMachineResourcesProtoPZ>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpbªGoogle.Cloud.AIPlatform.V1ÊGoogle\\Cloud\\AIPlatform\\V1êGoogle::Cloud::AIPlatform::V1bproto3' , true); diff --git a/AiPlatform/metadata/V1/NetworkSpec.php b/AiPlatform/metadata/V1/NetworkSpec.php new file mode 100644 index 000000000000..300e7f561cbc --- /dev/null +++ b/AiPlatform/metadata/V1/NetworkSpec.php @@ -0,0 +1,36 @@ +internalAddGeneratedFile( + ' +ª +-google/cloud/aiplatform/v1/network_spec.protogoogle.cloud.aiplatform.v1"Ÿ + NetworkSpec +enable_internet_access (4 +network ( B#úA +compute.googleapis.com/Network: + +subnetwork ( B&úA# +!compute.googleapis.com/SubnetworkB² +com.google.cloud.aiplatform.v1BNetworkSpecProtoPZ>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpbªGoogle.Cloud.AIPlatform.V1ÊGoogle\\Cloud\\AIPlatform\\V1êGoogle::Cloud::AIPlatform::V1êAa +!compute.googleapis.com/SubnetworkinternalAddGeneratedFile( + ' +‚ +4google/cloud/aiplatform/v1/notebook_euc_config.protogoogle.cloud.aiplatform.v1"O +NotebookEucConfig + euc_disabled (BàA +bypass_actas_check (BàABÔ +com.google.cloud.aiplatform.v1BNotebookEucConfigProtoPZ>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpbªGoogle.Cloud.AIPlatform.V1ÊGoogle\\Cloud\\AIPlatform\\V1êGoogle::Cloud::AIPlatform::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AiPlatform/metadata/V1/NotebookIdleShutdownConfig.php b/AiPlatform/metadata/V1/NotebookIdleShutdownConfig.php new file mode 100644 index 000000000000..28c99793663a --- /dev/null +++ b/AiPlatform/metadata/V1/NotebookIdleShutdownConfig.php @@ -0,0 +1,32 @@ +internalAddGeneratedFile( + ' +Ø +>google/cloud/aiplatform/v1/notebook_idle_shutdown_config.protogoogle.cloud.aiplatform.v1google/protobuf/duration.proto"r +NotebookIdleShutdownConfig4 + idle_timeout ( 2.google.protobuf.DurationBàA +idle_shutdown_disabled (BÝ +com.google.cloud.aiplatform.v1BNotebookIdleShutdownConfigProtoPZ>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpbªGoogle.Cloud.AIPlatform.V1ÊGoogle\\Cloud\\AIPlatform\\V1êGoogle::Cloud::AIPlatform::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AiPlatform/metadata/V1/NotebookRuntime.php b/AiPlatform/metadata/V1/NotebookRuntime.php new file mode 100644 index 0000000000000000000000000000000000000000..1eb999bcdfe8f6d3f090cc8e9e36e6bca4a85d9a GIT binary patch literal 4250 zcmb_f-HzHu6fW#f!odE-*)(3%w9YnFHdWS$ZPZ3ilL{6uLD>KT7Aci0%a{S&HMZp+ zl5NC8^r9D)`UHKHURLUTdYh-{neo_AmZc=k-YoXa`R2?y-}#Qux8FGf2YoJ-v4vgD z$6cXwF8Bj1IIiv6x@`)bpx48$pxZ;oFtIBNLa8QHYb`-8Ra&>f)UyLu$CA*u?Y@a~ zx@ia9oMt$t=J#xOm>cDDmhIz?ZJ()bVEM)nixeFpOB-U((R3`7>&55T*SeaoDP;PQ}aBb$^aW79(s)g_;Z4eY3PFIYd-wDV|c1z8NQ*J#!qmu$3jmt zJq#EZ_x1uy_YK<;h(XQL@%}v_#3Xy~I5q_0u@HGyC$WLJC>6`cuBDku346M0IKJ)H zVXGwdu^&g2yxG6UjwNtLPuLHAl%xwzJ{Ej8z|*G-f{XpYwH{Hw3BWl1rOb(2!7-F$ z1Do9<9%v)Ob|q3Onjo6J<^7FG+Jb@ux(%KAwv^llPYg!o zLbn?;_ZSL(Kjs=?-d*$?kMi$a>0CB65ve$c6LAnn`Rp!((;Oq`GV+B2kv&{+(lBJ0 z8ku;^=3s%174k^+fJkingGJjT*}{RY>Xa|c>d7)z2Czc)7%kqzo{6REv-HDNd+hwr z*!fgPL5XriRcVsL4SRoIMK@kIY9iB%3k!b~~ z?&A8JLgGzfjccP_(hF1vyPo0s*z#3y@Qh}Tze+*HMVR&2t^{Tj8ZMgPiYPNp0zR{Z ze^cs1E}4MaZ+X}q89G)qUALhJ@f(1X;xcFznpmITq)#=pZfYHDdi<8K0#W#Gk;9iH zOFW?nvgNzyTnp{Y;}n05UgGOz;4dl_S3qdOZ=R!A2g_i^BFa5LY2C%3P%7aek0?eq z!iY#J#!3`&1*`%GvdpZ~%UQM2joHr$)jxMIe;w>M4|CC}bEHO`4KkR;jH@Hg8<4h% zyXt7j%9Y=tPTgMw+GJMkVJQ7EA{14`H6Vq@-vAcSdP`&vPeYh04 zXIzJN84~Sdl!CjzI#&bNpo+v)Z-%z(%MoyfwpW(3YM{&jYonwo=?Dm*`fA)0p42Bv(>q7CR2 zfzx;4k=a<#ZeX literal 0 HcmV?d00001 diff --git a/AiPlatform/metadata/V1/NotebookRuntimeTemplateRef.php b/AiPlatform/metadata/V1/NotebookRuntimeTemplateRef.php new file mode 100644 index 000000000000..92d52033c683 --- /dev/null +++ b/AiPlatform/metadata/V1/NotebookRuntimeTemplateRef.php @@ -0,0 +1,32 @@ +internalAddGeneratedFile( + ' +Û +>google/cloud/aiplatform/v1/notebook_runtime_template_ref.protogoogle.cloud.aiplatform.v1google/api/resource.proto"z +NotebookRuntimeTemplateRef\\ +notebook_runtime_template ( B9àAúA3 +1aiplatform.googleapis.com/NotebookRuntimeTemplateBÝ +com.google.cloud.aiplatform.v1BNotebookRuntimeTemplateRefProtoPZ>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpbªGoogle.Cloud.AIPlatform.V1ÊGoogle\\Cloud\\AIPlatform\\V1êGoogle::Cloud::AIPlatform::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AiPlatform/metadata/V1/NotebookService.php b/AiPlatform/metadata/V1/NotebookService.php new file mode 100644 index 000000000000..6f3328303bee --- /dev/null +++ b/AiPlatform/metadata/V1/NotebookService.php @@ -0,0 +1,120 @@ +internalAddGeneratedFile( + ' +º- +1google/cloud/aiplatform/v1/notebook_service.protogoogle.cloud.aiplatform.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto1google/cloud/aiplatform/v1/notebook_runtime.proto*google/cloud/aiplatform/v1/operation.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"é +$CreateNotebookRuntimeTemplateRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location[ +notebook_runtime_template ( 23.google.cloud.aiplatform.v1.NotebookRuntimeTemplateBàA) +notebook_runtime_template_id ( BàA"€ +.CreateNotebookRuntimeTemplateOperationMetadataN +generic_metadata ( 24.google.cloud.aiplatform.v1.GenericOperationMetadata"l +!GetNotebookRuntimeTemplateRequestG +name ( B9àAúA3 +1aiplatform.googleapis.com/NotebookRuntimeTemplate"ñ +#ListNotebookRuntimeTemplatesRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location +filter ( BàA + page_size (BàA + +page_token ( BàA2 + read_mask ( 2.google.protobuf.FieldMaskBàA +order_by ( BàA"˜ +$ListNotebookRuntimeTemplatesResponseW +notebook_runtime_templates ( 23.google.cloud.aiplatform.v1.NotebookRuntimeTemplate +next_page_token ( "o +$DeleteNotebookRuntimeTemplateRequestG +name ( B9àAúA3 +1aiplatform.googleapis.com/NotebookRuntimeTemplate"¥ +AssignNotebookRuntimeRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location\\ +notebook_runtime_template ( B9àAúA3 +1aiplatform.googleapis.com/NotebookRuntimeTemplateJ +notebook_runtime ( 2+.google.cloud.aiplatform.v1.NotebookRuntimeBàA +notebook_runtime_id ( BàA"’ +&AssignNotebookRuntimeOperationMetadataN +generic_metadata ( 24.google.cloud.aiplatform.v1.GenericOperationMetadata +progress_message ( "\\ +GetNotebookRuntimeRequest? +name ( B1àAúA+ +)aiplatform.googleapis.com/NotebookRuntime"é +ListNotebookRuntimesRequest9 +parent ( B)àAúA# +!locations.googleapis.com/Location +filter ( BàA + page_size (BàA + +page_token ( BàA2 + read_mask ( 2.google.protobuf.FieldMaskBàA +order_by ( BàA" +ListNotebookRuntimesResponseF +notebook_runtimes ( 2+.google.cloud.aiplatform.v1.NotebookRuntime +next_page_token ( "_ +DeleteNotebookRuntimeRequest? +name ( B1àAúA+ +)aiplatform.googleapis.com/NotebookRuntime"` +UpgradeNotebookRuntimeRequest? +name ( B1àAúA+ +)aiplatform.googleapis.com/NotebookRuntime"“ +\'UpgradeNotebookRuntimeOperationMetadataN +generic_metadata ( 24.google.cloud.aiplatform.v1.GenericOperationMetadata +progress_message ( " +UpgradeNotebookRuntimeResponse"^ +StartNotebookRuntimeRequest? +name ( B1àAúA+ +)aiplatform.googleapis.com/NotebookRuntime"‘ +%StartNotebookRuntimeOperationMetadataN +generic_metadata ( 24.google.cloud.aiplatform.v1.GenericOperationMetadata +progress_message ( " +StartNotebookRuntimeResponse2ÿ +NotebookServiceî +CreateNotebookRuntimeTemplate@.google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest.google.longrunning.Operation"ëÊAI +NotebookRuntimeTemplate.CreateNotebookRuntimeTemplateOperationMetadataÚA=parent,notebook_runtime_template,notebook_runtime_template_id‚Óä“Y"*cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpbªGoogle.Cloud.AIPlatform.V1ÊGoogle\\Cloud\\AIPlatform\\V1êGoogle::Cloud::AIPlatform::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AiPlatform/metadata/V1/Openapi.php b/AiPlatform/metadata/V1/Openapi.php index ea0e9a59585b7f78451f932232bea6577c43909c..2511c27b0bc69339241643f69d2ce3f8cfd1ffb8 100644 GIT binary patch delta 282 zcmey$J(X`mAQQ_k4la#}-Wro@nXH+vvrgW{6wD>W#afbCl9MVSF`1d!nn#C=JtZ|Q zu{5VdLVWU1X2r?2%$8bWT%5U?dGVPgsky}xq6&-}%udV?92tc`;)xYdaWRniCM@fo#c1%}X!IkPt!`q7IS)S^`0sN{;{l delta 43 zcmbQr_mz7?AQQ_iHZF~c-Wro@nXH+%Gf&>d6g*jx*>G|Lv&G~W%;lSTSvi;hHaiVw diff --git a/AiPlatform/metadata/V1/PersistentResource.php b/AiPlatform/metadata/V1/PersistentResource.php new file mode 100644 index 0000000000000000000000000000000000000000..6acef1b1c6a3b3d070dfe8f4da1ed3c6f8ca3200 GIT binary patch literal 3339 zcmbtX-*4Mg6rPi&ZBDv2y=+<*F?PwOEgPFdyGcym50tD~7sQ$@$%=$5EXTQR%^cgh zwhLwI0}lxP5T5u`c;kU5B*gRn1fIA*Y$r{+sK8zp`=0MR=brPO}AOHy#35ju`~FlX7-rN_Yd9{qv)NV_P@~&5-?f-3|=fwL{x|VFVOsHLtX-;Ujd;aw!fy!f|Cc^NWr^pNF1}S>-AroGFWLK#oxA(b6Jg zDr};JiCtfqMS--t4+V=71~YiVN=w4JoLDE>R8!eX)I9(eCk-WN`D`HOD)QNAja}u> zhHAs2V-5(*D2R+|No=RcP(39lp9^r)4e1e&T|u9~l1svGJo>s+U?JoiH`v?1>li-Z z-&UMKxMCLJJOmJXKhNar4@09+w(#?Ie%mbJ-C>vg+?yVywHE?yx^%kW_3st9Gcl=TGp3cDl?!^wB>y$B!l3ph{&ie)Jd1tDJ(s;pejZQk6G=rlBwYy7 z0d-vYBMU2u4R3X{1{r%eIar#olFT(e21ViuoBGXpb&J16qW+6)cJKjp70y%Qv(3Xa zERX4Nm7E@LBw zWufby%AUxbhXCS*PeWTp_MGaEM_=LFkQ) zsSAl9mbtz%=zUn5J{^A_8^0@Jyv~WXacQ<2JAA$EC|^F2vp)HhvYEW^O|JK>q1lE% z?sI?eaPr}oOnF-@^Qu@7)q1NF|6!o+Zv2`Y>hY?tkB@b>?7z)ikzh>|XiXcRYufI{ kU{QP|@7+w-tUGdXp4hYbH{E8t=gf{REafJA495Wf0JEM(BLDyZ literal 0 HcmV?d00001 diff --git a/AiPlatform/metadata/V1/PersistentResourceService.php b/AiPlatform/metadata/V1/PersistentResourceService.php new file mode 100644 index 000000000000..86480f469c4a --- /dev/null +++ b/AiPlatform/metadata/V1/PersistentResourceService.php @@ -0,0 +1,82 @@ +internalAddGeneratedFile( + ' +š +/v1/{name=projects/*/locations/*/persistentResources/*}:reboot:*MÊAaiplatform.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBÜ +com.google.cloud.aiplatform.v1BPersistentResourceServiceProtoPZ>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpbªGoogle.Cloud.AIPlatform.V1ÊGoogle\\Cloud\\AIPlatform\\V1êGoogle::Cloud::AIPlatform::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AiPlatform/metadata/V1/PredictionService.php b/AiPlatform/metadata/V1/PredictionService.php index d899aee673cea523f316e69e09b4937f4f3f013a..c7ff2449651a0823ec4f0fcd31a5073e655428d4 100644 GIT binary patch delta 160 zcmez3^4E1k5DUv)8!qF?j;zuX(PvZ8k;^h7Lx?$*%;@N;-*h3CCk9Rl2@;r;r3AK7uwvYAP=h!+4bpffuF delta 66 zcmV-I0KNbHMf60lQUnClI|?(CK?NI;W*D=H1osRCwE_wjlTjZQlbR7xlQt5}0wS=p Y8xt4-0k4xZ6zKs*lO7dDvx^mS4gUWXr~m)} diff --git a/AiPlatform/metadata/V1/TuningJob.php b/AiPlatform/metadata/V1/TuningJob.php new file mode 100644 index 0000000000000000000000000000000000000000..ddea34c89d820b9d3e0f42418675da9145d5172f GIT binary patch literal 4115 zcmb_fUsDrT6n7IqI1!91+Lckd1XR$vDOfu;iZ+n|u@y2TIvr;_na$<`E1TV&-Mb9b zVW!iWzVxH?x!<8Poxc0(YyAf8Q_uaAO+dhOsxOAS=g&RA^E>C<^YC%79l*4{LOc>$ zl(h8bzD~D^9)v#iZQs?K@#ZE8b=z+Tj!QyA*O%7ywe`AQUaHimP&M-7&?W_a%lEfj zlDAzyZsjc}a4ov&hwc3Ce4fUh<83uw`Avh{1@Npki2}k+jm{x{=94aak+W4X=`7|f!+X}J+W z?e}FjW6!3J@99io-LuK;oGxrK*_pt{;1~7IovI8E#KNq2l!Tt;noA_ILnokqSVhr7 zVT;fNMRqbfC*3l0&Za&q?pP?icgaPahB4{&uInM8ap*nZ_htqTl3(UAh!q3JTy}`t zDv@n#*YU$bp&M1#$VsXjL?*Fstz%MTKJgJ6kM{5SI3t+Z8s?JpZzai0-9b)Ks~z;O zyAjwXa~DU)>u?s_dF05P7hA0)#miU?vq@4|if+Q+8r=R5WuQ(7VT0F<(XAO{cYflE zG-L%%K9ur< zt-Ao|FQh_gxId+N7$zP9$^4A;r-HYO1MIW%cF>>J4HzV0=!aT{%d4GekOfAKvp__# z3`4HfByOag)6*FCd`IvYavKR-jBmM4*`wh;v!kes0Avq|f`NHd8%3uhr8xxmpW-x3 z^^}O93sy&D;B3nC=CeoDuOZWueQk_i`o;(DLR!xlSw$emcv?HjY8x!?VuM137$=sCX&^!_q&v1>z6(VPPcsT^fUPVi<_}DUEVK z862!yb3Z8ncnOJ^`XvmCIu|u)-sG8@f=^ElfkUl68-P5y00V7edAxVY zql+-qCM^dKS-X;l=OGo`<6WX_D){OiuX}l7!`WtR?+_Yk!@Mk>okpQPLNa8SC2m!a z>?w>MI#pE|wEY;7Wm%Co!Ju5SDZrLTC>AA2WKn6)FqtUF8L$)r3ZN&;z& zO&R%p2d>2tdU3oU#+K^u5Rc7(gcEY!JpP|~5ZrNLk~{NbdV)7LLoy2=$6Ex~xi@^~ zMAjB*V3$nrKNO-EJRisD3S8n&k0iXq=jqdMlrKV#Rqkg6&SU53?UCyDa5YM1dxt5^ zlWe<;znO)5r};RMtgB~A7Za{@ZRUPY^)h^QA5p9#HQNNa8L?*p34D9|D4`Yhu5gJJ z^2xwfrA9k;Defo^3A^n?QB4!h;WiU6rboDh@ZuUY{n7X>ms zhw4?(ic7_6y}Z$=RbG}G&(~_z@{`JPrM#3qgD<4)p|9&}<*cG!f(wUEm)Dia&dssZ%gcLkm|BIYqHAH{#HdFEtD# zrB1_ToPG`_1{*aWwH=|JM_L`S+bltiAjuHNvu{ou!INWH`cr{Pd^4PqkcA?PyUMRenZw~Rd<=vafKJuAZDSI|hd}88;e9ZRACB=?- I00#j70-r%X-2eap literal 0 HcmV?d00001 diff --git a/AiPlatform/samples/V1/GenAiTuningServiceClient/cancel_tuning_job.php b/AiPlatform/samples/V1/GenAiTuningServiceClient/cancel_tuning_job.php new file mode 100644 index 000000000000..56c6e70b445e --- /dev/null +++ b/AiPlatform/samples/V1/GenAiTuningServiceClient/cancel_tuning_job.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $genAiTuningServiceClient->cancelTuningJob($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 = GenAiTuningServiceClient::tuningJobName('[PROJECT]', '[LOCATION]', '[TUNING_JOB]'); + + cancel_tuning_job_sample($formattedName); +} +// [END aiplatform_v1_generated_GenAiTuningService_CancelTuningJob_sync] diff --git a/AiPlatform/samples/V1/GenAiTuningServiceClient/create_tuning_job.php b/AiPlatform/samples/V1/GenAiTuningServiceClient/create_tuning_job.php new file mode 100644 index 000000000000..4c7149323045 --- /dev/null +++ b/AiPlatform/samples/V1/GenAiTuningServiceClient/create_tuning_job.php @@ -0,0 +1,75 @@ +setParent($formattedParent) + ->setTuningJob($tuningJob); + + // Call the API and handle any network failures. + try { + /** @var TuningJob $response */ + $response = $genAiTuningServiceClient->createTuningJob($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = GenAiTuningServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + create_tuning_job_sample($formattedParent); +} +// [END aiplatform_v1_generated_GenAiTuningService_CreateTuningJob_sync] diff --git a/AiPlatform/samples/V1/GenAiTuningServiceClient/get_iam_policy.php b/AiPlatform/samples/V1/GenAiTuningServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..517e836e89bc --- /dev/null +++ b/AiPlatform/samples/V1/GenAiTuningServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $genAiTuningServiceClient->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 aiplatform_v1_generated_GenAiTuningService_GetIamPolicy_sync] diff --git a/AiPlatform/samples/V1/GenAiTuningServiceClient/get_location.php b/AiPlatform/samples/V1/GenAiTuningServiceClient/get_location.php new file mode 100644 index 000000000000..a71a95c5065e --- /dev/null +++ b/AiPlatform/samples/V1/GenAiTuningServiceClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END aiplatform_v1_generated_GenAiTuningService_GetLocation_sync] diff --git a/AiPlatform/samples/V1/GenAiTuningServiceClient/get_tuning_job.php b/AiPlatform/samples/V1/GenAiTuningServiceClient/get_tuning_job.php new file mode 100644 index 000000000000..f0c1855a6577 --- /dev/null +++ b/AiPlatform/samples/V1/GenAiTuningServiceClient/get_tuning_job.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var TuningJob $response */ + $response = $genAiTuningServiceClient->getTuningJob($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = GenAiTuningServiceClient::tuningJobName('[PROJECT]', '[LOCATION]', '[TUNING_JOB]'); + + get_tuning_job_sample($formattedName); +} +// [END aiplatform_v1_generated_GenAiTuningService_GetTuningJob_sync] diff --git a/AiPlatform/samples/V1/GenAiTuningServiceClient/list_locations.php b/AiPlatform/samples/V1/GenAiTuningServiceClient/list_locations.php new file mode 100644 index 000000000000..f528e56198d4 --- /dev/null +++ b/AiPlatform/samples/V1/GenAiTuningServiceClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END aiplatform_v1_generated_GenAiTuningService_ListLocations_sync] diff --git a/AiPlatform/samples/V1/GenAiTuningServiceClient/list_tuning_jobs.php b/AiPlatform/samples/V1/GenAiTuningServiceClient/list_tuning_jobs.php new file mode 100644 index 000000000000..9857fb64e2c8 --- /dev/null +++ b/AiPlatform/samples/V1/GenAiTuningServiceClient/list_tuning_jobs.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $genAiTuningServiceClient->listTuningJobs($request); + + /** @var TuningJob $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = GenAiTuningServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_tuning_jobs_sample($formattedParent); +} +// [END aiplatform_v1_generated_GenAiTuningService_ListTuningJobs_sync] diff --git a/AiPlatform/samples/V1/GenAiTuningServiceClient/set_iam_policy.php b/AiPlatform/samples/V1/GenAiTuningServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..1a67475c3d0b --- /dev/null +++ b/AiPlatform/samples/V1/GenAiTuningServiceClient/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 = $genAiTuningServiceClient->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 aiplatform_v1_generated_GenAiTuningService_SetIamPolicy_sync] diff --git a/AiPlatform/samples/V1/GenAiTuningServiceClient/test_iam_permissions.php b/AiPlatform/samples/V1/GenAiTuningServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..37e3e3ca6892 --- /dev/null +++ b/AiPlatform/samples/V1/GenAiTuningServiceClient/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 = $genAiTuningServiceClient->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 aiplatform_v1_generated_GenAiTuningService_TestIamPermissions_sync] diff --git a/AiPlatform/samples/V1/NotebookServiceClient/assign_notebook_runtime.php b/AiPlatform/samples/V1/NotebookServiceClient/assign_notebook_runtime.php new file mode 100644 index 000000000000..fe2cec97ca9b --- /dev/null +++ b/AiPlatform/samples/V1/NotebookServiceClient/assign_notebook_runtime.php @@ -0,0 +1,113 @@ +setRuntimeUser($notebookRuntimeRuntimeUser) + ->setDisplayName($notebookRuntimeDisplayName); + $request = (new AssignNotebookRuntimeRequest()) + ->setParent($formattedParent) + ->setNotebookRuntimeTemplate($formattedNotebookRuntimeTemplate) + ->setNotebookRuntime($notebookRuntime); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->assignNotebookRuntime($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var NotebookRuntime $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NotebookServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $formattedNotebookRuntimeTemplate = NotebookServiceClient::notebookRuntimeTemplateName( + '[PROJECT]', + '[LOCATION]', + '[NOTEBOOK_RUNTIME_TEMPLATE]' + ); + $notebookRuntimeRuntimeUser = '[RUNTIME_USER]'; + $notebookRuntimeDisplayName = '[DISPLAY_NAME]'; + + assign_notebook_runtime_sample( + $formattedParent, + $formattedNotebookRuntimeTemplate, + $notebookRuntimeRuntimeUser, + $notebookRuntimeDisplayName + ); +} +// [END aiplatform_v1_generated_NotebookService_AssignNotebookRuntime_sync] diff --git a/AiPlatform/samples/V1/NotebookServiceClient/create_notebook_runtime_template.php b/AiPlatform/samples/V1/NotebookServiceClient/create_notebook_runtime_template.php new file mode 100644 index 000000000000..f79e1c51557b --- /dev/null +++ b/AiPlatform/samples/V1/NotebookServiceClient/create_notebook_runtime_template.php @@ -0,0 +1,93 @@ +setDisplayName($notebookRuntimeTemplateDisplayName); + $request = (new CreateNotebookRuntimeTemplateRequest()) + ->setParent($formattedParent) + ->setNotebookRuntimeTemplate($notebookRuntimeTemplate); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->createNotebookRuntimeTemplate($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var NotebookRuntimeTemplate $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NotebookServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $notebookRuntimeTemplateDisplayName = '[DISPLAY_NAME]'; + + create_notebook_runtime_template_sample($formattedParent, $notebookRuntimeTemplateDisplayName); +} +// [END aiplatform_v1_generated_NotebookService_CreateNotebookRuntimeTemplate_sync] diff --git a/AiPlatform/samples/V1/NotebookServiceClient/delete_notebook_runtime.php b/AiPlatform/samples/V1/NotebookServiceClient/delete_notebook_runtime.php new file mode 100644 index 000000000000..74a1401fa8fb --- /dev/null +++ b/AiPlatform/samples/V1/NotebookServiceClient/delete_notebook_runtime.php @@ -0,0 +1,87 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->deleteNotebookRuntime($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NotebookServiceClient::notebookRuntimeName( + '[PROJECT]', + '[LOCATION]', + '[NOTEBOOK_RUNTIME]' + ); + + delete_notebook_runtime_sample($formattedName); +} +// [END aiplatform_v1_generated_NotebookService_DeleteNotebookRuntime_sync] diff --git a/AiPlatform/samples/V1/NotebookServiceClient/delete_notebook_runtime_template.php b/AiPlatform/samples/V1/NotebookServiceClient/delete_notebook_runtime_template.php new file mode 100644 index 000000000000..3172af4cf7f1 --- /dev/null +++ b/AiPlatform/samples/V1/NotebookServiceClient/delete_notebook_runtime_template.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->deleteNotebookRuntimeTemplate($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NotebookServiceClient::notebookRuntimeTemplateName( + '[PROJECT]', + '[LOCATION]', + '[NOTEBOOK_RUNTIME_TEMPLATE]' + ); + + delete_notebook_runtime_template_sample($formattedName); +} +// [END aiplatform_v1_generated_NotebookService_DeleteNotebookRuntimeTemplate_sync] diff --git a/AiPlatform/samples/V1/NotebookServiceClient/get_iam_policy.php b/AiPlatform/samples/V1/NotebookServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..54da739e0b19 --- /dev/null +++ b/AiPlatform/samples/V1/NotebookServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $notebookServiceClient->getIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + get_iam_policy_sample($resource); +} +// [END aiplatform_v1_generated_NotebookService_GetIamPolicy_sync] diff --git a/AiPlatform/samples/V1/NotebookServiceClient/get_location.php b/AiPlatform/samples/V1/NotebookServiceClient/get_location.php new file mode 100644 index 000000000000..76f2ac39f024 --- /dev/null +++ b/AiPlatform/samples/V1/NotebookServiceClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END aiplatform_v1_generated_NotebookService_GetLocation_sync] diff --git a/AiPlatform/samples/V1/NotebookServiceClient/get_notebook_runtime.php b/AiPlatform/samples/V1/NotebookServiceClient/get_notebook_runtime.php new file mode 100644 index 000000000000..2ac5104c81a7 --- /dev/null +++ b/AiPlatform/samples/V1/NotebookServiceClient/get_notebook_runtime.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var NotebookRuntime $response */ + $response = $notebookServiceClient->getNotebookRuntime($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NotebookServiceClient::notebookRuntimeName( + '[PROJECT]', + '[LOCATION]', + '[NOTEBOOK_RUNTIME]' + ); + + get_notebook_runtime_sample($formattedName); +} +// [END aiplatform_v1_generated_NotebookService_GetNotebookRuntime_sync] diff --git a/AiPlatform/samples/V1/NotebookServiceClient/get_notebook_runtime_template.php b/AiPlatform/samples/V1/NotebookServiceClient/get_notebook_runtime_template.php new file mode 100644 index 000000000000..40e2dff4d480 --- /dev/null +++ b/AiPlatform/samples/V1/NotebookServiceClient/get_notebook_runtime_template.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var NotebookRuntimeTemplate $response */ + $response = $notebookServiceClient->getNotebookRuntimeTemplate($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NotebookServiceClient::notebookRuntimeTemplateName( + '[PROJECT]', + '[LOCATION]', + '[NOTEBOOK_RUNTIME_TEMPLATE]' + ); + + get_notebook_runtime_template_sample($formattedName); +} +// [END aiplatform_v1_generated_NotebookService_GetNotebookRuntimeTemplate_sync] diff --git a/AiPlatform/samples/V1/NotebookServiceClient/list_locations.php b/AiPlatform/samples/V1/NotebookServiceClient/list_locations.php new file mode 100644 index 000000000000..0ec91b6dda73 --- /dev/null +++ b/AiPlatform/samples/V1/NotebookServiceClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END aiplatform_v1_generated_NotebookService_ListLocations_sync] diff --git a/AiPlatform/samples/V1/NotebookServiceClient/list_notebook_runtime_templates.php b/AiPlatform/samples/V1/NotebookServiceClient/list_notebook_runtime_templates.php new file mode 100644 index 000000000000..c1f45e4e8948 --- /dev/null +++ b/AiPlatform/samples/V1/NotebookServiceClient/list_notebook_runtime_templates.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $notebookServiceClient->listNotebookRuntimeTemplates($request); + + /** @var NotebookRuntimeTemplate $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NotebookServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_notebook_runtime_templates_sample($formattedParent); +} +// [END aiplatform_v1_generated_NotebookService_ListNotebookRuntimeTemplates_sync] diff --git a/AiPlatform/samples/V1/NotebookServiceClient/list_notebook_runtimes.php b/AiPlatform/samples/V1/NotebookServiceClient/list_notebook_runtimes.php new file mode 100644 index 000000000000..0ddbed55ff14 --- /dev/null +++ b/AiPlatform/samples/V1/NotebookServiceClient/list_notebook_runtimes.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $notebookServiceClient->listNotebookRuntimes($request); + + /** @var NotebookRuntime $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = NotebookServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_notebook_runtimes_sample($formattedParent); +} +// [END aiplatform_v1_generated_NotebookService_ListNotebookRuntimes_sync] diff --git a/AiPlatform/samples/V1/NotebookServiceClient/set_iam_policy.php b/AiPlatform/samples/V1/NotebookServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..e4d447307a9e --- /dev/null +++ b/AiPlatform/samples/V1/NotebookServiceClient/set_iam_policy.php @@ -0,0 +1,77 @@ +setResource($resource) + ->setPolicy($policy); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $notebookServiceClient->setIamPolicy($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + + set_iam_policy_sample($resource); +} +// [END aiplatform_v1_generated_NotebookService_SetIamPolicy_sync] diff --git a/AiPlatform/samples/V1/NotebookServiceClient/start_notebook_runtime.php b/AiPlatform/samples/V1/NotebookServiceClient/start_notebook_runtime.php new file mode 100644 index 000000000000..2e7c40cd3745 --- /dev/null +++ b/AiPlatform/samples/V1/NotebookServiceClient/start_notebook_runtime.php @@ -0,0 +1,90 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->startNotebookRuntime($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var StartNotebookRuntimeResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NotebookServiceClient::notebookRuntimeName( + '[PROJECT]', + '[LOCATION]', + '[NOTEBOOK_RUNTIME]' + ); + + start_notebook_runtime_sample($formattedName); +} +// [END aiplatform_v1_generated_NotebookService_StartNotebookRuntime_sync] diff --git a/AiPlatform/samples/V1/NotebookServiceClient/test_iam_permissions.php b/AiPlatform/samples/V1/NotebookServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..63a012d0279e --- /dev/null +++ b/AiPlatform/samples/V1/NotebookServiceClient/test_iam_permissions.php @@ -0,0 +1,84 @@ +setResource($resource) + ->setPermissions($permissions); + + // Call the API and handle any network failures. + try { + /** @var TestIamPermissionsResponse $response */ + $response = $notebookServiceClient->testIamPermissions($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resource = '[RESOURCE]'; + $permissionsElement = '[PERMISSIONS]'; + + test_iam_permissions_sample($resource, $permissionsElement); +} +// [END aiplatform_v1_generated_NotebookService_TestIamPermissions_sync] diff --git a/AiPlatform/samples/V1/NotebookServiceClient/upgrade_notebook_runtime.php b/AiPlatform/samples/V1/NotebookServiceClient/upgrade_notebook_runtime.php new file mode 100644 index 000000000000..745910e31688 --- /dev/null +++ b/AiPlatform/samples/V1/NotebookServiceClient/upgrade_notebook_runtime.php @@ -0,0 +1,90 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $notebookServiceClient->upgradeNotebookRuntime($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var UpgradeNotebookRuntimeResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = NotebookServiceClient::notebookRuntimeName( + '[PROJECT]', + '[LOCATION]', + '[NOTEBOOK_RUNTIME]' + ); + + upgrade_notebook_runtime_sample($formattedName); +} +// [END aiplatform_v1_generated_NotebookService_UpgradeNotebookRuntime_sync] diff --git a/AiPlatform/samples/V1/PersistentResourceServiceClient/create_persistent_resource.php b/AiPlatform/samples/V1/PersistentResourceServiceClient/create_persistent_resource.php new file mode 100644 index 000000000000..6b30fdb2fb5e --- /dev/null +++ b/AiPlatform/samples/V1/PersistentResourceServiceClient/create_persistent_resource.php @@ -0,0 +1,102 @@ +setMachineSpec($persistentResourceResourcePoolsMachineSpec); + $persistentResourceResourcePools = [$resourcePool,]; + $persistentResource = (new PersistentResource()) + ->setResourcePools($persistentResourceResourcePools); + $request = (new CreatePersistentResourceRequest()) + ->setParent($formattedParent) + ->setPersistentResource($persistentResource) + ->setPersistentResourceId($persistentResourceId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $persistentResourceServiceClient->createPersistentResource($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PersistentResource $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = PersistentResourceServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $persistentResourceId = '[PERSISTENT_RESOURCE_ID]'; + + create_persistent_resource_sample($formattedParent, $persistentResourceId); +} +// [END aiplatform_v1_generated_PersistentResourceService_CreatePersistentResource_sync] diff --git a/AiPlatform/samples/V1/PersistentResourceServiceClient/delete_persistent_resource.php b/AiPlatform/samples/V1/PersistentResourceServiceClient/delete_persistent_resource.php new file mode 100644 index 000000000000..f937a624de20 --- /dev/null +++ b/AiPlatform/samples/V1/PersistentResourceServiceClient/delete_persistent_resource.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $persistentResourceServiceClient->deletePersistentResource($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 = PersistentResourceServiceClient::persistentResourceName( + '[PROJECT]', + '[LOCATION]', + '[PERSISTENT_RESOURCE]' + ); + + delete_persistent_resource_sample($formattedName); +} +// [END aiplatform_v1_generated_PersistentResourceService_DeletePersistentResource_sync] diff --git a/AiPlatform/samples/V1/PersistentResourceServiceClient/get_iam_policy.php b/AiPlatform/samples/V1/PersistentResourceServiceClient/get_iam_policy.php new file mode 100644 index 000000000000..8f1a2e864ce4 --- /dev/null +++ b/AiPlatform/samples/V1/PersistentResourceServiceClient/get_iam_policy.php @@ -0,0 +1,72 @@ +setResource($resource); + + // Call the API and handle any network failures. + try { + /** @var Policy $response */ + $response = $persistentResourceServiceClient->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 aiplatform_v1_generated_PersistentResourceService_GetIamPolicy_sync] diff --git a/AiPlatform/samples/V1/PersistentResourceServiceClient/get_location.php b/AiPlatform/samples/V1/PersistentResourceServiceClient/get_location.php new file mode 100644 index 000000000000..ab456dee65d8 --- /dev/null +++ b/AiPlatform/samples/V1/PersistentResourceServiceClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END aiplatform_v1_generated_PersistentResourceService_GetLocation_sync] diff --git a/AiPlatform/samples/V1/PersistentResourceServiceClient/get_persistent_resource.php b/AiPlatform/samples/V1/PersistentResourceServiceClient/get_persistent_resource.php new file mode 100644 index 000000000000..ebaac14dfb04 --- /dev/null +++ b/AiPlatform/samples/V1/PersistentResourceServiceClient/get_persistent_resource.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PersistentResource $response */ + $response = $persistentResourceServiceClient->getPersistentResource($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = PersistentResourceServiceClient::persistentResourceName( + '[PROJECT]', + '[LOCATION]', + '[PERSISTENT_RESOURCE]' + ); + + get_persistent_resource_sample($formattedName); +} +// [END aiplatform_v1_generated_PersistentResourceService_GetPersistentResource_sync] diff --git a/AiPlatform/samples/V1/PersistentResourceServiceClient/list_locations.php b/AiPlatform/samples/V1/PersistentResourceServiceClient/list_locations.php new file mode 100644 index 000000000000..4bce97c5dfd9 --- /dev/null +++ b/AiPlatform/samples/V1/PersistentResourceServiceClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END aiplatform_v1_generated_PersistentResourceService_ListLocations_sync] diff --git a/AiPlatform/samples/V1/PersistentResourceServiceClient/list_persistent_resources.php b/AiPlatform/samples/V1/PersistentResourceServiceClient/list_persistent_resources.php new file mode 100644 index 000000000000..20739d9265fa --- /dev/null +++ b/AiPlatform/samples/V1/PersistentResourceServiceClient/list_persistent_resources.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $persistentResourceServiceClient->listPersistentResources($request); + + /** @var PersistentResource $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = PersistentResourceServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_persistent_resources_sample($formattedParent); +} +// [END aiplatform_v1_generated_PersistentResourceService_ListPersistentResources_sync] diff --git a/AiPlatform/samples/V1/PersistentResourceServiceClient/reboot_persistent_resource.php b/AiPlatform/samples/V1/PersistentResourceServiceClient/reboot_persistent_resource.php new file mode 100644 index 000000000000..7c4c4ad25dd4 --- /dev/null +++ b/AiPlatform/samples/V1/PersistentResourceServiceClient/reboot_persistent_resource.php @@ -0,0 +1,89 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $persistentResourceServiceClient->rebootPersistentResource($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PersistentResource $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = PersistentResourceServiceClient::persistentResourceName( + '[PROJECT]', + '[LOCATION]', + '[PERSISTENT_RESOURCE]' + ); + + reboot_persistent_resource_sample($formattedName); +} +// [END aiplatform_v1_generated_PersistentResourceService_RebootPersistentResource_sync] diff --git a/AiPlatform/samples/V1/PersistentResourceServiceClient/set_iam_policy.php b/AiPlatform/samples/V1/PersistentResourceServiceClient/set_iam_policy.php new file mode 100644 index 000000000000..737bcba007f3 --- /dev/null +++ b/AiPlatform/samples/V1/PersistentResourceServiceClient/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 = $persistentResourceServiceClient->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 aiplatform_v1_generated_PersistentResourceService_SetIamPolicy_sync] diff --git a/AiPlatform/samples/V1/PersistentResourceServiceClient/test_iam_permissions.php b/AiPlatform/samples/V1/PersistentResourceServiceClient/test_iam_permissions.php new file mode 100644 index 000000000000..83c4c82209e4 --- /dev/null +++ b/AiPlatform/samples/V1/PersistentResourceServiceClient/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 = $persistentResourceServiceClient->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 aiplatform_v1_generated_PersistentResourceService_TestIamPermissions_sync] diff --git a/AiPlatform/samples/V1/PersistentResourceServiceClient/update_persistent_resource.php b/AiPlatform/samples/V1/PersistentResourceServiceClient/update_persistent_resource.php new file mode 100644 index 000000000000..9bbe3dde0d83 --- /dev/null +++ b/AiPlatform/samples/V1/PersistentResourceServiceClient/update_persistent_resource.php @@ -0,0 +1,81 @@ +setMachineSpec($persistentResourceResourcePoolsMachineSpec); + $persistentResourceResourcePools = [$resourcePool,]; + $persistentResource = (new PersistentResource()) + ->setResourcePools($persistentResourceResourcePools); + $updateMask = new FieldMask(); + $request = (new UpdatePersistentResourceRequest()) + ->setPersistentResource($persistentResource) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $persistentResourceServiceClient->updatePersistentResource($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var PersistentResource $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + 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 aiplatform_v1_generated_PersistentResourceService_UpdatePersistentResource_sync] diff --git a/AiPlatform/src/V1/AssignNotebookRuntimeOperationMetadata.php b/AiPlatform/src/V1/AssignNotebookRuntimeOperationMetadata.php new file mode 100644 index 000000000000..77318886a842 --- /dev/null +++ b/AiPlatform/src/V1/AssignNotebookRuntimeOperationMetadata.php @@ -0,0 +1,116 @@ +google.cloud.aiplatform.v1.AssignNotebookRuntimeOperationMetadata + */ +class AssignNotebookRuntimeOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The operation generic information. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private $generic_metadata = null; + /** + * A human-readable message that shows the intermediate progress details of + * NotebookRuntime. + * + * Generated from protobuf field string progress_message = 2; + */ + private $progress_message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\GenericOperationMetadata $generic_metadata + * The operation generic information. + * @type string $progress_message + * A human-readable message that shows the intermediate progress details of + * NotebookRuntime. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\NotebookService::initOnce(); + parent::__construct($data); + } + + /** + * The operation generic information. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * @return \Google\Cloud\AIPlatform\V1\GenericOperationMetadata|null + */ + public function getGenericMetadata() + { + return $this->generic_metadata; + } + + public function hasGenericMetadata() + { + return isset($this->generic_metadata); + } + + public function clearGenericMetadata() + { + unset($this->generic_metadata); + } + + /** + * The operation generic information. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * @param \Google\Cloud\AIPlatform\V1\GenericOperationMetadata $var + * @return $this + */ + public function setGenericMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GenericOperationMetadata::class); + $this->generic_metadata = $var; + + return $this; + } + + /** + * A human-readable message that shows the intermediate progress details of + * NotebookRuntime. + * + * Generated from protobuf field string progress_message = 2; + * @return string + */ + public function getProgressMessage() + { + return $this->progress_message; + } + + /** + * A human-readable message that shows the intermediate progress details of + * NotebookRuntime. + * + * Generated from protobuf field string progress_message = 2; + * @param string $var + * @return $this + */ + public function setProgressMessage($var) + { + GPBUtil::checkString($var, True); + $this->progress_message = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/AssignNotebookRuntimeRequest.php b/AiPlatform/src/V1/AssignNotebookRuntimeRequest.php new file mode 100644 index 000000000000..85624f69347d --- /dev/null +++ b/AiPlatform/src/V1/AssignNotebookRuntimeRequest.php @@ -0,0 +1,216 @@ +google.cloud.aiplatform.v1.AssignNotebookRuntimeRequest + */ +class AssignNotebookRuntimeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Location to get the NotebookRuntime + * assignment. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $parent = ''; + /** + * Required. The resource name of the NotebookRuntimeTemplate based on which a + * NotebookRuntime will be assigned (reuse or create a new one). + * + * Generated from protobuf field string notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $notebook_runtime_template = ''; + /** + * Required. Provide runtime specific information (e.g. runtime owner, + * notebook id) used for NotebookRuntime assignment. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $notebook_runtime = null; + /** + * Optional. User specified ID for the notebook runtime. + * + * Generated from protobuf field string notebook_runtime_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $notebook_runtime_id = ''; + + /** + * @param string $parent Required. The resource name of the Location to get the NotebookRuntime + * assignment. Format: `projects/{project}/locations/{location}` + * Please see {@see NotebookServiceClient::locationName()} for help formatting this field. + * @param string $notebookRuntimeTemplate Required. The resource name of the NotebookRuntimeTemplate based on which a + * NotebookRuntime will be assigned (reuse or create a new one). Please see + * {@see NotebookServiceClient::notebookRuntimeTemplateName()} for help formatting this field. + * @param \Google\Cloud\AIPlatform\V1\NotebookRuntime $notebookRuntime Required. Provide runtime specific information (e.g. runtime owner, + * notebook id) used for NotebookRuntime assignment. + * @param string $notebookRuntimeId Optional. User specified ID for the notebook runtime. + * + * @return \Google\Cloud\AIPlatform\V1\AssignNotebookRuntimeRequest + * + * @experimental + */ + public static function build(string $parent, string $notebookRuntimeTemplate, \Google\Cloud\AIPlatform\V1\NotebookRuntime $notebookRuntime, string $notebookRuntimeId): self + { + return (new self()) + ->setParent($parent) + ->setNotebookRuntimeTemplate($notebookRuntimeTemplate) + ->setNotebookRuntime($notebookRuntime) + ->setNotebookRuntimeId($notebookRuntimeId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the Location to get the NotebookRuntime + * assignment. Format: `projects/{project}/locations/{location}` + * @type string $notebook_runtime_template + * Required. The resource name of the NotebookRuntimeTemplate based on which a + * NotebookRuntime will be assigned (reuse or create a new one). + * @type \Google\Cloud\AIPlatform\V1\NotebookRuntime $notebook_runtime + * Required. Provide runtime specific information (e.g. runtime owner, + * notebook id) used for NotebookRuntime assignment. + * @type string $notebook_runtime_id + * Optional. User specified ID for the notebook runtime. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\NotebookService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Location to get the NotebookRuntime + * assignment. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the Location to get the NotebookRuntime + * assignment. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The resource name of the NotebookRuntimeTemplate based on which a + * NotebookRuntime will be assigned (reuse or create a new one). + * + * Generated from protobuf field string notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getNotebookRuntimeTemplate() + { + return $this->notebook_runtime_template; + } + + /** + * Required. The resource name of the NotebookRuntimeTemplate based on which a + * NotebookRuntime will be assigned (reuse or create a new one). + * + * Generated from protobuf field string notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNotebookRuntimeTemplate($var) + { + GPBUtil::checkString($var, True); + $this->notebook_runtime_template = $var; + + return $this; + } + + /** + * Required. Provide runtime specific information (e.g. runtime owner, + * notebook id) used for NotebookRuntime assignment. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\NotebookRuntime|null + */ + public function getNotebookRuntime() + { + return $this->notebook_runtime; + } + + public function hasNotebookRuntime() + { + return isset($this->notebook_runtime); + } + + public function clearNotebookRuntime() + { + unset($this->notebook_runtime); + } + + /** + * Required. Provide runtime specific information (e.g. runtime owner, + * notebook id) used for NotebookRuntime assignment. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtime = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\NotebookRuntime $var + * @return $this + */ + public function setNotebookRuntime($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\NotebookRuntime::class); + $this->notebook_runtime = $var; + + return $this; + } + + /** + * Optional. User specified ID for the notebook runtime. + * + * Generated from protobuf field string notebook_runtime_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNotebookRuntimeId() + { + return $this->notebook_runtime_id; + } + + /** + * Optional. User specified ID for the notebook runtime. + * + * Generated from protobuf field string notebook_runtime_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setNotebookRuntimeId($var) + { + GPBUtil::checkString($var, True); + $this->notebook_runtime_id = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/Blob.php b/AiPlatform/src/V1/Blob.php index 1405d081c9c9..13e490bfab4c 100644 --- a/AiPlatform/src/V1/Blob.php +++ b/AiPlatform/src/V1/Blob.php @@ -9,8 +9,9 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Raw media bytes. - * Text should not be sent as raw bytes, use the 'text' field. + * Content blob. + * It's preferred to send as [text][google.cloud.aiplatform.v1.Part.text] + * directly rather than raw bytes. * * Generated from protobuf message google.cloud.aiplatform.v1.Blob */ @@ -23,7 +24,7 @@ class Blob extends \Google\Protobuf\Internal\Message */ private $mime_type = ''; /** - * Required. Raw bytes for media formats. + * Required. Raw bytes. * * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; */ @@ -38,7 +39,7 @@ class Blob extends \Google\Protobuf\Internal\Message * @type string $mime_type * Required. The IANA standard MIME type of the source data. * @type string $data - * Required. Raw bytes for media formats. + * Required. Raw bytes. * } */ public function __construct($data = NULL) { @@ -73,7 +74,7 @@ public function setMimeType($var) } /** - * Required. Raw bytes for media formats. + * Required. Raw bytes. * * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -84,7 +85,7 @@ public function getData() } /** - * Required. Raw bytes for media formats. + * Required. Raw bytes. * * Generated from protobuf field bytes data = 2 [(.google.api.field_behavior) = REQUIRED]; * @param string $var diff --git a/AiPlatform/src/V1/CancelTuningJobRequest.php b/AiPlatform/src/V1/CancelTuningJobRequest.php new file mode 100644 index 000000000000..ef70fd619cf4 --- /dev/null +++ b/AiPlatform/src/V1/CancelTuningJobRequest.php @@ -0,0 +1,87 @@ +google.cloud.aiplatform.v1.CancelTuningJobRequest + */ +class CancelTuningJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the TuningJob to cancel. Format: + * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $name = ''; + + /** + * @param string $name Required. The name of the TuningJob to cancel. Format: + * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + * Please see {@see GenAiTuningServiceClient::tuningJobName()} for help formatting this field. + * + * @return \Google\Cloud\AIPlatform\V1\CancelTuningJobRequest + * + * @experimental + */ + public static function 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 TuningJob to cancel. Format: + * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\GenaiTuningService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the TuningJob to cancel. Format: + * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + * + * Generated from 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 TuningJob to cancel. Format: + * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/Client/GenAiTuningServiceClient.php b/AiPlatform/src/V1/Client/GenAiTuningServiceClient.php new file mode 100644 index 000000000000..0e81920e7181 --- /dev/null +++ b/AiPlatform/src/V1/Client/GenAiTuningServiceClient.php @@ -0,0 +1,611 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/gen_ai_tuning_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/gen_ai_tuning_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/gen_ai_tuning_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/gen_ai_tuning_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a context + * resource. + * + * @param string $project + * @param string $location + * @param string $metadataStore + * @param string $context + * + * @return string The formatted context resource. + */ + public static function contextName(string $project, string $location, string $metadataStore, string $context): string + { + return self::getPathTemplate('context')->render([ + 'project' => $project, + 'location' => $location, + 'metadata_store' => $metadataStore, + 'context' => $context, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a endpoint + * resource. + * + * @param string $project + * @param string $location + * @param string $endpoint + * + * @return string The formatted endpoint resource. + */ + public static function endpointName(string $project, string $location, string $endpoint): string + { + return self::getPathTemplate('endpoint')->render([ + 'project' => $project, + 'location' => $location, + 'endpoint' => $endpoint, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a model + * resource. + * + * @param string $project + * @param string $location + * @param string $model + * + * @return string The formatted model resource. + */ + public static function modelName(string $project, string $location, string $model): string + { + return self::getPathTemplate('model')->render([ + 'project' => $project, + 'location' => $location, + 'model' => $model, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_endpoint resource. + * + * @param string $project + * @param string $location + * @param string $endpoint + * + * @return string The formatted project_location_endpoint resource. + */ + public static function projectLocationEndpointName(string $project, string $location, string $endpoint): string + { + return self::getPathTemplate('projectLocationEndpoint')->render([ + 'project' => $project, + 'location' => $location, + 'endpoint' => $endpoint, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_publisher_model resource. + * + * @param string $project + * @param string $location + * @param string $publisher + * @param string $model + * + * @return string The formatted project_location_publisher_model resource. + */ + public static function projectLocationPublisherModelName(string $project, string $location, string $publisher, string $model): string + { + return self::getPathTemplate('projectLocationPublisherModel')->render([ + 'project' => $project, + 'location' => $location, + 'publisher' => $publisher, + 'model' => $model, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a tuning_job + * resource. + * + * @param string $project + * @param string $location + * @param string $tuningJob + * + * @return string The formatted tuning_job resource. + */ + public static function tuningJobName(string $project, string $location, string $tuningJob): string + { + return self::getPathTemplate('tuningJob')->render([ + 'project' => $project, + 'location' => $location, + 'tuning_job' => $tuningJob, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - context: projects/{project}/locations/{location}/metadataStores/{metadata_store}/contexts/{context} + * - endpoint: projects/{project}/locations/{location}/endpoints/{endpoint} + * - location: projects/{project}/locations/{location} + * - model: projects/{project}/locations/{location}/models/{model} + * - projectLocationEndpoint: projects/{project}/locations/{location}/endpoints/{endpoint} + * - projectLocationPublisherModel: projects/{project}/locations/{location}/publishers/{publisher}/models/{model} + * - tuningJob: projects/{project}/locations/{location}/tuningJobs/{tuning_job} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'aiplatform.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** 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); + } + + /** + * Cancels a TuningJob. + * Starts asynchronous cancellation on the TuningJob. The server makes a best + * effort to cancel the job, but success is not guaranteed. Clients can use + * [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob] + * or other methods to check whether the cancellation succeeded or whether the + * job completed despite cancellation. On successful cancellation, the + * TuningJob is not deleted; instead it becomes a job with a + * [TuningJob.error][google.cloud.aiplatform.v1.TuningJob.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`, and + * [TuningJob.state][google.cloud.aiplatform.v1.TuningJob.state] is set to + * `CANCELLED`. + * + * The async variant is {@see GenAiTuningServiceClient::cancelTuningJobAsync()} . + * + * @example samples/V1/GenAiTuningServiceClient/cancel_tuning_job.php + * + * @param CancelTuningJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 cancelTuningJob(CancelTuningJobRequest $request, array $callOptions = []): void + { + $this->startApiCall('CancelTuningJob', $request, $callOptions)->wait(); + } + + /** + * Creates a TuningJob. A created TuningJob right away will be attempted to + * be run. + * + * The async variant is {@see GenAiTuningServiceClient::createTuningJobAsync()} . + * + * @example samples/V1/GenAiTuningServiceClient/create_tuning_job.php + * + * @param CreateTuningJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TuningJob + * + * @throws ApiException Thrown if the API call fails. + */ + public function createTuningJob(CreateTuningJobRequest $request, array $callOptions = []): TuningJob + { + return $this->startApiCall('CreateTuningJob', $request, $callOptions)->wait(); + } + + /** + * Gets a TuningJob. + * + * The async variant is {@see GenAiTuningServiceClient::getTuningJobAsync()} . + * + * @example samples/V1/GenAiTuningServiceClient/get_tuning_job.php + * + * @param GetTuningJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TuningJob + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTuningJob(GetTuningJobRequest $request, array $callOptions = []): TuningJob + { + return $this->startApiCall('GetTuningJob', $request, $callOptions)->wait(); + } + + /** + * Lists TuningJobs in a Location. + * + * The async variant is {@see GenAiTuningServiceClient::listTuningJobsAsync()} . + * + * @example samples/V1/GenAiTuningServiceClient/list_tuning_jobs.php + * + * @param ListTuningJobsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listTuningJobs(ListTuningJobsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTuningJobs', $request, $callOptions); + } + + /** + * Gets information about a location. + * + * The async variant is {@see GenAiTuningServiceClient::getLocationAsync()} . + * + * @example samples/V1/GenAiTuningServiceClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see GenAiTuningServiceClient::listLocationsAsync()} . + * + * @example samples/V1/GenAiTuningServiceClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see GenAiTuningServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/GenAiTuningServiceClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see GenAiTuningServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/GenAiTuningServiceClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is {@see GenAiTuningServiceClient::testIamPermissionsAsync()} + * . + * + * @example samples/V1/GenAiTuningServiceClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/AiPlatform/src/V1/Client/JobServiceClient.php b/AiPlatform/src/V1/Client/JobServiceClient.php index c227c25f71cc..7a68185a9bee 100644 --- a/AiPlatform/src/V1/Client/JobServiceClient.php +++ b/AiPlatform/src/V1/Client/JobServiceClient.php @@ -484,6 +484,25 @@ public static function notificationChannelName(string $project, string $notifica ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * persistent_resource resource. + * + * @param string $project + * @param string $location + * @param string $persistentResource + * + * @return string The formatted persistent_resource resource. + */ + public static function persistentResourceName(string $project, string $location, string $persistentResource): string + { + return self::getPathTemplate('persistentResource')->render([ + 'project' => $project, + 'location' => $location, + 'persistent_resource' => $persistentResource, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * project_location_endpoint resource. @@ -582,6 +601,7 @@ public static function trialName(string $project, string $location, string $stud * - nasTrialDetail: projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail} * - network: projects/{project}/global/networks/{network} * - notificationChannel: projects/{project}/notificationChannels/{notification_channel} + * - persistentResource: projects/{project}/locations/{location}/persistentResources/{persistent_resource} * - projectLocationEndpoint: projects/{project}/locations/{location}/endpoints/{endpoint} * - projectLocationPublisherModel: projects/{project}/locations/{location}/publishers/{publisher}/models/{model} * - tensorboard: projects/{project}/locations/{location}/tensorboards/{tensorboard} diff --git a/AiPlatform/src/V1/Client/NotebookServiceClient.php b/AiPlatform/src/V1/Client/NotebookServiceClient.php new file mode 100644 index 000000000000..9599634fdce0 --- /dev/null +++ b/AiPlatform/src/V1/Client/NotebookServiceClient.php @@ -0,0 +1,766 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/notebook_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/notebook_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/notebook_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/notebook_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $project + * @param string $network + * + * @return string The formatted network resource. + */ + public static function networkName(string $project, string $network): string + { + return self::getPathTemplate('network')->render([ + 'project' => $project, + 'network' => $network, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * notebook_runtime resource. + * + * @param string $project + * @param string $location + * @param string $notebookRuntime + * + * @return string The formatted notebook_runtime resource. + */ + public static function notebookRuntimeName(string $project, string $location, string $notebookRuntime): string + { + return self::getPathTemplate('notebookRuntime')->render([ + 'project' => $project, + 'location' => $location, + 'notebook_runtime' => $notebookRuntime, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * notebook_runtime_template resource. + * + * @param string $project + * @param string $location + * @param string $notebookRuntimeTemplate + * + * @return string The formatted notebook_runtime_template resource. + */ + public static function notebookRuntimeTemplateName(string $project, string $location, string $notebookRuntimeTemplate): string + { + return self::getPathTemplate('notebookRuntimeTemplate')->render([ + 'project' => $project, + 'location' => $location, + 'notebook_runtime_template' => $notebookRuntimeTemplate, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a subnetwork + * resource. + * + * @param string $project + * @param string $region + * @param string $subnetwork + * + * @return string The formatted subnetwork resource. + */ + public static function subnetworkName(string $project, string $region, string $subnetwork): string + { + return self::getPathTemplate('subnetwork')->render([ + 'project' => $project, + 'region' => $region, + 'subnetwork' => $subnetwork, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - network: projects/{project}/global/networks/{network} + * - notebookRuntime: projects/{project}/locations/{location}/notebookRuntimes/{notebook_runtime} + * - notebookRuntimeTemplate: projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template} + * - subnetwork: projects/{project}/regions/{region}/subnetworks/{subnetwork} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'aiplatform.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Assigns a NotebookRuntime to a user for a particular Notebook file. This + * method will either returns an existing assignment or generates a new one. + * + * The async variant is {@see NotebookServiceClient::assignNotebookRuntimeAsync()} + * . + * + * @example samples/V1/NotebookServiceClient/assign_notebook_runtime.php + * + * @param AssignNotebookRuntimeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function assignNotebookRuntime(AssignNotebookRuntimeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('AssignNotebookRuntime', $request, $callOptions)->wait(); + } + + /** + * Creates a NotebookRuntimeTemplate. + * + * The async variant is + * {@see NotebookServiceClient::createNotebookRuntimeTemplateAsync()} . + * + * @example samples/V1/NotebookServiceClient/create_notebook_runtime_template.php + * + * @param CreateNotebookRuntimeTemplateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createNotebookRuntimeTemplate(CreateNotebookRuntimeTemplateRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateNotebookRuntimeTemplate', $request, $callOptions)->wait(); + } + + /** + * Deletes a NotebookRuntime. + * + * The async variant is {@see NotebookServiceClient::deleteNotebookRuntimeAsync()} + * . + * + * @example samples/V1/NotebookServiceClient/delete_notebook_runtime.php + * + * @param DeleteNotebookRuntimeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteNotebookRuntime(DeleteNotebookRuntimeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteNotebookRuntime', $request, $callOptions)->wait(); + } + + /** + * Deletes a NotebookRuntimeTemplate. + * + * The async variant is + * {@see NotebookServiceClient::deleteNotebookRuntimeTemplateAsync()} . + * + * @example samples/V1/NotebookServiceClient/delete_notebook_runtime_template.php + * + * @param DeleteNotebookRuntimeTemplateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteNotebookRuntimeTemplate(DeleteNotebookRuntimeTemplateRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteNotebookRuntimeTemplate', $request, $callOptions)->wait(); + } + + /** + * Gets a NotebookRuntime. + * + * The async variant is {@see NotebookServiceClient::getNotebookRuntimeAsync()} . + * + * @example samples/V1/NotebookServiceClient/get_notebook_runtime.php + * + * @param GetNotebookRuntimeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return NotebookRuntime + * + * @throws ApiException Thrown if the API call fails. + */ + public function getNotebookRuntime(GetNotebookRuntimeRequest $request, array $callOptions = []): NotebookRuntime + { + return $this->startApiCall('GetNotebookRuntime', $request, $callOptions)->wait(); + } + + /** + * Gets a NotebookRuntimeTemplate. + * + * The async variant is + * {@see NotebookServiceClient::getNotebookRuntimeTemplateAsync()} . + * + * @example samples/V1/NotebookServiceClient/get_notebook_runtime_template.php + * + * @param GetNotebookRuntimeTemplateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return NotebookRuntimeTemplate + * + * @throws ApiException Thrown if the API call fails. + */ + public function getNotebookRuntimeTemplate(GetNotebookRuntimeTemplateRequest $request, array $callOptions = []): NotebookRuntimeTemplate + { + return $this->startApiCall('GetNotebookRuntimeTemplate', $request, $callOptions)->wait(); + } + + /** + * Lists NotebookRuntimeTemplates in a Location. + * + * The async variant is + * {@see NotebookServiceClient::listNotebookRuntimeTemplatesAsync()} . + * + * @example samples/V1/NotebookServiceClient/list_notebook_runtime_templates.php + * + * @param ListNotebookRuntimeTemplatesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listNotebookRuntimeTemplates(ListNotebookRuntimeTemplatesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListNotebookRuntimeTemplates', $request, $callOptions); + } + + /** + * Lists NotebookRuntimes in a Location. + * + * The async variant is {@see NotebookServiceClient::listNotebookRuntimesAsync()} . + * + * @example samples/V1/NotebookServiceClient/list_notebook_runtimes.php + * + * @param ListNotebookRuntimesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listNotebookRuntimes(ListNotebookRuntimesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListNotebookRuntimes', $request, $callOptions); + } + + /** + * Starts a NotebookRuntime. + * + * The async variant is {@see NotebookServiceClient::startNotebookRuntimeAsync()} . + * + * @example samples/V1/NotebookServiceClient/start_notebook_runtime.php + * + * @param StartNotebookRuntimeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function startNotebookRuntime(StartNotebookRuntimeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('StartNotebookRuntime', $request, $callOptions)->wait(); + } + + /** + * Upgrades a NotebookRuntime. + * + * The async variant is {@see NotebookServiceClient::upgradeNotebookRuntimeAsync()} + * . + * + * @example samples/V1/NotebookServiceClient/upgrade_notebook_runtime.php + * + * @param UpgradeNotebookRuntimeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function upgradeNotebookRuntime(UpgradeNotebookRuntimeRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpgradeNotebookRuntime', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see NotebookServiceClient::getLocationAsync()} . + * + * @example samples/V1/NotebookServiceClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see NotebookServiceClient::listLocationsAsync()} . + * + * @example samples/V1/NotebookServiceClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see NotebookServiceClient::getIamPolicyAsync()} . + * + * @example samples/V1/NotebookServiceClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see NotebookServiceClient::setIamPolicyAsync()} . + * + * @example samples/V1/NotebookServiceClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is {@see NotebookServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/NotebookServiceClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/AiPlatform/src/V1/Client/PersistentResourceServiceClient.php b/AiPlatform/src/V1/Client/PersistentResourceServiceClient.php new file mode 100644 index 000000000000..a259b0d88c2c --- /dev/null +++ b/AiPlatform/src/V1/Client/PersistentResourceServiceClient.php @@ -0,0 +1,616 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/persistent_resource_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/persistent_resource_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/persistent_resource_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/persistent_resource_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $project + * @param string $network + * + * @return string The formatted network resource. + */ + public static function networkName(string $project, string $network): string + { + return self::getPathTemplate('network')->render([ + 'project' => $project, + 'network' => $network, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * persistent_resource resource. + * + * @param string $project + * @param string $location + * @param string $persistentResource + * + * @return string The formatted persistent_resource resource. + */ + public static function persistentResourceName(string $project, string $location, string $persistentResource): string + { + return self::getPathTemplate('persistentResource')->render([ + 'project' => $project, + 'location' => $location, + 'persistent_resource' => $persistentResource, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - network: projects/{project}/global/networks/{network} + * - persistentResource: projects/{project}/locations/{location}/persistentResources/{persistent_resource} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'aiplatform.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a PersistentResource. + * + * The async variant is + * {@see PersistentResourceServiceClient::createPersistentResourceAsync()} . + * + * @example samples/V1/PersistentResourceServiceClient/create_persistent_resource.php + * + * @param CreatePersistentResourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createPersistentResource(CreatePersistentResourceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreatePersistentResource', $request, $callOptions)->wait(); + } + + /** + * Deletes a PersistentResource. + * + * The async variant is + * {@see PersistentResourceServiceClient::deletePersistentResourceAsync()} . + * + * @example samples/V1/PersistentResourceServiceClient/delete_persistent_resource.php + * + * @param DeletePersistentResourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deletePersistentResource(DeletePersistentResourceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeletePersistentResource', $request, $callOptions)->wait(); + } + + /** + * Gets a PersistentResource. + * + * The async variant is + * {@see PersistentResourceServiceClient::getPersistentResourceAsync()} . + * + * @example samples/V1/PersistentResourceServiceClient/get_persistent_resource.php + * + * @param GetPersistentResourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PersistentResource + * + * @throws ApiException Thrown if the API call fails. + */ + public function getPersistentResource(GetPersistentResourceRequest $request, array $callOptions = []): PersistentResource + { + return $this->startApiCall('GetPersistentResource', $request, $callOptions)->wait(); + } + + /** + * Lists PersistentResources in a Location. + * + * The async variant is + * {@see PersistentResourceServiceClient::listPersistentResourcesAsync()} . + * + * @example samples/V1/PersistentResourceServiceClient/list_persistent_resources.php + * + * @param ListPersistentResourcesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listPersistentResources(ListPersistentResourcesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPersistentResources', $request, $callOptions); + } + + /** + * Reboots a PersistentResource. + * + * The async variant is + * {@see PersistentResourceServiceClient::rebootPersistentResourceAsync()} . + * + * @example samples/V1/PersistentResourceServiceClient/reboot_persistent_resource.php + * + * @param RebootPersistentResourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function rebootPersistentResource(RebootPersistentResourceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RebootPersistentResource', $request, $callOptions)->wait(); + } + + /** + * Updates a PersistentResource. + * + * The async variant is + * {@see PersistentResourceServiceClient::updatePersistentResourceAsync()} . + * + * @example samples/V1/PersistentResourceServiceClient/update_persistent_resource.php + * + * @param UpdatePersistentResourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updatePersistentResource(UpdatePersistentResourceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdatePersistentResource', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see PersistentResourceServiceClient::getLocationAsync()} + * . + * + * @example samples/V1/PersistentResourceServiceClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is + * {@see PersistentResourceServiceClient::listLocationsAsync()} . + * + * @example samples/V1/PersistentResourceServiceClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * The async variant is {@see PersistentResourceServiceClient::getIamPolicyAsync()} + * . + * + * @example samples/V1/PersistentResourceServiceClient/get_iam_policy.php + * + * @param GetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * The async variant is {@see PersistentResourceServiceClient::setIamPolicyAsync()} + * . + * + * @example samples/V1/PersistentResourceServiceClient/set_iam_policy.php + * + * @param SetIamPolicyRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Policy + * + * @throws ApiException Thrown if the API call fails. + */ + public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * The async variant is + * {@see PersistentResourceServiceClient::testIamPermissionsAsync()} . + * + * @example samples/V1/PersistentResourceServiceClient/test_iam_permissions.php + * + * @param TestIamPermissionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestIamPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } +} diff --git a/AiPlatform/src/V1/CreateNotebookRuntimeTemplateOperationMetadata.php b/AiPlatform/src/V1/CreateNotebookRuntimeTemplateOperationMetadata.php new file mode 100644 index 000000000000..ebe3d31c4744 --- /dev/null +++ b/AiPlatform/src/V1/CreateNotebookRuntimeTemplateOperationMetadata.php @@ -0,0 +1,78 @@ +google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateOperationMetadata + */ +class CreateNotebookRuntimeTemplateOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The operation generic information. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private $generic_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\GenericOperationMetadata $generic_metadata + * The operation generic information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\NotebookService::initOnce(); + parent::__construct($data); + } + + /** + * The operation generic information. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * @return \Google\Cloud\AIPlatform\V1\GenericOperationMetadata|null + */ + public function getGenericMetadata() + { + return $this->generic_metadata; + } + + public function hasGenericMetadata() + { + return isset($this->generic_metadata); + } + + public function clearGenericMetadata() + { + unset($this->generic_metadata); + } + + /** + * The operation generic information. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * @param \Google\Cloud\AIPlatform\V1\GenericOperationMetadata $var + * @return $this + */ + public function setGenericMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GenericOperationMetadata::class); + $this->generic_metadata = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/CreateNotebookRuntimeTemplateRequest.php b/AiPlatform/src/V1/CreateNotebookRuntimeTemplateRequest.php new file mode 100644 index 000000000000..3f98a973d495 --- /dev/null +++ b/AiPlatform/src/V1/CreateNotebookRuntimeTemplateRequest.php @@ -0,0 +1,169 @@ +google.cloud.aiplatform.v1.CreateNotebookRuntimeTemplateRequest + */ +class CreateNotebookRuntimeTemplateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Location to create the + * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $parent = ''; + /** + * Required. The NotebookRuntimeTemplate to create. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $notebook_runtime_template = null; + /** + * Optional. User specified ID for the notebook runtime template. + * + * Generated from protobuf field string notebook_runtime_template_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $notebook_runtime_template_id = ''; + + /** + * @param string $parent Required. The resource name of the Location to create the + * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}` + * Please see {@see NotebookServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\AIPlatform\V1\NotebookRuntimeTemplate $notebookRuntimeTemplate Required. The NotebookRuntimeTemplate to create. + * @param string $notebookRuntimeTemplateId Optional. User specified ID for the notebook runtime template. + * + * @return \Google\Cloud\AIPlatform\V1\CreateNotebookRuntimeTemplateRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\AIPlatform\V1\NotebookRuntimeTemplate $notebookRuntimeTemplate, string $notebookRuntimeTemplateId): self + { + return (new self()) + ->setParent($parent) + ->setNotebookRuntimeTemplate($notebookRuntimeTemplate) + ->setNotebookRuntimeTemplateId($notebookRuntimeTemplateId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the Location to create the + * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}` + * @type \Google\Cloud\AIPlatform\V1\NotebookRuntimeTemplate $notebook_runtime_template + * Required. The NotebookRuntimeTemplate to create. + * @type string $notebook_runtime_template_id + * Optional. User specified ID for the notebook runtime template. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\NotebookService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Location to create the + * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the Location to create the + * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The NotebookRuntimeTemplate to create. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\NotebookRuntimeTemplate|null + */ + public function getNotebookRuntimeTemplate() + { + return $this->notebook_runtime_template; + } + + public function hasNotebookRuntimeTemplate() + { + return isset($this->notebook_runtime_template); + } + + public function clearNotebookRuntimeTemplate() + { + unset($this->notebook_runtime_template); + } + + /** + * Required. The NotebookRuntimeTemplate to create. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_template = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\NotebookRuntimeTemplate $var + * @return $this + */ + public function setNotebookRuntimeTemplate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\NotebookRuntimeTemplate::class); + $this->notebook_runtime_template = $var; + + return $this; + } + + /** + * Optional. User specified ID for the notebook runtime template. + * + * Generated from protobuf field string notebook_runtime_template_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNotebookRuntimeTemplateId() + { + return $this->notebook_runtime_template_id; + } + + /** + * Optional. User specified ID for the notebook runtime template. + * + * Generated from protobuf field string notebook_runtime_template_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setNotebookRuntimeTemplateId($var) + { + GPBUtil::checkString($var, True); + $this->notebook_runtime_template_id = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/CreatePersistentResourceOperationMetadata.php b/AiPlatform/src/V1/CreatePersistentResourceOperationMetadata.php new file mode 100644 index 000000000000..77f013958a4d --- /dev/null +++ b/AiPlatform/src/V1/CreatePersistentResourceOperationMetadata.php @@ -0,0 +1,111 @@ +google.cloud.aiplatform.v1.CreatePersistentResourceOperationMetadata + */ +class CreatePersistentResourceOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Operation metadata for PersistentResource. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private $generic_metadata = null; + /** + * Progress Message for Create LRO + * + * Generated from protobuf field string progress_message = 2; + */ + private $progress_message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\GenericOperationMetadata $generic_metadata + * Operation metadata for PersistentResource. + * @type string $progress_message + * Progress Message for Create LRO + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\PersistentResourceService::initOnce(); + parent::__construct($data); + } + + /** + * Operation metadata for PersistentResource. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * @return \Google\Cloud\AIPlatform\V1\GenericOperationMetadata|null + */ + public function getGenericMetadata() + { + return $this->generic_metadata; + } + + public function hasGenericMetadata() + { + return isset($this->generic_metadata); + } + + public function clearGenericMetadata() + { + unset($this->generic_metadata); + } + + /** + * Operation metadata for PersistentResource. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * @param \Google\Cloud\AIPlatform\V1\GenericOperationMetadata $var + * @return $this + */ + public function setGenericMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GenericOperationMetadata::class); + $this->generic_metadata = $var; + + return $this; + } + + /** + * Progress Message for Create LRO + * + * Generated from protobuf field string progress_message = 2; + * @return string + */ + public function getProgressMessage() + { + return $this->progress_message; + } + + /** + * Progress Message for Create LRO + * + * Generated from protobuf field string progress_message = 2; + * @param string $var + * @return $this + */ + public function setProgressMessage($var) + { + GPBUtil::checkString($var, True); + $this->progress_message = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/CreatePersistentResourceRequest.php b/AiPlatform/src/V1/CreatePersistentResourceRequest.php new file mode 100644 index 000000000000..394dde330e1d --- /dev/null +++ b/AiPlatform/src/V1/CreatePersistentResourceRequest.php @@ -0,0 +1,185 @@ +google.cloud.aiplatform.v1.CreatePersistentResourceRequest + */ +class CreatePersistentResourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Location to create the + * PersistentResource in. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $parent = ''; + /** + * Required. The PersistentResource to create. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $persistent_resource = null; + /** + * Required. The ID to use for the PersistentResource, which become the final + * component of the PersistentResource's resource name. + * The maximum length is 63 characters, and valid characters + * are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`. + * + * Generated from protobuf field string persistent_resource_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $persistent_resource_id = ''; + + /** + * @param string $parent Required. The resource name of the Location to create the + * PersistentResource in. Format: `projects/{project}/locations/{location}` + * Please see {@see PersistentResourceServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\AIPlatform\V1\PersistentResource $persistentResource Required. The PersistentResource to create. + * @param string $persistentResourceId Required. The ID to use for the PersistentResource, which become the final + * component of the PersistentResource's resource name. + * + * The maximum length is 63 characters, and valid characters + * are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`. + * + * @return \Google\Cloud\AIPlatform\V1\CreatePersistentResourceRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\AIPlatform\V1\PersistentResource $persistentResource, string $persistentResourceId): self + { + return (new self()) + ->setParent($parent) + ->setPersistentResource($persistentResource) + ->setPersistentResourceId($persistentResourceId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the Location to create the + * PersistentResource in. Format: `projects/{project}/locations/{location}` + * @type \Google\Cloud\AIPlatform\V1\PersistentResource $persistent_resource + * Required. The PersistentResource to create. + * @type string $persistent_resource_id + * Required. The ID to use for the PersistentResource, which become the final + * component of the PersistentResource's resource name. + * The maximum length is 63 characters, and valid characters + * are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\PersistentResourceService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Location to create the + * PersistentResource in. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the Location to create the + * PersistentResource in. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The PersistentResource to create. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\PersistentResource|null + */ + public function getPersistentResource() + { + return $this->persistent_resource; + } + + public function hasPersistentResource() + { + return isset($this->persistent_resource); + } + + public function clearPersistentResource() + { + unset($this->persistent_resource); + } + + /** + * Required. The PersistentResource to create. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\PersistentResource $var + * @return $this + */ + public function setPersistentResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\PersistentResource::class); + $this->persistent_resource = $var; + + return $this; + } + + /** + * Required. The ID to use for the PersistentResource, which become the final + * component of the PersistentResource's resource name. + * The maximum length is 63 characters, and valid characters + * are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`. + * + * Generated from protobuf field string persistent_resource_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPersistentResourceId() + { + return $this->persistent_resource_id; + } + + /** + * Required. The ID to use for the PersistentResource, which become the final + * component of the PersistentResource's resource name. + * The maximum length is 63 characters, and valid characters + * are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`. + * + * Generated from protobuf field string persistent_resource_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPersistentResourceId($var) + { + GPBUtil::checkString($var, True); + $this->persistent_resource_id = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/CreateTuningJobRequest.php b/AiPlatform/src/V1/CreateTuningJobRequest.php new file mode 100644 index 000000000000..2b013f8c374e --- /dev/null +++ b/AiPlatform/src/V1/CreateTuningJobRequest.php @@ -0,0 +1,133 @@ +google.cloud.aiplatform.v1.CreateTuningJobRequest + */ +class CreateTuningJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Location to create the TuningJob in. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $parent = ''; + /** + * Required. The TuningJob to create. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $tuning_job = null; + + /** + * @param string $parent Required. The resource name of the Location to create the TuningJob in. + * Format: `projects/{project}/locations/{location}` + * Please see {@see GenAiTuningServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\AIPlatform\V1\TuningJob $tuningJob Required. The TuningJob to create. + * + * @return \Google\Cloud\AIPlatform\V1\CreateTuningJobRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\AIPlatform\V1\TuningJob $tuningJob): self + { + return (new self()) + ->setParent($parent) + ->setTuningJob($tuningJob); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the Location to create the TuningJob in. + * Format: `projects/{project}/locations/{location}` + * @type \Google\Cloud\AIPlatform\V1\TuningJob $tuning_job + * Required. The TuningJob to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\GenaiTuningService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Location to create the TuningJob in. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the Location to create the TuningJob in. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The TuningJob to create. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\TuningJob|null + */ + public function getTuningJob() + { + return $this->tuning_job; + } + + public function hasTuningJob() + { + return isset($this->tuning_job); + } + + public function clearTuningJob() + { + unset($this->tuning_job); + } + + /** + * Required. The TuningJob to create. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.TuningJob tuning_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\TuningJob $var + * @return $this + */ + public function setTuningJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\TuningJob::class); + $this->tuning_job = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/CustomJobSpec.php b/AiPlatform/src/V1/CustomJobSpec.php index 917980833eb1..d4226496f917 100644 --- a/AiPlatform/src/V1/CustomJobSpec.php +++ b/AiPlatform/src/V1/CustomJobSpec.php @@ -15,6 +15,17 @@ */ class CustomJobSpec extends \Google\Protobuf\Internal\Message { + /** + * Optional. The ID of the PersistentResource in the same Project and Location + * which to run + * If this is specified, the job will be run on existing machines held by the + * PersistentResource instead of on-demand short-live machines. + * The network and CMEK configs on the job should be consistent with those on + * the PersistentResource, otherwise, the job will be rejected. + * + * Generated from protobuf field string persistent_resource_id = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $persistent_resource_id = ''; /** * Required. The spec of the worker pools including machine type and Docker * image. All worker pools except the first one are optional and can be @@ -174,6 +185,13 @@ class CustomJobSpec extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * + * @type string $persistent_resource_id + * Optional. The ID of the PersistentResource in the same Project and Location + * which to run + * If this is specified, the job will be run on existing machines held by the + * PersistentResource instead of on-demand short-live machines. + * The network and CMEK configs on the job should be consistent with those on + * the PersistentResource, otherwise, the job will be rejected. * @type array<\Google\Cloud\AIPlatform\V1\WorkerPoolSpec>|\Google\Protobuf\Internal\RepeatedField $worker_pool_specs * Required. The spec of the worker pools including machine type and Docker * image. All worker pools except the first one are optional and can be @@ -281,6 +299,42 @@ public function __construct($data = NULL) { parent::__construct($data); } + /** + * Optional. The ID of the PersistentResource in the same Project and Location + * which to run + * If this is specified, the job will be run on existing machines held by the + * PersistentResource instead of on-demand short-live machines. + * The network and CMEK configs on the job should be consistent with those on + * the PersistentResource, otherwise, the job will be rejected. + * + * Generated from protobuf field string persistent_resource_id = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getPersistentResourceId() + { + return $this->persistent_resource_id; + } + + /** + * Optional. The ID of the PersistentResource in the same Project and Location + * which to run + * If this is specified, the job will be run on existing machines held by the + * PersistentResource instead of on-demand short-live machines. + * The network and CMEK configs on the job should be consistent with those on + * the PersistentResource, otherwise, the job will be rejected. + * + * Generated from protobuf field string persistent_resource_id = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setPersistentResourceId($var) + { + GPBUtil::checkString($var, True); + $this->persistent_resource_id = $var; + + return $this; + } + /** * Required. The spec of the worker pools including machine type and Docker * image. All worker pools except the first one are optional and can be diff --git a/AiPlatform/src/V1/DeleteNotebookRuntimeRequest.php b/AiPlatform/src/V1/DeleteNotebookRuntimeRequest.php new file mode 100644 index 000000000000..a0c67218a3d0 --- /dev/null +++ b/AiPlatform/src/V1/DeleteNotebookRuntimeRequest.php @@ -0,0 +1,97 @@ +google.cloud.aiplatform.v1.DeleteNotebookRuntimeRequest + */ +class DeleteNotebookRuntimeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the NotebookRuntime resource to be deleted. + * Instead of checking whether the name is in valid NotebookRuntime resource + * name format, directly throw NotFound exception if there is no such + * NotebookRuntime in spanner. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $name = ''; + + /** + * @param string $name Required. The name of the NotebookRuntime resource to be deleted. + * Instead of checking whether the name is in valid NotebookRuntime resource + * name format, directly throw NotFound exception if there is no such + * NotebookRuntime in spanner. Please see + * {@see NotebookServiceClient::notebookRuntimeName()} for help formatting this field. + * + * @return \Google\Cloud\AIPlatform\V1\DeleteNotebookRuntimeRequest + * + * @experimental + */ + public static function 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 NotebookRuntime resource to be deleted. + * Instead of checking whether the name is in valid NotebookRuntime resource + * name format, directly throw NotFound exception if there is no such + * NotebookRuntime in spanner. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\NotebookService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the NotebookRuntime resource to be deleted. + * Instead of checking whether the name is in valid NotebookRuntime resource + * name format, directly throw NotFound exception if there is no such + * NotebookRuntime in spanner. + * + * Generated from 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 NotebookRuntime resource to be deleted. + * Instead of checking whether the name is in valid NotebookRuntime resource + * name format, directly throw NotFound exception if there is no such + * NotebookRuntime in spanner. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/DeleteNotebookRuntimeTemplateRequest.php b/AiPlatform/src/V1/DeleteNotebookRuntimeTemplateRequest.php new file mode 100644 index 000000000000..27c1e29a1fe3 --- /dev/null +++ b/AiPlatform/src/V1/DeleteNotebookRuntimeTemplateRequest.php @@ -0,0 +1,92 @@ +google.cloud.aiplatform.v1.DeleteNotebookRuntimeTemplateRequest + */ +class DeleteNotebookRuntimeTemplateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the NotebookRuntimeTemplate resource to be deleted. + * Format: + * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $name = ''; + + /** + * @param string $name Required. The name of the NotebookRuntimeTemplate resource to be deleted. + * Format: + * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}` + * Please see {@see NotebookServiceClient::notebookRuntimeTemplateName()} for help formatting this field. + * + * @return \Google\Cloud\AIPlatform\V1\DeleteNotebookRuntimeTemplateRequest + * + * @experimental + */ + public static function 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 NotebookRuntimeTemplate resource to be deleted. + * Format: + * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\NotebookService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the NotebookRuntimeTemplate resource to be deleted. + * Format: + * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}` + * + * Generated from 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 NotebookRuntimeTemplate resource to be deleted. + * Format: + * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/DeletePersistentResourceRequest.php b/AiPlatform/src/V1/DeletePersistentResourceRequest.php new file mode 100644 index 000000000000..07814ad2f199 --- /dev/null +++ b/AiPlatform/src/V1/DeletePersistentResourceRequest.php @@ -0,0 +1,92 @@ +google.cloud.aiplatform.v1.DeletePersistentResourceRequest + */ +class DeletePersistentResourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the PersistentResource to be deleted. + * Format: + * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $name = ''; + + /** + * @param string $name Required. The name of the PersistentResource to be deleted. + * Format: + * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}` + * Please see {@see PersistentResourceServiceClient::persistentResourceName()} for help formatting this field. + * + * @return \Google\Cloud\AIPlatform\V1\DeletePersistentResourceRequest + * + * @experimental + */ + public static function 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 PersistentResource to be deleted. + * Format: + * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\PersistentResourceService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the PersistentResource to be deleted. + * Format: + * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the PersistentResource to be deleted. + * Format: + * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/DeployedModel.php b/AiPlatform/src/V1/DeployedModel.php index 1834dc2f2261..69f82c77f246 100644 --- a/AiPlatform/src/V1/DeployedModel.php +++ b/AiPlatform/src/V1/DeployedModel.php @@ -77,6 +77,16 @@ class DeployedModel extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.aiplatform.v1.ExplanationSpec explanation_spec = 9; */ private $explanation_spec = null; + /** + * If true, deploy the model without explainable feature, regardless the + * existence of + * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec] + * or + * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]. + * + * Generated from protobuf field bool disable_explanations = 19; + */ + private $disable_explanations = false; /** * The service account that the DeployedModel's container runs as. Specify the * email address of the service account. If this service account is not @@ -176,6 +186,12 @@ class DeployedModel extends \Google\Protobuf\Internal\Message * is not populated, all fields of the * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] * will be used for the explanation configuration. + * @type bool $disable_explanations + * If true, deploy the model without explainable feature, regardless the + * existence of + * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec] + * or + * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]. * @type string $service_account * The service account that the DeployedModel's container runs as. Specify the * email address of the service account. If this service account is not @@ -539,6 +555,40 @@ public function setExplanationSpec($var) return $this; } + /** + * If true, deploy the model without explainable feature, regardless the + * existence of + * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec] + * or + * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]. + * + * Generated from protobuf field bool disable_explanations = 19; + * @return bool + */ + public function getDisableExplanations() + { + return $this->disable_explanations; + } + + /** + * If true, deploy the model without explainable feature, regardless the + * existence of + * [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec] + * or + * [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]. + * + * Generated from protobuf field bool disable_explanations = 19; + * @param bool $var + * @return $this + */ + public function setDisableExplanations($var) + { + GPBUtil::checkBool($var); + $this->disable_explanations = $var; + + return $this; + } + /** * The service account that the DeployedModel's container runs as. Specify the * email address of the service account. If this service account is not diff --git a/AiPlatform/src/V1/FeatureOnlineStore.php b/AiPlatform/src/V1/FeatureOnlineStore.php index ffccbce597f9..a4742b610d4b 100644 --- a/AiPlatform/src/V1/FeatureOnlineStore.php +++ b/AiPlatform/src/V1/FeatureOnlineStore.php @@ -63,6 +63,13 @@ class FeatureOnlineStore extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.aiplatform.v1.FeatureOnlineStore.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $state = 0; + /** + * Optional. The dedicated serving endpoint for this FeatureOnlineStore, which + * is different from common Vertex service endpoint. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint dedicated_serving_endpoint = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $dedicated_serving_endpoint = null; protected $storage_type; /** @@ -75,6 +82,12 @@ class FeatureOnlineStore extends \Google\Protobuf\Internal\Message * Contains settings for the Cloud Bigtable instance that will be created * to serve featureValues for all FeatureViews under this * FeatureOnlineStore. + * @type \Google\Cloud\AIPlatform\V1\FeatureOnlineStore\Optimized $optimized + * Contains settings for the Optimized store that will be created + * to serve featureValues for all FeatureViews under this + * FeatureOnlineStore. When choose Optimized storage type, need to set + * [PrivateServiceConnectConfig.enable_private_service_connect][google.cloud.aiplatform.v1.PrivateServiceConnectConfig.enable_private_service_connect] + * to use private endpoint. Otherwise will use public endpoint by default. * @type string $name * Identifier. Name of the FeatureOnlineStore. Format: * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}` @@ -97,6 +110,9 @@ class FeatureOnlineStore extends \Google\Protobuf\Internal\Message * are prefixed with "aiplatform.googleapis.com/" and are immutable. * @type int $state * Output only. State of the featureOnlineStore. + * @type \Google\Cloud\AIPlatform\V1\FeatureOnlineStore\DedicatedServingEndpoint $dedicated_serving_endpoint + * Optional. The dedicated serving endpoint for this FeatureOnlineStore, which + * is different from common Vertex service endpoint. * } */ public function __construct($data = NULL) { @@ -139,6 +155,45 @@ public function setBigtable($var) return $this; } + /** + * Contains settings for the Optimized store that will be created + * to serve featureValues for all FeatureViews under this + * FeatureOnlineStore. When choose Optimized storage type, need to set + * [PrivateServiceConnectConfig.enable_private_service_connect][google.cloud.aiplatform.v1.PrivateServiceConnectConfig.enable_private_service_connect] + * to use private endpoint. Otherwise will use public endpoint by default. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized optimized = 12; + * @return \Google\Cloud\AIPlatform\V1\FeatureOnlineStore\Optimized|null + */ + public function getOptimized() + { + return $this->readOneof(12); + } + + public function hasOptimized() + { + return $this->hasOneof(12); + } + + /** + * Contains settings for the Optimized store that will be created + * to serve featureValues for all FeatureViews under this + * FeatureOnlineStore. When choose Optimized storage type, need to set + * [PrivateServiceConnectConfig.enable_private_service_connect][google.cloud.aiplatform.v1.PrivateServiceConnectConfig.enable_private_service_connect] + * to use private endpoint. Otherwise will use public endpoint by default. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized optimized = 12; + * @param \Google\Cloud\AIPlatform\V1\FeatureOnlineStore\Optimized $var + * @return $this + */ + public function setOptimized($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\FeatureOnlineStore\Optimized::class); + $this->writeOneof(12, $var); + + return $this; + } + /** * Identifier. Name of the FeatureOnlineStore. Format: * `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}` @@ -335,6 +390,44 @@ public function setState($var) return $this; } + /** + * Optional. The dedicated serving endpoint for this FeatureOnlineStore, which + * is different from common Vertex service endpoint. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint dedicated_serving_endpoint = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\AIPlatform\V1\FeatureOnlineStore\DedicatedServingEndpoint|null + */ + public function getDedicatedServingEndpoint() + { + return $this->dedicated_serving_endpoint; + } + + public function hasDedicatedServingEndpoint() + { + return isset($this->dedicated_serving_endpoint); + } + + public function clearDedicatedServingEndpoint() + { + unset($this->dedicated_serving_endpoint); + } + + /** + * Optional. The dedicated serving endpoint for this FeatureOnlineStore, which + * is different from common Vertex service endpoint. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint dedicated_serving_endpoint = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\AIPlatform\V1\FeatureOnlineStore\DedicatedServingEndpoint $var + * @return $this + */ + public function setDedicatedServingEndpoint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\FeatureOnlineStore\DedicatedServingEndpoint::class); + $this->dedicated_serving_endpoint = $var; + + return $this; + } + /** * @return string */ diff --git a/AiPlatform/src/V1/FeatureOnlineStore/DedicatedServingEndpoint.php b/AiPlatform/src/V1/FeatureOnlineStore/DedicatedServingEndpoint.php new file mode 100644 index 000000000000..340d2561ea36 --- /dev/null +++ b/AiPlatform/src/V1/FeatureOnlineStore/DedicatedServingEndpoint.php @@ -0,0 +1,74 @@ +google.cloud.aiplatform.v1.FeatureOnlineStore.DedicatedServingEndpoint + */ +class DedicatedServingEndpoint extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. This field will be populated with the domain name to use for + * this FeatureOnlineStore + * + * Generated from protobuf field string public_endpoint_domain_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $public_endpoint_domain_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $public_endpoint_domain_name + * Output only. This field will be populated with the domain name to use for + * this FeatureOnlineStore + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\FeatureOnlineStore::initOnce(); + parent::__construct($data); + } + + /** + * Output only. This field will be populated with the domain name to use for + * this FeatureOnlineStore + * + * Generated from protobuf field string public_endpoint_domain_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPublicEndpointDomainName() + { + return $this->public_endpoint_domain_name; + } + + /** + * Output only. This field will be populated with the domain name to use for + * this FeatureOnlineStore + * + * Generated from protobuf field string public_endpoint_domain_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPublicEndpointDomainName($var) + { + GPBUtil::checkString($var, True); + $this->public_endpoint_domain_name = $var; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/FeatureOnlineStore/Optimized.php b/AiPlatform/src/V1/FeatureOnlineStore/Optimized.php new file mode 100644 index 000000000000..ffa9d07292fa --- /dev/null +++ b/AiPlatform/src/V1/FeatureOnlineStore/Optimized.php @@ -0,0 +1,34 @@ +google.cloud.aiplatform.v1.FeatureOnlineStore.Optimized + */ +class Optimized extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\FeatureOnlineStore::initOnce(); + parent::__construct($data); + } + +} + + diff --git a/AiPlatform/src/V1/FeatureView.php b/AiPlatform/src/V1/FeatureView.php index 08e0aed1f982..348482a93b49 100644 --- a/AiPlatform/src/V1/FeatureView.php +++ b/AiPlatform/src/V1/FeatureView.php @@ -64,6 +64,15 @@ class FeatureView extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.aiplatform.v1.FeatureView.SyncConfig sync_config = 7; */ private $sync_config = null; + /** + * Optional. Configuration for index preparation for vector search. It + * contains the required configurations to create an index from source data, + * so that approximate nearest neighbor (a.k.a ANN) algorithms search can be + * performed during online serving. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FeatureView.IndexConfig index_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $index_config = null; protected $source; /** @@ -102,6 +111,11 @@ class FeatureView extends \Google\Protobuf\Internal\Message * Configures when data is to be synced/updated for this FeatureView. At the * end of the sync the latest featureValues for each entityId of this * FeatureView are made ready for online serving. + * @type \Google\Cloud\AIPlatform\V1\FeatureView\IndexConfig $index_config + * Optional. Configuration for index preparation for vector search. It + * contains the required configurations to create an index from source data, + * so that approximate nearest neighbor (a.k.a ANN) algorithms search can be + * performed during online serving. * } */ public function __construct($data = NULL) { @@ -385,6 +399,48 @@ public function setSyncConfig($var) return $this; } + /** + * Optional. Configuration for index preparation for vector search. It + * contains the required configurations to create an index from source data, + * so that approximate nearest neighbor (a.k.a ANN) algorithms search can be + * performed during online serving. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FeatureView.IndexConfig index_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\AIPlatform\V1\FeatureView\IndexConfig|null + */ + public function getIndexConfig() + { + return $this->index_config; + } + + public function hasIndexConfig() + { + return isset($this->index_config); + } + + public function clearIndexConfig() + { + unset($this->index_config); + } + + /** + * Optional. Configuration for index preparation for vector search. It + * contains the required configurations to create an index from source data, + * so that approximate nearest neighbor (a.k.a ANN) algorithms search can be + * performed during online serving. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FeatureView.IndexConfig index_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\AIPlatform\V1\FeatureView\IndexConfig $var + * @return $this + */ + public function setIndexConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\FeatureView\IndexConfig::class); + $this->index_config = $var; + + return $this; + } + /** * @return string */ diff --git a/AiPlatform/src/V1/FeatureView/IndexConfig.php b/AiPlatform/src/V1/FeatureView/IndexConfig.php new file mode 100644 index 000000000000..5f60331d319d --- /dev/null +++ b/AiPlatform/src/V1/FeatureView/IndexConfig.php @@ -0,0 +1,348 @@ +google.cloud.aiplatform.v1.FeatureView.IndexConfig + */ +class IndexConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Column of embedding. This column contains the source data to + * create index for vector search. embedding_column must be set when using + * vector search. + * + * Generated from protobuf field string embedding_column = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $embedding_column = ''; + /** + * Optional. Columns of features that're used to filter vector search + * results. + * + * Generated from protobuf field repeated string filter_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $filter_columns; + /** + * Optional. Column of crowding. This column contains crowding attribute + * which is a constraint on a neighbor list produced by + * [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1.FeatureOnlineStoreService.SearchNearestEntities] + * to diversify search results. If + * [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1.NearestNeighborQuery.per_crowding_attribute_neighbor_count] + * is set to K in + * [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1.SearchNearestEntitiesRequest], + * it's guaranteed that no more than K entities of the same crowding + * attribute are returned in the response. + * + * Generated from protobuf field string crowding_column = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $crowding_column = ''; + /** + * Optional. The number of dimensions of the input embedding. + * + * Generated from protobuf field optional int32 embedding_dimension = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $embedding_dimension = null; + /** + * Optional. The distance measure used in nearest neighbor search. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FeatureView.IndexConfig.DistanceMeasureType distance_measure_type = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $distance_measure_type = 0; + protected $algorithm_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\FeatureView\IndexConfig\TreeAHConfig $tree_ah_config + * Optional. Configuration options for the tree-AH algorithm (Shallow tree + * + Asymmetric Hashing). Please refer to this paper for more details: + * https://arxiv.org/abs/1908.10396 + * @type \Google\Cloud\AIPlatform\V1\FeatureView\IndexConfig\BruteForceConfig $brute_force_config + * Optional. Configuration options for using brute force search, which + * simply implements the standard linear search in the database for each + * query. It is primarily meant for benchmarking and to generate the + * ground truth for approximate search. + * @type string $embedding_column + * Optional. Column of embedding. This column contains the source data to + * create index for vector search. embedding_column must be set when using + * vector search. + * @type array|\Google\Protobuf\Internal\RepeatedField $filter_columns + * Optional. Columns of features that're used to filter vector search + * results. + * @type string $crowding_column + * Optional. Column of crowding. This column contains crowding attribute + * which is a constraint on a neighbor list produced by + * [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1.FeatureOnlineStoreService.SearchNearestEntities] + * to diversify search results. If + * [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1.NearestNeighborQuery.per_crowding_attribute_neighbor_count] + * is set to K in + * [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1.SearchNearestEntitiesRequest], + * it's guaranteed that no more than K entities of the same crowding + * attribute are returned in the response. + * @type int $embedding_dimension + * Optional. The number of dimensions of the input embedding. + * @type int $distance_measure_type + * Optional. The distance measure used in nearest neighbor search. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\FeatureView::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Configuration options for the tree-AH algorithm (Shallow tree + * + Asymmetric Hashing). Please refer to this paper for more details: + * https://arxiv.org/abs/1908.10396 + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig tree_ah_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\AIPlatform\V1\FeatureView\IndexConfig\TreeAHConfig|null + */ + public function getTreeAhConfig() + { + return $this->readOneof(6); + } + + public function hasTreeAhConfig() + { + return $this->hasOneof(6); + } + + /** + * Optional. Configuration options for the tree-AH algorithm (Shallow tree + * + Asymmetric Hashing). Please refer to this paper for more details: + * https://arxiv.org/abs/1908.10396 + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig tree_ah_config = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\AIPlatform\V1\FeatureView\IndexConfig\TreeAHConfig $var + * @return $this + */ + public function setTreeAhConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\FeatureView\IndexConfig\TreeAHConfig::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Optional. Configuration options for using brute force search, which + * simply implements the standard linear search in the database for each + * query. It is primarily meant for benchmarking and to generate the + * ground truth for approximate search. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig brute_force_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\AIPlatform\V1\FeatureView\IndexConfig\BruteForceConfig|null + */ + public function getBruteForceConfig() + { + return $this->readOneof(7); + } + + public function hasBruteForceConfig() + { + return $this->hasOneof(7); + } + + /** + * Optional. Configuration options for using brute force search, which + * simply implements the standard linear search in the database for each + * query. It is primarily meant for benchmarking and to generate the + * ground truth for approximate search. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig brute_force_config = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\AIPlatform\V1\FeatureView\IndexConfig\BruteForceConfig $var + * @return $this + */ + public function setBruteForceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\FeatureView\IndexConfig\BruteForceConfig::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Optional. Column of embedding. This column contains the source data to + * create index for vector search. embedding_column must be set when using + * vector search. + * + * Generated from protobuf field string embedding_column = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEmbeddingColumn() + { + return $this->embedding_column; + } + + /** + * Optional. Column of embedding. This column contains the source data to + * create index for vector search. embedding_column must be set when using + * vector search. + * + * Generated from protobuf field string embedding_column = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEmbeddingColumn($var) + { + GPBUtil::checkString($var, True); + $this->embedding_column = $var; + + return $this; + } + + /** + * Optional. Columns of features that're used to filter vector search + * results. + * + * Generated from protobuf field repeated string filter_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFilterColumns() + { + return $this->filter_columns; + } + + /** + * Optional. Columns of features that're used to filter vector search + * results. + * + * Generated from protobuf field repeated string filter_columns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFilterColumns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->filter_columns = $arr; + + return $this; + } + + /** + * Optional. Column of crowding. This column contains crowding attribute + * which is a constraint on a neighbor list produced by + * [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1.FeatureOnlineStoreService.SearchNearestEntities] + * to diversify search results. If + * [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1.NearestNeighborQuery.per_crowding_attribute_neighbor_count] + * is set to K in + * [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1.SearchNearestEntitiesRequest], + * it's guaranteed that no more than K entities of the same crowding + * attribute are returned in the response. + * + * Generated from protobuf field string crowding_column = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCrowdingColumn() + { + return $this->crowding_column; + } + + /** + * Optional. Column of crowding. This column contains crowding attribute + * which is a constraint on a neighbor list produced by + * [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1.FeatureOnlineStoreService.SearchNearestEntities] + * to diversify search results. If + * [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1.NearestNeighborQuery.per_crowding_attribute_neighbor_count] + * is set to K in + * [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1.SearchNearestEntitiesRequest], + * it's guaranteed that no more than K entities of the same crowding + * attribute are returned in the response. + * + * Generated from protobuf field string crowding_column = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCrowdingColumn($var) + { + GPBUtil::checkString($var, True); + $this->crowding_column = $var; + + return $this; + } + + /** + * Optional. The number of dimensions of the input embedding. + * + * Generated from protobuf field optional int32 embedding_dimension = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getEmbeddingDimension() + { + return isset($this->embedding_dimension) ? $this->embedding_dimension : 0; + } + + public function hasEmbeddingDimension() + { + return isset($this->embedding_dimension); + } + + public function clearEmbeddingDimension() + { + unset($this->embedding_dimension); + } + + /** + * Optional. The number of dimensions of the input embedding. + * + * Generated from protobuf field optional int32 embedding_dimension = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setEmbeddingDimension($var) + { + GPBUtil::checkInt32($var); + $this->embedding_dimension = $var; + + return $this; + } + + /** + * Optional. The distance measure used in nearest neighbor search. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FeatureView.IndexConfig.DistanceMeasureType distance_measure_type = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDistanceMeasureType() + { + return $this->distance_measure_type; + } + + /** + * Optional. The distance measure used in nearest neighbor search. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FeatureView.IndexConfig.DistanceMeasureType distance_measure_type = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDistanceMeasureType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\FeatureView\IndexConfig\DistanceMeasureType::class); + $this->distance_measure_type = $var; + + return $this; + } + + /** + * @return string + */ + public function getAlgorithmConfig() + { + return $this->whichOneof("algorithm_config"); + } + +} + + diff --git a/AiPlatform/src/V1/FeatureView/IndexConfig/BruteForceConfig.php b/AiPlatform/src/V1/FeatureView/IndexConfig/BruteForceConfig.php new file mode 100644 index 000000000000..8be31f767f4f --- /dev/null +++ b/AiPlatform/src/V1/FeatureView/IndexConfig/BruteForceConfig.php @@ -0,0 +1,34 @@ +google.cloud.aiplatform.v1.FeatureView.IndexConfig.BruteForceConfig + */ +class BruteForceConfig extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\FeatureView::initOnce(); + parent::__construct($data); + } + +} + + diff --git a/AiPlatform/src/V1/FeatureView/IndexConfig/DistanceMeasureType.php b/AiPlatform/src/V1/FeatureView/IndexConfig/DistanceMeasureType.php new file mode 100644 index 000000000000..e437e1f03c95 --- /dev/null +++ b/AiPlatform/src/V1/FeatureView/IndexConfig/DistanceMeasureType.php @@ -0,0 +1,74 @@ +google.cloud.aiplatform.v1.FeatureView.IndexConfig.DistanceMeasureType + */ +class DistanceMeasureType +{ + /** + * Should not be set. + * + * Generated from protobuf enum DISTANCE_MEASURE_TYPE_UNSPECIFIED = 0; + */ + const DISTANCE_MEASURE_TYPE_UNSPECIFIED = 0; + /** + * Euclidean (L_2) Distance. + * + * Generated from protobuf enum SQUARED_L2_DISTANCE = 1; + */ + const SQUARED_L2_DISTANCE = 1; + /** + * Cosine Distance. Defined as 1 - cosine similarity. + * We strongly suggest using DOT_PRODUCT_DISTANCE + UNIT_L2_NORM instead + * of COSINE distance. Our algorithms have been more optimized for + * DOT_PRODUCT distance which, when combined with UNIT_L2_NORM, is + * mathematically equivalent to COSINE distance and results in the same + * ranking. + * + * Generated from protobuf enum COSINE_DISTANCE = 2; + */ + const COSINE_DISTANCE = 2; + /** + * Dot Product Distance. Defined as a negative of the dot product. + * + * Generated from protobuf enum DOT_PRODUCT_DISTANCE = 3; + */ + const DOT_PRODUCT_DISTANCE = 3; + + private static $valueToName = [ + self::DISTANCE_MEASURE_TYPE_UNSPECIFIED => 'DISTANCE_MEASURE_TYPE_UNSPECIFIED', + self::SQUARED_L2_DISTANCE => 'SQUARED_L2_DISTANCE', + self::COSINE_DISTANCE => 'COSINE_DISTANCE', + self::DOT_PRODUCT_DISTANCE => 'DOT_PRODUCT_DISTANCE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AiPlatform/src/V1/FeatureView/IndexConfig/TreeAHConfig.php b/AiPlatform/src/V1/FeatureView/IndexConfig/TreeAHConfig.php new file mode 100644 index 000000000000..0d56662cbc72 --- /dev/null +++ b/AiPlatform/src/V1/FeatureView/IndexConfig/TreeAHConfig.php @@ -0,0 +1,82 @@ +google.cloud.aiplatform.v1.FeatureView.IndexConfig.TreeAHConfig + */ +class TreeAHConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Number of embeddings on each leaf node. The default value is + * 1000 if not set. + * + * Generated from protobuf field optional int64 leaf_node_embedding_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $leaf_node_embedding_count = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $leaf_node_embedding_count + * Optional. Number of embeddings on each leaf node. The default value is + * 1000 if not set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\FeatureView::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Number of embeddings on each leaf node. The default value is + * 1000 if not set. + * + * Generated from protobuf field optional int64 leaf_node_embedding_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getLeafNodeEmbeddingCount() + { + return isset($this->leaf_node_embedding_count) ? $this->leaf_node_embedding_count : 0; + } + + public function hasLeafNodeEmbeddingCount() + { + return isset($this->leaf_node_embedding_count); + } + + public function clearLeafNodeEmbeddingCount() + { + unset($this->leaf_node_embedding_count); + } + + /** + * Optional. Number of embeddings on each leaf node. The default value is + * 1000 if not set. + * + * Generated from protobuf field optional int64 leaf_node_embedding_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setLeafNodeEmbeddingCount($var) + { + GPBUtil::checkInt64($var); + $this->leaf_node_embedding_count = $var; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/FetchFeatureValuesResponse.php b/AiPlatform/src/V1/FetchFeatureValuesResponse.php index c31c1c346d76..0cc4c4debf3d 100644 --- a/AiPlatform/src/V1/FetchFeatureValuesResponse.php +++ b/AiPlatform/src/V1/FetchFeatureValuesResponse.php @@ -16,6 +16,14 @@ */ class FetchFeatureValuesResponse extends \Google\Protobuf\Internal\Message { + /** + * The data key associated with this response. + * Will only be populated for + * [FeatureOnlineStoreService.StreamingFetchFeatureValues][] RPCs. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FeatureViewDataKey data_key = 4; + */ + private $data_key = null; protected $format; /** @@ -28,6 +36,10 @@ class FetchFeatureValuesResponse extends \Google\Protobuf\Internal\Message * Feature values in KeyValue format. * @type \Google\Protobuf\Struct $proto_struct * Feature values in proto Struct format. + * @type \Google\Cloud\AIPlatform\V1\FeatureViewDataKey $data_key + * The data key associated with this response. + * Will only be populated for + * [FeatureOnlineStoreService.StreamingFetchFeatureValues][] RPCs. * } */ public function __construct($data = NULL) { @@ -97,6 +109,46 @@ public function setProtoStruct($var) return $this; } + /** + * The data key associated with this response. + * Will only be populated for + * [FeatureOnlineStoreService.StreamingFetchFeatureValues][] RPCs. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FeatureViewDataKey data_key = 4; + * @return \Google\Cloud\AIPlatform\V1\FeatureViewDataKey|null + */ + public function getDataKey() + { + return $this->data_key; + } + + public function hasDataKey() + { + return isset($this->data_key); + } + + public function clearDataKey() + { + unset($this->data_key); + } + + /** + * The data key associated with this response. + * Will only be populated for + * [FeatureOnlineStoreService.StreamingFetchFeatureValues][] RPCs. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.FeatureViewDataKey data_key = 4; + * @param \Google\Cloud\AIPlatform\V1\FeatureViewDataKey $var + * @return $this + */ + public function setDataKey($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\FeatureViewDataKey::class); + $this->data_key = $var; + + return $this; + } + /** * @return string */ diff --git a/AiPlatform/src/V1/FunctionDeclaration.php b/AiPlatform/src/V1/FunctionDeclaration.php index 3bede9ade854..5130f027d0df 100644 --- a/AiPlatform/src/V1/FunctionDeclaration.php +++ b/AiPlatform/src/V1/FunctionDeclaration.php @@ -22,8 +22,8 @@ class FunctionDeclaration extends \Google\Protobuf\Internal\Message /** * Required. The name of the function to call. * Must start with a letter or an underscore. - * Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum - * length of 64. + * Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a + * maximum length of 64. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; */ @@ -40,8 +40,10 @@ class FunctionDeclaration extends \Google\Protobuf\Internal\Message * format. Reflects the Open API 3.03 Parameter Object. string Key: the name * of the parameter. Parameter names are case sensitive. Schema Value: the * Schema defining the type used for the parameter. For function with no - * parameters, this can be left unset. Example with 1 required and 1 optional - * parameter: type: OBJECT properties: + * parameters, this can be left unset. Parameter names must start with a + * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or + * underscores with a maximum length of 64. Example with 1 required and 1 + * optional parameter: type: OBJECT properties: * param1: * type: STRING * param2: @@ -62,8 +64,8 @@ class FunctionDeclaration extends \Google\Protobuf\Internal\Message * @type string $name * Required. The name of the function to call. * Must start with a letter or an underscore. - * Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum - * length of 64. + * Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a + * maximum length of 64. * @type string $description * Optional. Description and purpose of the function. * Model uses it to decide how and whether to call the function. @@ -72,8 +74,10 @@ class FunctionDeclaration extends \Google\Protobuf\Internal\Message * format. Reflects the Open API 3.03 Parameter Object. string Key: the name * of the parameter. Parameter names are case sensitive. Schema Value: the * Schema defining the type used for the parameter. For function with no - * parameters, this can be left unset. Example with 1 required and 1 optional - * parameter: type: OBJECT properties: + * parameters, this can be left unset. Parameter names must start with a + * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or + * underscores with a maximum length of 64. Example with 1 required and 1 + * optional parameter: type: OBJECT properties: * param1: * type: STRING * param2: @@ -90,8 +94,8 @@ public function __construct($data = NULL) { /** * Required. The name of the function to call. * Must start with a letter or an underscore. - * Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum - * length of 64. + * Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a + * maximum length of 64. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -104,8 +108,8 @@ public function getName() /** * Required. The name of the function to call. * Must start with a letter or an underscore. - * Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum - * length of 64. + * Must be a-z, A-Z, 0-9, or contain underscores, dots and dashes, with a + * maximum length of 64. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; * @param string $var @@ -152,8 +156,10 @@ public function setDescription($var) * format. Reflects the Open API 3.03 Parameter Object. string Key: the name * of the parameter. Parameter names are case sensitive. Schema Value: the * Schema defining the type used for the parameter. For function with no - * parameters, this can be left unset. Example with 1 required and 1 optional - * parameter: type: OBJECT properties: + * parameters, this can be left unset. Parameter names must start with a + * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or + * underscores with a maximum length of 64. Example with 1 required and 1 + * optional parameter: type: OBJECT properties: * param1: * type: STRING * param2: @@ -184,8 +190,10 @@ public function clearParameters() * format. Reflects the Open API 3.03 Parameter Object. string Key: the name * of the parameter. Parameter names are case sensitive. Schema Value: the * Schema defining the type used for the parameter. For function with no - * parameters, this can be left unset. Example with 1 required and 1 optional - * parameter: type: OBJECT properties: + * parameters, this can be left unset. Parameter names must start with a + * letter or an underscore and must only contain chars a-z, A-Z, 0-9, or + * underscores with a maximum length of 64. Example with 1 required and 1 + * optional parameter: type: OBJECT properties: * param1: * type: STRING * param2: diff --git a/AiPlatform/src/V1/Gapic/EndpointServiceGapicClient.php b/AiPlatform/src/V1/Gapic/EndpointServiceGapicClient.php index cc002ad40537..969ccd96c01f 100644 --- a/AiPlatform/src/V1/Gapic/EndpointServiceGapicClient.php +++ b/AiPlatform/src/V1/Gapic/EndpointServiceGapicClient.php @@ -958,9 +958,8 @@ public function getEndpoint($name, array $optionalArgs = []) * names both snake_case and camelCase are supported. * * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint - * ID, - * i.e. the last segment of the Endpoint's [resource - * name][google.cloud.aiplatform.v1.Endpoint.name]. + * ID, i.e. the last segment of the Endpoint's + * [resource name][google.cloud.aiplatform.v1.Endpoint.name]. * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality diff --git a/AiPlatform/src/V1/Gapic/GenAiTuningServiceGapicClient.php b/AiPlatform/src/V1/Gapic/GenAiTuningServiceGapicClient.php new file mode 100644 index 000000000000..e2cd1cb21b89 --- /dev/null +++ b/AiPlatform/src/V1/Gapic/GenAiTuningServiceGapicClient.php @@ -0,0 +1,1084 @@ +tuningJobName('[PROJECT]', '[LOCATION]', '[TUNING_JOB]'); + * $genAiTuningServiceClient->cancelTuningJob($formattedName); + * } finally { + * $genAiTuningServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @deprecated Please use the new service client {@see \Google\Cloud\AIPlatform\V1\Client\GenAiTuningServiceClient}. + */ +class GenAiTuningServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.aiplatform.v1.GenAiTuningService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'aiplatform.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'aiplatform.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $contextNameTemplate; + + private static $endpointNameTemplate; + + private static $locationNameTemplate; + + private static $modelNameTemplate; + + private static $projectLocationEndpointNameTemplate; + + private static $projectLocationPublisherModelNameTemplate; + + private static $tuningJobNameTemplate; + + private static $pathTemplateMap; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => + self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => + __DIR__ . + '/../resources/gen_ai_tuning_service_client_config.json', + 'descriptorsConfigPath' => + __DIR__ . + '/../resources/gen_ai_tuning_service_descriptor_config.php', + 'gcpApiConfigPath' => + __DIR__ . + '/../resources/gen_ai_tuning_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => + __DIR__ . + '/../resources/gen_ai_tuning_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getContextNameTemplate() + { + if (self::$contextNameTemplate == null) { + self::$contextNameTemplate = new PathTemplate( + 'projects/{project}/locations/{location}/metadataStores/{metadata_store}/contexts/{context}' + ); + } + + return self::$contextNameTemplate; + } + + private static function getEndpointNameTemplate() + { + if (self::$endpointNameTemplate == null) { + self::$endpointNameTemplate = new PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ); + } + + return self::$endpointNameTemplate; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate( + 'projects/{project}/locations/{location}' + ); + } + + return self::$locationNameTemplate; + } + + private static function getModelNameTemplate() + { + if (self::$modelNameTemplate == null) { + self::$modelNameTemplate = new PathTemplate( + 'projects/{project}/locations/{location}/models/{model}' + ); + } + + return self::$modelNameTemplate; + } + + private static function getProjectLocationEndpointNameTemplate() + { + if (self::$projectLocationEndpointNameTemplate == null) { + self::$projectLocationEndpointNameTemplate = new PathTemplate( + 'projects/{project}/locations/{location}/endpoints/{endpoint}' + ); + } + + return self::$projectLocationEndpointNameTemplate; + } + + private static function getProjectLocationPublisherModelNameTemplate() + { + if (self::$projectLocationPublisherModelNameTemplate == null) { + self::$projectLocationPublisherModelNameTemplate = new PathTemplate( + 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}' + ); + } + + return self::$projectLocationPublisherModelNameTemplate; + } + + private static function getTuningJobNameTemplate() + { + if (self::$tuningJobNameTemplate == null) { + self::$tuningJobNameTemplate = new PathTemplate( + 'projects/{project}/locations/{location}/tuningJobs/{tuning_job}' + ); + } + + return self::$tuningJobNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'context' => self::getContextNameTemplate(), + 'endpoint' => self::getEndpointNameTemplate(), + 'location' => self::getLocationNameTemplate(), + 'model' => self::getModelNameTemplate(), + 'projectLocationEndpoint' => self::getProjectLocationEndpointNameTemplate(), + 'projectLocationPublisherModel' => self::getProjectLocationPublisherModelNameTemplate(), + 'tuningJob' => self::getTuningJobNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a context + * resource. + * + * @param string $project + * @param string $location + * @param string $metadataStore + * @param string $context + * + * @return string The formatted context resource. + */ + public static function contextName( + $project, + $location, + $metadataStore, + $context + ) { + return self::getContextNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'metadata_store' => $metadataStore, + 'context' => $context, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a endpoint + * resource. + * + * @param string $project + * @param string $location + * @param string $endpoint + * + * @return string The formatted endpoint resource. + */ + public static function endpointName($project, $location, $endpoint) + { + return self::getEndpointNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'endpoint' => $endpoint, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a model + * resource. + * + * @param string $project + * @param string $location + * @param string $model + * + * @return string The formatted model resource. + */ + public static function modelName($project, $location, $model) + { + return self::getModelNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'model' => $model, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_endpoint resource. + * + * @param string $project + * @param string $location + * @param string $endpoint + * + * @return string The formatted project_location_endpoint resource. + */ + public static function projectLocationEndpointName( + $project, + $location, + $endpoint + ) { + return self::getProjectLocationEndpointNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'endpoint' => $endpoint, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_publisher_model resource. + * + * @param string $project + * @param string $location + * @param string $publisher + * @param string $model + * + * @return string The formatted project_location_publisher_model resource. + */ + public static function projectLocationPublisherModelName( + $project, + $location, + $publisher, + $model + ) { + return self::getProjectLocationPublisherModelNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'publisher' => $publisher, + 'model' => $model, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a tuning_job + * resource. + * + * @param string $project + * @param string $location + * @param string $tuningJob + * + * @return string The formatted tuning_job resource. + */ + public static function tuningJobName($project, $location, $tuningJob) + { + return self::getTuningJobNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'tuning_job' => $tuningJob, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - context: projects/{project}/locations/{location}/metadataStores/{metadata_store}/contexts/{context} + * - endpoint: projects/{project}/locations/{location}/endpoints/{endpoint} + * - location: projects/{project}/locations/{location} + * - model: projects/{project}/locations/{location}/models/{model} + * - projectLocationEndpoint: projects/{project}/locations/{location}/endpoints/{endpoint} + * - projectLocationPublisherModel: projects/{project}/locations/{location}/publishers/{publisher}/models/{model} + * - tuningJob: projects/{project}/locations/{location}/tuningJobs/{tuning_job} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException( + "Template name $template does not exist" + ); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException( + "Input did not match any known format. Input: $formattedName" + ); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'aiplatform.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Cancels a TuningJob. + * Starts asynchronous cancellation on the TuningJob. The server makes a best + * effort to cancel the job, but success is not guaranteed. Clients can use + * [GenAiTuningService.GetTuningJob][google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob] + * or other methods to check whether the cancellation succeeded or whether the + * job completed despite cancellation. On successful cancellation, the + * TuningJob is not deleted; instead it becomes a job with a + * [TuningJob.error][google.cloud.aiplatform.v1.TuningJob.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`, and + * [TuningJob.state][google.cloud.aiplatform.v1.TuningJob.state] is set to + * `CANCELLED`. + * + * Sample code: + * ``` + * $genAiTuningServiceClient = new GenAiTuningServiceClient(); + * try { + * $formattedName = $genAiTuningServiceClient->tuningJobName('[PROJECT]', '[LOCATION]', '[TUNING_JOB]'); + * $genAiTuningServiceClient->cancelTuningJob($formattedName); + * } finally { + * $genAiTuningServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the TuningJob to cancel. Format: + * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function cancelTuningJob($name, array $optionalArgs = []) + { + $request = new CancelTuningJobRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'CancelTuningJob', + GPBEmpty::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Creates a TuningJob. A created TuningJob right away will be attempted to + * be run. + * + * Sample code: + * ``` + * $genAiTuningServiceClient = new GenAiTuningServiceClient(); + * try { + * $formattedParent = $genAiTuningServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $tuningJob = new TuningJob(); + * $response = $genAiTuningServiceClient->createTuningJob($formattedParent, $tuningJob); + * } finally { + * $genAiTuningServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the Location to create the TuningJob in. + * Format: `projects/{project}/locations/{location}` + * @param TuningJob $tuningJob Required. The TuningJob to create. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\AIPlatform\V1\TuningJob + * + * @throws ApiException if the remote call fails + */ + public function createTuningJob( + $parent, + $tuningJob, + array $optionalArgs = [] + ) { + $request = new CreateTuningJobRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setTuningJob($tuningJob); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'CreateTuningJob', + TuningJob::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Gets a TuningJob. + * + * Sample code: + * ``` + * $genAiTuningServiceClient = new GenAiTuningServiceClient(); + * try { + * $formattedName = $genAiTuningServiceClient->tuningJobName('[PROJECT]', '[LOCATION]', '[TUNING_JOB]'); + * $response = $genAiTuningServiceClient->getTuningJob($formattedName); + * } finally { + * $genAiTuningServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the TuningJob resource. Format: + * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\AIPlatform\V1\TuningJob + * + * @throws ApiException if the remote call fails + */ + public function getTuningJob($name, array $optionalArgs = []) + { + $request = new GetTuningJobRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'GetTuningJob', + TuningJob::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Lists TuningJobs in a Location. + * + * Sample code: + * ``` + * $genAiTuningServiceClient = new GenAiTuningServiceClient(); + * try { + * $formattedParent = $genAiTuningServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $genAiTuningServiceClient->listTuningJobs($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $genAiTuningServiceClient->listTuningJobs($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $genAiTuningServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the Location to list the TuningJobs from. + * Format: `projects/{project}/locations/{location}` + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * Optional. The standard list filter. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listTuningJobs($parent, array $optionalArgs = []) + { + $request = new ListTuningJobsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->getPagedListResponse( + 'ListTuningJobs', + $optionalArgs, + ListTuningJobsResponse::class, + $request + ); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $genAiTuningServiceClient = new GenAiTuningServiceClient(); + * try { + * $response = $genAiTuningServiceClient->getLocation(); + * } finally { + * $genAiTuningServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'GetLocation', + Location::class, + $optionalArgs, + $request, + Call::UNARY_CALL, + 'google.cloud.location.Locations' + )->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $genAiTuningServiceClient = new GenAiTuningServiceClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $genAiTuningServiceClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $genAiTuningServiceClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $genAiTuningServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->getPagedListResponse( + 'ListLocations', + $optionalArgs, + ListLocationsResponse::class, + $request, + 'google.cloud.location.Locations' + ); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * Sample code: + * ``` + * $genAiTuningServiceClient = new GenAiTuningServiceClient(); + * try { + * $resource = 'resource'; + * $response = $genAiTuningServiceClient->getIamPolicy($resource); + * } finally { + * $genAiTuningServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param array $optionalArgs { + * Optional. + * + * @type GetPolicyOptions $options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'GetIamPolicy', + Policy::class, + $optionalArgs, + $request, + Call::UNARY_CALL, + 'google.iam.v1.IAMPolicy' + )->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * Sample code: + * ``` + * $genAiTuningServiceClient = new GenAiTuningServiceClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $genAiTuningServiceClient->setIamPolicy($resource, $policy); + * } finally { + * $genAiTuningServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function setIamPolicy($resource, $policy, array $optionalArgs = []) + { + $request = new SetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPolicy($policy); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'SetIamPolicy', + Policy::class, + $optionalArgs, + $request, + Call::UNARY_CALL, + 'google.iam.v1.IAMPolicy' + )->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * Sample code: + * ``` + * $genAiTuningServiceClient = new GenAiTuningServiceClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $genAiTuningServiceClient->testIamPermissions($resource, $permissions); + * } finally { + * $genAiTuningServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse + * + * @throws ApiException if the remote call fails + */ + public function testIamPermissions( + $resource, + $permissions, + array $optionalArgs = [] + ) { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'TestIamPermissions', + TestIamPermissionsResponse::class, + $optionalArgs, + $request, + Call::UNARY_CALL, + 'google.iam.v1.IAMPolicy' + )->wait(); + } +} diff --git a/AiPlatform/src/V1/Gapic/JobServiceGapicClient.php b/AiPlatform/src/V1/Gapic/JobServiceGapicClient.php index cbb812873d78..7b9aa5313d05 100644 --- a/AiPlatform/src/V1/Gapic/JobServiceGapicClient.php +++ b/AiPlatform/src/V1/Gapic/JobServiceGapicClient.php @@ -182,6 +182,8 @@ class JobServiceGapicClient private static $notificationChannelNameTemplate; + private static $persistentResourceNameTemplate; + private static $projectLocationEndpointNameTemplate; private static $projectLocationPublisherModelNameTemplate; @@ -373,6 +375,17 @@ private static function getNotificationChannelNameTemplate() return self::$notificationChannelNameTemplate; } + private static function getPersistentResourceNameTemplate() + { + if (self::$persistentResourceNameTemplate == null) { + self::$persistentResourceNameTemplate = new PathTemplate( + 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}' + ); + } + + return self::$persistentResourceNameTemplate; + } + private static function getProjectLocationEndpointNameTemplate() { if (self::$projectLocationEndpointNameTemplate == null) { @@ -435,6 +448,7 @@ private static function getPathTemplateMap() 'nasTrialDetail' => self::getNasTrialDetailNameTemplate(), 'network' => self::getNetworkNameTemplate(), 'notificationChannel' => self::getNotificationChannelNameTemplate(), + 'persistentResource' => self::getPersistentResourceNameTemplate(), 'projectLocationEndpoint' => self::getProjectLocationEndpointNameTemplate(), 'projectLocationPublisherModel' => self::getProjectLocationPublisherModelNameTemplate(), 'tensorboard' => self::getTensorboardNameTemplate(), @@ -731,6 +745,28 @@ public static function notificationChannelName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * persistent_resource resource. + * + * @param string $project + * @param string $location + * @param string $persistentResource + * + * @return string The formatted persistent_resource resource. + */ + public static function persistentResourceName( + $project, + $location, + $persistentResource + ) { + return self::getPersistentResourceNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'persistent_resource' => $persistentResource, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * project_location_endpoint resource. @@ -836,6 +872,7 @@ public static function trialName($project, $location, $study, $trial) * - nasTrialDetail: projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail} * - network: projects/{project}/global/networks/{network} * - notificationChannel: projects/{project}/notificationChannels/{notification_channel} + * - persistentResource: projects/{project}/locations/{location}/persistentResources/{persistent_resource} * - projectLocationEndpoint: projects/{project}/locations/{location}/endpoints/{endpoint} * - projectLocationPublisherModel: projects/{project}/locations/{location}/publishers/{publisher}/models/{model} * - tensorboard: projects/{project}/locations/{location}/tensorboards/{tensorboard} diff --git a/AiPlatform/src/V1/Gapic/NotebookServiceGapicClient.php b/AiPlatform/src/V1/Gapic/NotebookServiceGapicClient.php new file mode 100644 index 000000000000..bcdf15d765eb --- /dev/null +++ b/AiPlatform/src/V1/Gapic/NotebookServiceGapicClient.php @@ -0,0 +1,1678 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $formattedNotebookRuntimeTemplate = $notebookServiceClient->notebookRuntimeTemplateName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME_TEMPLATE]'); + * $notebookRuntime = new NotebookRuntime(); + * $operationResponse = $notebookServiceClient->assignNotebookRuntime($formattedParent, $formattedNotebookRuntimeTemplate, $notebookRuntime); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $notebookServiceClient->assignNotebookRuntime($formattedParent, $formattedNotebookRuntimeTemplate, $notebookRuntime); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $notebookServiceClient->resumeOperation($operationName, 'assignNotebookRuntime'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $notebookServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @deprecated Please use the new service client {@see \Google\Cloud\AIPlatform\V1\Client\NotebookServiceClient}. + */ +class NotebookServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.aiplatform.v1.NotebookService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'aiplatform.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'aiplatform.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $locationNameTemplate; + + private static $networkNameTemplate; + + private static $notebookRuntimeNameTemplate; + + private static $notebookRuntimeTemplateNameTemplate; + + private static $subnetworkNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => + self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => + __DIR__ . '/../resources/notebook_service_client_config.json', + 'descriptorsConfigPath' => + __DIR__ . + '/../resources/notebook_service_descriptor_config.php', + 'gcpApiConfigPath' => + __DIR__ . '/../resources/notebook_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => + __DIR__ . + '/../resources/notebook_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate( + 'projects/{project}/locations/{location}' + ); + } + + return self::$locationNameTemplate; + } + + private static function getNetworkNameTemplate() + { + if (self::$networkNameTemplate == null) { + self::$networkNameTemplate = new PathTemplate( + 'projects/{project}/global/networks/{network}' + ); + } + + return self::$networkNameTemplate; + } + + private static function getNotebookRuntimeNameTemplate() + { + if (self::$notebookRuntimeNameTemplate == null) { + self::$notebookRuntimeNameTemplate = new PathTemplate( + 'projects/{project}/locations/{location}/notebookRuntimes/{notebook_runtime}' + ); + } + + return self::$notebookRuntimeNameTemplate; + } + + private static function getNotebookRuntimeTemplateNameTemplate() + { + if (self::$notebookRuntimeTemplateNameTemplate == null) { + self::$notebookRuntimeTemplateNameTemplate = new PathTemplate( + 'projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}' + ); + } + + return self::$notebookRuntimeTemplateNameTemplate; + } + + private static function getSubnetworkNameTemplate() + { + if (self::$subnetworkNameTemplate == null) { + self::$subnetworkNameTemplate = new PathTemplate( + 'projects/{project}/regions/{region}/subnetworks/{subnetwork}' + ); + } + + return self::$subnetworkNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'location' => self::getLocationNameTemplate(), + 'network' => self::getNetworkNameTemplate(), + 'notebookRuntime' => self::getNotebookRuntimeNameTemplate(), + 'notebookRuntimeTemplate' => self::getNotebookRuntimeTemplateNameTemplate(), + 'subnetwork' => self::getSubnetworkNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $project + * @param string $network + * + * @return string The formatted network resource. + */ + public static function networkName($project, $network) + { + return self::getNetworkNameTemplate()->render([ + 'project' => $project, + 'network' => $network, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * notebook_runtime resource. + * + * @param string $project + * @param string $location + * @param string $notebookRuntime + * + * @return string The formatted notebook_runtime resource. + */ + public static function notebookRuntimeName( + $project, + $location, + $notebookRuntime + ) { + return self::getNotebookRuntimeNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'notebook_runtime' => $notebookRuntime, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * notebook_runtime_template resource. + * + * @param string $project + * @param string $location + * @param string $notebookRuntimeTemplate + * + * @return string The formatted notebook_runtime_template resource. + */ + public static function notebookRuntimeTemplateName( + $project, + $location, + $notebookRuntimeTemplate + ) { + return self::getNotebookRuntimeTemplateNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'notebook_runtime_template' => $notebookRuntimeTemplate, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a subnetwork + * resource. + * + * @param string $project + * @param string $region + * @param string $subnetwork + * + * @return string The formatted subnetwork resource. + */ + public static function subnetworkName($project, $region, $subnetwork) + { + return self::getSubnetworkNameTemplate()->render([ + 'project' => $project, + 'region' => $region, + 'subnetwork' => $subnetwork, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - network: projects/{project}/global/networks/{network} + * - notebookRuntime: projects/{project}/locations/{location}/notebookRuntimes/{notebook_runtime} + * - notebookRuntimeTemplate: projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template} + * - subnetwork: projects/{project}/regions/{region}/subnetworks/{subnetwork} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException( + "Template name $template does not exist" + ); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException( + "Input did not match any known format. Input: $formattedName" + ); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) + ? $this->descriptors[$methodName]['longRunning'] + : []; + $operation = new OperationResponse( + $operationName, + $this->getOperationsClient(), + $options + ); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'aiplatform.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Assigns a NotebookRuntime to a user for a particular Notebook file. This + * method will either returns an existing assignment or generates a new one. + * + * Sample code: + * ``` + * $notebookServiceClient = new NotebookServiceClient(); + * try { + * $formattedParent = $notebookServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $formattedNotebookRuntimeTemplate = $notebookServiceClient->notebookRuntimeTemplateName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME_TEMPLATE]'); + * $notebookRuntime = new NotebookRuntime(); + * $operationResponse = $notebookServiceClient->assignNotebookRuntime($formattedParent, $formattedNotebookRuntimeTemplate, $notebookRuntime); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $notebookServiceClient->assignNotebookRuntime($formattedParent, $formattedNotebookRuntimeTemplate, $notebookRuntime); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $notebookServiceClient->resumeOperation($operationName, 'assignNotebookRuntime'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $notebookServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the Location to get the NotebookRuntime + * assignment. Format: `projects/{project}/locations/{location}` + * @param string $notebookRuntimeTemplate Required. The resource name of the NotebookRuntimeTemplate based on which a + * NotebookRuntime will be assigned (reuse or create a new one). + * @param NotebookRuntime $notebookRuntime Required. Provide runtime specific information (e.g. runtime owner, + * notebook id) used for NotebookRuntime assignment. + * @param array $optionalArgs { + * Optional. + * + * @type string $notebookRuntimeId + * Optional. User specified ID for the notebook runtime. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function assignNotebookRuntime( + $parent, + $notebookRuntimeTemplate, + $notebookRuntime, + array $optionalArgs = [] + ) { + $request = new AssignNotebookRuntimeRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setNotebookRuntimeTemplate($notebookRuntimeTemplate); + $request->setNotebookRuntime($notebookRuntime); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['notebookRuntimeId'])) { + $request->setNotebookRuntimeId($optionalArgs['notebookRuntimeId']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startOperationsCall( + 'AssignNotebookRuntime', + $optionalArgs, + $request, + $this->getOperationsClient() + )->wait(); + } + + /** + * Creates a NotebookRuntimeTemplate. + * + * Sample code: + * ``` + * $notebookServiceClient = new NotebookServiceClient(); + * try { + * $formattedParent = $notebookServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $notebookRuntimeTemplate = new NotebookRuntimeTemplate(); + * $operationResponse = $notebookServiceClient->createNotebookRuntimeTemplate($formattedParent, $notebookRuntimeTemplate); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $notebookServiceClient->createNotebookRuntimeTemplate($formattedParent, $notebookRuntimeTemplate); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $notebookServiceClient->resumeOperation($operationName, 'createNotebookRuntimeTemplate'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $notebookServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the Location to create the + * NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}` + * @param NotebookRuntimeTemplate $notebookRuntimeTemplate Required. The NotebookRuntimeTemplate to create. + * @param array $optionalArgs { + * Optional. + * + * @type string $notebookRuntimeTemplateId + * Optional. User specified ID for the notebook runtime template. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createNotebookRuntimeTemplate( + $parent, + $notebookRuntimeTemplate, + array $optionalArgs = [] + ) { + $request = new CreateNotebookRuntimeTemplateRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setNotebookRuntimeTemplate($notebookRuntimeTemplate); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['notebookRuntimeTemplateId'])) { + $request->setNotebookRuntimeTemplateId( + $optionalArgs['notebookRuntimeTemplateId'] + ); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startOperationsCall( + 'CreateNotebookRuntimeTemplate', + $optionalArgs, + $request, + $this->getOperationsClient() + )->wait(); + } + + /** + * Deletes a NotebookRuntime. + * + * Sample code: + * ``` + * $notebookServiceClient = new NotebookServiceClient(); + * try { + * $formattedName = $notebookServiceClient->notebookRuntimeName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME]'); + * $operationResponse = $notebookServiceClient->deleteNotebookRuntime($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $notebookServiceClient->deleteNotebookRuntime($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $notebookServiceClient->resumeOperation($operationName, 'deleteNotebookRuntime'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $notebookServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the NotebookRuntime resource to be deleted. + * Instead of checking whether the name is in valid NotebookRuntime resource + * name format, directly throw NotFound exception if there is no such + * NotebookRuntime in spanner. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteNotebookRuntime($name, array $optionalArgs = []) + { + $request = new DeleteNotebookRuntimeRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startOperationsCall( + 'DeleteNotebookRuntime', + $optionalArgs, + $request, + $this->getOperationsClient() + )->wait(); + } + + /** + * Deletes a NotebookRuntimeTemplate. + * + * Sample code: + * ``` + * $notebookServiceClient = new NotebookServiceClient(); + * try { + * $formattedName = $notebookServiceClient->notebookRuntimeTemplateName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME_TEMPLATE]'); + * $operationResponse = $notebookServiceClient->deleteNotebookRuntimeTemplate($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $notebookServiceClient->deleteNotebookRuntimeTemplate($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $notebookServiceClient->resumeOperation($operationName, 'deleteNotebookRuntimeTemplate'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $notebookServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the NotebookRuntimeTemplate resource to be deleted. + * Format: + * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deleteNotebookRuntimeTemplate( + $name, + array $optionalArgs = [] + ) { + $request = new DeleteNotebookRuntimeTemplateRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startOperationsCall( + 'DeleteNotebookRuntimeTemplate', + $optionalArgs, + $request, + $this->getOperationsClient() + )->wait(); + } + + /** + * Gets a NotebookRuntime. + * + * Sample code: + * ``` + * $notebookServiceClient = new NotebookServiceClient(); + * try { + * $formattedName = $notebookServiceClient->notebookRuntimeName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME]'); + * $response = $notebookServiceClient->getNotebookRuntime($formattedName); + * } finally { + * $notebookServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the NotebookRuntime resource. + * Instead of checking whether the name is in valid NotebookRuntime resource + * name format, directly throw NotFound exception if there is no such + * NotebookRuntime in spanner. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\AIPlatform\V1\NotebookRuntime + * + * @throws ApiException if the remote call fails + */ + public function getNotebookRuntime($name, array $optionalArgs = []) + { + $request = new GetNotebookRuntimeRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'GetNotebookRuntime', + NotebookRuntime::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Gets a NotebookRuntimeTemplate. + * + * Sample code: + * ``` + * $notebookServiceClient = new NotebookServiceClient(); + * try { + * $formattedName = $notebookServiceClient->notebookRuntimeTemplateName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME_TEMPLATE]'); + * $response = $notebookServiceClient->getNotebookRuntimeTemplate($formattedName); + * } finally { + * $notebookServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the NotebookRuntimeTemplate resource. + * Format: + * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\AIPlatform\V1\NotebookRuntimeTemplate + * + * @throws ApiException if the remote call fails + */ + public function getNotebookRuntimeTemplate($name, array $optionalArgs = []) + { + $request = new GetNotebookRuntimeTemplateRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'GetNotebookRuntimeTemplate', + NotebookRuntimeTemplate::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Lists NotebookRuntimeTemplates in a Location. + * + * Sample code: + * ``` + * $notebookServiceClient = new NotebookServiceClient(); + * try { + * $formattedParent = $notebookServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $notebookServiceClient->listNotebookRuntimeTemplates($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $notebookServiceClient->listNotebookRuntimeTemplates($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $notebookServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the Location from which to list the + * NotebookRuntimeTemplates. + * Format: `projects/{project}/locations/{location}` + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * Optional. An expression for filtering the results of the request. For field + * names both snake_case and camelCase are supported. + * + * * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` + * represents the NotebookRuntimeTemplate ID, + * i.e. the last segment of the NotebookRuntimeTemplate's [resource name] + * [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name]. + * * `display_name` supports = and != + * * `labels` supports general map functions that is: + * * `labels.key=value` - key:value equality + * * `labels.key:* or labels:key - key existence + * * A key including a space must be quoted. `labels."a key"`. + * * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: + * [USER_DEFINED, ONE_CLICK]. + * + * Some examples: + * + * * `notebookRuntimeTemplate=notebookRuntimeTemplate123` + * * `displayName="myDisplayName"` + * * `labels.myKey="myValue"` + * * `notebookRuntimeType=USER_DEFINED` + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type FieldMask $readMask + * Optional. Mask specifying which fields to read. + * @type string $orderBy + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. Supported fields: + * + * * `display_name` + * * `create_time` + * * `update_time` + * + * Example: `display_name, create_time desc`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listNotebookRuntimeTemplates( + $parent, + array $optionalArgs = [] + ) { + $request = new ListNotebookRuntimeTemplatesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['readMask'])) { + $request->setReadMask($optionalArgs['readMask']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->getPagedListResponse( + 'ListNotebookRuntimeTemplates', + $optionalArgs, + ListNotebookRuntimeTemplatesResponse::class, + $request + ); + } + + /** + * Lists NotebookRuntimes in a Location. + * + * Sample code: + * ``` + * $notebookServiceClient = new NotebookServiceClient(); + * try { + * $formattedParent = $notebookServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $notebookServiceClient->listNotebookRuntimes($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $notebookServiceClient->listNotebookRuntimes($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $notebookServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the Location from which to list the + * NotebookRuntimes. + * Format: `projects/{project}/locations/{location}` + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * Optional. An expression for filtering the results of the request. For field + * names both snake_case and camelCase are supported. + * + * * `notebookRuntime` supports = and !=. `notebookRuntime` represents the + * NotebookRuntime ID, + * i.e. the last segment of the NotebookRuntime's [resource name] + * [google.cloud.aiplatform.v1.NotebookRuntime.name]. + * * `displayName` supports = and != and regex. + * * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` + * represents the NotebookRuntimeTemplate ID, + * i.e. the last segment of the NotebookRuntimeTemplate's [resource name] + * [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name]. + * * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY, + * HEALTH_STATE_UNSPECIFIED]. + * * `runtimeState` supports = and !=. runtimeState enum: + * [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED, + * STOPPED, BEING_UPGRADED, ERROR, INVALID]. + * * `runtimeUser` supports = and !=. + * * API version is UI only: `uiState` supports = and !=. uiState enum: + * [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED, + * UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED, + * UI_RESOURCE_STATE_CREATION_FAILED]. + * * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: + * [USER_DEFINED, ONE_CLICK]. + * + * Some examples: + * + * * `notebookRuntime="notebookRuntime123"` + * * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"` + * * `notebookRuntimeTemplate="notebookRuntimeTemplate321"` + * * `healthState=HEALTHY` + * * `runtimeState=RUNNING` + * * `runtimeUser="test@google.com"` + * * `uiState=UI_RESOURCE_STATE_BEING_DELETED` + * * `notebookRuntimeType=USER_DEFINED` + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type FieldMask $readMask + * Optional. Mask specifying which fields to read. + * @type string $orderBy + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. Supported fields: + * + * * `display_name` + * * `create_time` + * * `update_time` + * + * Example: `display_name, create_time desc`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listNotebookRuntimes($parent, array $optionalArgs = []) + { + $request = new ListNotebookRuntimesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['readMask'])) { + $request->setReadMask($optionalArgs['readMask']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->getPagedListResponse( + 'ListNotebookRuntimes', + $optionalArgs, + ListNotebookRuntimesResponse::class, + $request + ); + } + + /** + * Starts a NotebookRuntime. + * + * Sample code: + * ``` + * $notebookServiceClient = new NotebookServiceClient(); + * try { + * $formattedName = $notebookServiceClient->notebookRuntimeName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME]'); + * $operationResponse = $notebookServiceClient->startNotebookRuntime($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $notebookServiceClient->startNotebookRuntime($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $notebookServiceClient->resumeOperation($operationName, 'startNotebookRuntime'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $notebookServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the NotebookRuntime resource to be started. + * Instead of checking whether the name is in valid NotebookRuntime resource + * name format, directly throw NotFound exception if there is no such + * NotebookRuntime in spanner. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function startNotebookRuntime($name, array $optionalArgs = []) + { + $request = new StartNotebookRuntimeRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startOperationsCall( + 'StartNotebookRuntime', + $optionalArgs, + $request, + $this->getOperationsClient() + )->wait(); + } + + /** + * Upgrades a NotebookRuntime. + * + * Sample code: + * ``` + * $notebookServiceClient = new NotebookServiceClient(); + * try { + * $formattedName = $notebookServiceClient->notebookRuntimeName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME]'); + * $operationResponse = $notebookServiceClient->upgradeNotebookRuntime($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $notebookServiceClient->upgradeNotebookRuntime($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $notebookServiceClient->resumeOperation($operationName, 'upgradeNotebookRuntime'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $notebookServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the NotebookRuntime resource to be upgrade. + * Instead of checking whether the name is in valid NotebookRuntime resource + * name format, directly throw NotFound exception if there is no such + * NotebookRuntime in spanner. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function upgradeNotebookRuntime($name, array $optionalArgs = []) + { + $request = new UpgradeNotebookRuntimeRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startOperationsCall( + 'UpgradeNotebookRuntime', + $optionalArgs, + $request, + $this->getOperationsClient() + )->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $notebookServiceClient = new NotebookServiceClient(); + * try { + * $response = $notebookServiceClient->getLocation(); + * } finally { + * $notebookServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'GetLocation', + Location::class, + $optionalArgs, + $request, + Call::UNARY_CALL, + 'google.cloud.location.Locations' + )->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $notebookServiceClient = new NotebookServiceClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $notebookServiceClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $notebookServiceClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $notebookServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->getPagedListResponse( + 'ListLocations', + $optionalArgs, + ListLocationsResponse::class, + $request, + 'google.cloud.location.Locations' + ); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * Sample code: + * ``` + * $notebookServiceClient = new NotebookServiceClient(); + * try { + * $resource = 'resource'; + * $response = $notebookServiceClient->getIamPolicy($resource); + * } finally { + * $notebookServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param array $optionalArgs { + * Optional. + * + * @type GetPolicyOptions $options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'GetIamPolicy', + Policy::class, + $optionalArgs, + $request, + Call::UNARY_CALL, + 'google.iam.v1.IAMPolicy' + )->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * Sample code: + * ``` + * $notebookServiceClient = new NotebookServiceClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $notebookServiceClient->setIamPolicy($resource, $policy); + * } finally { + * $notebookServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function setIamPolicy($resource, $policy, array $optionalArgs = []) + { + $request = new SetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPolicy($policy); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'SetIamPolicy', + Policy::class, + $optionalArgs, + $request, + Call::UNARY_CALL, + 'google.iam.v1.IAMPolicy' + )->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * Sample code: + * ``` + * $notebookServiceClient = new NotebookServiceClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $notebookServiceClient->testIamPermissions($resource, $permissions); + * } finally { + * $notebookServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse + * + * @throws ApiException if the remote call fails + */ + public function testIamPermissions( + $resource, + $permissions, + array $optionalArgs = [] + ) { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'TestIamPermissions', + TestIamPermissionsResponse::class, + $optionalArgs, + $request, + Call::UNARY_CALL, + 'google.iam.v1.IAMPolicy' + )->wait(); + } +} diff --git a/AiPlatform/src/V1/Gapic/PersistentResourceServiceGapicClient.php b/AiPlatform/src/V1/Gapic/PersistentResourceServiceGapicClient.php new file mode 100644 index 000000000000..fc35629dfebf --- /dev/null +++ b/AiPlatform/src/V1/Gapic/PersistentResourceServiceGapicClient.php @@ -0,0 +1,1206 @@ +locationName('[PROJECT]', '[LOCATION]'); + * $persistentResource = new PersistentResource(); + * $persistentResourceId = 'persistent_resource_id'; + * $operationResponse = $persistentResourceServiceClient->createPersistentResource($formattedParent, $persistentResource, $persistentResourceId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $persistentResourceServiceClient->createPersistentResource($formattedParent, $persistentResource, $persistentResourceId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $persistentResourceServiceClient->resumeOperation($operationName, 'createPersistentResource'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $persistentResourceServiceClient->close(); + * } + * ``` + * + * Many parameters require resource names to be formatted in a particular way. To + * assist with these names, this class includes a format method for each type of + * name, and additionally a parseName method to extract the individual identifiers + * contained within formatted names that are returned by the API. + * + * @deprecated Please use the new service client {@see \Google\Cloud\AIPlatform\V1\Client\PersistentResourceServiceClient}. + */ +class PersistentResourceServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.aiplatform.v1.PersistentResourceService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'aiplatform.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'aiplatform.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static $locationNameTemplate; + + private static $networkNameTemplate; + + private static $persistentResourceNameTemplate; + + private static $pathTemplateMap; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => + self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => + __DIR__ . + '/../resources/persistent_resource_service_client_config.json', + 'descriptorsConfigPath' => + __DIR__ . + '/../resources/persistent_resource_service_descriptor_config.php', + 'gcpApiConfigPath' => + __DIR__ . + '/../resources/persistent_resource_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => + __DIR__ . + '/../resources/persistent_resource_service_rest_client_config.php', + ], + ], + ]; + } + + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate( + 'projects/{project}/locations/{location}' + ); + } + + return self::$locationNameTemplate; + } + + private static function getNetworkNameTemplate() + { + if (self::$networkNameTemplate == null) { + self::$networkNameTemplate = new PathTemplate( + 'projects/{project}/global/networks/{network}' + ); + } + + return self::$networkNameTemplate; + } + + private static function getPersistentResourceNameTemplate() + { + if (self::$persistentResourceNameTemplate == null) { + self::$persistentResourceNameTemplate = new PathTemplate( + 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}' + ); + } + + return self::$persistentResourceNameTemplate; + } + + private static function getPathTemplateMap() + { + if (self::$pathTemplateMap == null) { + self::$pathTemplateMap = [ + 'location' => self::getLocationNameTemplate(), + 'network' => self::getNetworkNameTemplate(), + 'persistentResource' => self::getPersistentResourceNameTemplate(), + ]; + } + + return self::$pathTemplateMap; + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $project + * @param string $network + * + * @return string The formatted network resource. + */ + public static function networkName($project, $network) + { + return self::getNetworkNameTemplate()->render([ + 'project' => $project, + 'network' => $network, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * persistent_resource resource. + * + * @param string $project + * @param string $location + * @param string $persistentResource + * + * @return string The formatted persistent_resource resource. + */ + public static function persistentResourceName( + $project, + $location, + $persistentResource + ) { + return self::getPersistentResourceNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'persistent_resource' => $persistentResource, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - location: projects/{project}/locations/{location} + * - network: projects/{project}/global/networks/{network} + * - persistentResource: projects/{project}/locations/{location}/persistentResources/{persistent_resource} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName($formattedName, $template = null) + { + $templateMap = self::getPathTemplateMap(); + if ($template) { + if (!isset($templateMap[$template])) { + throw new ValidationException( + "Template name $template does not exist" + ); + } + + return $templateMap[$template]->match($formattedName); + } + + foreach ($templateMap as $templateName => $pathTemplate) { + try { + return $pathTemplate->match($formattedName); + } catch (ValidationException $ex) { + // Swallow the exception to continue trying other path templates + } + } + + throw new ValidationException( + "Input did not match any known format. Input: $formattedName" + ); + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) + ? $this->descriptors[$methodName]['longRunning'] + : []; + $operation = new OperationResponse( + $operationName, + $this->getOperationsClient(), + $options + ); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'aiplatform.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Creates a PersistentResource. + * + * Sample code: + * ``` + * $persistentResourceServiceClient = new PersistentResourceServiceClient(); + * try { + * $formattedParent = $persistentResourceServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * $persistentResource = new PersistentResource(); + * $persistentResourceId = 'persistent_resource_id'; + * $operationResponse = $persistentResourceServiceClient->createPersistentResource($formattedParent, $persistentResource, $persistentResourceId); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $persistentResourceServiceClient->createPersistentResource($formattedParent, $persistentResource, $persistentResourceId); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $persistentResourceServiceClient->resumeOperation($operationName, 'createPersistentResource'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $persistentResourceServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the Location to create the + * PersistentResource in. Format: `projects/{project}/locations/{location}` + * @param PersistentResource $persistentResource Required. The PersistentResource to create. + * @param string $persistentResourceId Required. The ID to use for the PersistentResource, which become the final + * component of the PersistentResource's resource name. + * + * The maximum length is 63 characters, and valid characters + * are `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createPersistentResource( + $parent, + $persistentResource, + $persistentResourceId, + array $optionalArgs = [] + ) { + $request = new CreatePersistentResourceRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setPersistentResource($persistentResource); + $request->setPersistentResourceId($persistentResourceId); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startOperationsCall( + 'CreatePersistentResource', + $optionalArgs, + $request, + $this->getOperationsClient() + )->wait(); + } + + /** + * Deletes a PersistentResource. + * + * Sample code: + * ``` + * $persistentResourceServiceClient = new PersistentResourceServiceClient(); + * try { + * $formattedName = $persistentResourceServiceClient->persistentResourceName('[PROJECT]', '[LOCATION]', '[PERSISTENT_RESOURCE]'); + * $operationResponse = $persistentResourceServiceClient->deletePersistentResource($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $persistentResourceServiceClient->deletePersistentResource($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $persistentResourceServiceClient->resumeOperation($operationName, 'deletePersistentResource'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // operation succeeded and returns no value + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $persistentResourceServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the PersistentResource to be deleted. + * Format: + * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function deletePersistentResource($name, array $optionalArgs = []) + { + $request = new DeletePersistentResourceRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startOperationsCall( + 'DeletePersistentResource', + $optionalArgs, + $request, + $this->getOperationsClient() + )->wait(); + } + + /** + * Gets a PersistentResource. + * + * Sample code: + * ``` + * $persistentResourceServiceClient = new PersistentResourceServiceClient(); + * try { + * $formattedName = $persistentResourceServiceClient->persistentResourceName('[PROJECT]', '[LOCATION]', '[PERSISTENT_RESOURCE]'); + * $response = $persistentResourceServiceClient->getPersistentResource($formattedName); + * } finally { + * $persistentResourceServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the PersistentResource resource. + * Format: + * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\AIPlatform\V1\PersistentResource + * + * @throws ApiException if the remote call fails + */ + public function getPersistentResource($name, array $optionalArgs = []) + { + $request = new GetPersistentResourceRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'GetPersistentResource', + PersistentResource::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Lists PersistentResources in a Location. + * + * Sample code: + * ``` + * $persistentResourceServiceClient = new PersistentResourceServiceClient(); + * try { + * $formattedParent = $persistentResourceServiceClient->locationName('[PROJECT]', '[LOCATION]'); + * // Iterate over pages of elements + * $pagedResponse = $persistentResourceServiceClient->listPersistentResources($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $persistentResourceServiceClient->listPersistentResources($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $persistentResourceServiceClient->close(); + * } + * ``` + * + * @param string $parent Required. The resource name of the Location to list the PersistentResources + * from. Format: `projects/{project}/locations/{location}` + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listPersistentResources($parent, array $optionalArgs = []) + { + $request = new ListPersistentResourcesRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->getPagedListResponse( + 'ListPersistentResources', + $optionalArgs, + ListPersistentResourcesResponse::class, + $request + ); + } + + /** + * Reboots a PersistentResource. + * + * Sample code: + * ``` + * $persistentResourceServiceClient = new PersistentResourceServiceClient(); + * try { + * $formattedName = $persistentResourceServiceClient->persistentResourceName('[PROJECT]', '[LOCATION]', '[PERSISTENT_RESOURCE]'); + * $operationResponse = $persistentResourceServiceClient->rebootPersistentResource($formattedName); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $persistentResourceServiceClient->rebootPersistentResource($formattedName); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $persistentResourceServiceClient->resumeOperation($operationName, 'rebootPersistentResource'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $persistentResourceServiceClient->close(); + * } + * ``` + * + * @param string $name Required. The name of the PersistentResource resource. + * Format: + * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}` + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function rebootPersistentResource($name, array $optionalArgs = []) + { + $request = new RebootPersistentResourceRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startOperationsCall( + 'RebootPersistentResource', + $optionalArgs, + $request, + $this->getOperationsClient() + )->wait(); + } + + /** + * Updates a PersistentResource. + * + * Sample code: + * ``` + * $persistentResourceServiceClient = new PersistentResourceServiceClient(); + * try { + * $persistentResource = new PersistentResource(); + * $updateMask = new FieldMask(); + * $operationResponse = $persistentResourceServiceClient->updatePersistentResource($persistentResource, $updateMask); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $persistentResourceServiceClient->updatePersistentResource($persistentResource, $updateMask); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $persistentResourceServiceClient->resumeOperation($operationName, 'updatePersistentResource'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $persistentResourceServiceClient->close(); + * } + * ``` + * + * @param PersistentResource $persistentResource Required. The PersistentResource to update. + * + * The PersistentResource's `name` field is used to identify the + * PersistentResource to update. Format: + * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}` + * @param FieldMask $updateMask Required. Specify the fields to be overwritten in the PersistentResource by + * the update method. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updatePersistentResource( + $persistentResource, + $updateMask, + array $optionalArgs = [] + ) { + $request = new UpdatePersistentResourceRequest(); + $requestParamHeaders = []; + $request->setPersistentResource($persistentResource); + $request->setUpdateMask($updateMask); + $requestParamHeaders[ + 'persistent_resource.name' + ] = $persistentResource->getName(); + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startOperationsCall( + 'UpdatePersistentResource', + $optionalArgs, + $request, + $this->getOperationsClient() + )->wait(); + } + + /** + * Gets information about a location. + * + * Sample code: + * ``` + * $persistentResourceServiceClient = new PersistentResourceServiceClient(); + * try { + * $response = $persistentResourceServiceClient->getLocation(); + * } finally { + * $persistentResourceServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * Resource name for the location. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Location\Location + * + * @throws ApiException if the remote call fails + */ + public function getLocation(array $optionalArgs = []) + { + $request = new GetLocationRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'GetLocation', + Location::class, + $optionalArgs, + $request, + Call::UNARY_CALL, + 'google.cloud.location.Locations' + )->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * Sample code: + * ``` + * $persistentResourceServiceClient = new PersistentResourceServiceClient(); + * try { + * // Iterate over pages of elements + * $pagedResponse = $persistentResourceServiceClient->listLocations(); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $persistentResourceServiceClient->listLocations(); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $persistentResourceServiceClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The resource that owns the locations collection, if applicable. + * @type string $filter + * The standard list filter. + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listLocations(array $optionalArgs = []) + { + $request = new ListLocationsRequest(); + $requestParamHeaders = []; + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + $requestParamHeaders['name'] = $optionalArgs['name']; + } + + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->getPagedListResponse( + 'ListLocations', + $optionalArgs, + ListLocationsResponse::class, + $request, + 'google.cloud.location.Locations' + ); + } + + /** + * Gets the access control policy for a resource. Returns an empty policy + if the resource exists and does not have a policy set. + * + * Sample code: + * ``` + * $persistentResourceServiceClient = new PersistentResourceServiceClient(); + * try { + * $resource = 'resource'; + * $response = $persistentResourceServiceClient->getIamPolicy($resource); + * } finally { + * $persistentResourceServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param array $optionalArgs { + * Optional. + * + * @type GetPolicyOptions $options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function getIamPolicy($resource, array $optionalArgs = []) + { + $request = new GetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['options'])) { + $request->setOptions($optionalArgs['options']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'GetIamPolicy', + Policy::class, + $optionalArgs, + $request, + Call::UNARY_CALL, + 'google.iam.v1.IAMPolicy' + )->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces + any existing policy. + + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. + * + * Sample code: + * ``` + * $persistentResourceServiceClient = new PersistentResourceServiceClient(); + * try { + * $resource = 'resource'; + * $policy = new Policy(); + * $response = $persistentResourceServiceClient->setIamPolicy($resource, $policy); + * } finally { + * $persistentResourceServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function setIamPolicy($resource, $policy, array $optionalArgs = []) + { + $request = new SetIamPolicyRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPolicy($policy); + $requestParamHeaders['resource'] = $resource; + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'SetIamPolicy', + Policy::class, + $optionalArgs, + $request, + Call::UNARY_CALL, + 'google.iam.v1.IAMPolicy' + )->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + resource does not exist, this will return an empty set of + permissions, not a `NOT_FOUND` error. + + Note: This operation is designed to be used for building + permission-aware UIs and command-line tools, not for authorization + checking. This operation may "fail open" without warning. + * + * Sample code: + * ``` + * $persistentResourceServiceClient = new PersistentResourceServiceClient(); + * try { + * $resource = 'resource'; + * $permissions = []; + * $response = $persistentResourceServiceClient->testIamPermissions($resource, $permissions); + * } finally { + * $persistentResourceServiceClient->close(); + * } + * ``` + * + * @param string $resource REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Iam\V1\TestIamPermissionsResponse + * + * @throws ApiException if the remote call fails + */ + public function testIamPermissions( + $resource, + $permissions, + array $optionalArgs = [] + ) { + $request = new TestIamPermissionsRequest(); + $requestParamHeaders = []; + $request->setResource($resource); + $request->setPermissions($permissions); + $requestParamHeaders['resource'] = $resource; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'TestIamPermissions', + TestIamPermissionsResponse::class, + $optionalArgs, + $request, + Call::UNARY_CALL, + 'google.iam.v1.IAMPolicy' + )->wait(); + } +} diff --git a/AiPlatform/src/V1/Gapic/PredictionServiceGapicClient.php b/AiPlatform/src/V1/Gapic/PredictionServiceGapicClient.php index e124c9c1930b..cd3d350f41be 100644 --- a/AiPlatform/src/V1/Gapic/PredictionServiceGapicClient.php +++ b/AiPlatform/src/V1/Gapic/PredictionServiceGapicClient.php @@ -640,6 +640,10 @@ public function explain($endpoint, $instances, array $optionalArgs = []) * @param array $optionalArgs { * Optional. * + * @type Content $systemInstruction + * Optional. The user provided system instructions for the model. + * Note: only text should be used in parts and content in each part will be in + * a separate paragraph. * @type Tool[] $tools * Optional. A list of `Tools` the model may use to generate the next * response. @@ -669,6 +673,10 @@ public function generateContent($model, $contents, array $optionalArgs = []) $request->setModel($model); $request->setContents($contents); $requestParamHeaders['model'] = $model; + if (isset($optionalArgs['systemInstruction'])) { + $request->setSystemInstruction($optionalArgs['systemInstruction']); + } + if (isset($optionalArgs['tools'])) { $request->setTools($optionalArgs['tools']); } @@ -1078,6 +1086,10 @@ public function streamDirectRawPredict(array $optionalArgs = []) * @param array $optionalArgs { * Optional. * + * @type Content $systemInstruction + * Optional. The user provided system instructions for the model. + * Note: only text should be used in parts and content in each part will be in + * a separate paragraph. * @type Tool[] $tools * Optional. A list of `Tools` the model may use to generate the next * response. @@ -1108,6 +1120,10 @@ public function streamGenerateContent( $request->setModel($model); $request->setContents($contents); $requestParamHeaders['model'] = $model; + if (isset($optionalArgs['systemInstruction'])) { + $request->setSystemInstruction($optionalArgs['systemInstruction']); + } + if (isset($optionalArgs['tools'])) { $request->setTools($optionalArgs['tools']); } diff --git a/AiPlatform/src/V1/GenAiTuningServiceClient.php b/AiPlatform/src/V1/GenAiTuningServiceClient.php new file mode 100644 index 000000000000..61f6b49d12aa --- /dev/null +++ b/AiPlatform/src/V1/GenAiTuningServiceClient.php @@ -0,0 +1,34 @@ +repeated .google.cloud.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED]; */ private $contents; + /** + * Optional. The user provided system instructions for the model. + * Note: only text should be used in parts and content in each part will be in + * a separate paragraph. + * + * Generated from protobuf field optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $system_instruction = null; /** * Optional. A list of `Tools` the model may use to generate the next * response. @@ -92,6 +100,10 @@ public static function build(string $model, array $contents): self * For single-turn queries, this is a single instance. For multi-turn queries, * this is a repeated field that contains conversation history + latest * request. + * @type \Google\Cloud\AIPlatform\V1\Content $system_instruction + * Optional. The user provided system instructions for the model. + * Note: only text should be used in parts and content in each part will be in + * a separate paragraph. * @type array<\Google\Cloud\AIPlatform\V1\Tool>|\Google\Protobuf\Internal\RepeatedField $tools * Optional. A list of `Tools` the model may use to generate the next * response. @@ -172,6 +184,46 @@ public function setContents($var) return $this; } + /** + * Optional. The user provided system instructions for the model. + * Note: only text should be used in parts and content in each part will be in + * a separate paragraph. + * + * Generated from protobuf field optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\AIPlatform\V1\Content|null + */ + public function getSystemInstruction() + { + return $this->system_instruction; + } + + public function hasSystemInstruction() + { + return isset($this->system_instruction); + } + + public function clearSystemInstruction() + { + unset($this->system_instruction); + } + + /** + * Optional. The user provided system instructions for the model. + * Note: only text should be used in parts and content in each part will be in + * a separate paragraph. + * + * Generated from protobuf field optional .google.cloud.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\AIPlatform\V1\Content $var + * @return $this + */ + public function setSystemInstruction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\Content::class); + $this->system_instruction = $var; + + return $this; + } + /** * Optional. A list of `Tools` the model may use to generate the next * response. diff --git a/AiPlatform/src/V1/GenerateContentResponse/PromptFeedback/BlockedReason.php b/AiPlatform/src/V1/GenerateContentResponse/PromptFeedback/BlockedReason.php index a1f6603afe24..59fb965d13b7 100644 --- a/AiPlatform/src/V1/GenerateContentResponse/PromptFeedback/BlockedReason.php +++ b/AiPlatform/src/V1/GenerateContentResponse/PromptFeedback/BlockedReason.php @@ -31,11 +31,26 @@ class BlockedReason * Generated from protobuf enum OTHER = 2; */ const OTHER = 2; + /** + * Candidates blocked due to the terms which are included from the + * terminology blocklist. + * + * Generated from protobuf enum BLOCKLIST = 3; + */ + const BLOCKLIST = 3; + /** + * Candidates blocked due to prohibited content. + * + * Generated from protobuf enum PROHIBITED_CONTENT = 4; + */ + const PROHIBITED_CONTENT = 4; private static $valueToName = [ self::BLOCKED_REASON_UNSPECIFIED => 'BLOCKED_REASON_UNSPECIFIED', self::SAFETY => 'SAFETY', self::OTHER => 'OTHER', + self::BLOCKLIST => 'BLOCKLIST', + self::PROHIBITED_CONTENT => 'PROHIBITED_CONTENT', ]; public static function name($value) diff --git a/AiPlatform/src/V1/GenerationConfig.php b/AiPlatform/src/V1/GenerationConfig.php index ef6ed19a73bc..29e63f8ec211 100644 --- a/AiPlatform/src/V1/GenerationConfig.php +++ b/AiPlatform/src/V1/GenerationConfig.php @@ -51,6 +51,30 @@ class GenerationConfig extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated string stop_sequences = 6 [(.google.api.field_behavior) = OPTIONAL]; */ private $stop_sequences; + /** + * Optional. Positive penalties. + * + * Generated from protobuf field optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $presence_penalty = null; + /** + * Optional. Frequency penalties. + * + * Generated from protobuf field optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $frequency_penalty = null; + /** + * Optional. Output response mimetype of the generated candidate text. + * Supported mimetype: + * - `text/plain`: (default) Text output. + * - `application/json`: JSON response in the candidates. + * The model needs to be prompted to output the appropriate response type, + * otherwise the behavior is undefined. + * This is a preview feature. + * + * Generated from protobuf field string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $response_mime_type = ''; /** * Constructor. @@ -70,6 +94,18 @@ class GenerationConfig extends \Google\Protobuf\Internal\Message * Optional. The maximum number of output tokens to generate per message. * @type array|\Google\Protobuf\Internal\RepeatedField $stop_sequences * Optional. Stop sequences. + * @type float $presence_penalty + * Optional. Positive penalties. + * @type float $frequency_penalty + * Optional. Frequency penalties. + * @type string $response_mime_type + * Optional. Output response mimetype of the generated candidate text. + * Supported mimetype: + * - `text/plain`: (default) Text output. + * - `application/json`: JSON response in the candidates. + * The model needs to be prompted to output the appropriate response type, + * otherwise the behavior is undefined. + * This is a preview feature. * } */ public function __construct($data = NULL) { @@ -283,5 +319,115 @@ public function setStopSequences($var) return $this; } + /** + * Optional. Positive penalties. + * + * Generated from protobuf field optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getPresencePenalty() + { + return isset($this->presence_penalty) ? $this->presence_penalty : 0.0; + } + + public function hasPresencePenalty() + { + return isset($this->presence_penalty); + } + + public function clearPresencePenalty() + { + unset($this->presence_penalty); + } + + /** + * Optional. Positive penalties. + * + * Generated from protobuf field optional float presence_penalty = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setPresencePenalty($var) + { + GPBUtil::checkFloat($var); + $this->presence_penalty = $var; + + return $this; + } + + /** + * Optional. Frequency penalties. + * + * Generated from protobuf field optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getFrequencyPenalty() + { + return isset($this->frequency_penalty) ? $this->frequency_penalty : 0.0; + } + + public function hasFrequencyPenalty() + { + return isset($this->frequency_penalty); + } + + public function clearFrequencyPenalty() + { + unset($this->frequency_penalty); + } + + /** + * Optional. Frequency penalties. + * + * Generated from protobuf field optional float frequency_penalty = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setFrequencyPenalty($var) + { + GPBUtil::checkFloat($var); + $this->frequency_penalty = $var; + + return $this; + } + + /** + * Optional. Output response mimetype of the generated candidate text. + * Supported mimetype: + * - `text/plain`: (default) Text output. + * - `application/json`: JSON response in the candidates. + * The model needs to be prompted to output the appropriate response type, + * otherwise the behavior is undefined. + * This is a preview feature. + * + * Generated from protobuf field string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getResponseMimeType() + { + return $this->response_mime_type; + } + + /** + * Optional. Output response mimetype of the generated candidate text. + * Supported mimetype: + * - `text/plain`: (default) Text output. + * - `application/json`: JSON response in the candidates. + * The model needs to be prompted to output the appropriate response type, + * otherwise the behavior is undefined. + * This is a preview feature. + * + * Generated from protobuf field string response_mime_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setResponseMimeType($var) + { + GPBUtil::checkString($var, True); + $this->response_mime_type = $var; + + return $this; + } + } diff --git a/AiPlatform/src/V1/GetNotebookRuntimeRequest.php b/AiPlatform/src/V1/GetNotebookRuntimeRequest.php new file mode 100644 index 000000000000..aa59a5be5820 --- /dev/null +++ b/AiPlatform/src/V1/GetNotebookRuntimeRequest.php @@ -0,0 +1,97 @@ +google.cloud.aiplatform.v1.GetNotebookRuntimeRequest + */ +class GetNotebookRuntimeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the NotebookRuntime resource. + * Instead of checking whether the name is in valid NotebookRuntime resource + * name format, directly throw NotFound exception if there is no such + * NotebookRuntime in spanner. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $name = ''; + + /** + * @param string $name Required. The name of the NotebookRuntime resource. + * Instead of checking whether the name is in valid NotebookRuntime resource + * name format, directly throw NotFound exception if there is no such + * NotebookRuntime in spanner. Please see + * {@see NotebookServiceClient::notebookRuntimeName()} for help formatting this field. + * + * @return \Google\Cloud\AIPlatform\V1\GetNotebookRuntimeRequest + * + * @experimental + */ + public static function 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 NotebookRuntime resource. + * Instead of checking whether the name is in valid NotebookRuntime resource + * name format, directly throw NotFound exception if there is no such + * NotebookRuntime in spanner. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\NotebookService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the NotebookRuntime resource. + * Instead of checking whether the name is in valid NotebookRuntime resource + * name format, directly throw NotFound exception if there is no such + * NotebookRuntime in spanner. + * + * Generated from 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 NotebookRuntime resource. + * Instead of checking whether the name is in valid NotebookRuntime resource + * name format, directly throw NotFound exception if there is no such + * NotebookRuntime in spanner. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/GetNotebookRuntimeTemplateRequest.php b/AiPlatform/src/V1/GetNotebookRuntimeTemplateRequest.php new file mode 100644 index 000000000000..995c8af8339e --- /dev/null +++ b/AiPlatform/src/V1/GetNotebookRuntimeTemplateRequest.php @@ -0,0 +1,92 @@ +google.cloud.aiplatform.v1.GetNotebookRuntimeTemplateRequest + */ +class GetNotebookRuntimeTemplateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the NotebookRuntimeTemplate resource. + * Format: + * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $name = ''; + + /** + * @param string $name Required. The name of the NotebookRuntimeTemplate resource. + * Format: + * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}` + * Please see {@see NotebookServiceClient::notebookRuntimeTemplateName()} for help formatting this field. + * + * @return \Google\Cloud\AIPlatform\V1\GetNotebookRuntimeTemplateRequest + * + * @experimental + */ + public static function 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 NotebookRuntimeTemplate resource. + * Format: + * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\NotebookService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the NotebookRuntimeTemplate resource. + * Format: + * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}` + * + * Generated from 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 NotebookRuntimeTemplate resource. + * Format: + * `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/GetPersistentResourceRequest.php b/AiPlatform/src/V1/GetPersistentResourceRequest.php new file mode 100644 index 000000000000..b4a22c3a4b96 --- /dev/null +++ b/AiPlatform/src/V1/GetPersistentResourceRequest.php @@ -0,0 +1,92 @@ +google.cloud.aiplatform.v1.GetPersistentResourceRequest + */ +class GetPersistentResourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the PersistentResource resource. + * Format: + * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $name = ''; + + /** + * @param string $name Required. The name of the PersistentResource resource. + * Format: + * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}` + * Please see {@see PersistentResourceServiceClient::persistentResourceName()} for help formatting this field. + * + * @return \Google\Cloud\AIPlatform\V1\GetPersistentResourceRequest + * + * @experimental + */ + public static function 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 PersistentResource resource. + * Format: + * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\PersistentResourceService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the PersistentResource resource. + * Format: + * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the PersistentResource resource. + * Format: + * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/GetTuningJobRequest.php b/AiPlatform/src/V1/GetTuningJobRequest.php new file mode 100644 index 000000000000..ea148ff60949 --- /dev/null +++ b/AiPlatform/src/V1/GetTuningJobRequest.php @@ -0,0 +1,87 @@ +google.cloud.aiplatform.v1.GetTuningJobRequest + */ +class GetTuningJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the TuningJob resource. Format: + * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $name = ''; + + /** + * @param string $name Required. The name of the TuningJob resource. Format: + * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + * Please see {@see GenAiTuningServiceClient::tuningJobName()} for help formatting this field. + * + * @return \Google\Cloud\AIPlatform\V1\GetTuningJobRequest + * + * @experimental + */ + public static function 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 TuningJob resource. Format: + * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\GenaiTuningService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the TuningJob resource. Format: + * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + * + * Generated from 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 TuningJob resource. Format: + * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ListEndpointsRequest.php b/AiPlatform/src/V1/ListEndpointsRequest.php index 77b42724f579..4fb300c50544 100644 --- a/AiPlatform/src/V1/ListEndpointsRequest.php +++ b/AiPlatform/src/V1/ListEndpointsRequest.php @@ -27,9 +27,8 @@ class ListEndpointsRequest extends \Google\Protobuf\Internal\Message * Optional. An expression for filtering the results of the request. For field * names both snake_case and camelCase are supported. * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint - * ID, - * i.e. the last segment of the Endpoint's [resource - * name][google.cloud.aiplatform.v1.Endpoint.name]. + * ID, i.e. the last segment of the Endpoint's + * [resource name][google.cloud.aiplatform.v1.Endpoint.name]. * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality @@ -109,9 +108,8 @@ public static function build(string $parent): self * Optional. An expression for filtering the results of the request. For field * names both snake_case and camelCase are supported. * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint - * ID, - * i.e. the last segment of the Endpoint's [resource - * name][google.cloud.aiplatform.v1.Endpoint.name]. + * ID, i.e. the last segment of the Endpoint's + * [resource name][google.cloud.aiplatform.v1.Endpoint.name]. * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality @@ -181,9 +179,8 @@ public function setParent($var) * Optional. An expression for filtering the results of the request. For field * names both snake_case and camelCase are supported. * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint - * ID, - * i.e. the last segment of the Endpoint's [resource - * name][google.cloud.aiplatform.v1.Endpoint.name]. + * ID, i.e. the last segment of the Endpoint's + * [resource name][google.cloud.aiplatform.v1.Endpoint.name]. * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality @@ -208,9 +205,8 @@ public function getFilter() * Optional. An expression for filtering the results of the request. For field * names both snake_case and camelCase are supported. * * `endpoint` supports `=` and `!=`. `endpoint` represents the Endpoint - * ID, - * i.e. the last segment of the Endpoint's [resource - * name][google.cloud.aiplatform.v1.Endpoint.name]. + * ID, i.e. the last segment of the Endpoint's + * [resource name][google.cloud.aiplatform.v1.Endpoint.name]. * * `display_name` supports `=` and `!=`. * * `labels` supports general map functions that is: * * `labels.key=value` - key:value equality diff --git a/AiPlatform/src/V1/ListNotebookRuntimeTemplatesRequest.php b/AiPlatform/src/V1/ListNotebookRuntimeTemplatesRequest.php new file mode 100644 index 000000000000..7dda8027159c --- /dev/null +++ b/AiPlatform/src/V1/ListNotebookRuntimeTemplatesRequest.php @@ -0,0 +1,380 @@ +google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest + */ +class ListNotebookRuntimeTemplatesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Location from which to list the + * NotebookRuntimeTemplates. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $parent = ''; + /** + * Optional. An expression for filtering the results of the request. For field + * names both snake_case and camelCase are supported. + * * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` + * represents the NotebookRuntimeTemplate ID, + * i.e. the last segment of the NotebookRuntimeTemplate's [resource name] + * [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name]. + * * `display_name` supports = and != + * * `labels` supports general map functions that is: + * * `labels.key=value` - key:value equality + * * `labels.key:* or labels:key - key existence + * * A key including a space must be quoted. `labels."a key"`. + * * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: + * [USER_DEFINED, ONE_CLICK]. + * Some examples: + * * `notebookRuntimeTemplate=notebookRuntimeTemplate123` + * * `displayName="myDisplayName"` + * * `labels.myKey="myValue"` + * * `notebookRuntimeType=USER_DEFINED` + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $filter = ''; + /** + * Optional. The standard list page size. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $page_size = 0; + /** + * Optional. The standard list page token. + * Typically obtained via + * [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse.next_page_token] + * of the previous + * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates] + * call. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $page_token = ''; + /** + * Optional. Mask specifying which fields to read. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $read_mask = null; + /** + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. Supported fields: + * * `display_name` + * * `create_time` + * * `update_time` + * Example: `display_name, create_time desc`. + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $order_by = ''; + + /** + * @param string $parent Required. The resource name of the Location from which to list the + * NotebookRuntimeTemplates. + * Format: `projects/{project}/locations/{location}` + * Please see {@see NotebookServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\AIPlatform\V1\ListNotebookRuntimeTemplatesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the Location from which to list the + * NotebookRuntimeTemplates. + * Format: `projects/{project}/locations/{location}` + * @type string $filter + * Optional. An expression for filtering the results of the request. For field + * names both snake_case and camelCase are supported. + * * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` + * represents the NotebookRuntimeTemplate ID, + * i.e. the last segment of the NotebookRuntimeTemplate's [resource name] + * [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name]. + * * `display_name` supports = and != + * * `labels` supports general map functions that is: + * * `labels.key=value` - key:value equality + * * `labels.key:* or labels:key - key existence + * * A key including a space must be quoted. `labels."a key"`. + * * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: + * [USER_DEFINED, ONE_CLICK]. + * Some examples: + * * `notebookRuntimeTemplate=notebookRuntimeTemplate123` + * * `displayName="myDisplayName"` + * * `labels.myKey="myValue"` + * * `notebookRuntimeType=USER_DEFINED` + * @type int $page_size + * Optional. The standard list page size. + * @type string $page_token + * Optional. The standard list page token. + * Typically obtained via + * [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse.next_page_token] + * of the previous + * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates] + * call. + * @type \Google\Protobuf\FieldMask $read_mask + * Optional. Mask specifying which fields to read. + * @type string $order_by + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. Supported fields: + * * `display_name` + * * `create_time` + * * `update_time` + * Example: `display_name, create_time desc`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\NotebookService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Location from which to list the + * NotebookRuntimeTemplates. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the Location from which to list the + * NotebookRuntimeTemplates. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. An expression for filtering the results of the request. For field + * names both snake_case and camelCase are supported. + * * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` + * represents the NotebookRuntimeTemplate ID, + * i.e. the last segment of the NotebookRuntimeTemplate's [resource name] + * [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name]. + * * `display_name` supports = and != + * * `labels` supports general map functions that is: + * * `labels.key=value` - key:value equality + * * `labels.key:* or labels:key - key existence + * * A key including a space must be quoted. `labels."a key"`. + * * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: + * [USER_DEFINED, ONE_CLICK]. + * Some examples: + * * `notebookRuntimeTemplate=notebookRuntimeTemplate123` + * * `displayName="myDisplayName"` + * * `labels.myKey="myValue"` + * * `notebookRuntimeType=USER_DEFINED` + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. An expression for filtering the results of the request. For field + * names both snake_case and camelCase are supported. + * * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` + * represents the NotebookRuntimeTemplate ID, + * i.e. the last segment of the NotebookRuntimeTemplate's [resource name] + * [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name]. + * * `display_name` supports = and != + * * `labels` supports general map functions that is: + * * `labels.key=value` - key:value equality + * * `labels.key:* or labels:key - key existence + * * A key including a space must be quoted. `labels."a key"`. + * * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: + * [USER_DEFINED, ONE_CLICK]. + * Some examples: + * * `notebookRuntimeTemplate=notebookRuntimeTemplate123` + * * `displayName="myDisplayName"` + * * `labels.myKey="myValue"` + * * `notebookRuntimeType=USER_DEFINED` + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. The standard list page size. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The standard list page size. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The standard list page token. + * Typically obtained via + * [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse.next_page_token] + * of the previous + * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates] + * call. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The standard list page token. + * Typically obtained via + * [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse.next_page_token] + * of the previous + * [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates] + * call. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Mask specifying which fields to read. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getReadMask() + { + return $this->read_mask; + } + + public function hasReadMask() + { + return isset($this->read_mask); + } + + public function clearReadMask() + { + unset($this->read_mask); + } + + /** + * Optional. Mask specifying which fields to read. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setReadMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->read_mask = $var; + + return $this; + } + + /** + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. Supported fields: + * * `display_name` + * * `create_time` + * * `update_time` + * Example: `display_name, create_time desc`. + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. Supported fields: + * * `display_name` + * * `create_time` + * * `update_time` + * Example: `display_name, create_time desc`. + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ListNotebookRuntimeTemplatesResponse.php b/AiPlatform/src/V1/ListNotebookRuntimeTemplatesResponse.php new file mode 100644 index 000000000000..f690b85986d4 --- /dev/null +++ b/AiPlatform/src/V1/ListNotebookRuntimeTemplatesResponse.php @@ -0,0 +1,114 @@ +google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse + */ +class ListNotebookRuntimeTemplatesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of NotebookRuntimeTemplates in the requested page. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + */ + private $notebook_runtime_templates; + /** + * A token to retrieve next page of results. + * Pass to + * [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest.page_token] + * to obtain that page. + * + * Generated from protobuf field string next_page_token = 2; + */ + private $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AIPlatform\V1\NotebookRuntimeTemplate>|\Google\Protobuf\Internal\RepeatedField $notebook_runtime_templates + * List of NotebookRuntimeTemplates in the requested page. + * @type string $next_page_token + * A token to retrieve next page of results. + * Pass to + * [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest.page_token] + * to obtain that page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\NotebookService::initOnce(); + parent::__construct($data); + } + + /** + * List of NotebookRuntimeTemplates in the requested page. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNotebookRuntimeTemplates() + { + return $this->notebook_runtime_templates; + } + + /** + * List of NotebookRuntimeTemplates in the requested page. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.NotebookRuntimeTemplate notebook_runtime_templates = 1; + * @param array<\Google\Cloud\AIPlatform\V1\NotebookRuntimeTemplate>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNotebookRuntimeTemplates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\NotebookRuntimeTemplate::class); + $this->notebook_runtime_templates = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. + * Pass to + * [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest.page_token] + * to obtain that page. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve next page of results. + * Pass to + * [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest.page_token] + * to obtain that page. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ListNotebookRuntimesRequest.php b/AiPlatform/src/V1/ListNotebookRuntimesRequest.php new file mode 100644 index 000000000000..29adfbe0d756 --- /dev/null +++ b/AiPlatform/src/V1/ListNotebookRuntimesRequest.php @@ -0,0 +1,436 @@ +google.cloud.aiplatform.v1.ListNotebookRuntimesRequest + */ +class ListNotebookRuntimesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Location from which to list the + * NotebookRuntimes. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $parent = ''; + /** + * Optional. An expression for filtering the results of the request. For field + * names both snake_case and camelCase are supported. + * * `notebookRuntime` supports = and !=. `notebookRuntime` represents the + * NotebookRuntime ID, + * i.e. the last segment of the NotebookRuntime's [resource name] + * [google.cloud.aiplatform.v1.NotebookRuntime.name]. + * * `displayName` supports = and != and regex. + * * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` + * represents the NotebookRuntimeTemplate ID, + * i.e. the last segment of the NotebookRuntimeTemplate's [resource name] + * [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name]. + * * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY, + * HEALTH_STATE_UNSPECIFIED]. + * * `runtimeState` supports = and !=. runtimeState enum: + * [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED, + * STOPPED, BEING_UPGRADED, ERROR, INVALID]. + * * `runtimeUser` supports = and !=. + * * API version is UI only: `uiState` supports = and !=. uiState enum: + * [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED, + * UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED, + * UI_RESOURCE_STATE_CREATION_FAILED]. + * * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: + * [USER_DEFINED, ONE_CLICK]. + * Some examples: + * * `notebookRuntime="notebookRuntime123"` + * * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"` + * * `notebookRuntimeTemplate="notebookRuntimeTemplate321"` + * * `healthState=HEALTHY` + * * `runtimeState=RUNNING` + * * `runtimeUser="test@google.com"` + * * `uiState=UI_RESOURCE_STATE_BEING_DELETED` + * * `notebookRuntimeType=USER_DEFINED` + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $filter = ''; + /** + * Optional. The standard list page size. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $page_size = 0; + /** + * Optional. The standard list page token. + * Typically obtained via + * [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesResponse.next_page_token] + * of the previous + * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes] + * call. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $page_token = ''; + /** + * Optional. Mask specifying which fields to read. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $read_mask = null; + /** + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. Supported fields: + * * `display_name` + * * `create_time` + * * `update_time` + * Example: `display_name, create_time desc`. + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $order_by = ''; + + /** + * @param string $parent Required. The resource name of the Location from which to list the + * NotebookRuntimes. + * Format: `projects/{project}/locations/{location}` + * Please see {@see NotebookServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\AIPlatform\V1\ListNotebookRuntimesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the Location from which to list the + * NotebookRuntimes. + * Format: `projects/{project}/locations/{location}` + * @type string $filter + * Optional. An expression for filtering the results of the request. For field + * names both snake_case and camelCase are supported. + * * `notebookRuntime` supports = and !=. `notebookRuntime` represents the + * NotebookRuntime ID, + * i.e. the last segment of the NotebookRuntime's [resource name] + * [google.cloud.aiplatform.v1.NotebookRuntime.name]. + * * `displayName` supports = and != and regex. + * * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` + * represents the NotebookRuntimeTemplate ID, + * i.e. the last segment of the NotebookRuntimeTemplate's [resource name] + * [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name]. + * * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY, + * HEALTH_STATE_UNSPECIFIED]. + * * `runtimeState` supports = and !=. runtimeState enum: + * [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED, + * STOPPED, BEING_UPGRADED, ERROR, INVALID]. + * * `runtimeUser` supports = and !=. + * * API version is UI only: `uiState` supports = and !=. uiState enum: + * [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED, + * UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED, + * UI_RESOURCE_STATE_CREATION_FAILED]. + * * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: + * [USER_DEFINED, ONE_CLICK]. + * Some examples: + * * `notebookRuntime="notebookRuntime123"` + * * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"` + * * `notebookRuntimeTemplate="notebookRuntimeTemplate321"` + * * `healthState=HEALTHY` + * * `runtimeState=RUNNING` + * * `runtimeUser="test@google.com"` + * * `uiState=UI_RESOURCE_STATE_BEING_DELETED` + * * `notebookRuntimeType=USER_DEFINED` + * @type int $page_size + * Optional. The standard list page size. + * @type string $page_token + * Optional. The standard list page token. + * Typically obtained via + * [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesResponse.next_page_token] + * of the previous + * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes] + * call. + * @type \Google\Protobuf\FieldMask $read_mask + * Optional. Mask specifying which fields to read. + * @type string $order_by + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. Supported fields: + * * `display_name` + * * `create_time` + * * `update_time` + * Example: `display_name, create_time desc`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\NotebookService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Location from which to list the + * NotebookRuntimes. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the Location from which to list the + * NotebookRuntimes. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. An expression for filtering the results of the request. For field + * names both snake_case and camelCase are supported. + * * `notebookRuntime` supports = and !=. `notebookRuntime` represents the + * NotebookRuntime ID, + * i.e. the last segment of the NotebookRuntime's [resource name] + * [google.cloud.aiplatform.v1.NotebookRuntime.name]. + * * `displayName` supports = and != and regex. + * * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` + * represents the NotebookRuntimeTemplate ID, + * i.e. the last segment of the NotebookRuntimeTemplate's [resource name] + * [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name]. + * * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY, + * HEALTH_STATE_UNSPECIFIED]. + * * `runtimeState` supports = and !=. runtimeState enum: + * [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED, + * STOPPED, BEING_UPGRADED, ERROR, INVALID]. + * * `runtimeUser` supports = and !=. + * * API version is UI only: `uiState` supports = and !=. uiState enum: + * [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED, + * UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED, + * UI_RESOURCE_STATE_CREATION_FAILED]. + * * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: + * [USER_DEFINED, ONE_CLICK]. + * Some examples: + * * `notebookRuntime="notebookRuntime123"` + * * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"` + * * `notebookRuntimeTemplate="notebookRuntimeTemplate321"` + * * `healthState=HEALTHY` + * * `runtimeState=RUNNING` + * * `runtimeUser="test@google.com"` + * * `uiState=UI_RESOURCE_STATE_BEING_DELETED` + * * `notebookRuntimeType=USER_DEFINED` + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. An expression for filtering the results of the request. For field + * names both snake_case and camelCase are supported. + * * `notebookRuntime` supports = and !=. `notebookRuntime` represents the + * NotebookRuntime ID, + * i.e. the last segment of the NotebookRuntime's [resource name] + * [google.cloud.aiplatform.v1.NotebookRuntime.name]. + * * `displayName` supports = and != and regex. + * * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` + * represents the NotebookRuntimeTemplate ID, + * i.e. the last segment of the NotebookRuntimeTemplate's [resource name] + * [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name]. + * * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY, + * HEALTH_STATE_UNSPECIFIED]. + * * `runtimeState` supports = and !=. runtimeState enum: + * [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED, + * STOPPED, BEING_UPGRADED, ERROR, INVALID]. + * * `runtimeUser` supports = and !=. + * * API version is UI only: `uiState` supports = and !=. uiState enum: + * [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED, + * UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED, + * UI_RESOURCE_STATE_CREATION_FAILED]. + * * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: + * [USER_DEFINED, ONE_CLICK]. + * Some examples: + * * `notebookRuntime="notebookRuntime123"` + * * `displayName="myDisplayName"` and `displayName=~"myDisplayNameRegex"` + * * `notebookRuntimeTemplate="notebookRuntimeTemplate321"` + * * `healthState=HEALTHY` + * * `runtimeState=RUNNING` + * * `runtimeUser="test@google.com"` + * * `uiState=UI_RESOURCE_STATE_BEING_DELETED` + * * `notebookRuntimeType=USER_DEFINED` + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. The standard list page size. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The standard list page size. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The standard list page token. + * Typically obtained via + * [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesResponse.next_page_token] + * of the previous + * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes] + * call. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The standard list page token. + * Typically obtained via + * [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesResponse.next_page_token] + * of the previous + * [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes] + * call. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Mask specifying which fields to read. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getReadMask() + { + return $this->read_mask; + } + + public function hasReadMask() + { + return isset($this->read_mask); + } + + public function clearReadMask() + { + unset($this->read_mask); + } + + /** + * Optional. Mask specifying which fields to read. + * + * Generated from protobuf field .google.protobuf.FieldMask read_mask = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setReadMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->read_mask = $var; + + return $this; + } + + /** + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. Supported fields: + * * `display_name` + * * `create_time` + * * `update_time` + * Example: `display_name, create_time desc`. + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. A comma-separated list of fields to order by, sorted in ascending + * order. Use "desc" after a field name for descending. Supported fields: + * * `display_name` + * * `create_time` + * * `update_time` + * Example: `display_name, create_time desc`. + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ListNotebookRuntimesResponse.php b/AiPlatform/src/V1/ListNotebookRuntimesResponse.php new file mode 100644 index 000000000000..d7440957ada5 --- /dev/null +++ b/AiPlatform/src/V1/ListNotebookRuntimesResponse.php @@ -0,0 +1,114 @@ +google.cloud.aiplatform.v1.ListNotebookRuntimesResponse + */ +class ListNotebookRuntimesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of NotebookRuntimes in the requested page. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + */ + private $notebook_runtimes; + /** + * A token to retrieve next page of results. + * Pass to + * [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesRequest.page_token] + * to obtain that page. + * + * Generated from protobuf field string next_page_token = 2; + */ + private $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AIPlatform\V1\NotebookRuntime>|\Google\Protobuf\Internal\RepeatedField $notebook_runtimes + * List of NotebookRuntimes in the requested page. + * @type string $next_page_token + * A token to retrieve next page of results. + * Pass to + * [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesRequest.page_token] + * to obtain that page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\NotebookService::initOnce(); + parent::__construct($data); + } + + /** + * List of NotebookRuntimes in the requested page. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNotebookRuntimes() + { + return $this->notebook_runtimes; + } + + /** + * List of NotebookRuntimes in the requested page. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.NotebookRuntime notebook_runtimes = 1; + * @param array<\Google\Cloud\AIPlatform\V1\NotebookRuntime>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNotebookRuntimes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\NotebookRuntime::class); + $this->notebook_runtimes = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. + * Pass to + * [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesRequest.page_token] + * to obtain that page. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve next page of results. + * Pass to + * [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesRequest.page_token] + * to obtain that page. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ListPersistentResourcesRequest.php b/AiPlatform/src/V1/ListPersistentResourcesRequest.php new file mode 100644 index 000000000000..90207195fb28 --- /dev/null +++ b/AiPlatform/src/V1/ListPersistentResourcesRequest.php @@ -0,0 +1,166 @@ +google.cloud.aiplatform.v1.ListPersistentResourcesRequest + */ +class ListPersistentResourcesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Location to list the PersistentResources + * from. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $parent = ''; + /** + * Optional. The standard list page size. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $page_size = 0; + /** + * Optional. The standard list page token. + * Typically obtained via + * [ListPersistentResourceResponse.next_page_token][] of the previous + * [PersistentResourceService.ListPersistentResource][] call. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $page_token = ''; + + /** + * @param string $parent Required. The resource name of the Location to list the PersistentResources + * from. Format: `projects/{project}/locations/{location}` + * Please see {@see PersistentResourceServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\AIPlatform\V1\ListPersistentResourcesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the Location to list the PersistentResources + * from. Format: `projects/{project}/locations/{location}` + * @type int $page_size + * Optional. The standard list page size. + * @type string $page_token + * Optional. The standard list page token. + * Typically obtained via + * [ListPersistentResourceResponse.next_page_token][] of the previous + * [PersistentResourceService.ListPersistentResource][] call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\PersistentResourceService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Location to list the PersistentResources + * from. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the Location to list the PersistentResources + * from. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The standard list page size. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The standard list page size. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The standard list page token. + * Typically obtained via + * [ListPersistentResourceResponse.next_page_token][] of the previous + * [PersistentResourceService.ListPersistentResource][] call. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The standard list page token. + * Typically obtained via + * [ListPersistentResourceResponse.next_page_token][] of the previous + * [PersistentResourceService.ListPersistentResource][] call. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ListPersistentResourcesResponse.php b/AiPlatform/src/V1/ListPersistentResourcesResponse.php new file mode 100644 index 000000000000..35b1dab685ff --- /dev/null +++ b/AiPlatform/src/V1/ListPersistentResourcesResponse.php @@ -0,0 +1,107 @@ +google.cloud.aiplatform.v1.ListPersistentResourcesResponse + */ +class ListPersistentResourcesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + */ + private $persistent_resources; + /** + * A token to retrieve next page of results. + * Pass to + * [ListPersistentResourcesRequest.page_token][google.cloud.aiplatform.v1.ListPersistentResourcesRequest.page_token] + * to obtain that page. + * + * Generated from protobuf field string next_page_token = 2; + */ + private $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AIPlatform\V1\PersistentResource>|\Google\Protobuf\Internal\RepeatedField $persistent_resources + * @type string $next_page_token + * A token to retrieve next page of results. + * Pass to + * [ListPersistentResourcesRequest.page_token][google.cloud.aiplatform.v1.ListPersistentResourcesRequest.page_token] + * to obtain that page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\PersistentResourceService::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getPersistentResources() + { + return $this->persistent_resources; + } + + /** + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.PersistentResource persistent_resources = 1; + * @param array<\Google\Cloud\AIPlatform\V1\PersistentResource>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setPersistentResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\PersistentResource::class); + $this->persistent_resources = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. + * Pass to + * [ListPersistentResourcesRequest.page_token][google.cloud.aiplatform.v1.ListPersistentResourcesRequest.page_token] + * to obtain that page. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve next page of results. + * Pass to + * [ListPersistentResourcesRequest.page_token][google.cloud.aiplatform.v1.ListPersistentResourcesRequest.page_token] + * to obtain that page. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ListTuningJobsRequest.php b/AiPlatform/src/V1/ListTuningJobsRequest.php new file mode 100644 index 000000000000..b1ae009ec515 --- /dev/null +++ b/AiPlatform/src/V1/ListTuningJobsRequest.php @@ -0,0 +1,197 @@ +google.cloud.aiplatform.v1.ListTuningJobsRequest + */ +class ListTuningJobsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Location to list the TuningJobs from. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $parent = ''; + /** + * Optional. The standard list filter. + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $filter = ''; + /** + * Optional. The standard list page size. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $page_size = 0; + /** + * Optional. The standard list page token. + * Typically obtained via [ListTuningJob.next_page_token][] of the + * previous GenAiTuningService.ListTuningJob][] call. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $page_token = ''; + + /** + * @param string $parent Required. The resource name of the Location to list the TuningJobs from. + * Format: `projects/{project}/locations/{location}` + * Please see {@see GenAiTuningServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\AIPlatform\V1\ListTuningJobsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the Location to list the TuningJobs from. + * Format: `projects/{project}/locations/{location}` + * @type string $filter + * Optional. The standard list filter. + * @type int $page_size + * Optional. The standard list page size. + * @type string $page_token + * Optional. The standard list page token. + * Typically obtained via [ListTuningJob.next_page_token][] of the + * previous GenAiTuningService.ListTuningJob][] call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\GenaiTuningService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Location to list the TuningJobs from. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the Location to list the TuningJobs from. + * Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The standard list filter. + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The standard list filter. + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. The standard list page size. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The standard list page size. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The standard list page token. + * Typically obtained via [ListTuningJob.next_page_token][] of the + * previous GenAiTuningService.ListTuningJob][] call. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The standard list page token. + * Typically obtained via [ListTuningJob.next_page_token][] of the + * previous GenAiTuningService.ListTuningJob][] call. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ListTuningJobsResponse.php b/AiPlatform/src/V1/ListTuningJobsResponse.php new file mode 100644 index 000000000000..2b72e8152c82 --- /dev/null +++ b/AiPlatform/src/V1/ListTuningJobsResponse.php @@ -0,0 +1,114 @@ +google.cloud.aiplatform.v1.ListTuningJobsResponse + */ +class ListTuningJobsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of TuningJobs in the requested page. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + */ + private $tuning_jobs; + /** + * A token to retrieve the next page of results. + * Pass to + * [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListTuningJobsRequest.page_token] + * to obtain that page. + * + * Generated from protobuf field string next_page_token = 2; + */ + private $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\AIPlatform\V1\TuningJob>|\Google\Protobuf\Internal\RepeatedField $tuning_jobs + * List of TuningJobs in the requested page. + * @type string $next_page_token + * A token to retrieve the next page of results. + * Pass to + * [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListTuningJobsRequest.page_token] + * to obtain that page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\GenaiTuningService::initOnce(); + parent::__construct($data); + } + + /** + * List of TuningJobs in the requested page. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTuningJobs() + { + return $this->tuning_jobs; + } + + /** + * List of TuningJobs in the requested page. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.TuningJob tuning_jobs = 1; + * @param array<\Google\Cloud\AIPlatform\V1\TuningJob>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTuningJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\TuningJob::class); + $this->tuning_jobs = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. + * Pass to + * [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListTuningJobsRequest.page_token] + * to obtain that page. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. + * Pass to + * [ListTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListTuningJobsRequest.page_token] + * to obtain that page. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/NetworkSpec.php b/AiPlatform/src/V1/NetworkSpec.php new file mode 100644 index 000000000000..ec4e2234714b --- /dev/null +++ b/AiPlatform/src/V1/NetworkSpec.php @@ -0,0 +1,147 @@ +google.cloud.aiplatform.v1.NetworkSpec + */ +class NetworkSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Whether to enable public internet access. Default false. + * + * Generated from protobuf field bool enable_internet_access = 1; + */ + private $enable_internet_access = false; + /** + * The full name of the Google Compute Engine + * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks) + * + * Generated from protobuf field string network = 2 [(.google.api.resource_reference) = { + */ + private $network = ''; + /** + * The name of the subnet that this instance is in. + * Format: + * `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}` + * + * Generated from protobuf field string subnetwork = 3 [(.google.api.resource_reference) = { + */ + private $subnetwork = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_internet_access + * Whether to enable public internet access. Default false. + * @type string $network + * The full name of the Google Compute Engine + * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks) + * @type string $subnetwork + * The name of the subnet that this instance is in. + * Format: + * `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\NetworkSpec::initOnce(); + parent::__construct($data); + } + + /** + * Whether to enable public internet access. Default false. + * + * Generated from protobuf field bool enable_internet_access = 1; + * @return bool + */ + public function getEnableInternetAccess() + { + return $this->enable_internet_access; + } + + /** + * Whether to enable public internet access. Default false. + * + * Generated from protobuf field bool enable_internet_access = 1; + * @param bool $var + * @return $this + */ + public function setEnableInternetAccess($var) + { + GPBUtil::checkBool($var); + $this->enable_internet_access = $var; + + return $this; + } + + /** + * The full name of the Google Compute Engine + * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks) + * + * Generated from protobuf field string network = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * The full name of the Google Compute Engine + * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks) + * + * Generated from protobuf field string network = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * The name of the subnet that this instance is in. + * Format: + * `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}` + * + * Generated from protobuf field string subnetwork = 3 [(.google.api.resource_reference) = { + * @return string + */ + public function getSubnetwork() + { + return $this->subnetwork; + } + + /** + * The name of the subnet that this instance is in. + * Format: + * `projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}` + * + * Generated from protobuf field string subnetwork = 3 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSubnetwork($var) + { + GPBUtil::checkString($var, True); + $this->subnetwork = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/NotebookEucConfig.php b/AiPlatform/src/V1/NotebookEucConfig.php new file mode 100644 index 000000000000..c8a7ee268192 --- /dev/null +++ b/AiPlatform/src/V1/NotebookEucConfig.php @@ -0,0 +1,133 @@ +google.cloud.aiplatform.v1.NotebookEucConfig + */ +class NotebookEucConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Input only. Whether EUC is disabled in this NotebookRuntimeTemplate. + * In proto3, the default value of a boolean is false. In this way, by default + * EUC will be enabled for NotebookRuntimeTemplate. + * + * Generated from protobuf field bool euc_disabled = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + private $euc_disabled = false; + /** + * Output only. Whether ActAs check is bypassed for service account attached + * to the VM. If false, we need ActAs check for the default Compute Engine + * Service account. When a Runtime is created, a VM is allocated using Default + * Compute Engine Service Account. Any user requesting to use this Runtime + * requires Service Account User (ActAs) permission over this SA. If true, + * Runtime owner is using EUC and does not require the above permission as VM + * no longer use default Compute Engine SA, but a P4SA. + * + * Generated from protobuf field bool bypass_actas_check = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $bypass_actas_check = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $euc_disabled + * Input only. Whether EUC is disabled in this NotebookRuntimeTemplate. + * In proto3, the default value of a boolean is false. In this way, by default + * EUC will be enabled for NotebookRuntimeTemplate. + * @type bool $bypass_actas_check + * Output only. Whether ActAs check is bypassed for service account attached + * to the VM. If false, we need ActAs check for the default Compute Engine + * Service account. When a Runtime is created, a VM is allocated using Default + * Compute Engine Service Account. Any user requesting to use this Runtime + * requires Service Account User (ActAs) permission over this SA. If true, + * Runtime owner is using EUC and does not require the above permission as VM + * no longer use default Compute Engine SA, but a P4SA. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\NotebookEucConfig::initOnce(); + parent::__construct($data); + } + + /** + * Input only. Whether EUC is disabled in this NotebookRuntimeTemplate. + * In proto3, the default value of a boolean is false. In this way, by default + * EUC will be enabled for NotebookRuntimeTemplate. + * + * Generated from protobuf field bool euc_disabled = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return bool + */ + public function getEucDisabled() + { + return $this->euc_disabled; + } + + /** + * Input only. Whether EUC is disabled in this NotebookRuntimeTemplate. + * In proto3, the default value of a boolean is false. In this way, by default + * EUC will be enabled for NotebookRuntimeTemplate. + * + * Generated from protobuf field bool euc_disabled = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setEucDisabled($var) + { + GPBUtil::checkBool($var); + $this->euc_disabled = $var; + + return $this; + } + + /** + * Output only. Whether ActAs check is bypassed for service account attached + * to the VM. If false, we need ActAs check for the default Compute Engine + * Service account. When a Runtime is created, a VM is allocated using Default + * Compute Engine Service Account. Any user requesting to use this Runtime + * requires Service Account User (ActAs) permission over this SA. If true, + * Runtime owner is using EUC and does not require the above permission as VM + * no longer use default Compute Engine SA, but a P4SA. + * + * Generated from protobuf field bool bypass_actas_check = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getBypassActasCheck() + { + return $this->bypass_actas_check; + } + + /** + * Output only. Whether ActAs check is bypassed for service account attached + * to the VM. If false, we need ActAs check for the default Compute Engine + * Service account. When a Runtime is created, a VM is allocated using Default + * Compute Engine Service Account. Any user requesting to use this Runtime + * requires Service Account User (ActAs) permission over this SA. If true, + * Runtime owner is using EUC and does not require the above permission as VM + * no longer use default Compute Engine SA, but a P4SA. + * + * Generated from protobuf field bool bypass_actas_check = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setBypassActasCheck($var) + { + GPBUtil::checkBool($var); + $this->bypass_actas_check = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/NotebookIdleShutdownConfig.php b/AiPlatform/src/V1/NotebookIdleShutdownConfig.php new file mode 100644 index 000000000000..b418f7c370ce --- /dev/null +++ b/AiPlatform/src/V1/NotebookIdleShutdownConfig.php @@ -0,0 +1,120 @@ +google.cloud.aiplatform.v1.NotebookIdleShutdownConfig + */ +class NotebookIdleShutdownConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Duration is accurate to the second. In Notebook, Idle Timeout is + * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440 + * * 60. + * + * Generated from protobuf field .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $idle_timeout = null; + /** + * Whether Idle Shutdown is disabled in this NotebookRuntimeTemplate. + * + * Generated from protobuf field bool idle_shutdown_disabled = 2; + */ + private $idle_shutdown_disabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $idle_timeout + * Required. Duration is accurate to the second. In Notebook, Idle Timeout is + * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440 + * * 60. + * @type bool $idle_shutdown_disabled + * Whether Idle Shutdown is disabled in this NotebookRuntimeTemplate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\NotebookIdleShutdownConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. Duration is accurate to the second. In Notebook, Idle Timeout is + * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440 + * * 60. + * + * Generated from protobuf field .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getIdleTimeout() + { + return $this->idle_timeout; + } + + public function hasIdleTimeout() + { + return isset($this->idle_timeout); + } + + public function clearIdleTimeout() + { + unset($this->idle_timeout); + } + + /** + * Required. Duration is accurate to the second. In Notebook, Idle Timeout is + * accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440 + * * 60. + * + * Generated from protobuf field .google.protobuf.Duration idle_timeout = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setIdleTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->idle_timeout = $var; + + return $this; + } + + /** + * Whether Idle Shutdown is disabled in this NotebookRuntimeTemplate. + * + * Generated from protobuf field bool idle_shutdown_disabled = 2; + * @return bool + */ + public function getIdleShutdownDisabled() + { + return $this->idle_shutdown_disabled; + } + + /** + * Whether Idle Shutdown is disabled in this NotebookRuntimeTemplate. + * + * Generated from protobuf field bool idle_shutdown_disabled = 2; + * @param bool $var + * @return $this + */ + public function setIdleShutdownDisabled($var) + { + GPBUtil::checkBool($var); + $this->idle_shutdown_disabled = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/NotebookRuntime.php b/AiPlatform/src/V1/NotebookRuntime.php new file mode 100644 index 000000000000..64f24d6ed899 --- /dev/null +++ b/AiPlatform/src/V1/NotebookRuntime.php @@ -0,0 +1,741 @@ +google.cloud.aiplatform.v1.NotebookRuntime + */ +class NotebookRuntime extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the NotebookRuntime. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $name = ''; + /** + * Required. The user email of the NotebookRuntime. + * + * Generated from protobuf field string runtime_user = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $runtime_user = ''; + /** + * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is + * created from. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $notebook_runtime_template_ref = null; + /** + * Output only. The proxy endpoint used to access the NotebookRuntime. + * + * Generated from protobuf field string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $proxy_uri = ''; + /** + * Output only. Timestamp when this NotebookRuntime was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $create_time = null; + /** + * Output only. Timestamp when this NotebookRuntime was most recently updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $update_time = null; + /** + * Output only. The health state of the NotebookRuntime. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookRuntime.HealthState health_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $health_state = 0; + /** + * Required. The display name of the NotebookRuntime. + * The name can be up to 128 characters long and can consist of any UTF-8 + * characters. + * + * Generated from protobuf field string display_name = 10 [(.google.api.field_behavior) = REQUIRED]; + */ + private $display_name = ''; + /** + * The description of the NotebookRuntime. + * + * Generated from protobuf field string description = 11; + */ + private $description = ''; + /** + * Output only. The service account that the NotebookRuntime workload runs as. + * + * Generated from protobuf field string service_account = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $service_account = ''; + /** + * Output only. The runtime (instance) state of the NotebookRuntime. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState runtime_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $runtime_state = 0; + /** + * Output only. Whether NotebookRuntime is upgradable. + * + * Generated from protobuf field bool is_upgradable = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $is_upgradable = false; + /** + * The labels with user-defined metadata to organize your + * NotebookRuntime. + * Label keys and values can be no longer than 64 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * No more than 64 user labels can be associated with one NotebookRuntime + * (System labels are excluded). + * See https://goo.gl/xmQnxf for more information and examples of labels. + * System reserved label keys are prefixed with "aiplatform.googleapis.com/" + * and are immutable. Following system labels exist for NotebookRuntime: + * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output + * only, its value is the Compute Engine instance id. + * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is + * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to + * describe the entry service, either BigQuery or Vertex. + * + * Generated from protobuf field map labels = 16; + */ + private $labels; + /** + * Output only. Timestamp when this NotebookRuntime will be expired: + * 1. System Predefined NotebookRuntime: 24 hours after creation. After + * expiration, system predifined runtime will be deleted. + * 2. User created NotebookRuntime: 6 months after last upgrade. After + * expiration, user created runtime will be stopped and allowed for upgrade. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $expiration_time = null; + /** + * Output only. The VM os image version of NotebookRuntime. + * + * Generated from protobuf field string version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $version = ''; + /** + * Output only. The type of the notebook runtime. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $notebook_runtime_type = 0; + /** + * Optional. The Compute Engine tags to add to runtime (see [Tagging + * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)). + * + * Generated from protobuf field repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $network_tags; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the NotebookRuntime. + * @type string $runtime_user + * Required. The user email of the NotebookRuntime. + * @type \Google\Cloud\AIPlatform\V1\NotebookRuntimeTemplateRef $notebook_runtime_template_ref + * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is + * created from. + * @type string $proxy_uri + * Output only. The proxy endpoint used to access the NotebookRuntime. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Timestamp when this NotebookRuntime was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Timestamp when this NotebookRuntime was most recently updated. + * @type int $health_state + * Output only. The health state of the NotebookRuntime. + * @type string $display_name + * Required. The display name of the NotebookRuntime. + * The name can be up to 128 characters long and can consist of any UTF-8 + * characters. + * @type string $description + * The description of the NotebookRuntime. + * @type string $service_account + * Output only. The service account that the NotebookRuntime workload runs as. + * @type int $runtime_state + * Output only. The runtime (instance) state of the NotebookRuntime. + * @type bool $is_upgradable + * Output only. Whether NotebookRuntime is upgradable. + * @type array|\Google\Protobuf\Internal\MapField $labels + * The labels with user-defined metadata to organize your + * NotebookRuntime. + * Label keys and values can be no longer than 64 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * No more than 64 user labels can be associated with one NotebookRuntime + * (System labels are excluded). + * See https://goo.gl/xmQnxf for more information and examples of labels. + * System reserved label keys are prefixed with "aiplatform.googleapis.com/" + * and are immutable. Following system labels exist for NotebookRuntime: + * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output + * only, its value is the Compute Engine instance id. + * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is + * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to + * describe the entry service, either BigQuery or Vertex. + * @type \Google\Protobuf\Timestamp $expiration_time + * Output only. Timestamp when this NotebookRuntime will be expired: + * 1. System Predefined NotebookRuntime: 24 hours after creation. After + * expiration, system predifined runtime will be deleted. + * 2. User created NotebookRuntime: 6 months after last upgrade. After + * expiration, user created runtime will be stopped and allowed for upgrade. + * @type string $version + * Output only. The VM os image version of NotebookRuntime. + * @type int $notebook_runtime_type + * Output only. The type of the notebook runtime. + * @type array|\Google\Protobuf\Internal\RepeatedField $network_tags + * Optional. The Compute Engine tags to add to runtime (see [Tagging + * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\NotebookRuntime::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the NotebookRuntime. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of the NotebookRuntime. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The user email of the NotebookRuntime. + * + * Generated from protobuf field string runtime_user = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRuntimeUser() + { + return $this->runtime_user; + } + + /** + * Required. The user email of the NotebookRuntime. + * + * Generated from protobuf field string runtime_user = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRuntimeUser($var) + { + GPBUtil::checkString($var, True); + $this->runtime_user = $var; + + return $this; + } + + /** + * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is + * created from. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AIPlatform\V1\NotebookRuntimeTemplateRef|null + */ + public function getNotebookRuntimeTemplateRef() + { + return $this->notebook_runtime_template_ref; + } + + public function hasNotebookRuntimeTemplateRef() + { + return isset($this->notebook_runtime_template_ref); + } + + public function clearNotebookRuntimeTemplateRef() + { + unset($this->notebook_runtime_template_ref); + } + + /** + * Output only. The pointer to NotebookRuntimeTemplate this NotebookRuntime is + * created from. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef notebook_runtime_template_ref = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AIPlatform\V1\NotebookRuntimeTemplateRef $var + * @return $this + */ + public function setNotebookRuntimeTemplateRef($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\NotebookRuntimeTemplateRef::class); + $this->notebook_runtime_template_ref = $var; + + return $this; + } + + /** + * Output only. The proxy endpoint used to access the NotebookRuntime. + * + * Generated from protobuf field string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getProxyUri() + { + return $this->proxy_uri; + } + + /** + * Output only. The proxy endpoint used to access the NotebookRuntime. + * + * Generated from protobuf field string proxy_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setProxyUri($var) + { + GPBUtil::checkString($var, True); + $this->proxy_uri = $var; + + return $this; + } + + /** + * Output only. Timestamp when this NotebookRuntime was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Timestamp when this NotebookRuntime was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Timestamp when this NotebookRuntime was most recently updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Timestamp when this NotebookRuntime was most recently updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The health state of the NotebookRuntime. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookRuntime.HealthState health_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getHealthState() + { + return $this->health_state; + } + + /** + * Output only. The health state of the NotebookRuntime. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookRuntime.HealthState health_state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setHealthState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\NotebookRuntime\HealthState::class); + $this->health_state = $var; + + return $this; + } + + /** + * Required. The display name of the NotebookRuntime. + * The name can be up to 128 characters long and can consist of any UTF-8 + * characters. + * + * Generated from protobuf field string display_name = 10 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The display name of the NotebookRuntime. + * The name can be up to 128 characters long and can consist of any UTF-8 + * characters. + * + * Generated from protobuf field string display_name = 10 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The description of the NotebookRuntime. + * + * Generated from protobuf field string description = 11; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of the NotebookRuntime. + * + * Generated from protobuf field string description = 11; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The service account that the NotebookRuntime workload runs as. + * + * Generated from protobuf field string service_account = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Output only. The service account that the NotebookRuntime workload runs as. + * + * Generated from protobuf field string service_account = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * Output only. The runtime (instance) state of the NotebookRuntime. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState runtime_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getRuntimeState() + { + return $this->runtime_state; + } + + /** + * Output only. The runtime (instance) state of the NotebookRuntime. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState runtime_state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setRuntimeState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\NotebookRuntime\RuntimeState::class); + $this->runtime_state = $var; + + return $this; + } + + /** + * Output only. Whether NotebookRuntime is upgradable. + * + * Generated from protobuf field bool is_upgradable = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getIsUpgradable() + { + return $this->is_upgradable; + } + + /** + * Output only. Whether NotebookRuntime is upgradable. + * + * Generated from protobuf field bool is_upgradable = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setIsUpgradable($var) + { + GPBUtil::checkBool($var); + $this->is_upgradable = $var; + + return $this; + } + + /** + * The labels with user-defined metadata to organize your + * NotebookRuntime. + * Label keys and values can be no longer than 64 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * No more than 64 user labels can be associated with one NotebookRuntime + * (System labels are excluded). + * See https://goo.gl/xmQnxf for more information and examples of labels. + * System reserved label keys are prefixed with "aiplatform.googleapis.com/" + * and are immutable. Following system labels exist for NotebookRuntime: + * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output + * only, its value is the Compute Engine instance id. + * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is + * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to + * describe the entry service, either BigQuery or Vertex. + * + * Generated from protobuf field map labels = 16; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * The labels with user-defined metadata to organize your + * NotebookRuntime. + * Label keys and values can be no longer than 64 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * No more than 64 user labels can be associated with one NotebookRuntime + * (System labels are excluded). + * See https://goo.gl/xmQnxf for more information and examples of labels. + * System reserved label keys are prefixed with "aiplatform.googleapis.com/" + * and are immutable. Following system labels exist for NotebookRuntime: + * * "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": output + * only, its value is the Compute Engine instance id. + * * "aiplatform.googleapis.com/colab_enterprise_entry_service": its value is + * either "bigquery" or "vertex"; if absent, it should be "vertex". This is to + * describe the entry service, either BigQuery or Vertex. + * + * Generated from protobuf field map labels = 16; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. Timestamp when this NotebookRuntime will be expired: + * 1. System Predefined NotebookRuntime: 24 hours after creation. After + * expiration, system predifined runtime will be deleted. + * 2. User created NotebookRuntime: 6 months after last upgrade. After + * expiration, user created runtime will be stopped and allowed for upgrade. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpirationTime() + { + return $this->expiration_time; + } + + public function hasExpirationTime() + { + return isset($this->expiration_time); + } + + public function clearExpirationTime() + { + unset($this->expiration_time); + } + + /** + * Output only. Timestamp when this NotebookRuntime will be expired: + * 1. System Predefined NotebookRuntime: 24 hours after creation. After + * expiration, system predifined runtime will be deleted. + * 2. User created NotebookRuntime: 6 months after last upgrade. After + * expiration, user created runtime will be stopped and allowed for upgrade. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpirationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expiration_time = $var; + + return $this; + } + + /** + * Output only. The VM os image version of NotebookRuntime. + * + * Generated from protobuf field string version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Output only. The VM os image version of NotebookRuntime. + * + * Generated from protobuf field string version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Output only. The type of the notebook runtime. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getNotebookRuntimeType() + { + return $this->notebook_runtime_type; + } + + /** + * Output only. The type of the notebook runtime. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setNotebookRuntimeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\NotebookRuntimeType::class); + $this->notebook_runtime_type = $var; + + return $this; + } + + /** + * Optional. The Compute Engine tags to add to runtime (see [Tagging + * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)). + * + * Generated from protobuf field repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkTags() + { + return $this->network_tags; + } + + /** + * Optional. The Compute Engine tags to add to runtime (see [Tagging + * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)). + * + * Generated from protobuf field repeated string network_tags = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworkTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->network_tags = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/NotebookRuntime/HealthState.php b/AiPlatform/src/V1/NotebookRuntime/HealthState.php new file mode 100644 index 000000000000..6fad87ba4b1f --- /dev/null +++ b/AiPlatform/src/V1/NotebookRuntime/HealthState.php @@ -0,0 +1,62 @@ +google.cloud.aiplatform.v1.NotebookRuntime.HealthState + */ +class HealthState +{ + /** + * Unspecified health state. + * + * Generated from protobuf enum HEALTH_STATE_UNSPECIFIED = 0; + */ + const HEALTH_STATE_UNSPECIFIED = 0; + /** + * NotebookRuntime is in healthy state. Applies to ACTIVE state. + * + * Generated from protobuf enum HEALTHY = 1; + */ + const HEALTHY = 1; + /** + * NotebookRuntime is in unhealthy state. Applies to ACTIVE state. + * + * Generated from protobuf enum UNHEALTHY = 2; + */ + const UNHEALTHY = 2; + + private static $valueToName = [ + self::HEALTH_STATE_UNSPECIFIED => 'HEALTH_STATE_UNSPECIFIED', + self::HEALTHY => 'HEALTHY', + self::UNHEALTHY => 'UNHEALTHY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AiPlatform/src/V1/NotebookRuntime/RuntimeState.php b/AiPlatform/src/V1/NotebookRuntime/RuntimeState.php new file mode 100644 index 000000000000..22b59f083094 --- /dev/null +++ b/AiPlatform/src/V1/NotebookRuntime/RuntimeState.php @@ -0,0 +1,99 @@ +google.cloud.aiplatform.v1.NotebookRuntime.RuntimeState + */ +class RuntimeState +{ + /** + * Unspecified runtime state. + * + * Generated from protobuf enum RUNTIME_STATE_UNSPECIFIED = 0; + */ + const RUNTIME_STATE_UNSPECIFIED = 0; + /** + * NotebookRuntime is in running state. + * + * Generated from protobuf enum RUNNING = 1; + */ + const RUNNING = 1; + /** + * NotebookRuntime is in starting state. + * + * Generated from protobuf enum BEING_STARTED = 2; + */ + const BEING_STARTED = 2; + /** + * NotebookRuntime is in stopping state. + * + * Generated from protobuf enum BEING_STOPPED = 3; + */ + const BEING_STOPPED = 3; + /** + * NotebookRuntime is in stopped state. + * + * Generated from protobuf enum STOPPED = 4; + */ + const STOPPED = 4; + /** + * NotebookRuntime is in upgrading state. It is in the middle of upgrading + * process. + * + * Generated from protobuf enum BEING_UPGRADED = 5; + */ + const BEING_UPGRADED = 5; + /** + * NotebookRuntime was unable to start/stop properly. + * + * Generated from protobuf enum ERROR = 100; + */ + const ERROR = 100; + /** + * NotebookRuntime is in invalid state. Cannot be recovered. + * + * Generated from protobuf enum INVALID = 101; + */ + const INVALID = 101; + + private static $valueToName = [ + self::RUNTIME_STATE_UNSPECIFIED => 'RUNTIME_STATE_UNSPECIFIED', + self::RUNNING => 'RUNNING', + self::BEING_STARTED => 'BEING_STARTED', + self::BEING_STOPPED => 'BEING_STOPPED', + self::STOPPED => 'STOPPED', + self::BEING_UPGRADED => 'BEING_UPGRADED', + self::ERROR => 'ERROR', + self::INVALID => 'INVALID', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AiPlatform/src/V1/NotebookRuntimeTemplate.php b/AiPlatform/src/V1/NotebookRuntimeTemplate.php new file mode 100644 index 000000000000..bbf5c92fdc96 --- /dev/null +++ b/AiPlatform/src/V1/NotebookRuntimeTemplate.php @@ -0,0 +1,769 @@ +google.cloud.aiplatform.v1.NotebookRuntimeTemplate + */ +class NotebookRuntimeTemplate extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the NotebookRuntimeTemplate. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $name = ''; + /** + * Required. The display name of the NotebookRuntimeTemplate. + * The name can be up to 128 characters long and can consist of any UTF-8 + * characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $display_name = ''; + /** + * The description of the NotebookRuntimeTemplate. + * + * Generated from protobuf field string description = 3; + */ + private $description = ''; + /** + * Output only. The default template to use if not specified. + * + * Generated from protobuf field bool is_default = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $is_default = false; + /** + * Optional. Immutable. The specification of a single machine for the + * template. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + private $machine_spec = null; + /** + * Optional. The specification of [persistent + * disk][https://cloud.google.com/compute/docs/disks/persistent-disks] + * attached to the runtime as data disk storage. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $data_persistent_disk_spec = null; + /** + * Optional. Network spec. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $network_spec = null; + /** + * The service account that the runtime workload runs as. + * You can use any service account within the same project, but you + * must have the service account user permission to use the instance. + * If not specified, the [Compute Engine default service + * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + * is used. + * + * Generated from protobuf field string service_account = 13; + */ + private $service_account = ''; + /** + * Used to perform consistent read-modify-write updates. If not set, a blind + * "overwrite" update happens. + * + * Generated from protobuf field string etag = 14; + */ + private $etag = ''; + /** + * The labels with user-defined metadata to organize the + * NotebookRuntimeTemplates. + * Label keys and values can be no longer than 64 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * See https://goo.gl/xmQnxf for more information and examples of labels. + * + * Generated from protobuf field map labels = 15; + */ + private $labels; + /** + * The idle shutdown configuration of NotebookRuntimeTemplate. This config + * will only be set when idle shutdown is enabled. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + */ + private $idle_shutdown_config = null; + /** + * EUC configuration of the NotebookRuntimeTemplate. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookEucConfig euc_config = 18; + */ + private $euc_config = null; + /** + * Output only. Timestamp when this NotebookRuntimeTemplate was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $create_time = null; + /** + * Output only. Timestamp when this NotebookRuntimeTemplate was most recently + * updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $update_time = null; + /** + * Optional. Immutable. The type of the notebook runtime template. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + private $notebook_runtime_type = 0; + /** + * Optional. Immutable. Runtime Shielded VM spec. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + private $shielded_vm_config = null; + /** + * Optional. The Compute Engine tags to add to runtime (see [Tagging + * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)). + * + * Generated from protobuf field repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $network_tags; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the NotebookRuntimeTemplate. + * @type string $display_name + * Required. The display name of the NotebookRuntimeTemplate. + * The name can be up to 128 characters long and can consist of any UTF-8 + * characters. + * @type string $description + * The description of the NotebookRuntimeTemplate. + * @type bool $is_default + * Output only. The default template to use if not specified. + * @type \Google\Cloud\AIPlatform\V1\MachineSpec $machine_spec + * Optional. Immutable. The specification of a single machine for the + * template. + * @type \Google\Cloud\AIPlatform\V1\PersistentDiskSpec $data_persistent_disk_spec + * Optional. The specification of [persistent + * disk][https://cloud.google.com/compute/docs/disks/persistent-disks] + * attached to the runtime as data disk storage. + * @type \Google\Cloud\AIPlatform\V1\NetworkSpec $network_spec + * Optional. Network spec. + * @type string $service_account + * The service account that the runtime workload runs as. + * You can use any service account within the same project, but you + * must have the service account user permission to use the instance. + * If not specified, the [Compute Engine default service + * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + * is used. + * @type string $etag + * Used to perform consistent read-modify-write updates. If not set, a blind + * "overwrite" update happens. + * @type array|\Google\Protobuf\Internal\MapField $labels + * The labels with user-defined metadata to organize the + * NotebookRuntimeTemplates. + * Label keys and values can be no longer than 64 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * See https://goo.gl/xmQnxf for more information and examples of labels. + * @type \Google\Cloud\AIPlatform\V1\NotebookIdleShutdownConfig $idle_shutdown_config + * The idle shutdown configuration of NotebookRuntimeTemplate. This config + * will only be set when idle shutdown is enabled. + * @type \Google\Cloud\AIPlatform\V1\NotebookEucConfig $euc_config + * EUC configuration of the NotebookRuntimeTemplate. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Timestamp when this NotebookRuntimeTemplate was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Timestamp when this NotebookRuntimeTemplate was most recently + * updated. + * @type int $notebook_runtime_type + * Optional. Immutable. The type of the notebook runtime template. + * @type \Google\Cloud\AIPlatform\V1\ShieldedVmConfig $shielded_vm_config + * Optional. Immutable. Runtime Shielded VM spec. + * @type array|\Google\Protobuf\Internal\RepeatedField $network_tags + * Optional. The Compute Engine tags to add to runtime (see [Tagging + * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\NotebookRuntime::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the NotebookRuntimeTemplate. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of the NotebookRuntimeTemplate. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The display name of the NotebookRuntimeTemplate. + * The name can be up to 128 characters long and can consist of any UTF-8 + * characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The display name of the NotebookRuntimeTemplate. + * The name can be up to 128 characters long and can consist of any UTF-8 + * characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The description of the NotebookRuntimeTemplate. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of the NotebookRuntimeTemplate. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The default template to use if not specified. + * + * Generated from protobuf field bool is_default = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getIsDefault() + { + return $this->is_default; + } + + /** + * Output only. The default template to use if not specified. + * + * Generated from protobuf field bool is_default = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setIsDefault($var) + { + GPBUtil::checkBool($var); + $this->is_default = $var; + + return $this; + } + + /** + * Optional. Immutable. The specification of a single machine for the + * template. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\AIPlatform\V1\MachineSpec|null + */ + public function getMachineSpec() + { + return $this->machine_spec; + } + + public function hasMachineSpec() + { + return isset($this->machine_spec); + } + + public function clearMachineSpec() + { + unset($this->machine_spec); + } + + /** + * Optional. Immutable. The specification of a single machine for the + * template. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.MachineSpec machine_spec = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\AIPlatform\V1\MachineSpec $var + * @return $this + */ + public function setMachineSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\MachineSpec::class); + $this->machine_spec = $var; + + return $this; + } + + /** + * Optional. The specification of [persistent + * disk][https://cloud.google.com/compute/docs/disks/persistent-disks] + * attached to the runtime as data disk storage. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\AIPlatform\V1\PersistentDiskSpec|null + */ + public function getDataPersistentDiskSpec() + { + return $this->data_persistent_disk_spec; + } + + public function hasDataPersistentDiskSpec() + { + return isset($this->data_persistent_disk_spec); + } + + public function clearDataPersistentDiskSpec() + { + unset($this->data_persistent_disk_spec); + } + + /** + * Optional. The specification of [persistent + * disk][https://cloud.google.com/compute/docs/disks/persistent-disks] + * attached to the runtime as data disk storage. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PersistentDiskSpec data_persistent_disk_spec = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\AIPlatform\V1\PersistentDiskSpec $var + * @return $this + */ + public function setDataPersistentDiskSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\PersistentDiskSpec::class); + $this->data_persistent_disk_spec = $var; + + return $this; + } + + /** + * Optional. Network spec. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\AIPlatform\V1\NetworkSpec|null + */ + public function getNetworkSpec() + { + return $this->network_spec; + } + + public function hasNetworkSpec() + { + return isset($this->network_spec); + } + + public function clearNetworkSpec() + { + unset($this->network_spec); + } + + /** + * Optional. Network spec. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NetworkSpec network_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\AIPlatform\V1\NetworkSpec $var + * @return $this + */ + public function setNetworkSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\NetworkSpec::class); + $this->network_spec = $var; + + return $this; + } + + /** + * The service account that the runtime workload runs as. + * You can use any service account within the same project, but you + * must have the service account user permission to use the instance. + * If not specified, the [Compute Engine default service + * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + * is used. + * + * Generated from protobuf field string service_account = 13; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * The service account that the runtime workload runs as. + * You can use any service account within the same project, but you + * must have the service account user permission to use the instance. + * If not specified, the [Compute Engine default service + * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + * is used. + * + * Generated from protobuf field string service_account = 13; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * Used to perform consistent read-modify-write updates. If not set, a blind + * "overwrite" update happens. + * + * Generated from protobuf field string etag = 14; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Used to perform consistent read-modify-write updates. If not set, a blind + * "overwrite" update happens. + * + * Generated from protobuf field string etag = 14; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * The labels with user-defined metadata to organize the + * NotebookRuntimeTemplates. + * Label keys and values can be no longer than 64 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * See https://goo.gl/xmQnxf for more information and examples of labels. + * + * Generated from protobuf field map labels = 15; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * The labels with user-defined metadata to organize the + * NotebookRuntimeTemplates. + * Label keys and values can be no longer than 64 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * See https://goo.gl/xmQnxf for more information and examples of labels. + * + * Generated from protobuf field map labels = 15; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * The idle shutdown configuration of NotebookRuntimeTemplate. This config + * will only be set when idle shutdown is enabled. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * @return \Google\Cloud\AIPlatform\V1\NotebookIdleShutdownConfig|null + */ + public function getIdleShutdownConfig() + { + return $this->idle_shutdown_config; + } + + public function hasIdleShutdownConfig() + { + return isset($this->idle_shutdown_config); + } + + public function clearIdleShutdownConfig() + { + unset($this->idle_shutdown_config); + } + + /** + * The idle shutdown configuration of NotebookRuntimeTemplate. This config + * will only be set when idle shutdown is enabled. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookIdleShutdownConfig idle_shutdown_config = 17; + * @param \Google\Cloud\AIPlatform\V1\NotebookIdleShutdownConfig $var + * @return $this + */ + public function setIdleShutdownConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\NotebookIdleShutdownConfig::class); + $this->idle_shutdown_config = $var; + + return $this; + } + + /** + * EUC configuration of the NotebookRuntimeTemplate. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookEucConfig euc_config = 18; + * @return \Google\Cloud\AIPlatform\V1\NotebookEucConfig|null + */ + public function getEucConfig() + { + return $this->euc_config; + } + + public function hasEucConfig() + { + return isset($this->euc_config); + } + + public function clearEucConfig() + { + unset($this->euc_config); + } + + /** + * EUC configuration of the NotebookRuntimeTemplate. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookEucConfig euc_config = 18; + * @param \Google\Cloud\AIPlatform\V1\NotebookEucConfig $var + * @return $this + */ + public function setEucConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\NotebookEucConfig::class); + $this->euc_config = $var; + + return $this; + } + + /** + * Output only. Timestamp when this NotebookRuntimeTemplate was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Timestamp when this NotebookRuntimeTemplate was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Timestamp when this NotebookRuntimeTemplate was most recently + * updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Timestamp when this NotebookRuntimeTemplate was most recently + * updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. Immutable. The type of the notebook runtime template. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getNotebookRuntimeType() + { + return $this->notebook_runtime_type; + } + + /** + * Optional. Immutable. The type of the notebook runtime template. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.NotebookRuntimeType notebook_runtime_type = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setNotebookRuntimeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\NotebookRuntimeType::class); + $this->notebook_runtime_type = $var; + + return $this; + } + + /** + * Optional. Immutable. Runtime Shielded VM spec. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\AIPlatform\V1\ShieldedVmConfig|null + */ + public function getShieldedVmConfig() + { + return $this->shielded_vm_config; + } + + public function hasShieldedVmConfig() + { + return isset($this->shielded_vm_config); + } + + public function clearShieldedVmConfig() + { + unset($this->shielded_vm_config); + } + + /** + * Optional. Immutable. Runtime Shielded VM spec. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ShieldedVmConfig shielded_vm_config = 20 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\AIPlatform\V1\ShieldedVmConfig $var + * @return $this + */ + public function setShieldedVmConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ShieldedVmConfig::class); + $this->shielded_vm_config = $var; + + return $this; + } + + /** + * Optional. The Compute Engine tags to add to runtime (see [Tagging + * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)). + * + * Generated from protobuf field repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkTags() + { + return $this->network_tags; + } + + /** + * Optional. The Compute Engine tags to add to runtime (see [Tagging + * instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)). + * + * Generated from protobuf field repeated string network_tags = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNetworkTags($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->network_tags = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/NotebookRuntimeTemplateRef.php b/AiPlatform/src/V1/NotebookRuntimeTemplateRef.php new file mode 100644 index 000000000000..c25187dc2d1e --- /dev/null +++ b/AiPlatform/src/V1/NotebookRuntimeTemplateRef.php @@ -0,0 +1,67 @@ +google.cloud.aiplatform.v1.NotebookRuntimeTemplateRef + */ +class NotebookRuntimeTemplateRef extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. A resource name of the NotebookRuntimeTemplate. + * + * Generated from protobuf field string notebook_runtime_template = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + private $notebook_runtime_template = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $notebook_runtime_template + * Immutable. A resource name of the NotebookRuntimeTemplate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\NotebookRuntimeTemplateRef::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. A resource name of the NotebookRuntimeTemplate. + * + * Generated from protobuf field string notebook_runtime_template = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getNotebookRuntimeTemplate() + { + return $this->notebook_runtime_template; + } + + /** + * Immutable. A resource name of the NotebookRuntimeTemplate. + * + * Generated from protobuf field string notebook_runtime_template = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNotebookRuntimeTemplate($var) + { + GPBUtil::checkString($var, True); + $this->notebook_runtime_template = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/NotebookRuntimeType.php b/AiPlatform/src/V1/NotebookRuntimeType.php new file mode 100644 index 000000000000..903280bc0733 --- /dev/null +++ b/AiPlatform/src/V1/NotebookRuntimeType.php @@ -0,0 +1,62 @@ +google.cloud.aiplatform.v1.NotebookRuntimeType + */ +class NotebookRuntimeType +{ + /** + * Unspecified notebook runtime type, NotebookRuntimeType will default to + * USER_DEFINED. + * + * Generated from protobuf enum NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED = 0; + */ + const NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED = 0; + /** + * runtime or template with coustomized configurations from user. + * + * Generated from protobuf enum USER_DEFINED = 1; + */ + const USER_DEFINED = 1; + /** + * runtime or template with system defined configurations. + * + * Generated from protobuf enum ONE_CLICK = 2; + */ + const ONE_CLICK = 2; + + private static $valueToName = [ + self::NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED => 'NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED', + self::USER_DEFINED => 'USER_DEFINED', + self::ONE_CLICK => 'ONE_CLICK', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/AiPlatform/src/V1/NotebookServiceClient.php b/AiPlatform/src/V1/NotebookServiceClient.php new file mode 100644 index 000000000000..fd2e95bbb0a2 --- /dev/null +++ b/AiPlatform/src/V1/NotebookServiceClient.php @@ -0,0 +1,34 @@ +google.cloud.aiplatform.v1.PersistentResource + */ +class PersistentResource extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Resource name of a PersistentResource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + private $name = ''; + /** + * Optional. The display name of the PersistentResource. + * The name can be up to 128 characters long and can consist of any UTF-8 + * characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $display_name = ''; + /** + * Required. The spec of the pools of different resources. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + private $resource_pools; + /** + * Output only. The detailed state of a Study. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PersistentResource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $state = 0; + /** + * Output only. Only populated when persistent resource's state is `STOPPING` + * or `ERROR`. + * + * Generated from protobuf field .google.rpc.Status error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $error = null; + /** + * Output only. Time when the PersistentResource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $create_time = null; + /** + * Output only. Time when the PersistentResource for the first time entered + * the `RUNNING` state. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $start_time = null; + /** + * Output only. Time when the PersistentResource was most recently updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $update_time = null; + /** + * Optional. The labels with user-defined metadata to organize + * PersistentResource. + * Label keys and values can be no longer than 64 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * See https://goo.gl/xmQnxf for more information and examples of labels. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. The full name of the Compute Engine + * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) to peered with + * Vertex AI to host the persistent resources. + * For example, `projects/12345/global/networks/myVPC`. + * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert) + * is of the form `projects/{project}/global/networks/{network}`. + * Where {project} is a project number, as in `12345`, and {network} is a + * network name. + * To specify this field, you must have already [configured VPC Network + * Peering for Vertex + * AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering). + * If this field is left unspecified, the resources aren't peered with any + * network. + * + * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $network = ''; + /** + * Optional. Customer-managed encryption key spec for a PersistentResource. + * If set, this PersistentResource and all sub-resources of this + * PersistentResource will be secured by this key. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $encryption_spec = null; + /** + * Optional. Persistent Resource runtime spec. + * For example, used for Ray cluster configuration. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ResourceRuntimeSpec resource_runtime_spec = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $resource_runtime_spec = null; + /** + * Output only. Runtime information of the Persistent Resource. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ResourceRuntime resource_runtime = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $resource_runtime = null; + /** + * Optional. A list of names for the reserved IP ranges under the VPC network + * that can be used for this persistent resource. + * If set, we will deploy the persistent resource within the provided IP + * ranges. Otherwise, the persistent resource is deployed to any IP + * ranges under the provided VPC network. + * Example: ['vertex-ai-ip-range']. + * + * Generated from protobuf field repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $reserved_ip_ranges; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. Resource name of a PersistentResource. + * @type string $display_name + * Optional. The display name of the PersistentResource. + * The name can be up to 128 characters long and can consist of any UTF-8 + * characters. + * @type array<\Google\Cloud\AIPlatform\V1\ResourcePool>|\Google\Protobuf\Internal\RepeatedField $resource_pools + * Required. The spec of the pools of different resources. + * @type int $state + * Output only. The detailed state of a Study. + * @type \Google\Rpc\Status $error + * Output only. Only populated when persistent resource's state is `STOPPING` + * or `ERROR`. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Time when the PersistentResource was created. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. Time when the PersistentResource for the first time entered + * the `RUNNING` state. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Time when the PersistentResource was most recently updated. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels with user-defined metadata to organize + * PersistentResource. + * Label keys and values can be no longer than 64 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * See https://goo.gl/xmQnxf for more information and examples of labels. + * @type string $network + * Optional. The full name of the Compute Engine + * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) to peered with + * Vertex AI to host the persistent resources. + * For example, `projects/12345/global/networks/myVPC`. + * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert) + * is of the form `projects/{project}/global/networks/{network}`. + * Where {project} is a project number, as in `12345`, and {network} is a + * network name. + * To specify this field, you must have already [configured VPC Network + * Peering for Vertex + * AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering). + * If this field is left unspecified, the resources aren't peered with any + * network. + * @type \Google\Cloud\AIPlatform\V1\EncryptionSpec $encryption_spec + * Optional. Customer-managed encryption key spec for a PersistentResource. + * If set, this PersistentResource and all sub-resources of this + * PersistentResource will be secured by this key. + * @type \Google\Cloud\AIPlatform\V1\ResourceRuntimeSpec $resource_runtime_spec + * Optional. Persistent Resource runtime spec. + * For example, used for Ray cluster configuration. + * @type \Google\Cloud\AIPlatform\V1\ResourceRuntime $resource_runtime + * Output only. Runtime information of the Persistent Resource. + * @type array|\Google\Protobuf\Internal\RepeatedField $reserved_ip_ranges + * Optional. A list of names for the reserved IP ranges under the VPC network + * that can be used for this persistent resource. + * If set, we will deploy the persistent resource within the provided IP + * ranges. Otherwise, the persistent resource is deployed to any IP + * ranges under the provided VPC network. + * Example: ['vertex-ai-ip-range']. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\PersistentResource::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Resource name of a PersistentResource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. Resource name of a PersistentResource. + * + * 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; + } + + /** + * Optional. The display name of the PersistentResource. + * The name can be up to 128 characters long and can consist of any UTF-8 + * characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. The display name of the PersistentResource. + * The name can be up to 128 characters long and can consist of any UTF-8 + * characters. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Required. The spec of the pools of different resources. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResourcePools() + { + return $this->resource_pools; + } + + /** + * Required. The spec of the pools of different resources. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.ResourcePool resource_pools = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\AIPlatform\V1\ResourcePool>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResourcePools($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\ResourcePool::class); + $this->resource_pools = $arr; + + return $this; + } + + /** + * Output only. The detailed state of a Study. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PersistentResource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The detailed state of a Study. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PersistentResource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\PersistentResource\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Only populated when persistent resource's state is `STOPPING` + * or `ERROR`. + * + * Generated from protobuf field .google.rpc.Status error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. Only populated when persistent resource's state is `STOPPING` + * or `ERROR`. + * + * Generated from protobuf field .google.rpc.Status error = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * Output only. Time when the PersistentResource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Time when the PersistentResource was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Time when the PersistentResource for the first time entered + * the `RUNNING` state. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Output only. Time when the PersistentResource for the first time entered + * the `RUNNING` state. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. Time when the PersistentResource was most recently updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Time when the PersistentResource was most recently updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. The labels with user-defined metadata to organize + * PersistentResource. + * Label keys and values can be no longer than 64 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * See https://goo.gl/xmQnxf for more information and examples of labels. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels with user-defined metadata to organize + * PersistentResource. + * Label keys and values can be no longer than 64 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * See https://goo.gl/xmQnxf for more information and examples of labels. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Optional. The full name of the Compute Engine + * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) to peered with + * Vertex AI to host the persistent resources. + * For example, `projects/12345/global/networks/myVPC`. + * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert) + * is of the form `projects/{project}/global/networks/{network}`. + * Where {project} is a project number, as in `12345`, and {network} is a + * network name. + * To specify this field, you must have already [configured VPC Network + * Peering for Vertex + * AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering). + * If this field is left unspecified, the resources aren't peered with any + * network. + * + * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Optional. The full name of the Compute Engine + * [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) to peered with + * Vertex AI to host the persistent resources. + * For example, `projects/12345/global/networks/myVPC`. + * [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert) + * is of the form `projects/{project}/global/networks/{network}`. + * Where {project} is a project number, as in `12345`, and {network} is a + * network name. + * To specify this field, you must have already [configured VPC Network + * Peering for Vertex + * AI](https://cloud.google.com/vertex-ai/docs/general/vpc-peering). + * If this field is left unspecified, the resources aren't peered with any + * network. + * + * Generated from protobuf field string network = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Optional. Customer-managed encryption key spec for a PersistentResource. + * If set, this PersistentResource and all sub-resources of this + * PersistentResource will be secured by this key. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\AIPlatform\V1\EncryptionSpec|null + */ + public function getEncryptionSpec() + { + return $this->encryption_spec; + } + + public function hasEncryptionSpec() + { + return isset($this->encryption_spec); + } + + public function clearEncryptionSpec() + { + unset($this->encryption_spec); + } + + /** + * Optional. Customer-managed encryption key spec for a PersistentResource. + * If set, this PersistentResource and all sub-resources of this + * PersistentResource will be secured by this key. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\AIPlatform\V1\EncryptionSpec $var + * @return $this + */ + public function setEncryptionSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\EncryptionSpec::class); + $this->encryption_spec = $var; + + return $this; + } + + /** + * Optional. Persistent Resource runtime spec. + * For example, used for Ray cluster configuration. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ResourceRuntimeSpec resource_runtime_spec = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\AIPlatform\V1\ResourceRuntimeSpec|null + */ + public function getResourceRuntimeSpec() + { + return $this->resource_runtime_spec; + } + + public function hasResourceRuntimeSpec() + { + return isset($this->resource_runtime_spec); + } + + public function clearResourceRuntimeSpec() + { + unset($this->resource_runtime_spec); + } + + /** + * Optional. Persistent Resource runtime spec. + * For example, used for Ray cluster configuration. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ResourceRuntimeSpec resource_runtime_spec = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\AIPlatform\V1\ResourceRuntimeSpec $var + * @return $this + */ + public function setResourceRuntimeSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ResourceRuntimeSpec::class); + $this->resource_runtime_spec = $var; + + return $this; + } + + /** + * Output only. Runtime information of the Persistent Resource. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ResourceRuntime resource_runtime = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AIPlatform\V1\ResourceRuntime|null + */ + public function getResourceRuntime() + { + return $this->resource_runtime; + } + + public function hasResourceRuntime() + { + return isset($this->resource_runtime); + } + + public function clearResourceRuntime() + { + unset($this->resource_runtime); + } + + /** + * Output only. Runtime information of the Persistent Resource. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ResourceRuntime resource_runtime = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AIPlatform\V1\ResourceRuntime $var + * @return $this + */ + public function setResourceRuntime($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ResourceRuntime::class); + $this->resource_runtime = $var; + + return $this; + } + + /** + * Optional. A list of names for the reserved IP ranges under the VPC network + * that can be used for this persistent resource. + * If set, we will deploy the persistent resource within the provided IP + * ranges. Otherwise, the persistent resource is deployed to any IP + * ranges under the provided VPC network. + * Example: ['vertex-ai-ip-range']. + * + * Generated from protobuf field repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReservedIpRanges() + { + return $this->reserved_ip_ranges; + } + + /** + * Optional. A list of names for the reserved IP ranges under the VPC network + * that can be used for this persistent resource. + * If set, we will deploy the persistent resource within the provided IP + * ranges. Otherwise, the persistent resource is deployed to any IP + * ranges under the provided VPC network. + * Example: ['vertex-ai-ip-range']. + * + * Generated from protobuf field repeated string reserved_ip_ranges = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReservedIpRanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->reserved_ip_ranges = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/PersistentResource/State.php b/AiPlatform/src/V1/PersistentResource/State.php new file mode 100644 index 000000000000..45c24a10a21f --- /dev/null +++ b/AiPlatform/src/V1/PersistentResource/State.php @@ -0,0 +1,94 @@ +google.cloud.aiplatform.v1.PersistentResource.State + */ +class State +{ + /** + * Not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The PROVISIONING state indicates the persistent resources is being + * created. + * + * Generated from protobuf enum PROVISIONING = 1; + */ + const PROVISIONING = 1; + /** + * The RUNNING state indicates the persistent resource is healthy and fully + * usable. + * + * Generated from protobuf enum RUNNING = 3; + */ + const RUNNING = 3; + /** + * The STOPPING state indicates the persistent resource is being deleted. + * + * Generated from protobuf enum STOPPING = 4; + */ + const STOPPING = 4; + /** + * The ERROR state indicates the persistent resource may be unusable. + * Details can be found in the `error` field. + * + * Generated from protobuf enum ERROR = 5; + */ + const ERROR = 5; + /** + * The REBOOTING state indicates the persistent resource is being rebooted + * (PR is not available right now but is expected to be ready again later). + * + * Generated from protobuf enum REBOOTING = 6; + */ + const REBOOTING = 6; + /** + * The UPDATING state indicates the persistent resource is being updated. + * + * Generated from protobuf enum UPDATING = 7; + */ + const UPDATING = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PROVISIONING => 'PROVISIONING', + self::RUNNING => 'RUNNING', + self::STOPPING => 'STOPPING', + self::ERROR => 'ERROR', + self::REBOOTING => 'REBOOTING', + self::UPDATING => 'UPDATING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AiPlatform/src/V1/PersistentResourceServiceClient.php b/AiPlatform/src/V1/PersistentResourceServiceClient.php new file mode 100644 index 000000000000..1d1f41c667c9 --- /dev/null +++ b/AiPlatform/src/V1/PersistentResourceServiceClient.php @@ -0,0 +1,34 @@ +google.cloud.aiplatform.v1.RaySpec + */ +class RaySpec extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\PersistentResource::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AiPlatform/src/V1/RebootPersistentResourceOperationMetadata.php b/AiPlatform/src/V1/RebootPersistentResourceOperationMetadata.php new file mode 100644 index 000000000000..5ca9b9efdd0e --- /dev/null +++ b/AiPlatform/src/V1/RebootPersistentResourceOperationMetadata.php @@ -0,0 +1,111 @@ +google.cloud.aiplatform.v1.RebootPersistentResourceOperationMetadata + */ +class RebootPersistentResourceOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Operation metadata for PersistentResource. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private $generic_metadata = null; + /** + * Progress Message for Reboot LRO + * + * Generated from protobuf field string progress_message = 2; + */ + private $progress_message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\GenericOperationMetadata $generic_metadata + * Operation metadata for PersistentResource. + * @type string $progress_message + * Progress Message for Reboot LRO + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\PersistentResourceService::initOnce(); + parent::__construct($data); + } + + /** + * Operation metadata for PersistentResource. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * @return \Google\Cloud\AIPlatform\V1\GenericOperationMetadata|null + */ + public function getGenericMetadata() + { + return $this->generic_metadata; + } + + public function hasGenericMetadata() + { + return isset($this->generic_metadata); + } + + public function clearGenericMetadata() + { + unset($this->generic_metadata); + } + + /** + * Operation metadata for PersistentResource. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * @param \Google\Cloud\AIPlatform\V1\GenericOperationMetadata $var + * @return $this + */ + public function setGenericMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GenericOperationMetadata::class); + $this->generic_metadata = $var; + + return $this; + } + + /** + * Progress Message for Reboot LRO + * + * Generated from protobuf field string progress_message = 2; + * @return string + */ + public function getProgressMessage() + { + return $this->progress_message; + } + + /** + * Progress Message for Reboot LRO + * + * Generated from protobuf field string progress_message = 2; + * @param string $var + * @return $this + */ + public function setProgressMessage($var) + { + GPBUtil::checkString($var, True); + $this->progress_message = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/RebootPersistentResourceRequest.php b/AiPlatform/src/V1/RebootPersistentResourceRequest.php new file mode 100644 index 000000000000..7ec9c42a0365 --- /dev/null +++ b/AiPlatform/src/V1/RebootPersistentResourceRequest.php @@ -0,0 +1,92 @@ +google.cloud.aiplatform.v1.RebootPersistentResourceRequest + */ +class RebootPersistentResourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the PersistentResource resource. + * Format: + * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $name = ''; + + /** + * @param string $name Required. The name of the PersistentResource resource. + * Format: + * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}` + * Please see {@see PersistentResourceServiceClient::persistentResourceName()} for help formatting this field. + * + * @return \Google\Cloud\AIPlatform\V1\RebootPersistentResourceRequest + * + * @experimental + */ + public static function 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 PersistentResource resource. + * Format: + * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\PersistentResourceService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the PersistentResource resource. + * Format: + * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the PersistentResource resource. + * Format: + * `projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ResourcePool.php b/AiPlatform/src/V1/ResourcePool.php new file mode 100644 index 000000000000..ba312b74a449 --- /dev/null +++ b/AiPlatform/src/V1/ResourcePool.php @@ -0,0 +1,290 @@ +google.cloud.aiplatform.v1.ResourcePool + */ +class ResourcePool extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The unique ID in a PersistentResource for referring to this + * resource pool. User can specify it if necessary. Otherwise, it's generated + * automatically. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + private $id = ''; + /** + * Required. Immutable. The specification of a single machine. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + private $machine_spec = null; + /** + * Optional. The total number of machines to use for this resource pool. + * + * Generated from protobuf field optional int64 replica_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $replica_count = null; + /** + * Optional. Disk spec for the machine in this node pool. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $disk_spec = null; + /** + * Output only. The number of machines currently in use by training jobs for + * this resource pool. Will replace idle_replica_count. + * + * Generated from protobuf field int64 used_replica_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $used_replica_count = 0; + /** + * Optional. Optional spec to configure GKE autoscaling + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $autoscaling_spec = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Immutable. The unique ID in a PersistentResource for referring to this + * resource pool. User can specify it if necessary. Otherwise, it's generated + * automatically. + * @type \Google\Cloud\AIPlatform\V1\MachineSpec $machine_spec + * Required. Immutable. The specification of a single machine. + * @type int|string $replica_count + * Optional. The total number of machines to use for this resource pool. + * @type \Google\Cloud\AIPlatform\V1\DiskSpec $disk_spec + * Optional. Disk spec for the machine in this node pool. + * @type int|string $used_replica_count + * Output only. The number of machines currently in use by training jobs for + * this resource pool. Will replace idle_replica_count. + * @type \Google\Cloud\AIPlatform\V1\ResourcePool\AutoscalingSpec $autoscaling_spec + * Optional. Optional spec to configure GKE autoscaling + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\PersistentResource::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. The unique ID in a PersistentResource for referring to this + * resource pool. User can specify it if necessary. Otherwise, it's generated + * automatically. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Immutable. The unique ID in a PersistentResource for referring to this + * resource pool. User can specify it if necessary. Otherwise, it's generated + * automatically. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Required. Immutable. The specification of a single machine. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\AIPlatform\V1\MachineSpec|null + */ + public function getMachineSpec() + { + return $this->machine_spec; + } + + public function hasMachineSpec() + { + return isset($this->machine_spec); + } + + public function clearMachineSpec() + { + unset($this->machine_spec); + } + + /** + * Required. Immutable. The specification of a single machine. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.MachineSpec machine_spec = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\AIPlatform\V1\MachineSpec $var + * @return $this + */ + public function setMachineSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\MachineSpec::class); + $this->machine_spec = $var; + + return $this; + } + + /** + * Optional. The total number of machines to use for this resource pool. + * + * Generated from protobuf field optional int64 replica_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getReplicaCount() + { + return isset($this->replica_count) ? $this->replica_count : 0; + } + + public function hasReplicaCount() + { + return isset($this->replica_count); + } + + public function clearReplicaCount() + { + unset($this->replica_count); + } + + /** + * Optional. The total number of machines to use for this resource pool. + * + * Generated from protobuf field optional int64 replica_count = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setReplicaCount($var) + { + GPBUtil::checkInt64($var); + $this->replica_count = $var; + + return $this; + } + + /** + * Optional. Disk spec for the machine in this node pool. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\AIPlatform\V1\DiskSpec|null + */ + public function getDiskSpec() + { + return $this->disk_spec; + } + + public function hasDiskSpec() + { + return isset($this->disk_spec); + } + + public function clearDiskSpec() + { + unset($this->disk_spec); + } + + /** + * Optional. Disk spec for the machine in this node pool. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.DiskSpec disk_spec = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\AIPlatform\V1\DiskSpec $var + * @return $this + */ + public function setDiskSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\DiskSpec::class); + $this->disk_spec = $var; + + return $this; + } + + /** + * Output only. The number of machines currently in use by training jobs for + * this resource pool. Will replace idle_replica_count. + * + * Generated from protobuf field int64 used_replica_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getUsedReplicaCount() + { + return $this->used_replica_count; + } + + /** + * Output only. The number of machines currently in use by training jobs for + * this resource pool. Will replace idle_replica_count. + * + * Generated from protobuf field int64 used_replica_count = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setUsedReplicaCount($var) + { + GPBUtil::checkInt64($var); + $this->used_replica_count = $var; + + return $this; + } + + /** + * Optional. Optional spec to configure GKE autoscaling + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\AIPlatform\V1\ResourcePool\AutoscalingSpec|null + */ + public function getAutoscalingSpec() + { + return $this->autoscaling_spec; + } + + public function hasAutoscalingSpec() + { + return isset($this->autoscaling_spec); + } + + public function clearAutoscalingSpec() + { + unset($this->autoscaling_spec); + } + + /** + * Optional. Optional spec to configure GKE autoscaling + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec autoscaling_spec = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\AIPlatform\V1\ResourcePool\AutoscalingSpec $var + * @return $this + */ + public function setAutoscalingSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ResourcePool\AutoscalingSpec::class); + $this->autoscaling_spec = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ResourcePool/AutoscalingSpec.php b/AiPlatform/src/V1/ResourcePool/AutoscalingSpec.php new file mode 100644 index 000000000000..af0d2a21b1c6 --- /dev/null +++ b/AiPlatform/src/V1/ResourcePool/AutoscalingSpec.php @@ -0,0 +1,130 @@ +google.cloud.aiplatform.v1.ResourcePool.AutoscalingSpec + */ +class AutoscalingSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. min replicas in the node pool, + * must be ≤ replica_count and < max_replica_count or will throw error + * + * Generated from protobuf field optional int64 min_replica_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $min_replica_count = null; + /** + * Optional. max replicas in the node pool, + * must be ≥ replica_count and > min_replica_count or will throw error + * + * Generated from protobuf field optional int64 max_replica_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $max_replica_count = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $min_replica_count + * Optional. min replicas in the node pool, + * must be ≤ replica_count and < max_replica_count or will throw error + * @type int|string $max_replica_count + * Optional. max replicas in the node pool, + * must be ≥ replica_count and > min_replica_count or will throw error + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\PersistentResource::initOnce(); + parent::__construct($data); + } + + /** + * Optional. min replicas in the node pool, + * must be ≤ replica_count and < max_replica_count or will throw error + * + * Generated from protobuf field optional int64 min_replica_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getMinReplicaCount() + { + return isset($this->min_replica_count) ? $this->min_replica_count : 0; + } + + public function hasMinReplicaCount() + { + return isset($this->min_replica_count); + } + + public function clearMinReplicaCount() + { + unset($this->min_replica_count); + } + + /** + * Optional. min replicas in the node pool, + * must be ≤ replica_count and < max_replica_count or will throw error + * + * Generated from protobuf field optional int64 min_replica_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setMinReplicaCount($var) + { + GPBUtil::checkInt64($var); + $this->min_replica_count = $var; + + return $this; + } + + /** + * Optional. max replicas in the node pool, + * must be ≥ replica_count and > min_replica_count or will throw error + * + * Generated from protobuf field optional int64 max_replica_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getMaxReplicaCount() + { + return isset($this->max_replica_count) ? $this->max_replica_count : 0; + } + + public function hasMaxReplicaCount() + { + return isset($this->max_replica_count); + } + + public function clearMaxReplicaCount() + { + unset($this->max_replica_count); + } + + /** + * Optional. max replicas in the node pool, + * must be ≥ replica_count and > min_replica_count or will throw error + * + * Generated from protobuf field optional int64 max_replica_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setMaxReplicaCount($var) + { + GPBUtil::checkInt64($var); + $this->max_replica_count = $var; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/ResourceRuntime.php b/AiPlatform/src/V1/ResourceRuntime.php new file mode 100644 index 000000000000..41ee6bb3e9f7 --- /dev/null +++ b/AiPlatform/src/V1/ResourceRuntime.php @@ -0,0 +1,33 @@ +google.cloud.aiplatform.v1.ResourceRuntime + */ +class ResourceRuntime extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\PersistentResource::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AiPlatform/src/V1/ResourceRuntimeSpec.php b/AiPlatform/src/V1/ResourceRuntimeSpec.php new file mode 100644 index 000000000000..2603db6b157e --- /dev/null +++ b/AiPlatform/src/V1/ResourceRuntimeSpec.php @@ -0,0 +1,128 @@ +google.cloud.aiplatform.v1.ResourceRuntimeSpec + */ +class ResourceRuntimeSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Configure the use of workload identity on the PersistentResource + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ServiceAccountSpec service_account_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $service_account_spec = null; + /** + * Optional. Ray cluster configuration. + * Required when creating a dedicated RayCluster on the PersistentResource. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RaySpec ray_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $ray_spec = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\ServiceAccountSpec $service_account_spec + * Optional. Configure the use of workload identity on the PersistentResource + * @type \Google\Cloud\AIPlatform\V1\RaySpec $ray_spec + * Optional. Ray cluster configuration. + * Required when creating a dedicated RayCluster on the PersistentResource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\PersistentResource::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Configure the use of workload identity on the PersistentResource + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ServiceAccountSpec service_account_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\AIPlatform\V1\ServiceAccountSpec|null + */ + public function getServiceAccountSpec() + { + return $this->service_account_spec; + } + + public function hasServiceAccountSpec() + { + return isset($this->service_account_spec); + } + + public function clearServiceAccountSpec() + { + unset($this->service_account_spec); + } + + /** + * Optional. Configure the use of workload identity on the PersistentResource + * + * Generated from protobuf field .google.cloud.aiplatform.v1.ServiceAccountSpec service_account_spec = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\AIPlatform\V1\ServiceAccountSpec $var + * @return $this + */ + public function setServiceAccountSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\ServiceAccountSpec::class); + $this->service_account_spec = $var; + + return $this; + } + + /** + * Optional. Ray cluster configuration. + * Required when creating a dedicated RayCluster on the PersistentResource. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RaySpec ray_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\AIPlatform\V1\RaySpec|null + */ + public function getRaySpec() + { + return $this->ray_spec; + } + + public function hasRaySpec() + { + return isset($this->ray_spec); + } + + public function clearRaySpec() + { + unset($this->ray_spec); + } + + /** + * Optional. Ray cluster configuration. + * Required when creating a dedicated RayCluster on the PersistentResource. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.RaySpec ray_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\AIPlatform\V1\RaySpec $var + * @return $this + */ + public function setRaySpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\RaySpec::class); + $this->ray_spec = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/SafetySetting.php b/AiPlatform/src/V1/SafetySetting.php index 7815fef899d0..35baf65e189e 100644 --- a/AiPlatform/src/V1/SafetySetting.php +++ b/AiPlatform/src/V1/SafetySetting.php @@ -27,6 +27,13 @@ class SafetySetting extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.aiplatform.v1.SafetySetting.HarmBlockThreshold threshold = 2 [(.google.api.field_behavior) = REQUIRED]; */ private $threshold = 0; + /** + * Optional. Specify if the threshold is used for probability or severity + * score. If not specified, the threshold is used for probability score. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $method = 0; /** * Constructor. @@ -38,6 +45,9 @@ class SafetySetting extends \Google\Protobuf\Internal\Message * Required. Harm category. * @type int $threshold * Required. The harm block threshold. + * @type int $method + * Optional. Specify if the threshold is used for probability or severity + * score. If not specified, the threshold is used for probability score. * } */ public function __construct($data = NULL) { @@ -97,5 +107,33 @@ public function setThreshold($var) return $this; } + /** + * Optional. Specify if the threshold is used for probability or severity + * score. If not specified, the threshold is used for probability score. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMethod() + { + return $this->method; + } + + /** + * Optional. Specify if the threshold is used for probability or severity + * score. If not specified, the threshold is used for probability score. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod method = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMethod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\SafetySetting\HarmBlockMethod::class); + $this->method = $var; + + return $this; + } + } diff --git a/AiPlatform/src/V1/SafetySetting/HarmBlockMethod.php b/AiPlatform/src/V1/SafetySetting/HarmBlockMethod.php new file mode 100644 index 000000000000..2c37726fa2b0 --- /dev/null +++ b/AiPlatform/src/V1/SafetySetting/HarmBlockMethod.php @@ -0,0 +1,62 @@ +google.cloud.aiplatform.v1.SafetySetting.HarmBlockMethod + */ +class HarmBlockMethod +{ + /** + * The harm block method is unspecified. + * + * Generated from protobuf enum HARM_BLOCK_METHOD_UNSPECIFIED = 0; + */ + const HARM_BLOCK_METHOD_UNSPECIFIED = 0; + /** + * The harm block method uses both probability and severity scores. + * + * Generated from protobuf enum SEVERITY = 1; + */ + const SEVERITY = 1; + /** + * The harm block method uses the probability score. + * + * Generated from protobuf enum PROBABILITY = 2; + */ + const PROBABILITY = 2; + + private static $valueToName = [ + self::HARM_BLOCK_METHOD_UNSPECIFIED => 'HARM_BLOCK_METHOD_UNSPECIFIED', + self::SEVERITY => 'SEVERITY', + self::PROBABILITY => 'PROBABILITY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AiPlatform/src/V1/Schema.php b/AiPlatform/src/V1/Schema.php index cebf394a32da..4fed6769878d 100644 --- a/AiPlatform/src/V1/Schema.php +++ b/AiPlatform/src/V1/Schema.php @@ -27,12 +27,19 @@ class Schema extends \Google\Protobuf\Internal\Message /** * Optional. The format of the data. * Supported formats: - * for NUMBER type: float, double - * for INTEGER type: int32, int64 + * for NUMBER type: "float", "double" + * for INTEGER type: "int32", "int64" + * for STRING type: "email", "byte", etc * * Generated from protobuf field string format = 7 [(.google.api.field_behavior) = OPTIONAL]; */ private $format = ''; + /** + * Optional. The title of the Schema. + * + * Generated from protobuf field string title = 24 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $title = ''; /** * Optional. The description of the data. * @@ -46,11 +53,30 @@ class Schema extends \Google\Protobuf\Internal\Message */ private $nullable = false; /** - * Optional. Schema of the elements of Type.ARRAY. + * Optional. Default value of the data. + * + * Generated from protobuf field .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $default = null; + /** + * Optional. SCHEMA FIELDS FOR TYPE ARRAY + * Schema of the elements of Type.ARRAY. * * Generated from protobuf field .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $items = null; + /** + * Optional. Minimum number of the elements for Type.ARRAY. + * + * Generated from protobuf field int64 min_items = 21 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $min_items = 0; + /** + * Optional. Maximum number of the elements for Type.ARRAY. + * + * Generated from protobuf field int64 max_items = 22 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $max_items = 0; /** * Optional. Possible values of the element of Type.STRING with enum format. * For example we can define an Enum Direction as : @@ -60,7 +86,8 @@ class Schema extends \Google\Protobuf\Internal\Message */ private $enum; /** - * Optional. Properties of Type.OBJECT. + * Optional. SCHEMA FIELDS FOR TYPE OBJECT + * Properties of Type.OBJECT. * * Generated from protobuf field map properties = 3 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -71,6 +98,51 @@ class Schema extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated string required = 5 [(.google.api.field_behavior) = OPTIONAL]; */ private $required; + /** + * Optional. Minimum number of the properties for Type.OBJECT. + * + * Generated from protobuf field int64 min_properties = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $min_properties = 0; + /** + * Optional. Maximum number of the properties for Type.OBJECT. + * + * Generated from protobuf field int64 max_properties = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $max_properties = 0; + /** + * Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER + * Minimum value of the Type.INTEGER and Type.NUMBER + * + * Generated from protobuf field double minimum = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $minimum = 0.0; + /** + * Optional. Maximum value of the Type.INTEGER and Type.NUMBER + * + * Generated from protobuf field double maximum = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $maximum = 0.0; + /** + * Optional. SCHEMA FIELDS FOR TYPE STRING + * Minimum length of the Type.STRING + * + * Generated from protobuf field int64 min_length = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $min_length = 0; + /** + * Optional. Maximum length of the Type.STRING + * + * Generated from protobuf field int64 max_length = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $max_length = 0; + /** + * Optional. Pattern of the Type.STRING to restrict a string to a regular + * expression. + * + * Generated from protobuf field string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $pattern = ''; /** * Optional. Example of the object. Will only populated when the object is the * root. @@ -90,22 +162,50 @@ class Schema extends \Google\Protobuf\Internal\Message * @type string $format * Optional. The format of the data. * Supported formats: - * for NUMBER type: float, double - * for INTEGER type: int32, int64 + * for NUMBER type: "float", "double" + * for INTEGER type: "int32", "int64" + * for STRING type: "email", "byte", etc + * @type string $title + * Optional. The title of the Schema. * @type string $description * Optional. The description of the data. * @type bool $nullable * Optional. Indicates if the value may be null. + * @type \Google\Protobuf\Value $default + * Optional. Default value of the data. * @type \Google\Cloud\AIPlatform\V1\Schema $items - * Optional. Schema of the elements of Type.ARRAY. + * Optional. SCHEMA FIELDS FOR TYPE ARRAY + * Schema of the elements of Type.ARRAY. + * @type int|string $min_items + * Optional. Minimum number of the elements for Type.ARRAY. + * @type int|string $max_items + * Optional. Maximum number of the elements for Type.ARRAY. * @type array|\Google\Protobuf\Internal\RepeatedField $enum * Optional. Possible values of the element of Type.STRING with enum format. * For example we can define an Enum Direction as : * {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} * @type array|\Google\Protobuf\Internal\MapField $properties - * Optional. Properties of Type.OBJECT. + * Optional. SCHEMA FIELDS FOR TYPE OBJECT + * Properties of Type.OBJECT. * @type array|\Google\Protobuf\Internal\RepeatedField $required * Optional. Required properties of Type.OBJECT. + * @type int|string $min_properties + * Optional. Minimum number of the properties for Type.OBJECT. + * @type int|string $max_properties + * Optional. Maximum number of the properties for Type.OBJECT. + * @type float $minimum + * Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER + * Minimum value of the Type.INTEGER and Type.NUMBER + * @type float $maximum + * Optional. Maximum value of the Type.INTEGER and Type.NUMBER + * @type int|string $min_length + * Optional. SCHEMA FIELDS FOR TYPE STRING + * Minimum length of the Type.STRING + * @type int|string $max_length + * Optional. Maximum length of the Type.STRING + * @type string $pattern + * Optional. Pattern of the Type.STRING to restrict a string to a regular + * expression. * @type \Google\Protobuf\Value $example * Optional. Example of the object. Will only populated when the object is the * root. @@ -145,8 +245,9 @@ public function setType($var) /** * Optional. The format of the data. * Supported formats: - * for NUMBER type: float, double - * for INTEGER type: int32, int64 + * for NUMBER type: "float", "double" + * for INTEGER type: "int32", "int64" + * for STRING type: "email", "byte", etc * * Generated from protobuf field string format = 7 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -159,8 +260,9 @@ public function getFormat() /** * Optional. The format of the data. * Supported formats: - * for NUMBER type: float, double - * for INTEGER type: int32, int64 + * for NUMBER type: "float", "double" + * for INTEGER type: "int32", "int64" + * for STRING type: "email", "byte", etc * * Generated from protobuf field string format = 7 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var @@ -174,6 +276,32 @@ public function setFormat($var) return $this; } + /** + * Optional. The title of the Schema. + * + * Generated from protobuf field string title = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Optional. The title of the Schema. + * + * Generated from protobuf field string title = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + /** * Optional. The description of the data. * @@ -227,7 +355,44 @@ public function setNullable($var) } /** - * Optional. Schema of the elements of Type.ARRAY. + * Optional. Default value of the data. + * + * Generated from protobuf field .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Value|null + */ + public function getDefault() + { + return $this->default; + } + + public function hasDefault() + { + return isset($this->default); + } + + public function clearDefault() + { + unset($this->default); + } + + /** + * Optional. Default value of the data. + * + * Generated from protobuf field .google.protobuf.Value default = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Value $var + * @return $this + */ + public function setDefault($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Value::class); + $this->default = $var; + + return $this; + } + + /** + * Optional. SCHEMA FIELDS FOR TYPE ARRAY + * Schema of the elements of Type.ARRAY. * * Generated from protobuf field .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\AIPlatform\V1\Schema|null @@ -248,7 +413,8 @@ public function clearItems() } /** - * Optional. Schema of the elements of Type.ARRAY. + * Optional. SCHEMA FIELDS FOR TYPE ARRAY + * Schema of the elements of Type.ARRAY. * * Generated from protobuf field .google.cloud.aiplatform.v1.Schema items = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\AIPlatform\V1\Schema $var @@ -262,6 +428,58 @@ public function setItems($var) return $this; } + /** + * Optional. Minimum number of the elements for Type.ARRAY. + * + * Generated from protobuf field int64 min_items = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getMinItems() + { + return $this->min_items; + } + + /** + * Optional. Minimum number of the elements for Type.ARRAY. + * + * Generated from protobuf field int64 min_items = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setMinItems($var) + { + GPBUtil::checkInt64($var); + $this->min_items = $var; + + return $this; + } + + /** + * Optional. Maximum number of the elements for Type.ARRAY. + * + * Generated from protobuf field int64 max_items = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getMaxItems() + { + return $this->max_items; + } + + /** + * Optional. Maximum number of the elements for Type.ARRAY. + * + * Generated from protobuf field int64 max_items = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setMaxItems($var) + { + GPBUtil::checkInt64($var); + $this->max_items = $var; + + return $this; + } + /** * Optional. Possible values of the element of Type.STRING with enum format. * For example we can define an Enum Direction as : @@ -293,7 +511,8 @@ public function setEnum($var) } /** - * Optional. Properties of Type.OBJECT. + * Optional. SCHEMA FIELDS FOR TYPE OBJECT + * Properties of Type.OBJECT. * * Generated from protobuf field map properties = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\MapField @@ -304,7 +523,8 @@ public function getProperties() } /** - * Optional. Properties of Type.OBJECT. + * Optional. SCHEMA FIELDS FOR TYPE OBJECT + * Properties of Type.OBJECT. * * Generated from protobuf field map properties = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param array|\Google\Protobuf\Internal\MapField $var @@ -344,6 +564,194 @@ public function setRequired($var) return $this; } + /** + * Optional. Minimum number of the properties for Type.OBJECT. + * + * Generated from protobuf field int64 min_properties = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getMinProperties() + { + return $this->min_properties; + } + + /** + * Optional. Minimum number of the properties for Type.OBJECT. + * + * Generated from protobuf field int64 min_properties = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setMinProperties($var) + { + GPBUtil::checkInt64($var); + $this->min_properties = $var; + + return $this; + } + + /** + * Optional. Maximum number of the properties for Type.OBJECT. + * + * Generated from protobuf field int64 max_properties = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getMaxProperties() + { + return $this->max_properties; + } + + /** + * Optional. Maximum number of the properties for Type.OBJECT. + * + * Generated from protobuf field int64 max_properties = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setMaxProperties($var) + { + GPBUtil::checkInt64($var); + $this->max_properties = $var; + + return $this; + } + + /** + * Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER + * Minimum value of the Type.INTEGER and Type.NUMBER + * + * Generated from protobuf field double minimum = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getMinimum() + { + return $this->minimum; + } + + /** + * Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER + * Minimum value of the Type.INTEGER and Type.NUMBER + * + * Generated from protobuf field double minimum = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setMinimum($var) + { + GPBUtil::checkDouble($var); + $this->minimum = $var; + + return $this; + } + + /** + * Optional. Maximum value of the Type.INTEGER and Type.NUMBER + * + * Generated from protobuf field double maximum = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getMaximum() + { + return $this->maximum; + } + + /** + * Optional. Maximum value of the Type.INTEGER and Type.NUMBER + * + * Generated from protobuf field double maximum = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setMaximum($var) + { + GPBUtil::checkDouble($var); + $this->maximum = $var; + + return $this; + } + + /** + * Optional. SCHEMA FIELDS FOR TYPE STRING + * Minimum length of the Type.STRING + * + * Generated from protobuf field int64 min_length = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getMinLength() + { + return $this->min_length; + } + + /** + * Optional. SCHEMA FIELDS FOR TYPE STRING + * Minimum length of the Type.STRING + * + * Generated from protobuf field int64 min_length = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setMinLength($var) + { + GPBUtil::checkInt64($var); + $this->min_length = $var; + + return $this; + } + + /** + * Optional. Maximum length of the Type.STRING + * + * Generated from protobuf field int64 max_length = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getMaxLength() + { + return $this->max_length; + } + + /** + * Optional. Maximum length of the Type.STRING + * + * Generated from protobuf field int64 max_length = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setMaxLength($var) + { + GPBUtil::checkInt64($var); + $this->max_length = $var; + + return $this; + } + + /** + * Optional. Pattern of the Type.STRING to restrict a string to a regular + * expression. + * + * Generated from protobuf field string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPattern() + { + return $this->pattern; + } + + /** + * Optional. Pattern of the Type.STRING to restrict a string to a regular + * expression. + * + * Generated from protobuf field string pattern = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPattern($var) + { + GPBUtil::checkString($var, True); + $this->pattern = $var; + + return $this; + } + /** * Optional. Example of the object. Will only populated when the object is the * root. diff --git a/AiPlatform/src/V1/ServiceAccountSpec.php b/AiPlatform/src/V1/ServiceAccountSpec.php new file mode 100644 index 000000000000..95c55ce9fbe5 --- /dev/null +++ b/AiPlatform/src/V1/ServiceAccountSpec.php @@ -0,0 +1,145 @@ +google.cloud.aiplatform.v1.ServiceAccountSpec + */ +class ServiceAccountSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Required. If true, custom user-managed service account is enforced to run + * any workloads (for example, Vertex Jobs) on the resource. Otherwise, uses + * the [Vertex AI Custom Code Service + * Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents). + * + * Generated from protobuf field bool enable_custom_service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $enable_custom_service_account = false; + /** + * Optional. Required when all below conditions are met + * * `enable_custom_service_account` is true; + * * any runtime is specified via `ResourceRuntimeSpec` on creation time, + * for example, Ray + * The users must have `iam.serviceAccounts.actAs` permission on this service + * account and then the specified runtime containers will run as it. + * Do not set this field if you want to submit jobs using custom service + * account to this PersistentResource after creation, but only specify the + * `service_account` inside the job. + * + * Generated from protobuf field string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $service_account = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_custom_service_account + * Required. If true, custom user-managed service account is enforced to run + * any workloads (for example, Vertex Jobs) on the resource. Otherwise, uses + * the [Vertex AI Custom Code Service + * Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents). + * @type string $service_account + * Optional. Required when all below conditions are met + * * `enable_custom_service_account` is true; + * * any runtime is specified via `ResourceRuntimeSpec` on creation time, + * for example, Ray + * The users must have `iam.serviceAccounts.actAs` permission on this service + * account and then the specified runtime containers will run as it. + * Do not set this field if you want to submit jobs using custom service + * account to this PersistentResource after creation, but only specify the + * `service_account` inside the job. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\PersistentResource::initOnce(); + parent::__construct($data); + } + + /** + * Required. If true, custom user-managed service account is enforced to run + * any workloads (for example, Vertex Jobs) on the resource. Otherwise, uses + * the [Vertex AI Custom Code Service + * Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents). + * + * Generated from protobuf field bool enable_custom_service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return bool + */ + public function getEnableCustomServiceAccount() + { + return $this->enable_custom_service_account; + } + + /** + * Required. If true, custom user-managed service account is enforced to run + * any workloads (for example, Vertex Jobs) on the resource. Otherwise, uses + * the [Vertex AI Custom Code Service + * Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents). + * + * Generated from protobuf field bool enable_custom_service_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param bool $var + * @return $this + */ + public function setEnableCustomServiceAccount($var) + { + GPBUtil::checkBool($var); + $this->enable_custom_service_account = $var; + + return $this; + } + + /** + * Optional. Required when all below conditions are met + * * `enable_custom_service_account` is true; + * * any runtime is specified via `ResourceRuntimeSpec` on creation time, + * for example, Ray + * The users must have `iam.serviceAccounts.actAs` permission on this service + * account and then the specified runtime containers will run as it. + * Do not set this field if you want to submit jobs using custom service + * account to this PersistentResource after creation, but only specify the + * `service_account` inside the job. + * + * Generated from protobuf field string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Optional. Required when all below conditions are met + * * `enable_custom_service_account` is true; + * * any runtime is specified via `ResourceRuntimeSpec` on creation time, + * for example, Ray + * The users must have `iam.serviceAccounts.actAs` permission on this service + * account and then the specified runtime containers will run as it. + * Do not set this field if you want to submit jobs using custom service + * account to this PersistentResource after creation, but only specify the + * `service_account` inside the job. + * + * Generated from protobuf field string service_account = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/ShieldedVmConfig.php b/AiPlatform/src/V1/ShieldedVmConfig.php new file mode 100644 index 000000000000..fda7ed22871d --- /dev/null +++ b/AiPlatform/src/V1/ShieldedVmConfig.php @@ -0,0 +1,89 @@ +google.cloud.aiplatform.v1.ShieldedVmConfig + */ +class ShieldedVmConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Defines whether the instance has [Secure + * Boot](https://cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot) + * enabled. + * Secure Boot helps ensure that the system only runs authentic software by + * verifying the digital signature of all boot components, and halting the + * boot process if signature verification fails. + * + * Generated from protobuf field bool enable_secure_boot = 1; + */ + private $enable_secure_boot = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_secure_boot + * Defines whether the instance has [Secure + * Boot](https://cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot) + * enabled. + * Secure Boot helps ensure that the system only runs authentic software by + * verifying the digital signature of all boot components, and halting the + * boot process if signature verification fails. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\MachineResources::initOnce(); + parent::__construct($data); + } + + /** + * Defines whether the instance has [Secure + * Boot](https://cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot) + * enabled. + * Secure Boot helps ensure that the system only runs authentic software by + * verifying the digital signature of all boot components, and halting the + * boot process if signature verification fails. + * + * Generated from protobuf field bool enable_secure_boot = 1; + * @return bool + */ + public function getEnableSecureBoot() + { + return $this->enable_secure_boot; + } + + /** + * Defines whether the instance has [Secure + * Boot](https://cloud.google.com/compute/shielded-vm/docs/shielded-vm#secure-boot) + * enabled. + * Secure Boot helps ensure that the system only runs authentic software by + * verifying the digital signature of all boot components, and halting the + * boot process if signature verification fails. + * + * Generated from protobuf field bool enable_secure_boot = 1; + * @param bool $var + * @return $this + */ + public function setEnableSecureBoot($var) + { + GPBUtil::checkBool($var); + $this->enable_secure_boot = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/StartNotebookRuntimeOperationMetadata.php b/AiPlatform/src/V1/StartNotebookRuntimeOperationMetadata.php new file mode 100644 index 000000000000..7a7a00690d7a --- /dev/null +++ b/AiPlatform/src/V1/StartNotebookRuntimeOperationMetadata.php @@ -0,0 +1,116 @@ +google.cloud.aiplatform.v1.StartNotebookRuntimeOperationMetadata + */ +class StartNotebookRuntimeOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The operation generic information. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private $generic_metadata = null; + /** + * A human-readable message that shows the intermediate progress details of + * NotebookRuntime. + * + * Generated from protobuf field string progress_message = 2; + */ + private $progress_message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\GenericOperationMetadata $generic_metadata + * The operation generic information. + * @type string $progress_message + * A human-readable message that shows the intermediate progress details of + * NotebookRuntime. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\NotebookService::initOnce(); + parent::__construct($data); + } + + /** + * The operation generic information. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * @return \Google\Cloud\AIPlatform\V1\GenericOperationMetadata|null + */ + public function getGenericMetadata() + { + return $this->generic_metadata; + } + + public function hasGenericMetadata() + { + return isset($this->generic_metadata); + } + + public function clearGenericMetadata() + { + unset($this->generic_metadata); + } + + /** + * The operation generic information. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * @param \Google\Cloud\AIPlatform\V1\GenericOperationMetadata $var + * @return $this + */ + public function setGenericMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GenericOperationMetadata::class); + $this->generic_metadata = $var; + + return $this; + } + + /** + * A human-readable message that shows the intermediate progress details of + * NotebookRuntime. + * + * Generated from protobuf field string progress_message = 2; + * @return string + */ + public function getProgressMessage() + { + return $this->progress_message; + } + + /** + * A human-readable message that shows the intermediate progress details of + * NotebookRuntime. + * + * Generated from protobuf field string progress_message = 2; + * @param string $var + * @return $this + */ + public function setProgressMessage($var) + { + GPBUtil::checkString($var, True); + $this->progress_message = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/StartNotebookRuntimeRequest.php b/AiPlatform/src/V1/StartNotebookRuntimeRequest.php new file mode 100644 index 000000000000..97757ea4bab6 --- /dev/null +++ b/AiPlatform/src/V1/StartNotebookRuntimeRequest.php @@ -0,0 +1,97 @@ +google.cloud.aiplatform.v1.StartNotebookRuntimeRequest + */ +class StartNotebookRuntimeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the NotebookRuntime resource to be started. + * Instead of checking whether the name is in valid NotebookRuntime resource + * name format, directly throw NotFound exception if there is no such + * NotebookRuntime in spanner. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $name = ''; + + /** + * @param string $name Required. The name of the NotebookRuntime resource to be started. + * Instead of checking whether the name is in valid NotebookRuntime resource + * name format, directly throw NotFound exception if there is no such + * NotebookRuntime in spanner. Please see + * {@see NotebookServiceClient::notebookRuntimeName()} for help formatting this field. + * + * @return \Google\Cloud\AIPlatform\V1\StartNotebookRuntimeRequest + * + * @experimental + */ + public static function 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 NotebookRuntime resource to be started. + * Instead of checking whether the name is in valid NotebookRuntime resource + * name format, directly throw NotFound exception if there is no such + * NotebookRuntime in spanner. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\NotebookService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the NotebookRuntime resource to be started. + * Instead of checking whether the name is in valid NotebookRuntime resource + * name format, directly throw NotFound exception if there is no such + * NotebookRuntime in spanner. + * + * Generated from 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 NotebookRuntime resource to be started. + * Instead of checking whether the name is in valid NotebookRuntime resource + * name format, directly throw NotFound exception if there is no such + * NotebookRuntime in spanner. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/StartNotebookRuntimeResponse.php b/AiPlatform/src/V1/StartNotebookRuntimeResponse.php new file mode 100644 index 000000000000..14872566c9f6 --- /dev/null +++ b/AiPlatform/src/V1/StartNotebookRuntimeResponse.php @@ -0,0 +1,34 @@ +google.cloud.aiplatform.v1.StartNotebookRuntimeResponse + */ +class StartNotebookRuntimeResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\NotebookService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AiPlatform/src/V1/SupervisedHyperParameters.php b/AiPlatform/src/V1/SupervisedHyperParameters.php new file mode 100644 index 000000000000..2399d0e50cc1 --- /dev/null +++ b/AiPlatform/src/V1/SupervisedHyperParameters.php @@ -0,0 +1,135 @@ +google.cloud.aiplatform.v1.SupervisedHyperParameters + */ +class SupervisedHyperParameters extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Number of training epoches for this tuning job. + * + * Generated from protobuf field int64 epoch_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $epoch_count = 0; + /** + * Optional. Learning rate multiplier for tuning. + * + * Generated from protobuf field double learning_rate_multiplier = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $learning_rate_multiplier = 0.0; + /** + * Optional. Adapter size for tuning. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize adapter_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $adapter_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $epoch_count + * Optional. Number of training epoches for this tuning job. + * @type float $learning_rate_multiplier + * Optional. Learning rate multiplier for tuning. + * @type int $adapter_size + * Optional. Adapter size for tuning. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\TuningJob::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Number of training epoches for this tuning job. + * + * Generated from protobuf field int64 epoch_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getEpochCount() + { + return $this->epoch_count; + } + + /** + * Optional. Number of training epoches for this tuning job. + * + * Generated from protobuf field int64 epoch_count = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setEpochCount($var) + { + GPBUtil::checkInt64($var); + $this->epoch_count = $var; + + return $this; + } + + /** + * Optional. Learning rate multiplier for tuning. + * + * Generated from protobuf field double learning_rate_multiplier = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getLearningRateMultiplier() + { + return $this->learning_rate_multiplier; + } + + /** + * Optional. Learning rate multiplier for tuning. + * + * Generated from protobuf field double learning_rate_multiplier = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setLearningRateMultiplier($var) + { + GPBUtil::checkDouble($var); + $this->learning_rate_multiplier = $var; + + return $this; + } + + /** + * Optional. Adapter size for tuning. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize adapter_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getAdapterSize() + { + return $this->adapter_size; + } + + /** + * Optional. Adapter size for tuning. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize adapter_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setAdapterSize($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\SupervisedHyperParameters\AdapterSize::class); + $this->adapter_size = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/SupervisedHyperParameters/AdapterSize.php b/AiPlatform/src/V1/SupervisedHyperParameters/AdapterSize.php new file mode 100644 index 000000000000..98aa6491495c --- /dev/null +++ b/AiPlatform/src/V1/SupervisedHyperParameters/AdapterSize.php @@ -0,0 +1,76 @@ +google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize + */ +class AdapterSize +{ + /** + * Adapter size is unspecified. + * + * Generated from protobuf enum ADAPTER_SIZE_UNSPECIFIED = 0; + */ + const ADAPTER_SIZE_UNSPECIFIED = 0; + /** + * Adapter size 1. + * + * Generated from protobuf enum ADAPTER_SIZE_ONE = 1; + */ + const ADAPTER_SIZE_ONE = 1; + /** + * Adapter size 4. + * + * Generated from protobuf enum ADAPTER_SIZE_FOUR = 2; + */ + const ADAPTER_SIZE_FOUR = 2; + /** + * Adapter size 8. + * + * Generated from protobuf enum ADAPTER_SIZE_EIGHT = 3; + */ + const ADAPTER_SIZE_EIGHT = 3; + /** + * Adapter size 16. + * + * Generated from protobuf enum ADAPTER_SIZE_SIXTEEN = 4; + */ + const ADAPTER_SIZE_SIXTEEN = 4; + + private static $valueToName = [ + self::ADAPTER_SIZE_UNSPECIFIED => 'ADAPTER_SIZE_UNSPECIFIED', + self::ADAPTER_SIZE_ONE => 'ADAPTER_SIZE_ONE', + self::ADAPTER_SIZE_FOUR => 'ADAPTER_SIZE_FOUR', + self::ADAPTER_SIZE_EIGHT => 'ADAPTER_SIZE_EIGHT', + self::ADAPTER_SIZE_SIXTEEN => 'ADAPTER_SIZE_SIXTEEN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AiPlatform/src/V1/SupervisedTuningDataStats.php b/AiPlatform/src/V1/SupervisedTuningDataStats.php new file mode 100644 index 000000000000..d7113531c2b1 --- /dev/null +++ b/AiPlatform/src/V1/SupervisedTuningDataStats.php @@ -0,0 +1,335 @@ +google.cloud.aiplatform.v1.SupervisedTuningDataStats + */ +class SupervisedTuningDataStats extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Number of examples in the tuning dataset. + * + * Generated from protobuf field int64 tuning_dataset_example_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $tuning_dataset_example_count = 0; + /** + * Output only. Number of tuning characters in the tuning dataset. + * + * Generated from protobuf field int64 total_tuning_character_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $total_tuning_character_count = 0; + /** + * Output only. Number of billable characters in the tuning dataset. + * + * Generated from protobuf field int64 total_billable_character_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $total_billable_character_count = 0; + /** + * Output only. Number of tuning steps for this Tuning Job. + * + * Generated from protobuf field int64 tuning_step_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $tuning_step_count = 0; + /** + * Output only. Dataset distributions for the user input tokens. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $user_input_token_distribution = null; + /** + * Output only. Dataset distributions for the user output tokens. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $user_output_token_distribution = null; + /** + * Output only. Dataset distributions for the messages per example. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $user_message_per_example_distribution = null; + /** + * Output only. Sample user messages in the training dataset uri. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $user_dataset_examples; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $tuning_dataset_example_count + * Output only. Number of examples in the tuning dataset. + * @type int|string $total_tuning_character_count + * Output only. Number of tuning characters in the tuning dataset. + * @type int|string $total_billable_character_count + * Output only. Number of billable characters in the tuning dataset. + * @type int|string $tuning_step_count + * Output only. Number of tuning steps for this Tuning Job. + * @type \Google\Cloud\AIPlatform\V1\SupervisedTuningDatasetDistribution $user_input_token_distribution + * Output only. Dataset distributions for the user input tokens. + * @type \Google\Cloud\AIPlatform\V1\SupervisedTuningDatasetDistribution $user_output_token_distribution + * Output only. Dataset distributions for the user output tokens. + * @type \Google\Cloud\AIPlatform\V1\SupervisedTuningDatasetDistribution $user_message_per_example_distribution + * Output only. Dataset distributions for the messages per example. + * @type array<\Google\Cloud\AIPlatform\V1\Content>|\Google\Protobuf\Internal\RepeatedField $user_dataset_examples + * Output only. Sample user messages in the training dataset uri. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\TuningJob::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Number of examples in the tuning dataset. + * + * Generated from protobuf field int64 tuning_dataset_example_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getTuningDatasetExampleCount() + { + return $this->tuning_dataset_example_count; + } + + /** + * Output only. Number of examples in the tuning dataset. + * + * Generated from protobuf field int64 tuning_dataset_example_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setTuningDatasetExampleCount($var) + { + GPBUtil::checkInt64($var); + $this->tuning_dataset_example_count = $var; + + return $this; + } + + /** + * Output only. Number of tuning characters in the tuning dataset. + * + * Generated from protobuf field int64 total_tuning_character_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getTotalTuningCharacterCount() + { + return $this->total_tuning_character_count; + } + + /** + * Output only. Number of tuning characters in the tuning dataset. + * + * Generated from protobuf field int64 total_tuning_character_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setTotalTuningCharacterCount($var) + { + GPBUtil::checkInt64($var); + $this->total_tuning_character_count = $var; + + return $this; + } + + /** + * Output only. Number of billable characters in the tuning dataset. + * + * Generated from protobuf field int64 total_billable_character_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getTotalBillableCharacterCount() + { + return $this->total_billable_character_count; + } + + /** + * Output only. Number of billable characters in the tuning dataset. + * + * Generated from protobuf field int64 total_billable_character_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setTotalBillableCharacterCount($var) + { + GPBUtil::checkInt64($var); + $this->total_billable_character_count = $var; + + return $this; + } + + /** + * Output only. Number of tuning steps for this Tuning Job. + * + * Generated from protobuf field int64 tuning_step_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getTuningStepCount() + { + return $this->tuning_step_count; + } + + /** + * Output only. Number of tuning steps for this Tuning Job. + * + * Generated from protobuf field int64 tuning_step_count = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setTuningStepCount($var) + { + GPBUtil::checkInt64($var); + $this->tuning_step_count = $var; + + return $this; + } + + /** + * Output only. Dataset distributions for the user input tokens. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AIPlatform\V1\SupervisedTuningDatasetDistribution|null + */ + public function getUserInputTokenDistribution() + { + return $this->user_input_token_distribution; + } + + public function hasUserInputTokenDistribution() + { + return isset($this->user_input_token_distribution); + } + + public function clearUserInputTokenDistribution() + { + unset($this->user_input_token_distribution); + } + + /** + * Output only. Dataset distributions for the user input tokens. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_input_token_distribution = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AIPlatform\V1\SupervisedTuningDatasetDistribution $var + * @return $this + */ + public function setUserInputTokenDistribution($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SupervisedTuningDatasetDistribution::class); + $this->user_input_token_distribution = $var; + + return $this; + } + + /** + * Output only. Dataset distributions for the user output tokens. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AIPlatform\V1\SupervisedTuningDatasetDistribution|null + */ + public function getUserOutputTokenDistribution() + { + return $this->user_output_token_distribution; + } + + public function hasUserOutputTokenDistribution() + { + return isset($this->user_output_token_distribution); + } + + public function clearUserOutputTokenDistribution() + { + unset($this->user_output_token_distribution); + } + + /** + * Output only. Dataset distributions for the user output tokens. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_output_token_distribution = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AIPlatform\V1\SupervisedTuningDatasetDistribution $var + * @return $this + */ + public function setUserOutputTokenDistribution($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SupervisedTuningDatasetDistribution::class); + $this->user_output_token_distribution = $var; + + return $this; + } + + /** + * Output only. Dataset distributions for the messages per example. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AIPlatform\V1\SupervisedTuningDatasetDistribution|null + */ + public function getUserMessagePerExampleDistribution() + { + return $this->user_message_per_example_distribution; + } + + public function hasUserMessagePerExampleDistribution() + { + return isset($this->user_message_per_example_distribution); + } + + public function clearUserMessagePerExampleDistribution() + { + unset($this->user_message_per_example_distribution); + } + + /** + * Output only. Dataset distributions for the messages per example. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution user_message_per_example_distribution = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AIPlatform\V1\SupervisedTuningDatasetDistribution $var + * @return $this + */ + public function setUserMessagePerExampleDistribution($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SupervisedTuningDatasetDistribution::class); + $this->user_message_per_example_distribution = $var; + + return $this; + } + + /** + * Output only. Sample user messages in the training dataset uri. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUserDatasetExamples() + { + return $this->user_dataset_examples; + } + + /** + * Output only. Sample user messages in the training dataset uri. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.Content user_dataset_examples = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\AIPlatform\V1\Content>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUserDatasetExamples($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\Content::class); + $this->user_dataset_examples = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/SupervisedTuningDatasetDistribution.php b/AiPlatform/src/V1/SupervisedTuningDatasetDistribution.php new file mode 100644 index 000000000000..8e10df2eaa4b --- /dev/null +++ b/AiPlatform/src/V1/SupervisedTuningDatasetDistribution.php @@ -0,0 +1,305 @@ +google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution + */ +class SupervisedTuningDatasetDistribution extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Sum of a given population of values. + * + * Generated from protobuf field int64 sum = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $sum = 0; + /** + * Output only. The minimum of the population values. + * + * Generated from protobuf field double min = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $min = 0.0; + /** + * Output only. The maximum of the population values. + * + * Generated from protobuf field double max = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $max = 0.0; + /** + * Output only. The arithmetic mean of the values in the population. + * + * Generated from protobuf field double mean = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $mean = 0.0; + /** + * Output only. The median of the values in the population. + * + * Generated from protobuf field double median = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $median = 0.0; + /** + * Output only. The 5th percentile of the values in the population. + * + * Generated from protobuf field double p5 = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $p5 = 0.0; + /** + * Output only. The 95th percentile of the values in the population. + * + * Generated from protobuf field double p95 = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $p95 = 0.0; + /** + * Output only. Defines the histogram bucket. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $buckets; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $sum + * Output only. Sum of a given population of values. + * @type float $min + * Output only. The minimum of the population values. + * @type float $max + * Output only. The maximum of the population values. + * @type float $mean + * Output only. The arithmetic mean of the values in the population. + * @type float $median + * Output only. The median of the values in the population. + * @type float $p5 + * Output only. The 5th percentile of the values in the population. + * @type float $p95 + * Output only. The 95th percentile of the values in the population. + * @type array<\Google\Cloud\AIPlatform\V1\SupervisedTuningDatasetDistribution\DatasetBucket>|\Google\Protobuf\Internal\RepeatedField $buckets + * Output only. Defines the histogram bucket. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\TuningJob::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Sum of a given population of values. + * + * Generated from protobuf field int64 sum = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getSum() + { + return $this->sum; + } + + /** + * Output only. Sum of a given population of values. + * + * Generated from protobuf field int64 sum = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setSum($var) + { + GPBUtil::checkInt64($var); + $this->sum = $var; + + return $this; + } + + /** + * Output only. The minimum of the population values. + * + * Generated from protobuf field double min = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getMin() + { + return $this->min; + } + + /** + * Output only. The minimum of the population values. + * + * Generated from protobuf field double min = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setMin($var) + { + GPBUtil::checkDouble($var); + $this->min = $var; + + return $this; + } + + /** + * Output only. The maximum of the population values. + * + * Generated from protobuf field double max = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getMax() + { + return $this->max; + } + + /** + * Output only. The maximum of the population values. + * + * Generated from protobuf field double max = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setMax($var) + { + GPBUtil::checkDouble($var); + $this->max = $var; + + return $this; + } + + /** + * Output only. The arithmetic mean of the values in the population. + * + * Generated from protobuf field double mean = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getMean() + { + return $this->mean; + } + + /** + * Output only. The arithmetic mean of the values in the population. + * + * Generated from protobuf field double mean = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setMean($var) + { + GPBUtil::checkDouble($var); + $this->mean = $var; + + return $this; + } + + /** + * Output only. The median of the values in the population. + * + * Generated from protobuf field double median = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getMedian() + { + return $this->median; + } + + /** + * Output only. The median of the values in the population. + * + * Generated from protobuf field double median = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setMedian($var) + { + GPBUtil::checkDouble($var); + $this->median = $var; + + return $this; + } + + /** + * Output only. The 5th percentile of the values in the population. + * + * Generated from protobuf field double p5 = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getP5() + { + return $this->p5; + } + + /** + * Output only. The 5th percentile of the values in the population. + * + * Generated from protobuf field double p5 = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setP5($var) + { + GPBUtil::checkDouble($var); + $this->p5 = $var; + + return $this; + } + + /** + * Output only. The 95th percentile of the values in the population. + * + * Generated from protobuf field double p95 = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getP95() + { + return $this->p95; + } + + /** + * Output only. The 95th percentile of the values in the population. + * + * Generated from protobuf field double p95 = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setP95($var) + { + GPBUtil::checkDouble($var); + $this->p95 = $var; + + return $this; + } + + /** + * Output only. Defines the histogram bucket. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getBuckets() + { + return $this->buckets; + } + + /** + * Output only. Defines the histogram bucket. + * + * Generated from protobuf field repeated .google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket buckets = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\AIPlatform\V1\SupervisedTuningDatasetDistribution\DatasetBucket>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setBuckets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\SupervisedTuningDatasetDistribution\DatasetBucket::class); + $this->buckets = $arr; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/SupervisedTuningDatasetDistribution/DatasetBucket.php b/AiPlatform/src/V1/SupervisedTuningDatasetDistribution/DatasetBucket.php new file mode 100644 index 000000000000..ef958607e6e5 --- /dev/null +++ b/AiPlatform/src/V1/SupervisedTuningDatasetDistribution/DatasetBucket.php @@ -0,0 +1,137 @@ +google.cloud.aiplatform.v1.SupervisedTuningDatasetDistribution.DatasetBucket + */ +class DatasetBucket extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Number of values in the bucket. + * + * Generated from protobuf field double count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $count = 0.0; + /** + * Output only. Left bound of the bucket. + * + * Generated from protobuf field double left = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $left = 0.0; + /** + * Output only. Right bound of the bucket. + * + * Generated from protobuf field double right = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $right = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $count + * Output only. Number of values in the bucket. + * @type float $left + * Output only. Left bound of the bucket. + * @type float $right + * Output only. Right bound of the bucket. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\TuningJob::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Number of values in the bucket. + * + * Generated from protobuf field double count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getCount() + { + return $this->count; + } + + /** + * Output only. Number of values in the bucket. + * + * Generated from protobuf field double count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkDouble($var); + $this->count = $var; + + return $this; + } + + /** + * Output only. Left bound of the bucket. + * + * Generated from protobuf field double left = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getLeft() + { + return $this->left; + } + + /** + * Output only. Left bound of the bucket. + * + * Generated from protobuf field double left = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setLeft($var) + { + GPBUtil::checkDouble($var); + $this->left = $var; + + return $this; + } + + /** + * Output only. Right bound of the bucket. + * + * Generated from protobuf field double right = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getRight() + { + return $this->right; + } + + /** + * Output only. Right bound of the bucket. + * + * Generated from protobuf field double right = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setRight($var) + { + GPBUtil::checkDouble($var); + $this->right = $var; + + return $this; + } + +} + + diff --git a/AiPlatform/src/V1/SupervisedTuningSpec.php b/AiPlatform/src/V1/SupervisedTuningSpec.php new file mode 100644 index 000000000000..3964310e38fd --- /dev/null +++ b/AiPlatform/src/V1/SupervisedTuningSpec.php @@ -0,0 +1,153 @@ +google.cloud.aiplatform.v1.SupervisedTuningSpec + */ +class SupervisedTuningSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Cloud Storage path to file containing training dataset for + * tuning. + * + * Generated from protobuf field string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $training_dataset_uri = ''; + /** + * Optional. Cloud Storage path to file containing validation dataset for + * tuning. + * + * Generated from protobuf field string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $validation_dataset_uri = ''; + /** + * Optional. Hyperparameters for SFT. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $hyper_parameters = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $training_dataset_uri + * Required. Cloud Storage path to file containing training dataset for + * tuning. + * @type string $validation_dataset_uri + * Optional. Cloud Storage path to file containing validation dataset for + * tuning. + * @type \Google\Cloud\AIPlatform\V1\SupervisedHyperParameters $hyper_parameters + * Optional. Hyperparameters for SFT. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\TuningJob::initOnce(); + parent::__construct($data); + } + + /** + * Required. Cloud Storage path to file containing training dataset for + * tuning. + * + * Generated from protobuf field string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTrainingDatasetUri() + { + return $this->training_dataset_uri; + } + + /** + * Required. Cloud Storage path to file containing training dataset for + * tuning. + * + * Generated from protobuf field string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTrainingDatasetUri($var) + { + GPBUtil::checkString($var, True); + $this->training_dataset_uri = $var; + + return $this; + } + + /** + * Optional. Cloud Storage path to file containing validation dataset for + * tuning. + * + * Generated from protobuf field string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getValidationDatasetUri() + { + return $this->validation_dataset_uri; + } + + /** + * Optional. Cloud Storage path to file containing validation dataset for + * tuning. + * + * Generated from protobuf field string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setValidationDatasetUri($var) + { + GPBUtil::checkString($var, True); + $this->validation_dataset_uri = $var; + + return $this; + } + + /** + * Optional. Hyperparameters for SFT. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\AIPlatform\V1\SupervisedHyperParameters|null + */ + public function getHyperParameters() + { + return $this->hyper_parameters; + } + + public function hasHyperParameters() + { + return isset($this->hyper_parameters); + } + + public function clearHyperParameters() + { + unset($this->hyper_parameters); + } + + /** + * Optional. Hyperparameters for SFT. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SupervisedHyperParameters hyper_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\AIPlatform\V1\SupervisedHyperParameters $var + * @return $this + */ + public function setHyperParameters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SupervisedHyperParameters::class); + $this->hyper_parameters = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/TunedModel.php b/AiPlatform/src/V1/TunedModel.php new file mode 100644 index 000000000000..e96cfa85de86 --- /dev/null +++ b/AiPlatform/src/V1/TunedModel.php @@ -0,0 +1,110 @@ +google.cloud.aiplatform.v1.TunedModel + */ +class TunedModel extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the TunedModel. Format: + * `projects/{project}/locations/{location}/models/{model}`. + * + * Generated from protobuf field string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + private $model = ''; + /** + * Output only. A resource name of an Endpoint. Format: + * `projects/{project}/locations/{location}/endpoints/{endpoint}`. + * + * Generated from protobuf field string endpoint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + private $endpoint = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $model + * Output only. The resource name of the TunedModel. Format: + * `projects/{project}/locations/{location}/models/{model}`. + * @type string $endpoint + * Output only. A resource name of an Endpoint. Format: + * `projects/{project}/locations/{location}/endpoints/{endpoint}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\TuningJob::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the TunedModel. Format: + * `projects/{project}/locations/{location}/models/{model}`. + * + * Generated from protobuf field string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * Output only. The resource name of the TunedModel. Format: + * `projects/{project}/locations/{location}/models/{model}`. + * + * Generated from protobuf field string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkString($var, True); + $this->model = $var; + + return $this; + } + + /** + * Output only. A resource name of an Endpoint. Format: + * `projects/{project}/locations/{location}/endpoints/{endpoint}`. + * + * Generated from protobuf field string endpoint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getEndpoint() + { + return $this->endpoint; + } + + /** + * Output only. A resource name of an Endpoint. Format: + * `projects/{project}/locations/{location}/endpoints/{endpoint}`. + * + * Generated from protobuf field string endpoint = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->endpoint = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/TuningDataStats.php b/AiPlatform/src/V1/TuningDataStats.php new file mode 100644 index 000000000000..6ec1dc045e5b --- /dev/null +++ b/AiPlatform/src/V1/TuningDataStats.php @@ -0,0 +1,76 @@ +google.cloud.aiplatform.v1.TuningDataStats + */ +class TuningDataStats extends \Google\Protobuf\Internal\Message +{ + protected $tuning_data_stats; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\SupervisedTuningDataStats $supervised_tuning_data_stats + * The SFT Tuning data stats. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\TuningJob::initOnce(); + parent::__construct($data); + } + + /** + * The SFT Tuning data stats. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * @return \Google\Cloud\AIPlatform\V1\SupervisedTuningDataStats|null + */ + public function getSupervisedTuningDataStats() + { + return $this->readOneof(1); + } + + public function hasSupervisedTuningDataStats() + { + return $this->hasOneof(1); + } + + /** + * The SFT Tuning data stats. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SupervisedTuningDataStats supervised_tuning_data_stats = 1; + * @param \Google\Cloud\AIPlatform\V1\SupervisedTuningDataStats $var + * @return $this + */ + public function setSupervisedTuningDataStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SupervisedTuningDataStats::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getTuningDataStats() + { + return $this->whichOneof("tuning_data_stats"); + } + +} + diff --git a/AiPlatform/src/V1/TuningJob.php b/AiPlatform/src/V1/TuningJob.php new file mode 100644 index 000000000000..60e01bd7b5ea --- /dev/null +++ b/AiPlatform/src/V1/TuningJob.php @@ -0,0 +1,717 @@ +google.cloud.aiplatform.v1.TuningJob + */ +class TuningJob extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Identifier. Resource name of a TuningJob. Format: + * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $name = ''; + /** + * Optional. The display name of the + * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to + * 128 characters long and can consist of any UTF-8 characters. + * + * Generated from protobuf field string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $tuned_model_display_name = ''; + /** + * Optional. The description of the + * [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $description = ''; + /** + * Output only. The detailed state of the job. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $state = 0; + /** + * Output only. Time when the + * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $create_time = null; + /** + * Output only. Time when the + * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time + * entered the `JOB_STATE_RUNNING` state. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $start_time = null; + /** + * Output only. Time when the TuningJob entered any of the following + * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`, + * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $end_time = null; + /** + * Output only. Time when the + * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently + * updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $update_time = null; + /** + * Output only. Only populated when job's state is `JOB_STATE_FAILED` or + * `JOB_STATE_CANCELLED`. + * + * Generated from protobuf field .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $error = null; + /** + * Optional. The labels with user-defined metadata to organize + * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources + * such as [Model][google.cloud.aiplatform.v1.Model] and + * [Endpoint][google.cloud.aiplatform.v1.Endpoint]. + * Label keys and values can be no longer than 64 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * See https://goo.gl/xmQnxf for more information and examples of labels. + * + * Generated from protobuf field map labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Output only. The Experiment associated with this + * [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + * + * Generated from protobuf field string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + private $experiment = ''; + /** + * Output only. The tuned model resources assiociated with this + * [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $tuned_model = null; + /** + * Output only. The tuning data statistics associated with this + * [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $tuning_data_stats = null; + protected $source_model; + protected $tuning_spec; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $base_model + * Model name for tuning, e.g., "gemini-1.0-pro-002". + * @type \Google\Cloud\AIPlatform\V1\SupervisedTuningSpec $supervised_tuning_spec + * Tuning Spec for Supervised Fine Tuning. + * @type string $name + * Output only. Identifier. Resource name of a TuningJob. Format: + * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + * @type string $tuned_model_display_name + * Optional. The display name of the + * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to + * 128 characters long and can consist of any UTF-8 characters. + * @type string $description + * Optional. The description of the + * [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + * @type int $state + * Output only. The detailed state of the job. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Time when the + * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. Time when the + * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time + * entered the `JOB_STATE_RUNNING` state. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. Time when the TuningJob entered any of the following + * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`, + * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Time when the + * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently + * updated. + * @type \Google\Rpc\Status $error + * Output only. Only populated when job's state is `JOB_STATE_FAILED` or + * `JOB_STATE_CANCELLED`. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels with user-defined metadata to organize + * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources + * such as [Model][google.cloud.aiplatform.v1.Model] and + * [Endpoint][google.cloud.aiplatform.v1.Endpoint]. + * Label keys and values can be no longer than 64 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * See https://goo.gl/xmQnxf for more information and examples of labels. + * @type string $experiment + * Output only. The Experiment associated with this + * [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + * @type \Google\Cloud\AIPlatform\V1\TunedModel $tuned_model + * Output only. The tuned model resources assiociated with this + * [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + * @type \Google\Cloud\AIPlatform\V1\TuningDataStats $tuning_data_stats + * Output only. The tuning data statistics associated with this + * [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\TuningJob::initOnce(); + parent::__construct($data); + } + + /** + * Model name for tuning, e.g., "gemini-1.0-pro-002". + * + * Generated from protobuf field string base_model = 4; + * @return string + */ + public function getBaseModel() + { + return $this->readOneof(4); + } + + public function hasBaseModel() + { + return $this->hasOneof(4); + } + + /** + * Model name for tuning, e.g., "gemini-1.0-pro-002". + * + * Generated from protobuf field string base_model = 4; + * @param string $var + * @return $this + */ + public function setBaseModel($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Tuning Spec for Supervised Fine Tuning. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SupervisedTuningSpec supervised_tuning_spec = 5; + * @return \Google\Cloud\AIPlatform\V1\SupervisedTuningSpec|null + */ + public function getSupervisedTuningSpec() + { + return $this->readOneof(5); + } + + public function hasSupervisedTuningSpec() + { + return $this->hasOneof(5); + } + + /** + * Tuning Spec for Supervised Fine Tuning. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.SupervisedTuningSpec supervised_tuning_spec = 5; + * @param \Google\Cloud\AIPlatform\V1\SupervisedTuningSpec $var + * @return $this + */ + public function setSupervisedTuningSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SupervisedTuningSpec::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Output only. Identifier. Resource name of a TuningJob. Format: + * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Identifier. Resource name of a TuningJob. Format: + * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The display name of the + * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to + * 128 characters long and can consist of any UTF-8 characters. + * + * Generated from protobuf field string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getTunedModelDisplayName() + { + return $this->tuned_model_display_name; + } + + /** + * Optional. The display name of the + * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to + * 128 characters long and can consist of any UTF-8 characters. + * + * Generated from protobuf field string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setTunedModelDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->tuned_model_display_name = $var; + + return $this; + } + + /** + * Optional. The description of the + * [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. The description of the + * [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The detailed state of the job. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The detailed state of the job. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\JobState::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Time when the + * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Time when the + * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Time when the + * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time + * entered the `JOB_STATE_RUNNING` state. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Output only. Time when the + * [TuningJob][google.cloud.aiplatform.v1.TuningJob] for the first time + * entered the `JOB_STATE_RUNNING` state. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. Time when the TuningJob entered any of the following + * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`, + * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. Time when the TuningJob entered any of the following + * [JobStates][google.cloud.aiplatform.v1.JobState]: `JOB_STATE_SUCCEEDED`, + * `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, `JOB_STATE_EXPIRED`. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 9 [(.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. Time when the + * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently + * updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Time when the + * [TuningJob][google.cloud.aiplatform.v1.TuningJob] was most recently + * updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.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 populated when job's state is `JOB_STATE_FAILED` or + * `JOB_STATE_CANCELLED`. + * + * Generated from protobuf field .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Output only. Only populated when job's state is `JOB_STATE_FAILED` or + * `JOB_STATE_CANCELLED`. + * + * Generated from protobuf field .google.rpc.Status error = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->error = $var; + + return $this; + } + + /** + * Optional. The labels with user-defined metadata to organize + * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources + * such as [Model][google.cloud.aiplatform.v1.Model] and + * [Endpoint][google.cloud.aiplatform.v1.Endpoint]. + * Label keys and values can be no longer than 64 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * See https://goo.gl/xmQnxf for more information and examples of labels. + * + * Generated from protobuf field map labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels with user-defined metadata to organize + * [TuningJob][google.cloud.aiplatform.v1.TuningJob] and generated resources + * such as [Model][google.cloud.aiplatform.v1.Model] and + * [Endpoint][google.cloud.aiplatform.v1.Endpoint]. + * Label keys and values can be no longer than 64 characters + * (Unicode codepoints), can only contain lowercase letters, numeric + * characters, underscores and dashes. International characters are allowed. + * See https://goo.gl/xmQnxf for more information and examples of labels. + * + * Generated from protobuf field map labels = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. The Experiment associated with this + * [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + * + * Generated from protobuf field string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getExperiment() + { + return $this->experiment; + } + + /** + * Output only. The Experiment associated with this + * [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + * + * Generated from protobuf field string experiment = 13 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setExperiment($var) + { + GPBUtil::checkString($var, True); + $this->experiment = $var; + + return $this; + } + + /** + * Output only. The tuned model resources assiociated with this + * [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AIPlatform\V1\TunedModel|null + */ + public function getTunedModel() + { + return $this->tuned_model; + } + + public function hasTunedModel() + { + return isset($this->tuned_model); + } + + public function clearTunedModel() + { + unset($this->tuned_model); + } + + /** + * Output only. The tuned model resources assiociated with this + * [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.TunedModel tuned_model = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AIPlatform\V1\TunedModel $var + * @return $this + */ + public function setTunedModel($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\TunedModel::class); + $this->tuned_model = $var; + + return $this; + } + + /** + * Output only. The tuning data statistics associated with this + * [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\AIPlatform\V1\TuningDataStats|null + */ + public function getTuningDataStats() + { + return $this->tuning_data_stats; + } + + public function hasTuningDataStats() + { + return isset($this->tuning_data_stats); + } + + public function clearTuningDataStats() + { + unset($this->tuning_data_stats); + } + + /** + * Output only. The tuning data statistics associated with this + * [TuningJob][google.cloud.aiplatform.v1.TuningJob]. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.TuningDataStats tuning_data_stats = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\AIPlatform\V1\TuningDataStats $var + * @return $this + */ + public function setTuningDataStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\TuningDataStats::class); + $this->tuning_data_stats = $var; + + return $this; + } + + /** + * @return string + */ + public function getSourceModel() + { + return $this->whichOneof("source_model"); + } + + /** + * @return string + */ + public function getTuningSpec() + { + return $this->whichOneof("tuning_spec"); + } + +} + diff --git a/AiPlatform/src/V1/UpdatePersistentResourceOperationMetadata.php b/AiPlatform/src/V1/UpdatePersistentResourceOperationMetadata.php new file mode 100644 index 000000000000..bc3dd13eaf1f --- /dev/null +++ b/AiPlatform/src/V1/UpdatePersistentResourceOperationMetadata.php @@ -0,0 +1,111 @@ +google.cloud.aiplatform.v1.UpdatePersistentResourceOperationMetadata + */ +class UpdatePersistentResourceOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Operation metadata for PersistentResource. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private $generic_metadata = null; + /** + * Progress Message for Update LRO + * + * Generated from protobuf field string progress_message = 2; + */ + private $progress_message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\GenericOperationMetadata $generic_metadata + * Operation metadata for PersistentResource. + * @type string $progress_message + * Progress Message for Update LRO + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\PersistentResourceService::initOnce(); + parent::__construct($data); + } + + /** + * Operation metadata for PersistentResource. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * @return \Google\Cloud\AIPlatform\V1\GenericOperationMetadata|null + */ + public function getGenericMetadata() + { + return $this->generic_metadata; + } + + public function hasGenericMetadata() + { + return isset($this->generic_metadata); + } + + public function clearGenericMetadata() + { + unset($this->generic_metadata); + } + + /** + * Operation metadata for PersistentResource. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * @param \Google\Cloud\AIPlatform\V1\GenericOperationMetadata $var + * @return $this + */ + public function setGenericMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GenericOperationMetadata::class); + $this->generic_metadata = $var; + + return $this; + } + + /** + * Progress Message for Update LRO + * + * Generated from protobuf field string progress_message = 2; + * @return string + */ + public function getProgressMessage() + { + return $this->progress_message; + } + + /** + * Progress Message for Update LRO + * + * Generated from protobuf field string progress_message = 2; + * @param string $var + * @return $this + */ + public function setProgressMessage($var) + { + GPBUtil::checkString($var, True); + $this->progress_message = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/UpdatePersistentResourceRequest.php b/AiPlatform/src/V1/UpdatePersistentResourceRequest.php new file mode 100644 index 000000000000..8da87c571779 --- /dev/null +++ b/AiPlatform/src/V1/UpdatePersistentResourceRequest.php @@ -0,0 +1,157 @@ +google.cloud.aiplatform.v1.UpdatePersistentResourceRequest + */ +class UpdatePersistentResourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The PersistentResource to update. + * The PersistentResource's `name` field is used to identify the + * PersistentResource to update. Format: + * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}` + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $persistent_resource = null; + /** + * Required. Specify the fields to be overwritten in the PersistentResource by + * the update method. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $update_mask = null; + + /** + * @param \Google\Cloud\AIPlatform\V1\PersistentResource $persistentResource Required. The PersistentResource to update. + * + * The PersistentResource's `name` field is used to identify the + * PersistentResource to update. Format: + * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}` + * @param \Google\Protobuf\FieldMask $updateMask Required. Specify the fields to be overwritten in the PersistentResource by + * the update method. + * + * @return \Google\Cloud\AIPlatform\V1\UpdatePersistentResourceRequest + * + * @experimental + */ + public static function build(\Google\Cloud\AIPlatform\V1\PersistentResource $persistentResource, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setPersistentResource($persistentResource) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\PersistentResource $persistent_resource + * Required. The PersistentResource to update. + * The PersistentResource's `name` field is used to identify the + * PersistentResource to update. Format: + * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}` + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Specify the fields to be overwritten in the PersistentResource by + * the update method. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\PersistentResourceService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The PersistentResource to update. + * The PersistentResource's `name` field is used to identify the + * PersistentResource to update. Format: + * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}` + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\AIPlatform\V1\PersistentResource|null + */ + public function getPersistentResource() + { + return $this->persistent_resource; + } + + public function hasPersistentResource() + { + return isset($this->persistent_resource); + } + + public function clearPersistentResource() + { + unset($this->persistent_resource); + } + + /** + * Required. The PersistentResource to update. + * The PersistentResource's `name` field is used to identify the + * PersistentResource to update. Format: + * `projects/{project}/locations/{location}/persistentResources/{persistent_resource}` + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PersistentResource persistent_resource = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\AIPlatform\V1\PersistentResource $var + * @return $this + */ + public function setPersistentResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\PersistentResource::class); + $this->persistent_resource = $var; + + return $this; + } + + /** + * Required. Specify the fields to be overwritten in the PersistentResource by + * the update method. + * + * 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. Specify the fields to be overwritten in the PersistentResource by + * the update method. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/UpgradeNotebookRuntimeOperationMetadata.php b/AiPlatform/src/V1/UpgradeNotebookRuntimeOperationMetadata.php new file mode 100644 index 000000000000..79aef9cbfdcd --- /dev/null +++ b/AiPlatform/src/V1/UpgradeNotebookRuntimeOperationMetadata.php @@ -0,0 +1,116 @@ +google.cloud.aiplatform.v1.UpgradeNotebookRuntimeOperationMetadata + */ +class UpgradeNotebookRuntimeOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The operation generic information. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + private $generic_metadata = null; + /** + * A human-readable message that shows the intermediate progress details of + * NotebookRuntime. + * + * Generated from protobuf field string progress_message = 2; + */ + private $progress_message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\AIPlatform\V1\GenericOperationMetadata $generic_metadata + * The operation generic information. + * @type string $progress_message + * A human-readable message that shows the intermediate progress details of + * NotebookRuntime. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\NotebookService::initOnce(); + parent::__construct($data); + } + + /** + * The operation generic information. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * @return \Google\Cloud\AIPlatform\V1\GenericOperationMetadata|null + */ + public function getGenericMetadata() + { + return $this->generic_metadata; + } + + public function hasGenericMetadata() + { + return isset($this->generic_metadata); + } + + public function clearGenericMetadata() + { + unset($this->generic_metadata); + } + + /** + * The operation generic information. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * @param \Google\Cloud\AIPlatform\V1\GenericOperationMetadata $var + * @return $this + */ + public function setGenericMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\GenericOperationMetadata::class); + $this->generic_metadata = $var; + + return $this; + } + + /** + * A human-readable message that shows the intermediate progress details of + * NotebookRuntime. + * + * Generated from protobuf field string progress_message = 2; + * @return string + */ + public function getProgressMessage() + { + return $this->progress_message; + } + + /** + * A human-readable message that shows the intermediate progress details of + * NotebookRuntime. + * + * Generated from protobuf field string progress_message = 2; + * @param string $var + * @return $this + */ + public function setProgressMessage($var) + { + GPBUtil::checkString($var, True); + $this->progress_message = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/UpgradeNotebookRuntimeRequest.php b/AiPlatform/src/V1/UpgradeNotebookRuntimeRequest.php new file mode 100644 index 000000000000..9ed6b370b2cb --- /dev/null +++ b/AiPlatform/src/V1/UpgradeNotebookRuntimeRequest.php @@ -0,0 +1,97 @@ +google.cloud.aiplatform.v1.UpgradeNotebookRuntimeRequest + */ +class UpgradeNotebookRuntimeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the NotebookRuntime resource to be upgrade. + * Instead of checking whether the name is in valid NotebookRuntime resource + * name format, directly throw NotFound exception if there is no such + * NotebookRuntime in spanner. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $name = ''; + + /** + * @param string $name Required. The name of the NotebookRuntime resource to be upgrade. + * Instead of checking whether the name is in valid NotebookRuntime resource + * name format, directly throw NotFound exception if there is no such + * NotebookRuntime in spanner. Please see + * {@see NotebookServiceClient::notebookRuntimeName()} for help formatting this field. + * + * @return \Google\Cloud\AIPlatform\V1\UpgradeNotebookRuntimeRequest + * + * @experimental + */ + public static function 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 NotebookRuntime resource to be upgrade. + * Instead of checking whether the name is in valid NotebookRuntime resource + * name format, directly throw NotFound exception if there is no such + * NotebookRuntime in spanner. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\NotebookService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the NotebookRuntime resource to be upgrade. + * Instead of checking whether the name is in valid NotebookRuntime resource + * name format, directly throw NotFound exception if there is no such + * NotebookRuntime in spanner. + * + * Generated from 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 NotebookRuntime resource to be upgrade. + * Instead of checking whether the name is in valid NotebookRuntime resource + * name format, directly throw NotFound exception if there is no such + * NotebookRuntime in spanner. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/UpgradeNotebookRuntimeResponse.php b/AiPlatform/src/V1/UpgradeNotebookRuntimeResponse.php new file mode 100644 index 000000000000..d7abc22c2246 --- /dev/null +++ b/AiPlatform/src/V1/UpgradeNotebookRuntimeResponse.php @@ -0,0 +1,34 @@ +google.cloud.aiplatform.v1.UpgradeNotebookRuntimeResponse + */ +class UpgradeNotebookRuntimeResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\NotebookService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AiPlatform/src/V1/VertexAISearch.php b/AiPlatform/src/V1/VertexAISearch.php index 71999cededc4..cdf98c4910d7 100644 --- a/AiPlatform/src/V1/VertexAISearch.php +++ b/AiPlatform/src/V1/VertexAISearch.php @@ -19,7 +19,7 @@ class VertexAISearch extends \Google\Protobuf\Internal\Message /** * Required. Fully-qualified Vertex AI Search's datastore resource ID. * Format: - * projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore} + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` * * Generated from protobuf field string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; */ @@ -34,7 +34,7 @@ class VertexAISearch extends \Google\Protobuf\Internal\Message * @type string $datastore * Required. Fully-qualified Vertex AI Search's datastore resource ID. * Format: - * projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore} + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` * } */ public function __construct($data = NULL) { @@ -45,7 +45,7 @@ public function __construct($data = NULL) { /** * Required. Fully-qualified Vertex AI Search's datastore resource ID. * Format: - * projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore} + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` * * Generated from protobuf field string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -58,7 +58,7 @@ public function getDatastore() /** * Required. Fully-qualified Vertex AI Search's datastore resource ID. * Format: - * projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore} + * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` * * Generated from protobuf field string datastore = 1 [(.google.api.field_behavior) = REQUIRED]; * @param string $var diff --git a/AiPlatform/src/V1/gapic_metadata.json b/AiPlatform/src/V1/gapic_metadata.json index e83ddbcf50d6..e1ab0115869f 100644 --- a/AiPlatform/src/V1/gapic_metadata.json +++ b/AiPlatform/src/V1/gapic_metadata.json @@ -677,6 +677,60 @@ } } }, + "GenAiTuningService": { + "clients": { + "grpc": { + "libraryClient": "GenAiTuningServiceGapicClient", + "rpcs": { + "CancelTuningJob": { + "methods": [ + "cancelTuningJob" + ] + }, + "CreateTuningJob": { + "methods": [ + "createTuningJob" + ] + }, + "GetTuningJob": { + "methods": [ + "getTuningJob" + ] + }, + "ListTuningJobs": { + "methods": [ + "listTuningJobs" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, "IndexEndpointService": { "clients": { "grpc": { @@ -1617,6 +1671,154 @@ } } }, + "NotebookService": { + "clients": { + "grpc": { + "libraryClient": "NotebookServiceGapicClient", + "rpcs": { + "AssignNotebookRuntime": { + "methods": [ + "assignNotebookRuntime" + ] + }, + "CreateNotebookRuntimeTemplate": { + "methods": [ + "createNotebookRuntimeTemplate" + ] + }, + "DeleteNotebookRuntime": { + "methods": [ + "deleteNotebookRuntime" + ] + }, + "DeleteNotebookRuntimeTemplate": { + "methods": [ + "deleteNotebookRuntimeTemplate" + ] + }, + "GetNotebookRuntime": { + "methods": [ + "getNotebookRuntime" + ] + }, + "GetNotebookRuntimeTemplate": { + "methods": [ + "getNotebookRuntimeTemplate" + ] + }, + "ListNotebookRuntimeTemplates": { + "methods": [ + "listNotebookRuntimeTemplates" + ] + }, + "ListNotebookRuntimes": { + "methods": [ + "listNotebookRuntimes" + ] + }, + "StartNotebookRuntime": { + "methods": [ + "startNotebookRuntime" + ] + }, + "UpgradeNotebookRuntime": { + "methods": [ + "upgradeNotebookRuntime" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, + "PersistentResourceService": { + "clients": { + "grpc": { + "libraryClient": "PersistentResourceServiceGapicClient", + "rpcs": { + "CreatePersistentResource": { + "methods": [ + "createPersistentResource" + ] + }, + "DeletePersistentResource": { + "methods": [ + "deletePersistentResource" + ] + }, + "GetPersistentResource": { + "methods": [ + "getPersistentResource" + ] + }, + "ListPersistentResources": { + "methods": [ + "listPersistentResources" + ] + }, + "RebootPersistentResource": { + "methods": [ + "rebootPersistentResource" + ] + }, + "UpdatePersistentResource": { + "methods": [ + "updatePersistentResource" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, "PipelineService": { "clients": { "grpc": { diff --git a/AiPlatform/src/V1/resources/dataset_service_rest_client_config.php b/AiPlatform/src/V1/resources/dataset_service_rest_client_config.php index 1a67e0fcb8e5..eb0337f8bc7b 100644 --- a/AiPlatform/src/V1/resources/dataset_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/dataset_service_rest_client_config.php @@ -540,6 +540,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -680,6 +684,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -841,6 +849,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1005,6 +1017,10 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1178,6 +1194,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1346,6 +1366,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1527,6 +1551,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1629,7 +1657,7 @@ ], [ 'method' => 'get', - 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', ], [ 'method' => 'get', @@ -1683,6 +1711,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1864,6 +1896,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', @@ -2016,6 +2052,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/deployment_resource_pool_service_rest_client_config.php b/AiPlatform/src/V1/resources/deployment_resource_pool_service_rest_client_config.php index 4311e77f2a92..e2336ab7d857 100644 --- a/AiPlatform/src/V1/resources/deployment_resource_pool_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/deployment_resource_pool_service_rest_client_config.php @@ -389,6 +389,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -529,6 +533,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -690,6 +698,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -854,6 +866,10 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1027,6 +1043,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1195,6 +1215,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1376,6 +1400,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1478,7 +1506,7 @@ ], [ 'method' => 'get', - 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', ], [ 'method' => 'get', @@ -1532,6 +1560,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1713,6 +1745,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', @@ -1865,6 +1901,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/endpoint_service_rest_client_config.php b/AiPlatform/src/V1/resources/endpoint_service_rest_client_config.php index c967b9b88a34..252c2cf4a962 100644 --- a/AiPlatform/src/V1/resources/endpoint_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/endpoint_service_rest_client_config.php @@ -430,6 +430,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -570,6 +574,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -731,6 +739,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -895,6 +907,10 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1068,6 +1084,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1236,6 +1256,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1417,6 +1441,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1519,7 +1547,7 @@ ], [ 'method' => 'get', - 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', ], [ 'method' => 'get', @@ -1573,6 +1601,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1754,6 +1786,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', @@ -1906,6 +1942,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/feature_online_store_admin_service_rest_client_config.php b/AiPlatform/src/V1/resources/feature_online_store_admin_service_rest_client_config.php index 617006a16b14..81cf661cd2f5 100644 --- a/AiPlatform/src/V1/resources/feature_online_store_admin_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/feature_online_store_admin_service_rest_client_config.php @@ -489,6 +489,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -629,6 +633,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -790,6 +798,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -954,6 +966,10 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1127,6 +1143,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1295,6 +1315,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1476,6 +1500,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1578,7 +1606,7 @@ ], [ 'method' => 'get', - 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', ], [ 'method' => 'get', @@ -1632,6 +1660,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1813,6 +1845,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', @@ -1965,6 +2001,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/feature_online_store_service_rest_client_config.php b/AiPlatform/src/V1/resources/feature_online_store_service_rest_client_config.php index 344030b150b4..029d5f37440a 100644 --- a/AiPlatform/src/V1/resources/feature_online_store_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/feature_online_store_service_rest_client_config.php @@ -357,6 +357,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -497,6 +501,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -658,6 +666,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -822,6 +834,10 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -995,6 +1011,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1163,6 +1183,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1344,6 +1368,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1446,7 +1474,7 @@ ], [ 'method' => 'get', - 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', ], [ 'method' => 'get', @@ -1500,6 +1528,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1681,6 +1713,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', @@ -1833,6 +1869,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/feature_registry_service_rest_client_config.php b/AiPlatform/src/V1/resources/feature_registry_service_rest_client_config.php index 81381eba7c2e..2044587f1e1f 100644 --- a/AiPlatform/src/V1/resources/feature_registry_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/feature_registry_service_rest_client_config.php @@ -455,6 +455,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -595,6 +599,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -756,6 +764,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -920,6 +932,10 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1093,6 +1109,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1261,6 +1281,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1442,6 +1466,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1544,7 +1572,7 @@ ], [ 'method' => 'get', - 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', ], [ 'method' => 'get', @@ -1598,6 +1626,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1779,6 +1811,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', @@ -1931,6 +1967,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/featurestore_online_serving_service_rest_client_config.php b/AiPlatform/src/V1/resources/featurestore_online_serving_service_rest_client_config.php index 7e22e7c8b2be..035f78dbf4cb 100644 --- a/AiPlatform/src/V1/resources/featurestore_online_serving_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/featurestore_online_serving_service_rest_client_config.php @@ -369,6 +369,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -509,6 +513,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -670,6 +678,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -834,6 +846,10 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1007,6 +1023,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1175,6 +1195,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1356,6 +1380,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1458,7 +1486,7 @@ ], [ 'method' => 'get', - 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', ], [ 'method' => 'get', @@ -1512,6 +1540,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1693,6 +1725,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', @@ -1845,6 +1881,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/featurestore_service_rest_client_config.php b/AiPlatform/src/V1/resources/featurestore_service_rest_client_config.php index 45a4709eb16e..621167288dd3 100644 --- a/AiPlatform/src/V1/resources/featurestore_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/featurestore_service_rest_client_config.php @@ -587,6 +587,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -727,6 +731,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -888,6 +896,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1052,6 +1064,10 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1225,6 +1241,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1393,6 +1413,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1574,6 +1598,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1676,7 +1704,7 @@ ], [ 'method' => 'get', - 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', ], [ 'method' => 'get', @@ -1730,6 +1758,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1911,6 +1943,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', @@ -2063,6 +2099,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/gen_ai_tuning_service_client_config.json b/AiPlatform/src/V1/resources/gen_ai_tuning_service_client_config.json new file mode 100644 index 000000000000..ce8d374c8147 --- /dev/null +++ b/AiPlatform/src/V1/resources/gen_ai_tuning_service_client_config.json @@ -0,0 +1,67 @@ +{ + "interfaces": { + "google.cloud.aiplatform.v1.GenAiTuningService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "CancelTuningJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateTuningJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetTuningJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListTuningJobs": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AiPlatform/src/V1/resources/gen_ai_tuning_service_descriptor_config.php b/AiPlatform/src/V1/resources/gen_ai_tuning_service_descriptor_config.php new file mode 100644 index 000000000000..5bd48fc3f48b --- /dev/null +++ b/AiPlatform/src/V1/resources/gen_ai_tuning_service_descriptor_config.php @@ -0,0 +1,146 @@ + [ + 'google.cloud.aiplatform.v1.GenAiTuningService' => [ + 'CancelTuningJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateTuningJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\AIPlatform\V1\TuningJob', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetTuningJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\AIPlatform\V1\TuningJob', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListTuningJobs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTuningJobs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\AIPlatform\V1\ListTuningJobsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'context' => 'projects/{project}/locations/{location}/metadataStores/{metadata_store}/contexts/{context}', + 'endpoint' => 'projects/{project}/locations/{location}/endpoints/{endpoint}', + 'location' => 'projects/{project}/locations/{location}', + 'model' => 'projects/{project}/locations/{location}/models/{model}', + 'projectLocationEndpoint' => 'projects/{project}/locations/{location}/endpoints/{endpoint}', + 'projectLocationPublisherModel' => 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}', + 'tuningJob' => 'projects/{project}/locations/{location}/tuningJobs/{tuning_job}', + ], + ], + ], +]; diff --git a/AiPlatform/src/V1/resources/gen_ai_tuning_service_rest_client_config.php b/AiPlatform/src/V1/resources/gen_ai_tuning_service_rest_client_config.php new file mode 100644 index 000000000000..2811ac79f8fc --- /dev/null +++ b/AiPlatform/src/V1/resources/gen_ai_tuning_service_rest_client_config.php @@ -0,0 +1,1953 @@ + [ + 'google.cloud.aiplatform.v1.GenAiTuningService' => [ + 'CancelTuningJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateTuningJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/tuningJobs', + 'body' => 'tuning_job', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetTuningJob' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListTuningJobs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/tuningJobs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*}/locations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/models/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/publishers/*/models/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/models/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/models/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:testIamPermissions', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/endpoints/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensionControllers/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensions/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/customJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexes/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/customJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexes/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/migratableResources/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/endpoints/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensionControllers/*}/operations', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensions/*}/operations', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/customJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexes/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/customJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexes/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/migratableResources/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/edgeDeploymentJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/endpoints/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensionControllers/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensions/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/customJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/customJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/migratableResources/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/deploymentResourcePools/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/edgeDevices/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/endpoints/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensionControllers/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensions/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/customJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/dataLabelingJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexes/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexEndpoints/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/executions/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelMonitors/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/migratableResources/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/trials/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/deploymentResourcePools/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/customJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataLabelingJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexes/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/executions/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/migratableResources/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/trials/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/specialistPools/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}:wait', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'WaitOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/operations/*}:wait', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/endpoints/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensionControllers/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensions/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/customJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexes/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/customJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexes/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/migratableResources/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}:wait', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], +]; diff --git a/AiPlatform/src/V1/resources/index_endpoint_service_rest_client_config.php b/AiPlatform/src/V1/resources/index_endpoint_service_rest_client_config.php index 7c98ce27817d..56cac3dfc035 100644 --- a/AiPlatform/src/V1/resources/index_endpoint_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/index_endpoint_service_rest_client_config.php @@ -430,6 +430,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -570,6 +574,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -731,6 +739,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -895,6 +907,10 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1068,6 +1084,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1236,6 +1256,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1417,6 +1441,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1519,7 +1547,7 @@ ], [ 'method' => 'get', - 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', ], [ 'method' => 'get', @@ -1573,6 +1601,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1754,6 +1786,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', @@ -1906,6 +1942,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/index_service_rest_client_config.php b/AiPlatform/src/V1/resources/index_service_rest_client_config.php index abc948cd63c0..e7c23502e98f 100644 --- a/AiPlatform/src/V1/resources/index_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/index_service_rest_client_config.php @@ -415,6 +415,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -555,6 +559,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -716,6 +724,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -880,6 +892,10 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1053,6 +1069,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1221,6 +1241,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1402,6 +1426,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1504,7 +1532,7 @@ ], [ 'method' => 'get', - 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', ], [ 'method' => 'get', @@ -1558,6 +1586,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1739,6 +1771,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', @@ -1891,6 +1927,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/job_service_descriptor_config.php b/AiPlatform/src/V1/resources/job_service_descriptor_config.php index 70bd84ce450b..3935337c5c86 100644 --- a/AiPlatform/src/V1/resources/job_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/job_service_descriptor_config.php @@ -625,6 +625,7 @@ 'nasTrialDetail' => 'projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}', 'network' => 'projects/{project}/global/networks/{network}', 'notificationChannel' => 'projects/{project}/notificationChannels/{notification_channel}', + 'persistentResource' => 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}', 'projectLocationEndpoint' => 'projects/{project}/locations/{location}/endpoints/{endpoint}', 'projectLocationPublisherModel' => 'projects/{project}/locations/{location}/publishers/{publisher}/models/{model}', 'tensorboard' => 'projects/{project}/locations/{location}/tensorboards/{tensorboard}', diff --git a/AiPlatform/src/V1/resources/job_service_rest_client_config.php b/AiPlatform/src/V1/resources/job_service_rest_client_config.php index 253c8eded979..6b07399a5b75 100644 --- a/AiPlatform/src/V1/resources/job_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/job_service_rest_client_config.php @@ -737,6 +737,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -877,6 +881,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -1038,6 +1046,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1202,6 +1214,10 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1375,6 +1391,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1543,6 +1563,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1724,6 +1748,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1826,7 +1854,7 @@ ], [ 'method' => 'get', - 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', ], [ 'method' => 'get', @@ -1880,6 +1908,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -2061,6 +2093,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', @@ -2213,6 +2249,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/llm_utility_service_rest_client_config.php b/AiPlatform/src/V1/resources/llm_utility_service_rest_client_config.php index e80d569baf06..3215271a92b4 100644 --- a/AiPlatform/src/V1/resources/llm_utility_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/llm_utility_service_rest_client_config.php @@ -371,6 +371,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -511,6 +515,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -672,6 +680,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -836,6 +848,10 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1009,6 +1025,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1177,6 +1197,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1358,6 +1382,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1460,7 +1488,7 @@ ], [ 'method' => 'get', - 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', ], [ 'method' => 'get', @@ -1514,6 +1542,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1695,6 +1727,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', @@ -1847,6 +1883,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/match_service_rest_client_config.php b/AiPlatform/src/V1/resources/match_service_rest_client_config.php index 04011ef9324b..33ee5bea6603 100644 --- a/AiPlatform/src/V1/resources/match_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/match_service_rest_client_config.php @@ -357,6 +357,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -497,6 +501,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -658,6 +666,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -822,6 +834,10 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -995,6 +1011,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1163,6 +1183,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1344,6 +1368,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1446,7 +1474,7 @@ ], [ 'method' => 'get', - 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', ], [ 'method' => 'get', @@ -1500,6 +1528,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1681,6 +1713,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', @@ -1833,6 +1869,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/metadata_service_rest_client_config.php b/AiPlatform/src/V1/resources/metadata_service_rest_client_config.php index b4be20faae85..25139594a8c9 100644 --- a/AiPlatform/src/V1/resources/metadata_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/metadata_service_rest_client_config.php @@ -703,6 +703,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -843,6 +847,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -1004,6 +1012,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1168,6 +1180,10 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1341,6 +1357,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1509,6 +1529,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1690,6 +1714,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1792,7 +1820,7 @@ ], [ 'method' => 'get', - 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', ], [ 'method' => 'get', @@ -1846,6 +1874,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -2027,6 +2059,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', @@ -2179,6 +2215,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/migration_service_rest_client_config.php b/AiPlatform/src/V1/resources/migration_service_rest_client_config.php index 5ac1cc98717e..22719fcb8377 100644 --- a/AiPlatform/src/V1/resources/migration_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/migration_service_rest_client_config.php @@ -357,6 +357,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -497,6 +501,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -658,6 +666,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -822,6 +834,10 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -995,6 +1011,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1163,6 +1183,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1344,6 +1368,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1446,7 +1474,7 @@ ], [ 'method' => 'get', - 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', ], [ 'method' => 'get', @@ -1500,6 +1528,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1681,6 +1713,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', @@ -1833,6 +1869,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/model_garden_service_rest_client_config.php b/AiPlatform/src/V1/resources/model_garden_service_rest_client_config.php index a869147ff858..f8ae19bc0a27 100644 --- a/AiPlatform/src/V1/resources/model_garden_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/model_garden_service_rest_client_config.php @@ -344,6 +344,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -484,6 +488,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -645,6 +653,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -809,6 +821,10 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -982,6 +998,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1150,6 +1170,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1331,6 +1355,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1433,7 +1461,7 @@ ], [ 'method' => 'get', - 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', ], [ 'method' => 'get', @@ -1487,6 +1515,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1668,6 +1700,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', @@ -1820,6 +1856,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/model_service_rest_client_config.php b/AiPlatform/src/V1/resources/model_service_rest_client_config.php index c69edc2b9c2c..c5cba83a41be 100644 --- a/AiPlatform/src/V1/resources/model_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/model_service_rest_client_config.php @@ -544,6 +544,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -684,6 +688,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -845,6 +853,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1009,6 +1021,10 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1182,6 +1198,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1350,6 +1370,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1531,6 +1555,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1633,7 +1661,7 @@ ], [ 'method' => 'get', - 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', ], [ 'method' => 'get', @@ -1687,6 +1715,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1868,6 +1900,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', @@ -2020,6 +2056,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/notebook_service_client_config.json b/AiPlatform/src/V1/resources/notebook_service_client_config.json new file mode 100644 index 000000000000..07d9bbb7ed13 --- /dev/null +++ b/AiPlatform/src/V1/resources/notebook_service_client_config.json @@ -0,0 +1,97 @@ +{ + "interfaces": { + "google.cloud.aiplatform.v1.NotebookService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "AssignNotebookRuntime": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateNotebookRuntimeTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteNotebookRuntime": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteNotebookRuntimeTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetNotebookRuntime": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetNotebookRuntimeTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListNotebookRuntimeTemplates": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListNotebookRuntimes": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "StartNotebookRuntime": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpgradeNotebookRuntime": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AiPlatform/src/V1/resources/notebook_service_descriptor_config.php b/AiPlatform/src/V1/resources/notebook_service_descriptor_config.php new file mode 100644 index 000000000000..b49834ef76ee --- /dev/null +++ b/AiPlatform/src/V1/resources/notebook_service_descriptor_config.php @@ -0,0 +1,266 @@ + [ + 'google.cloud.aiplatform.v1.NotebookService' => [ + 'AssignNotebookRuntime' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\AIPlatform\V1\NotebookRuntime', + 'metadataReturnType' => '\Google\Cloud\AIPlatform\V1\AssignNotebookRuntimeOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateNotebookRuntimeTemplate' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\AIPlatform\V1\NotebookRuntimeTemplate', + 'metadataReturnType' => '\Google\Cloud\AIPlatform\V1\CreateNotebookRuntimeTemplateOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteNotebookRuntime' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\AIPlatform\V1\DeleteOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteNotebookRuntimeTemplate' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\AIPlatform\V1\DeleteOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'StartNotebookRuntime' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\AIPlatform\V1\StartNotebookRuntimeResponse', + 'metadataReturnType' => '\Google\Cloud\AIPlatform\V1\StartNotebookRuntimeOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpgradeNotebookRuntime' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\AIPlatform\V1\UpgradeNotebookRuntimeResponse', + 'metadataReturnType' => '\Google\Cloud\AIPlatform\V1\UpgradeNotebookRuntimeOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetNotebookRuntime' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\AIPlatform\V1\NotebookRuntime', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetNotebookRuntimeTemplate' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\AIPlatform\V1\NotebookRuntimeTemplate', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListNotebookRuntimeTemplates' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getNotebookRuntimeTemplates', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\AIPlatform\V1\ListNotebookRuntimeTemplatesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListNotebookRuntimes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getNotebookRuntimes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\AIPlatform\V1\ListNotebookRuntimesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'location' => 'projects/{project}/locations/{location}', + 'network' => 'projects/{project}/global/networks/{network}', + 'notebookRuntime' => 'projects/{project}/locations/{location}/notebookRuntimes/{notebook_runtime}', + 'notebookRuntimeTemplate' => 'projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}', + 'subnetwork' => 'projects/{project}/regions/{region}/subnetworks/{subnetwork}', + ], + ], + ], +]; diff --git a/AiPlatform/src/V1/resources/notebook_service_rest_client_config.php b/AiPlatform/src/V1/resources/notebook_service_rest_client_config.php new file mode 100644 index 000000000000..b7916496d0aa --- /dev/null +++ b/AiPlatform/src/V1/resources/notebook_service_rest_client_config.php @@ -0,0 +1,2021 @@ + [ + 'google.cloud.aiplatform.v1.NotebookService' => [ + 'AssignNotebookRuntime' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/notebookRuntimes:assign', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateNotebookRuntimeTemplate' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/notebookRuntimeTemplates', + 'body' => 'notebook_runtime_template', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteNotebookRuntime' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteNotebookRuntimeTemplate' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetNotebookRuntime' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetNotebookRuntimeTemplate' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimeTemplates/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListNotebookRuntimeTemplates' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/notebookRuntimeTemplates', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListNotebookRuntimes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/notebookRuntimes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'StartNotebookRuntime' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimes/*}:start', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpgradeNotebookRuntime' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/notebookRuntimes/*}:upgrade', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*}/locations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/models/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/publishers/*/models/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/models/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/models/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:testIamPermissions', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/endpoints/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensionControllers/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensions/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/customJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexes/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/customJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexes/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/migratableResources/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/endpoints/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensionControllers/*}/operations', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensions/*}/operations', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/customJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexes/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/customJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexes/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/migratableResources/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/edgeDeploymentJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/endpoints/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensionControllers/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensions/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/customJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/customJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/migratableResources/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/deploymentResourcePools/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/edgeDevices/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/endpoints/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensionControllers/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensions/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/customJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/dataLabelingJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexes/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexEndpoints/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/executions/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelMonitors/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/migratableResources/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/trials/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/deploymentResourcePools/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/customJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataLabelingJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexes/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/executions/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/migratableResources/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/trials/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/specialistPools/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}:wait', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'WaitOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/operations/*}:wait', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/endpoints/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensionControllers/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensions/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/customJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexes/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/customJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexes/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/migratableResources/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}:wait', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], +]; diff --git a/AiPlatform/src/V1/resources/persistent_resource_service_client_config.json b/AiPlatform/src/V1/resources/persistent_resource_service_client_config.json new file mode 100644 index 000000000000..4821bd550e52 --- /dev/null +++ b/AiPlatform/src/V1/resources/persistent_resource_service_client_config.json @@ -0,0 +1,77 @@ +{ + "interfaces": { + "google.cloud.aiplatform.v1.PersistentResourceService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "CreatePersistentResource": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeletePersistentResource": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetPersistentResource": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListPersistentResources": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RebootPersistentResource": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdatePersistentResource": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SetIamPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TestIamPermissions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/AiPlatform/src/V1/resources/persistent_resource_service_descriptor_config.php b/AiPlatform/src/V1/resources/persistent_resource_service_descriptor_config.php new file mode 100644 index 000000000000..0496c2c2a2c8 --- /dev/null +++ b/AiPlatform/src/V1/resources/persistent_resource_service_descriptor_config.php @@ -0,0 +1,195 @@ + [ + 'google.cloud.aiplatform.v1.PersistentResourceService' => [ + 'CreatePersistentResource' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\AIPlatform\V1\PersistentResource', + 'metadataReturnType' => '\Google\Cloud\AIPlatform\V1\CreatePersistentResourceOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeletePersistentResource' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\AIPlatform\V1\DeleteOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RebootPersistentResource' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\AIPlatform\V1\PersistentResource', + 'metadataReturnType' => '\Google\Cloud\AIPlatform\V1\RebootPersistentResourceOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdatePersistentResource' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\AIPlatform\V1\PersistentResource', + 'metadataReturnType' => '\Google\Cloud\AIPlatform\V1\UpdatePersistentResourceOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'persistent_resource.name', + 'fieldAccessors' => [ + 'getPersistentResource', + 'getName', + ], + ], + ], + ], + 'GetPersistentResource' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\AIPlatform\V1\PersistentResource', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListPersistentResources' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPersistentResources', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\AIPlatform\V1\ListPersistentResourcesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + 'interfaceOverride' => 'google.iam.v1.IAMPolicy', + ], + 'templateMap' => [ + 'location' => 'projects/{project}/locations/{location}', + 'network' => 'projects/{project}/global/networks/{network}', + 'persistentResource' => 'projects/{project}/locations/{location}/persistentResources/{persistent_resource}', + ], + ], + ], +]; diff --git a/AiPlatform/src/V1/resources/persistent_resource_service_rest_client_config.php b/AiPlatform/src/V1/resources/persistent_resource_service_rest_client_config.php new file mode 100644 index 000000000000..716615d8efa0 --- /dev/null +++ b/AiPlatform/src/V1/resources/persistent_resource_service_rest_client_config.php @@ -0,0 +1,1983 @@ + [ + 'google.cloud.aiplatform.v1.PersistentResourceService' => [ + 'CreatePersistentResource' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/persistentResources', + 'body' => 'persistent_resource', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'persistent_resource_id', + ], + ], + 'DeletePersistentResource' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetPersistentResource' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListPersistentResources' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/persistentResources', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RebootPersistentResource' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}:reboot', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdatePersistentResource' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{persistent_resource.name=projects/*/locations/*/persistentResources/*}', + 'body' => 'persistent_resource', + 'placeholders' => [ + 'persistent_resource.name' => [ + 'getters' => [ + 'getPersistentResource', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*}/locations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.iam.v1.IAMPolicy' => [ + 'GetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/models/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/publishers/*/models/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:getIamPolicy', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:getIamPolicy', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/models/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:setIamPolicy', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:setIamPolicy', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/models/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:testIamPermissions', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:testIamPermissions', + ], + ], + 'placeholders' => [ + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/operations/*}:cancel', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/endpoints/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensionControllers/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensions/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/customJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexes/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/customJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexes/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/migratableResources/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:cancel', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:cancel', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/endpoints/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensionControllers/*}/operations', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensions/*}/operations', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/customJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexes/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/customJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexes/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/migratableResources/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/edgeDeploymentJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/endpoints/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensionControllers/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensions/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/customJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/customJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/migratableResources/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/deploymentResourcePools/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/edgeDevices/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/endpoints/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensionControllers/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensions/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/customJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/dataLabelingJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexes/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexEndpoints/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/executions/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelMonitors/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/migratableResources/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/trials/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/deploymentResourcePools/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/customJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataLabelingJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexes/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/executions/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/migratableResources/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/trials/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/specialistPools/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/operations/*}:wait', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}:wait', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'WaitOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/operations/*}:wait', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/edgeDevices/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/endpoints/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensionControllers/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/extensions/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/customJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexes/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/modelMonitors/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/migratableResources/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/savedQueries/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/datasets/*/dataItems/*/annotations/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/deploymentResourcePools/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/endpoints/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featurestores/*/entityTypes/*/features/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/customJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataLabelingJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexes/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/modelDeploymentMonitoringJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/migratableResources/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/trials/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/schedules/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/specialistPools/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tensorboards/*/experiments/*/runs/*/timeSeries/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureOnlineStores/*/featureViews/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/operations/*}:wait', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/featureGroups/*/features/*/operations/*}:wait', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], +]; diff --git a/AiPlatform/src/V1/resources/pipeline_service_rest_client_config.php b/AiPlatform/src/V1/resources/pipeline_service_rest_client_config.php index 18a1a15dda95..b21773b52342 100644 --- a/AiPlatform/src/V1/resources/pipeline_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/pipeline_service_rest_client_config.php @@ -471,6 +471,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -611,6 +615,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -772,6 +780,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -936,6 +948,10 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1109,6 +1125,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1277,6 +1297,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1458,6 +1482,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1560,7 +1588,7 @@ ], [ 'method' => 'get', - 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', ], [ 'method' => 'get', @@ -1614,6 +1642,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1795,6 +1827,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', @@ -1947,6 +1983,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/prediction_service_rest_client_config.php b/AiPlatform/src/V1/resources/prediction_service_rest_client_config.php index 39083ac12677..8c58de98e899 100644 --- a/AiPlatform/src/V1/resources/prediction_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/prediction_service_rest_client_config.php @@ -483,6 +483,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -623,6 +627,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -784,6 +792,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -948,6 +960,10 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1121,6 +1137,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1289,6 +1309,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1470,6 +1494,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1572,7 +1600,7 @@ ], [ 'method' => 'get', - 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', ], [ 'method' => 'get', @@ -1626,6 +1654,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1807,6 +1839,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', @@ -1959,6 +1995,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/schedule_service_rest_client_config.php b/AiPlatform/src/V1/resources/schedule_service_rest_client_config.php index 74a779782570..c0601f0f3a39 100644 --- a/AiPlatform/src/V1/resources/schedule_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/schedule_service_rest_client_config.php @@ -418,6 +418,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -558,6 +562,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -719,6 +727,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -883,6 +895,10 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1056,6 +1072,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1224,6 +1244,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1405,6 +1429,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1507,7 +1535,7 @@ ], [ 'method' => 'get', - 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', ], [ 'method' => 'get', @@ -1561,6 +1589,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1742,6 +1774,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', @@ -1894,6 +1930,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/specialist_pool_service_rest_client_config.php b/AiPlatform/src/V1/resources/specialist_pool_service_rest_client_config.php index 251d29956c7f..9603c57f0911 100644 --- a/AiPlatform/src/V1/resources/specialist_pool_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/specialist_pool_service_rest_client_config.php @@ -394,6 +394,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -534,6 +538,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -695,6 +703,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -859,6 +871,10 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1032,6 +1048,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1200,6 +1220,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1381,6 +1405,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1483,7 +1511,7 @@ ], [ 'method' => 'get', - 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', ], [ 'method' => 'get', @@ -1537,6 +1565,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1718,6 +1750,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', @@ -1870,6 +1906,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/tensorboard_service_rest_client_config.php b/AiPlatform/src/V1/resources/tensorboard_service_rest_client_config.php index ae089738bd88..bf21c1e216b3 100644 --- a/AiPlatform/src/V1/resources/tensorboard_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/tensorboard_service_rest_client_config.php @@ -698,6 +698,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -838,6 +842,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -999,6 +1007,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1163,6 +1175,10 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1336,6 +1352,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1504,6 +1524,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1685,6 +1709,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1787,7 +1815,7 @@ ], [ 'method' => 'get', - 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', ], [ 'method' => 'get', @@ -1841,6 +1869,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -2022,6 +2054,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', @@ -2174,6 +2210,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', diff --git a/AiPlatform/src/V1/resources/vizier_service_rest_client_config.php b/AiPlatform/src/V1/resources/vizier_service_rest_client_config.php index 9f77a36fcd31..a6b50e18323e 100644 --- a/AiPlatform/src/V1/resources/vizier_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/vizier_service_rest_client_config.php @@ -507,6 +507,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -647,6 +651,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}:cancel', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:cancel', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/studies/*/operations/*}:cancel', @@ -808,6 +816,10 @@ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -972,6 +984,10 @@ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1145,6 +1161,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/models/*/evaluations/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/studies/*/operations/*}', @@ -1313,6 +1333,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}', @@ -1494,6 +1518,10 @@ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1596,7 +1624,7 @@ ], [ 'method' => 'get', - 'uriTemplate' => '/ui/{name=projects/*/locations/*/tuningJobs/*}/operations', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/tuningJobs/*}/operations', ], [ 'method' => 'get', @@ -1650,6 +1678,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*}/operations', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*}/operations', + ], [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*}/operations', @@ -1831,6 +1863,10 @@ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/ui/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/ui/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', @@ -1983,6 +2019,10 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/trainingPipelines/*/operations/*}:wait', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/persistentResources/*/operations/*}:wait', + ], [ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/locations/*/pipelineJobs/*/operations/*}:wait', diff --git a/AiPlatform/tests/Unit/V1/Client/GenAiTuningServiceClientTest.php b/AiPlatform/tests/Unit/V1/Client/GenAiTuningServiceClientTest.php new file mode 100644 index 000000000000..ef3c0534fa23 --- /dev/null +++ b/AiPlatform/tests/Unit/V1/Client/GenAiTuningServiceClientTest.php @@ -0,0 +1,715 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return GenAiTuningServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new GenAiTuningServiceClient($options); + } + + /** @test */ + public function cancelTuningJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tuningJobName('[PROJECT]', '[LOCATION]', '[TUNING_JOB]'); + $request = (new CancelTuningJobRequest()) + ->setName($formattedName); + $gapicClient->cancelTuningJob($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.GenAiTuningService/CancelTuningJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function cancelTuningJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->tuningJobName('[PROJECT]', '[LOCATION]', '[TUNING_JOB]'); + $request = (new CancelTuningJobRequest()) + ->setName($formattedName); + try { + $gapicClient->cancelTuningJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTuningJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $baseModel = 'baseModel-480754629'; + $name = 'name3373707'; + $tunedModelDisplayName = 'tunedModelDisplayName358986993'; + $description = 'description-1724546052'; + $experiment = 'experiment-85337091'; + $expectedResponse = new TuningJob(); + $expectedResponse->setBaseModel($baseModel); + $expectedResponse->setName($name); + $expectedResponse->setTunedModelDisplayName($tunedModelDisplayName); + $expectedResponse->setDescription($description); + $expectedResponse->setExperiment($experiment); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $tuningJob = new TuningJob(); + $request = (new CreateTuningJobRequest()) + ->setParent($formattedParent) + ->setTuningJob($tuningJob); + $response = $gapicClient->createTuningJob($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.GenAiTuningService/CreateTuningJob', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTuningJob(); + $this->assertProtobufEquals($tuningJob, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTuningJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $tuningJob = new TuningJob(); + $request = (new CreateTuningJobRequest()) + ->setParent($formattedParent) + ->setTuningJob($tuningJob); + try { + $gapicClient->createTuningJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTuningJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $baseModel = 'baseModel-480754629'; + $name2 = 'name2-1052831874'; + $tunedModelDisplayName = 'tunedModelDisplayName358986993'; + $description = 'description-1724546052'; + $experiment = 'experiment-85337091'; + $expectedResponse = new TuningJob(); + $expectedResponse->setBaseModel($baseModel); + $expectedResponse->setName($name2); + $expectedResponse->setTunedModelDisplayName($tunedModelDisplayName); + $expectedResponse->setDescription($description); + $expectedResponse->setExperiment($experiment); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tuningJobName('[PROJECT]', '[LOCATION]', '[TUNING_JOB]'); + $request = (new GetTuningJobRequest()) + ->setName($formattedName); + $response = $gapicClient->getTuningJob($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.GenAiTuningService/GetTuningJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTuningJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->tuningJobName('[PROJECT]', '[LOCATION]', '[TUNING_JOB]'); + $request = (new GetTuningJobRequest()) + ->setName($formattedName); + try { + $gapicClient->getTuningJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTuningJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $tuningJobsElement = new TuningJob(); + $tuningJobs = [ + $tuningJobsElement, + ]; + $expectedResponse = new ListTuningJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTuningJobs($tuningJobs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListTuningJobsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listTuningJobs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTuningJobs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.GenAiTuningService/ListTuningJobs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTuningJobsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListTuningJobsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listTuningJobs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function cancelTuningJobAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tuningJobName('[PROJECT]', '[LOCATION]', '[TUNING_JOB]'); + $request = (new CancelTuningJobRequest()) + ->setName($formattedName); + $gapicClient->cancelTuningJobAsync($request)->wait(); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.GenAiTuningService/CancelTuningJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AiPlatform/tests/Unit/V1/Client/NotebookServiceClientTest.php b/AiPlatform/tests/Unit/V1/Client/NotebookServiceClientTest.php new file mode 100644 index 000000000000..4a1303f87954 --- /dev/null +++ b/AiPlatform/tests/Unit/V1/Client/NotebookServiceClientTest.php @@ -0,0 +1,1592 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return NotebookServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new NotebookServiceClient($options); + } + + /** @test */ + public function assignNotebookRuntimeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/assignNotebookRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $runtimeUser = 'runtimeUser1935670226'; + $proxyUri = 'proxyUri-475670501'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $serviceAccount = 'serviceAccount-1948028253'; + $isUpgradable = true; + $version = 'version351608024'; + $expectedResponse = new NotebookRuntime(); + $expectedResponse->setName($name); + $expectedResponse->setRuntimeUser($runtimeUser); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setIsUpgradable($isUpgradable); + $expectedResponse->setVersion($version); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/assignNotebookRuntimeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $formattedNotebookRuntimeTemplate = $gapicClient->notebookRuntimeTemplateName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME_TEMPLATE]'); + $notebookRuntime = new NotebookRuntime(); + $notebookRuntimeRuntimeUser = 'notebookRuntimeRuntimeUser825639430'; + $notebookRuntime->setRuntimeUser($notebookRuntimeRuntimeUser); + $notebookRuntimeDisplayName = 'notebookRuntimeDisplayName1784911024'; + $notebookRuntime->setDisplayName($notebookRuntimeDisplayName); + $request = (new AssignNotebookRuntimeRequest()) + ->setParent($formattedParent) + ->setNotebookRuntimeTemplate($formattedNotebookRuntimeTemplate) + ->setNotebookRuntime($notebookRuntime); + $response = $gapicClient->assignNotebookRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.NotebookService/AssignNotebookRuntime', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getNotebookRuntimeTemplate(); + $this->assertProtobufEquals($formattedNotebookRuntimeTemplate, $actualValue); + $actualValue = $actualApiRequestObject->getNotebookRuntime(); + $this->assertProtobufEquals($notebookRuntime, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/assignNotebookRuntimeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function assignNotebookRuntimeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/assignNotebookRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $formattedNotebookRuntimeTemplate = $gapicClient->notebookRuntimeTemplateName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME_TEMPLATE]'); + $notebookRuntime = new NotebookRuntime(); + $notebookRuntimeRuntimeUser = 'notebookRuntimeRuntimeUser825639430'; + $notebookRuntime->setRuntimeUser($notebookRuntimeRuntimeUser); + $notebookRuntimeDisplayName = 'notebookRuntimeDisplayName1784911024'; + $notebookRuntime->setDisplayName($notebookRuntimeDisplayName); + $request = (new AssignNotebookRuntimeRequest()) + ->setParent($formattedParent) + ->setNotebookRuntimeTemplate($formattedNotebookRuntimeTemplate) + ->setNotebookRuntime($notebookRuntime); + $response = $gapicClient->assignNotebookRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/assignNotebookRuntimeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createNotebookRuntimeTemplateTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createNotebookRuntimeTemplateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $isDefault = true; + $serviceAccount = 'serviceAccount-1948028253'; + $etag = 'etag3123477'; + $expectedResponse = new NotebookRuntimeTemplate(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setIsDefault($isDefault); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createNotebookRuntimeTemplateTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $notebookRuntimeTemplate = new NotebookRuntimeTemplate(); + $notebookRuntimeTemplateDisplayName = 'notebookRuntimeTemplateDisplayName-1609642794'; + $notebookRuntimeTemplate->setDisplayName($notebookRuntimeTemplateDisplayName); + $request = (new CreateNotebookRuntimeTemplateRequest()) + ->setParent($formattedParent) + ->setNotebookRuntimeTemplate($notebookRuntimeTemplate); + $response = $gapicClient->createNotebookRuntimeTemplate($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.NotebookService/CreateNotebookRuntimeTemplate', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getNotebookRuntimeTemplate(); + $this->assertProtobufEquals($notebookRuntimeTemplate, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createNotebookRuntimeTemplateTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createNotebookRuntimeTemplateExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createNotebookRuntimeTemplateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $notebookRuntimeTemplate = new NotebookRuntimeTemplate(); + $notebookRuntimeTemplateDisplayName = 'notebookRuntimeTemplateDisplayName-1609642794'; + $notebookRuntimeTemplate->setDisplayName($notebookRuntimeTemplateDisplayName); + $request = (new CreateNotebookRuntimeTemplateRequest()) + ->setParent($formattedParent) + ->setNotebookRuntimeTemplate($notebookRuntimeTemplate); + $response = $gapicClient->createNotebookRuntimeTemplate($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createNotebookRuntimeTemplateTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteNotebookRuntimeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteNotebookRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteNotebookRuntimeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->notebookRuntimeName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME]'); + $request = (new DeleteNotebookRuntimeRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteNotebookRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.NotebookService/DeleteNotebookRuntime', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteNotebookRuntimeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteNotebookRuntimeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteNotebookRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->notebookRuntimeName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME]'); + $request = (new DeleteNotebookRuntimeRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteNotebookRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteNotebookRuntimeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteNotebookRuntimeTemplateTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteNotebookRuntimeTemplateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteNotebookRuntimeTemplateTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->notebookRuntimeTemplateName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME_TEMPLATE]'); + $request = (new DeleteNotebookRuntimeTemplateRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteNotebookRuntimeTemplate($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.NotebookService/DeleteNotebookRuntimeTemplate', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteNotebookRuntimeTemplateTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteNotebookRuntimeTemplateExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteNotebookRuntimeTemplateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->notebookRuntimeTemplateName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME_TEMPLATE]'); + $request = (new DeleteNotebookRuntimeTemplateRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteNotebookRuntimeTemplate($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteNotebookRuntimeTemplateTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getNotebookRuntimeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $runtimeUser = 'runtimeUser1935670226'; + $proxyUri = 'proxyUri-475670501'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $serviceAccount = 'serviceAccount-1948028253'; + $isUpgradable = true; + $version = 'version351608024'; + $expectedResponse = new NotebookRuntime(); + $expectedResponse->setName($name2); + $expectedResponse->setRuntimeUser($runtimeUser); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setIsUpgradable($isUpgradable); + $expectedResponse->setVersion($version); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->notebookRuntimeName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME]'); + $request = (new GetNotebookRuntimeRequest()) + ->setName($formattedName); + $response = $gapicClient->getNotebookRuntime($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.NotebookService/GetNotebookRuntime', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNotebookRuntimeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->notebookRuntimeName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME]'); + $request = (new GetNotebookRuntimeRequest()) + ->setName($formattedName); + try { + $gapicClient->getNotebookRuntime($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNotebookRuntimeTemplateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $isDefault = true; + $serviceAccount = 'serviceAccount-1948028253'; + $etag = 'etag3123477'; + $expectedResponse = new NotebookRuntimeTemplate(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setIsDefault($isDefault); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->notebookRuntimeTemplateName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME_TEMPLATE]'); + $request = (new GetNotebookRuntimeTemplateRequest()) + ->setName($formattedName); + $response = $gapicClient->getNotebookRuntimeTemplate($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.NotebookService/GetNotebookRuntimeTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNotebookRuntimeTemplateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->notebookRuntimeTemplateName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME_TEMPLATE]'); + $request = (new GetNotebookRuntimeTemplateRequest()) + ->setName($formattedName); + try { + $gapicClient->getNotebookRuntimeTemplate($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNotebookRuntimeTemplatesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $notebookRuntimeTemplatesElement = new NotebookRuntimeTemplate(); + $notebookRuntimeTemplates = [ + $notebookRuntimeTemplatesElement, + ]; + $expectedResponse = new ListNotebookRuntimeTemplatesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setNotebookRuntimeTemplates($notebookRuntimeTemplates); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListNotebookRuntimeTemplatesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listNotebookRuntimeTemplates($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getNotebookRuntimeTemplates()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.NotebookService/ListNotebookRuntimeTemplates', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNotebookRuntimeTemplatesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListNotebookRuntimeTemplatesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listNotebookRuntimeTemplates($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNotebookRuntimesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $notebookRuntimesElement = new NotebookRuntime(); + $notebookRuntimes = [ + $notebookRuntimesElement, + ]; + $expectedResponse = new ListNotebookRuntimesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setNotebookRuntimes($notebookRuntimes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListNotebookRuntimesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listNotebookRuntimes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getNotebookRuntimes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.NotebookService/ListNotebookRuntimes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNotebookRuntimesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListNotebookRuntimesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listNotebookRuntimes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startNotebookRuntimeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startNotebookRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new StartNotebookRuntimeResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/startNotebookRuntimeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->notebookRuntimeName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME]'); + $request = (new StartNotebookRuntimeRequest()) + ->setName($formattedName); + $response = $gapicClient->startNotebookRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.NotebookService/StartNotebookRuntime', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startNotebookRuntimeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function startNotebookRuntimeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startNotebookRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->notebookRuntimeName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME]'); + $request = (new StartNotebookRuntimeRequest()) + ->setName($formattedName); + $response = $gapicClient->startNotebookRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startNotebookRuntimeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function upgradeNotebookRuntimeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/upgradeNotebookRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new UpgradeNotebookRuntimeResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/upgradeNotebookRuntimeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->notebookRuntimeName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME]'); + $request = (new UpgradeNotebookRuntimeRequest()) + ->setName($formattedName); + $response = $gapicClient->upgradeNotebookRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.NotebookService/UpgradeNotebookRuntime', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/upgradeNotebookRuntimeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function upgradeNotebookRuntimeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/upgradeNotebookRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->notebookRuntimeName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME]'); + $request = (new UpgradeNotebookRuntimeRequest()) + ->setName($formattedName); + $response = $gapicClient->upgradeNotebookRuntime($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/upgradeNotebookRuntimeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function assignNotebookRuntimeAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/assignNotebookRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $runtimeUser = 'runtimeUser1935670226'; + $proxyUri = 'proxyUri-475670501'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $serviceAccount = 'serviceAccount-1948028253'; + $isUpgradable = true; + $version = 'version351608024'; + $expectedResponse = new NotebookRuntime(); + $expectedResponse->setName($name); + $expectedResponse->setRuntimeUser($runtimeUser); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setIsUpgradable($isUpgradable); + $expectedResponse->setVersion($version); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/assignNotebookRuntimeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $formattedNotebookRuntimeTemplate = $gapicClient->notebookRuntimeTemplateName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME_TEMPLATE]'); + $notebookRuntime = new NotebookRuntime(); + $notebookRuntimeRuntimeUser = 'notebookRuntimeRuntimeUser825639430'; + $notebookRuntime->setRuntimeUser($notebookRuntimeRuntimeUser); + $notebookRuntimeDisplayName = 'notebookRuntimeDisplayName1784911024'; + $notebookRuntime->setDisplayName($notebookRuntimeDisplayName); + $request = (new AssignNotebookRuntimeRequest()) + ->setParent($formattedParent) + ->setNotebookRuntimeTemplate($formattedNotebookRuntimeTemplate) + ->setNotebookRuntime($notebookRuntime); + $response = $gapicClient->assignNotebookRuntimeAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.NotebookService/AssignNotebookRuntime', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getNotebookRuntimeTemplate(); + $this->assertProtobufEquals($formattedNotebookRuntimeTemplate, $actualValue); + $actualValue = $actualApiRequestObject->getNotebookRuntime(); + $this->assertProtobufEquals($notebookRuntime, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/assignNotebookRuntimeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/AiPlatform/tests/Unit/V1/Client/PersistentResourceServiceClientTest.php b/AiPlatform/tests/Unit/V1/Client/PersistentResourceServiceClientTest.php new file mode 100644 index 000000000000..d7883ca272d8 --- /dev/null +++ b/AiPlatform/tests/Unit/V1/Client/PersistentResourceServiceClientTest.php @@ -0,0 +1,1161 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return PersistentResourceServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new PersistentResourceServiceClient($options); + } + + /** @test */ + public function createPersistentResourceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPersistentResourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $network = 'network1843485230'; + $expectedResponse = new PersistentResource(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setNetwork($network); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createPersistentResourceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $persistentResource = new PersistentResource(); + $persistentResourceResourcePools = []; + $persistentResource->setResourcePools($persistentResourceResourcePools); + $persistentResourceId = 'persistentResourceId661736772'; + $request = (new CreatePersistentResourceRequest()) + ->setParent($formattedParent) + ->setPersistentResource($persistentResource) + ->setPersistentResourceId($persistentResourceId); + $response = $gapicClient->createPersistentResource($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.PersistentResourceService/CreatePersistentResource', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getPersistentResource(); + $this->assertProtobufEquals($persistentResource, $actualValue); + $actualValue = $actualApiRequestObject->getPersistentResourceId(); + $this->assertProtobufEquals($persistentResourceId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPersistentResourceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createPersistentResourceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPersistentResourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $persistentResource = new PersistentResource(); + $persistentResourceResourcePools = []; + $persistentResource->setResourcePools($persistentResourceResourcePools); + $persistentResourceId = 'persistentResourceId661736772'; + $request = (new CreatePersistentResourceRequest()) + ->setParent($formattedParent) + ->setPersistentResource($persistentResource) + ->setPersistentResourceId($persistentResourceId); + $response = $gapicClient->createPersistentResource($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPersistentResourceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deletePersistentResourceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deletePersistentResourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deletePersistentResourceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->persistentResourceName('[PROJECT]', '[LOCATION]', '[PERSISTENT_RESOURCE]'); + $request = (new DeletePersistentResourceRequest()) + ->setName($formattedName); + $response = $gapicClient->deletePersistentResource($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.PersistentResourceService/DeletePersistentResource', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deletePersistentResourceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deletePersistentResourceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deletePersistentResourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->persistentResourceName('[PROJECT]', '[LOCATION]', '[PERSISTENT_RESOURCE]'); + $request = (new DeletePersistentResourceRequest()) + ->setName($formattedName); + $response = $gapicClient->deletePersistentResource($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deletePersistentResourceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getPersistentResourceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $network = 'network1843485230'; + $expectedResponse = new PersistentResource(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setNetwork($network); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->persistentResourceName('[PROJECT]', '[LOCATION]', '[PERSISTENT_RESOURCE]'); + $request = (new GetPersistentResourceRequest()) + ->setName($formattedName); + $response = $gapicClient->getPersistentResource($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.PersistentResourceService/GetPersistentResource', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPersistentResourceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->persistentResourceName('[PROJECT]', '[LOCATION]', '[PERSISTENT_RESOURCE]'); + $request = (new GetPersistentResourceRequest()) + ->setName($formattedName); + try { + $gapicClient->getPersistentResource($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPersistentResourcesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $persistentResourcesElement = new PersistentResource(); + $persistentResources = [ + $persistentResourcesElement, + ]; + $expectedResponse = new ListPersistentResourcesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPersistentResources($persistentResources); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListPersistentResourcesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPersistentResources($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPersistentResources()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.PersistentResourceService/ListPersistentResources', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPersistentResourcesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListPersistentResourcesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPersistentResources($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rebootPersistentResourceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/rebootPersistentResourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $network = 'network1843485230'; + $expectedResponse = new PersistentResource(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setNetwork($network); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/rebootPersistentResourceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->persistentResourceName('[PROJECT]', '[LOCATION]', '[PERSISTENT_RESOURCE]'); + $request = (new RebootPersistentResourceRequest()) + ->setName($formattedName); + $response = $gapicClient->rebootPersistentResource($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.PersistentResourceService/RebootPersistentResource', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rebootPersistentResourceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function rebootPersistentResourceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/rebootPersistentResourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->persistentResourceName('[PROJECT]', '[LOCATION]', '[PERSISTENT_RESOURCE]'); + $request = (new RebootPersistentResourceRequest()) + ->setName($formattedName); + $response = $gapicClient->rebootPersistentResource($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rebootPersistentResourceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updatePersistentResourceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updatePersistentResourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $network = 'network1843485230'; + $expectedResponse = new PersistentResource(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setNetwork($network); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updatePersistentResourceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $persistentResource = new PersistentResource(); + $persistentResourceResourcePools = []; + $persistentResource->setResourcePools($persistentResourceResourcePools); + $updateMask = new FieldMask(); + $request = (new UpdatePersistentResourceRequest()) + ->setPersistentResource($persistentResource) + ->setUpdateMask($updateMask); + $response = $gapicClient->updatePersistentResource($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.PersistentResourceService/UpdatePersistentResource', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getPersistentResource(); + $this->assertProtobufEquals($persistentResource, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updatePersistentResourceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updatePersistentResourceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updatePersistentResourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $persistentResource = new PersistentResource(); + $persistentResourceResourcePools = []; + $persistentResource->setResourcePools($persistentResourceResourcePools); + $updateMask = new FieldMask(); + $request = (new UpdatePersistentResourceRequest()) + ->setPersistentResource($persistentResource) + ->setUpdateMask($updateMask); + $response = $gapicClient->updatePersistentResource($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updatePersistentResourceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + $response = $gapicClient->getIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $request = (new GetIamPolicyRequest()) + ->setResource($resource); + try { + $gapicClient->getIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + $response = $gapicClient->setIamPolicy($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $request = (new SetIamPolicyRequest()) + ->setResource($resource) + ->setPolicy($policy); + try { + $gapicClient->setIamPolicy($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + $response = $gapicClient->testIamPermissions($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $request = (new TestIamPermissionsRequest()) + ->setResource($resource) + ->setPermissions($permissions); + try { + $gapicClient->testIamPermissions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createPersistentResourceAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPersistentResourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $network = 'network1843485230'; + $expectedResponse = new PersistentResource(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setNetwork($network); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createPersistentResourceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $persistentResource = new PersistentResource(); + $persistentResourceResourcePools = []; + $persistentResource->setResourcePools($persistentResourceResourcePools); + $persistentResourceId = 'persistentResourceId661736772'; + $request = (new CreatePersistentResourceRequest()) + ->setParent($formattedParent) + ->setPersistentResource($persistentResource) + ->setPersistentResourceId($persistentResourceId); + $response = $gapicClient->createPersistentResourceAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.PersistentResourceService/CreatePersistentResource', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getPersistentResource(); + $this->assertProtobufEquals($persistentResource, $actualValue); + $actualValue = $actualApiRequestObject->getPersistentResourceId(); + $this->assertProtobufEquals($persistentResourceId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPersistentResourceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/AiPlatform/tests/Unit/V1/GenAiTuningServiceClientTest.php b/AiPlatform/tests/Unit/V1/GenAiTuningServiceClientTest.php new file mode 100644 index 000000000000..260b16c29e29 --- /dev/null +++ b/AiPlatform/tests/Unit/V1/GenAiTuningServiceClientTest.php @@ -0,0 +1,642 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return GenAiTuningServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new GenAiTuningServiceClient($options); + } + + /** @test */ + public function cancelTuningJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tuningJobName('[PROJECT]', '[LOCATION]', '[TUNING_JOB]'); + $gapicClient->cancelTuningJob($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.GenAiTuningService/CancelTuningJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function cancelTuningJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->tuningJobName('[PROJECT]', '[LOCATION]', '[TUNING_JOB]'); + try { + $gapicClient->cancelTuningJob($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTuningJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $baseModel = 'baseModel-480754629'; + $name = 'name3373707'; + $tunedModelDisplayName = 'tunedModelDisplayName358986993'; + $description = 'description-1724546052'; + $experiment = 'experiment-85337091'; + $expectedResponse = new TuningJob(); + $expectedResponse->setBaseModel($baseModel); + $expectedResponse->setName($name); + $expectedResponse->setTunedModelDisplayName($tunedModelDisplayName); + $expectedResponse->setDescription($description); + $expectedResponse->setExperiment($experiment); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $tuningJob = new TuningJob(); + $response = $gapicClient->createTuningJob($formattedParent, $tuningJob); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.GenAiTuningService/CreateTuningJob', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getTuningJob(); + $this->assertProtobufEquals($tuningJob, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createTuningJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $tuningJob = new TuningJob(); + try { + $gapicClient->createTuningJob($formattedParent, $tuningJob); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTuningJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $baseModel = 'baseModel-480754629'; + $name2 = 'name2-1052831874'; + $tunedModelDisplayName = 'tunedModelDisplayName358986993'; + $description = 'description-1724546052'; + $experiment = 'experiment-85337091'; + $expectedResponse = new TuningJob(); + $expectedResponse->setBaseModel($baseModel); + $expectedResponse->setName($name2); + $expectedResponse->setTunedModelDisplayName($tunedModelDisplayName); + $expectedResponse->setDescription($description); + $expectedResponse->setExperiment($experiment); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->tuningJobName('[PROJECT]', '[LOCATION]', '[TUNING_JOB]'); + $response = $gapicClient->getTuningJob($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.GenAiTuningService/GetTuningJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTuningJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->tuningJobName('[PROJECT]', '[LOCATION]', '[TUNING_JOB]'); + try { + $gapicClient->getTuningJob($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTuningJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $tuningJobsElement = new TuningJob(); + $tuningJobs = [ + $tuningJobsElement, + ]; + $expectedResponse = new ListTuningJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTuningJobs($tuningJobs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listTuningJobs($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTuningJobs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.GenAiTuningService/ListTuningJobs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTuningJobsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listTuningJobs($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->getLocation(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->listLocations(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $response = $gapicClient->getIamPolicy($resource); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + try { + $gapicClient->getIamPolicy($resource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $response = $gapicClient->setIamPolicy($resource, $policy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + try { + $gapicClient->setIamPolicy($resource, $policy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + try { + $gapicClient->testIamPermissions($resource, $permissions); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AiPlatform/tests/Unit/V1/NotebookServiceClientTest.php b/AiPlatform/tests/Unit/V1/NotebookServiceClientTest.php new file mode 100644 index 000000000000..480df68da8bb --- /dev/null +++ b/AiPlatform/tests/Unit/V1/NotebookServiceClientTest.php @@ -0,0 +1,1419 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return NotebookServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new NotebookServiceClient($options); + } + + /** @test */ + public function assignNotebookRuntimeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/assignNotebookRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $runtimeUser = 'runtimeUser1935670226'; + $proxyUri = 'proxyUri-475670501'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $serviceAccount = 'serviceAccount-1948028253'; + $isUpgradable = true; + $version = 'version351608024'; + $expectedResponse = new NotebookRuntime(); + $expectedResponse->setName($name); + $expectedResponse->setRuntimeUser($runtimeUser); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setIsUpgradable($isUpgradable); + $expectedResponse->setVersion($version); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/assignNotebookRuntimeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $formattedNotebookRuntimeTemplate = $gapicClient->notebookRuntimeTemplateName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME_TEMPLATE]'); + $notebookRuntime = new NotebookRuntime(); + $notebookRuntimeRuntimeUser = 'notebookRuntimeRuntimeUser825639430'; + $notebookRuntime->setRuntimeUser($notebookRuntimeRuntimeUser); + $notebookRuntimeDisplayName = 'notebookRuntimeDisplayName1784911024'; + $notebookRuntime->setDisplayName($notebookRuntimeDisplayName); + $response = $gapicClient->assignNotebookRuntime($formattedParent, $formattedNotebookRuntimeTemplate, $notebookRuntime); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.NotebookService/AssignNotebookRuntime', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getNotebookRuntimeTemplate(); + $this->assertProtobufEquals($formattedNotebookRuntimeTemplate, $actualValue); + $actualValue = $actualApiRequestObject->getNotebookRuntime(); + $this->assertProtobufEquals($notebookRuntime, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/assignNotebookRuntimeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function assignNotebookRuntimeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/assignNotebookRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $formattedNotebookRuntimeTemplate = $gapicClient->notebookRuntimeTemplateName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME_TEMPLATE]'); + $notebookRuntime = new NotebookRuntime(); + $notebookRuntimeRuntimeUser = 'notebookRuntimeRuntimeUser825639430'; + $notebookRuntime->setRuntimeUser($notebookRuntimeRuntimeUser); + $notebookRuntimeDisplayName = 'notebookRuntimeDisplayName1784911024'; + $notebookRuntime->setDisplayName($notebookRuntimeDisplayName); + $response = $gapicClient->assignNotebookRuntime($formattedParent, $formattedNotebookRuntimeTemplate, $notebookRuntime); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/assignNotebookRuntimeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createNotebookRuntimeTemplateTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createNotebookRuntimeTemplateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $isDefault = true; + $serviceAccount = 'serviceAccount-1948028253'; + $etag = 'etag3123477'; + $expectedResponse = new NotebookRuntimeTemplate(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setIsDefault($isDefault); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createNotebookRuntimeTemplateTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $notebookRuntimeTemplate = new NotebookRuntimeTemplate(); + $notebookRuntimeTemplateDisplayName = 'notebookRuntimeTemplateDisplayName-1609642794'; + $notebookRuntimeTemplate->setDisplayName($notebookRuntimeTemplateDisplayName); + $response = $gapicClient->createNotebookRuntimeTemplate($formattedParent, $notebookRuntimeTemplate); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.NotebookService/CreateNotebookRuntimeTemplate', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getNotebookRuntimeTemplate(); + $this->assertProtobufEquals($notebookRuntimeTemplate, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createNotebookRuntimeTemplateTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createNotebookRuntimeTemplateExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createNotebookRuntimeTemplateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $notebookRuntimeTemplate = new NotebookRuntimeTemplate(); + $notebookRuntimeTemplateDisplayName = 'notebookRuntimeTemplateDisplayName-1609642794'; + $notebookRuntimeTemplate->setDisplayName($notebookRuntimeTemplateDisplayName); + $response = $gapicClient->createNotebookRuntimeTemplate($formattedParent, $notebookRuntimeTemplate); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createNotebookRuntimeTemplateTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteNotebookRuntimeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteNotebookRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteNotebookRuntimeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->notebookRuntimeName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME]'); + $response = $gapicClient->deleteNotebookRuntime($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.NotebookService/DeleteNotebookRuntime', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteNotebookRuntimeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteNotebookRuntimeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteNotebookRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->notebookRuntimeName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME]'); + $response = $gapicClient->deleteNotebookRuntime($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteNotebookRuntimeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteNotebookRuntimeTemplateTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteNotebookRuntimeTemplateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteNotebookRuntimeTemplateTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->notebookRuntimeTemplateName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME_TEMPLATE]'); + $response = $gapicClient->deleteNotebookRuntimeTemplate($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.NotebookService/DeleteNotebookRuntimeTemplate', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteNotebookRuntimeTemplateTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteNotebookRuntimeTemplateExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteNotebookRuntimeTemplateTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->notebookRuntimeTemplateName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME_TEMPLATE]'); + $response = $gapicClient->deleteNotebookRuntimeTemplate($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteNotebookRuntimeTemplateTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getNotebookRuntimeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $runtimeUser = 'runtimeUser1935670226'; + $proxyUri = 'proxyUri-475670501'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $serviceAccount = 'serviceAccount-1948028253'; + $isUpgradable = true; + $version = 'version351608024'; + $expectedResponse = new NotebookRuntime(); + $expectedResponse->setName($name2); + $expectedResponse->setRuntimeUser($runtimeUser); + $expectedResponse->setProxyUri($proxyUri); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setIsUpgradable($isUpgradable); + $expectedResponse->setVersion($version); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->notebookRuntimeName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME]'); + $response = $gapicClient->getNotebookRuntime($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.NotebookService/GetNotebookRuntime', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNotebookRuntimeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->notebookRuntimeName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME]'); + try { + $gapicClient->getNotebookRuntime($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNotebookRuntimeTemplateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $isDefault = true; + $serviceAccount = 'serviceAccount-1948028253'; + $etag = 'etag3123477'; + $expectedResponse = new NotebookRuntimeTemplate(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setIsDefault($isDefault); + $expectedResponse->setServiceAccount($serviceAccount); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->notebookRuntimeTemplateName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME_TEMPLATE]'); + $response = $gapicClient->getNotebookRuntimeTemplate($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.NotebookService/GetNotebookRuntimeTemplate', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getNotebookRuntimeTemplateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->notebookRuntimeTemplateName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME_TEMPLATE]'); + try { + $gapicClient->getNotebookRuntimeTemplate($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNotebookRuntimeTemplatesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $notebookRuntimeTemplatesElement = new NotebookRuntimeTemplate(); + $notebookRuntimeTemplates = [ + $notebookRuntimeTemplatesElement, + ]; + $expectedResponse = new ListNotebookRuntimeTemplatesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setNotebookRuntimeTemplates($notebookRuntimeTemplates); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listNotebookRuntimeTemplates($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getNotebookRuntimeTemplates()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.NotebookService/ListNotebookRuntimeTemplates', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNotebookRuntimeTemplatesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listNotebookRuntimeTemplates($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNotebookRuntimesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $notebookRuntimesElement = new NotebookRuntime(); + $notebookRuntimes = [ + $notebookRuntimesElement, + ]; + $expectedResponse = new ListNotebookRuntimesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setNotebookRuntimes($notebookRuntimes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listNotebookRuntimes($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getNotebookRuntimes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.NotebookService/ListNotebookRuntimes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listNotebookRuntimesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listNotebookRuntimes($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function startNotebookRuntimeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startNotebookRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new StartNotebookRuntimeResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/startNotebookRuntimeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->notebookRuntimeName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME]'); + $response = $gapicClient->startNotebookRuntime($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.NotebookService/StartNotebookRuntime', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startNotebookRuntimeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function startNotebookRuntimeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/startNotebookRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->notebookRuntimeName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME]'); + $response = $gapicClient->startNotebookRuntime($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/startNotebookRuntimeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function upgradeNotebookRuntimeTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/upgradeNotebookRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new UpgradeNotebookRuntimeResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/upgradeNotebookRuntimeTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->notebookRuntimeName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME]'); + $response = $gapicClient->upgradeNotebookRuntime($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.NotebookService/UpgradeNotebookRuntime', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/upgradeNotebookRuntimeTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function upgradeNotebookRuntimeExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/upgradeNotebookRuntimeTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->notebookRuntimeName('[PROJECT]', '[LOCATION]', '[NOTEBOOK_RUNTIME]'); + $response = $gapicClient->upgradeNotebookRuntime($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/upgradeNotebookRuntimeTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->getLocation(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->listLocations(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $response = $gapicClient->getIamPolicy($resource); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + try { + $gapicClient->getIamPolicy($resource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $response = $gapicClient->setIamPolicy($resource, $policy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + try { + $gapicClient->setIamPolicy($resource, $policy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + try { + $gapicClient->testIamPermissions($resource, $permissions); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AiPlatform/tests/Unit/V1/PersistentResourceServiceClientTest.php b/AiPlatform/tests/Unit/V1/PersistentResourceServiceClientTest.php new file mode 100644 index 000000000000..f7ae0cc14d43 --- /dev/null +++ b/AiPlatform/tests/Unit/V1/PersistentResourceServiceClientTest.php @@ -0,0 +1,1020 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return PersistentResourceServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new PersistentResourceServiceClient($options); + } + + /** @test */ + public function createPersistentResourceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPersistentResourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $network = 'network1843485230'; + $expectedResponse = new PersistentResource(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setNetwork($network); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createPersistentResourceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $persistentResource = new PersistentResource(); + $persistentResourceResourcePools = []; + $persistentResource->setResourcePools($persistentResourceResourcePools); + $persistentResourceId = 'persistentResourceId661736772'; + $response = $gapicClient->createPersistentResource($formattedParent, $persistentResource, $persistentResourceId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.PersistentResourceService/CreatePersistentResource', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getPersistentResource(); + $this->assertProtobufEquals($persistentResource, $actualValue); + $actualValue = $actualApiRequestObject->getPersistentResourceId(); + $this->assertProtobufEquals($persistentResourceId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPersistentResourceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createPersistentResourceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createPersistentResourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $persistentResource = new PersistentResource(); + $persistentResourceResourcePools = []; + $persistentResource->setResourcePools($persistentResourceResourcePools); + $persistentResourceId = 'persistentResourceId661736772'; + $response = $gapicClient->createPersistentResource($formattedParent, $persistentResource, $persistentResourceId); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createPersistentResourceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deletePersistentResourceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deletePersistentResourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deletePersistentResourceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->persistentResourceName('[PROJECT]', '[LOCATION]', '[PERSISTENT_RESOURCE]'); + $response = $gapicClient->deletePersistentResource($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.PersistentResourceService/DeletePersistentResource', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deletePersistentResourceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deletePersistentResourceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deletePersistentResourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->persistentResourceName('[PROJECT]', '[LOCATION]', '[PERSISTENT_RESOURCE]'); + $response = $gapicClient->deletePersistentResource($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deletePersistentResourceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getPersistentResourceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $network = 'network1843485230'; + $expectedResponse = new PersistentResource(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setNetwork($network); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->persistentResourceName('[PROJECT]', '[LOCATION]', '[PERSISTENT_RESOURCE]'); + $response = $gapicClient->getPersistentResource($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.PersistentResourceService/GetPersistentResource', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getPersistentResourceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->persistentResourceName('[PROJECT]', '[LOCATION]', '[PERSISTENT_RESOURCE]'); + try { + $gapicClient->getPersistentResource($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPersistentResourcesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $persistentResourcesElement = new PersistentResource(); + $persistentResources = [ + $persistentResourcesElement, + ]; + $expectedResponse = new ListPersistentResourcesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPersistentResources($persistentResources); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $response = $gapicClient->listPersistentResources($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPersistentResources()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.PersistentResourceService/ListPersistentResources', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPersistentResourcesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + try { + $gapicClient->listPersistentResources($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rebootPersistentResourceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/rebootPersistentResourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $network = 'network1843485230'; + $expectedResponse = new PersistentResource(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setNetwork($network); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/rebootPersistentResourceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->persistentResourceName('[PROJECT]', '[LOCATION]', '[PERSISTENT_RESOURCE]'); + $response = $gapicClient->rebootPersistentResource($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.PersistentResourceService/RebootPersistentResource', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rebootPersistentResourceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function rebootPersistentResourceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/rebootPersistentResourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->persistentResourceName('[PROJECT]', '[LOCATION]', '[PERSISTENT_RESOURCE]'); + $response = $gapicClient->rebootPersistentResource($formattedName); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rebootPersistentResourceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updatePersistentResourceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updatePersistentResourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $network = 'network1843485230'; + $expectedResponse = new PersistentResource(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setNetwork($network); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updatePersistentResourceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $persistentResource = new PersistentResource(); + $persistentResourceResourcePools = []; + $persistentResource->setResourcePools($persistentResourceResourcePools); + $updateMask = new FieldMask(); + $response = $gapicClient->updatePersistentResource($persistentResource, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.aiplatform.v1.PersistentResourceService/UpdatePersistentResource', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getPersistentResource(); + $this->assertProtobufEquals($persistentResource, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updatePersistentResourceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updatePersistentResourceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updatePersistentResourceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $persistentResource = new PersistentResource(); + $persistentResourceResourcePools = []; + $persistentResource->setResourcePools($persistentResourceResourcePools); + $updateMask = new FieldMask(); + $response = $gapicClient->updatePersistentResource($persistentResource, $updateMask); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updatePersistentResourceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $response = $gapicClient->getLocation(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->getLocation(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $response = $gapicClient->listLocations(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + try { + $gapicClient->listLocations(); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $response = $gapicClient->getIamPolicy($resource); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + try { + $gapicClient->getIamPolicy($resource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $version = 351608024; + $etag = '21'; + $expectedResponse = new Policy(); + $expectedResponse->setVersion($version); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + $response = $gapicClient->setIamPolicy($resource, $policy); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPolicy(); + $this->assertProtobufEquals($policy, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setIamPolicyExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $policy = new Policy(); + try { + $gapicClient->setIamPolicy($resource, $policy); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TestIamPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + $response = $gapicClient->testIamPermissions($resource, $permissions); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.iam.v1.IAMPolicy/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getPermissions(); + $this->assertProtobufEquals($permissions, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function testIamPermissionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $resource = 'resource-341064690'; + $permissions = []; + try { + $gapicClient->testIamPermissions($resource, $permissions); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} From 754cf40dd24d975ad9fd569c4966eb826dbdeaa5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:29:31 -0700 Subject: [PATCH 04/86] feat: add smart scheduling (#7178) feat: add backup indexing docs: remove the next id annotation docs: add output only and optional api field behavior label docs: update retention policy and cron schedule comment to include new constraints from smart scheduling PiperOrigin-RevId: 618989341 Source-Link: https://github.com/googleapis/googleapis/commit/b8691edb3f1d3c1583aa9cd89240eb359eebe9c7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d5fd4fbaa1860872a42a43ed7ce79966247591cc Copy-Tag: eyJwIjoiR2tlQmFja3VwLy5Pd2xCb3QueWFtbCIsImgiOiJkNWZkNGZiYWExODYwODcyYTQyYTQzZWQ3Y2U3OTk2NjI0NzU5MWNjIn0= --- GkeBackup/metadata/V1/Backup.php | Bin 2886 -> 2931 bytes GkeBackup/metadata/V1/BackupPlan.php | Bin 2636 -> 3709 bytes GkeBackup/metadata/V1/Common.php | 27 +- GkeBackup/metadata/V1/Gkebackup.php | 131 +++++---- GkeBackup/metadata/V1/Restore.php | Bin 4693 -> 4813 bytes GkeBackup/metadata/V1/RestorePlan.php | Bin 1997 -> 2007 bytes .../get_backup_index_download_url.php | 78 +++++ GkeBackup/src/V1/Backup.php | 81 +++--- GkeBackup/src/V1/Backup/ClusterMetadata.php | 66 +++-- GkeBackup/src/V1/BackupPlan.php | 172 ++++++++--- GkeBackup/src/V1/BackupPlan/BackupConfig.php | 74 ++--- .../src/V1/BackupPlan/RetentionPolicy.php | 150 +++++----- GkeBackup/src/V1/BackupPlan/Schedule.php | 184 ++++++++++-- .../src/V1/Client/BackupForGKEClient.php | 30 ++ GkeBackup/src/V1/CreateBackupRequest.php | 32 +-- GkeBackup/src/V1/DeleteBackupPlanRequest.php | 14 +- GkeBackup/src/V1/DeleteBackupRequest.php | 36 +-- GkeBackup/src/V1/DeleteRestorePlanRequest.php | 36 +-- GkeBackup/src/V1/DeleteRestoreRequest.php | 36 +-- GkeBackup/src/V1/EncryptionKey.php | 14 +- GkeBackup/src/V1/ExclusionWindow.php | 268 ++++++++++++++++++ .../src/V1/ExclusionWindow/DayOfWeekList.php | 68 +++++ .../src/V1/Gapic/BackupForGKEGapicClient.php | 108 +++++-- .../V1/GetBackupIndexDownloadUrlRequest.php | 91 ++++++ .../V1/GetBackupIndexDownloadUrlResponse.php | 60 ++++ GkeBackup/src/V1/ListBackupPlansRequest.php | 64 ++--- GkeBackup/src/V1/ListBackupsRequest.php | 64 ++--- GkeBackup/src/V1/ListRestorePlansRequest.php | 64 ++--- GkeBackup/src/V1/ListRestoresRequest.php | 64 ++--- GkeBackup/src/V1/ListVolumeBackupsRequest.php | 64 ++--- .../src/V1/ListVolumeRestoresRequest.php | 64 ++--- GkeBackup/src/V1/NamespacedName.php | 28 +- GkeBackup/src/V1/NamespacedNames.php | 14 +- GkeBackup/src/V1/Namespaces.php | 14 +- GkeBackup/src/V1/Restore.php | 1 - GkeBackup/src/V1/RestoreConfig.php | 181 ++++++------ .../ClusterResourceRestoreScope.php | 72 ++--- GkeBackup/src/V1/RestoreConfig/GroupKind.php | 40 +-- .../src/V1/RestoreConfig/ResourceFilter.php | 106 ++++--- .../src/V1/RestoreConfig/SubstitutionRule.php | 112 ++++---- .../V1/RestoreConfig/TransformationRule.php | 52 ++-- .../TransformationRuleAction.php | 58 ++-- GkeBackup/src/V1/RestorePlan.php | 29 +- GkeBackup/src/V1/RpoConfig.php | 150 ++++++++++ GkeBackup/src/V1/UpdateBackupPlanRequest.php | 16 +- GkeBackup/src/V1/UpdateBackupRequest.php | 16 +- GkeBackup/src/V1/UpdateRestorePlanRequest.php | 16 +- GkeBackup/src/V1/UpdateRestoreRequest.php | 16 +- GkeBackup/src/V1/VolumeBackup.php | 1 - GkeBackup/src/V1/VolumeRestore.php | 1 - GkeBackup/src/V1/gapic_metadata.json | 5 + .../backup_for_gke_client_config.json | 5 + .../backup_for_gke_descriptor_config.php | 12 + .../backup_for_gke_rest_client_config.php | 13 +- .../tests/Unit/V1/BackupForGKEClientTest.php | 73 +++++ .../Unit/V1/Client/BackupForGKEClientTest.php | 78 +++++ 56 files changed, 2232 insertions(+), 1017 deletions(-) create mode 100644 GkeBackup/samples/V1/BackupForGKEClient/get_backup_index_download_url.php create mode 100644 GkeBackup/src/V1/ExclusionWindow.php create mode 100644 GkeBackup/src/V1/ExclusionWindow/DayOfWeekList.php create mode 100644 GkeBackup/src/V1/GetBackupIndexDownloadUrlRequest.php create mode 100644 GkeBackup/src/V1/GetBackupIndexDownloadUrlResponse.php create mode 100644 GkeBackup/src/V1/RpoConfig.php diff --git a/GkeBackup/metadata/V1/Backup.php b/GkeBackup/metadata/V1/Backup.php index 6eae599157990ae691ac6eb4725b5a72b80d33af..29dacb1679325fe492e9c0967c3c3bc950e4d523 100644 GIT binary patch delta 269 zcmX>m_E~JhNhZeolTR_NWPCBXgn0v_(_~c^TNNkf2ab$FvRncwsX3`7sqs1a$=UHK ziIv3?>><+Hmn7H_zb4rU#Qj2_nhNL8xBnpXeu_r@>Bp6|;nT3GnWLp%+m!%dJgUn$< v$Yf2{;YhUunaM09#l@YToeEdQ0$1h10Q3uAVqQr`KEe=Ixb)@&9BoVh71B;A delta 224 zcmew?c1&!;NhZcklTR_NWZXTugn0v_?POIJTPYz4E`gNPoYa!k_?-OY?D&+#%3=w2 z1x5|l$!#poBEnqUMX4o;nRyTiPLRarM=Yn9Kr$(*#mPmP1tppJc@mO98P3T^*&VFs zGI8-c=ad$gq!#%CwWcJNBnt6!u_r@>Bp5*og@C%VEsEpIQj3Z~x|zU&sgu1pQuT#I jxwzA_Q{i$fAUO{PphNi*^GY)E5xQ7GGMnFWv@rny0jWVN diff --git a/GkeBackup/metadata/V1/BackupPlan.php b/GkeBackup/metadata/V1/BackupPlan.php index 6ca49ae489d58297c71476835343d8222f6b8dab..cc97d9528273cfcccc639fd6cf16955d215af5e6 100644 GIT binary patch delta 1105 zcmZuwO-~a+7-o07rJVwmrIfNoA(ccvOp7%pUW}m>MIg3fk&DS@*`3z0+nr{27N`e3 z;2$7!@aDxIpvJ_T@nFKic=F)U_zOIlcrtNjKT06ncHZ}$=Xu^|pZS*gH}&qN7_WMc zP7tk$4fR&3y>lC#44JK-@I-9xG+(8?h8S90!X>8;ews zw24bCj9V5gbsbFbuGcJ?0mqIszpZA&CSgP+lMxmDF*Sd>9#WpyBoTSgEPNcMhtliG z97vhaH5}9>2-`V%Mwm-hq+iPdy%D=DG^iJ=4f<#04n2-7hu@ntDc_ZYxw@Rm`zX3W z&>oX!=28qL5!|{@pUL;a$uIKrx{?PYP8Vwqa@(2(_n?)#z^45PNtpuae$#=v%M^`9 ziX^oI(p!)~n=7qj3mH9SmOhG4uLo4qK-txew%64hNOWXt%xO0#M(Bbv2I3Yr+DxF- z7pQ&~K;ohC1e%@&6_vh?k1qvqY`Uv^E}P~M;X1bf-~tV7H&M%nNtI{mk(|G>)x|4* zHMqS3R2v=;%?+VVEzm~)NLNMmJN*&=ba@7hA=|J#6KZ?d@;Z`12baO(qyr`^$QFy?}TxOoOk8Bg~ zb91D*RC$3f@M1OU?)XiAjlxe6q|Y>z5&$maA{vjBPmwBTi$M^JJfKA$^jfp3_c(~C zEP+IjW%fI{m#Ok(G#-V$SbgfJ9oxZ`>mchQn>_~&8;0jN&^CN`VCea11mN@Wm$x>c zq=9Ve$m#_SvO*mU@eF9VsqvTSr#n@?dEUB3rnc7HVN;vPC2Ip}1q`1mDc8<`3Cz2Z hGmH0c`0iDPSXy8tzj7>qiw5ol%IPaPL${NE{{syYRtNw9 delta 305 zcmew>b4FxC3)AHNO!AW(ne|yV@NsER^wyqypE-VV9E$?8(gyCyms#eC2y=0#q!uR^ zWfqiV=I2SUDllqrPVQp0XY`+Ziq)S<$Z@g)nQRkTNIc z2ae1_U;`49OESw6OHxxLxPdYpLY|W!vw2Q7WUmvIisRxBN-asv0~sHXpOcwfDI`Dn zKf8RQkQA3tQetv;X+eAu(9q1h_>{!TVhJXo0jxrNTx>b{$=N^ynL!3h8FFz1CugLl zl;)%giE{BK7v<;07efUk7(uQ9X(>o7Ee2`<8NnfSc(N?#UPkH3w>hPmgv2NRinternalAddGeneratedFile( ' -– -&google/cloud/gkebackup/v1/common.protogoogle.cloud.gkebackup.v1" - -Namespaces - -namespaces ( "1 -NamespacedName - namespace (  -name ( "V -NamespacedNamesC -namespaced_names ( 2).google.cloud.gkebackup.v1.NamespacedName"W - EncryptionKeyF -gcp_kms_encryption_key ( B&úA# +È +&google/cloud/gkebackup/v1/common.protogoogle.cloud.gkebackup.v1google/api/resource.proto"% + +Namespaces + +namespaces ( BàA"; +NamespacedName + namespace ( BàA +name ( BàA"[ +NamespacedNamesH +namespaced_names ( 2).google.cloud.gkebackup.v1.NamespacedNameBàA"Z + EncryptionKeyI +gcp_kms_encryption_key ( B)àAúA# !cloudkms.googleapis.com/CryptoKeyB com.google.cloud.gkebackup.v1B CommonProtoPZ;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppbªGoogle.Cloud.GkeBackup.V1ÊGoogle\\Cloud\\GkeBackup\\V1êGoogle::Cloud::GkeBackup::V1bproto3' , true); diff --git a/GkeBackup/metadata/V1/Gkebackup.php b/GkeBackup/metadata/V1/Gkebackup.php index b03cdeb1e942..88dc7db961f7 100644 --- a/GkeBackup/metadata/V1/Gkebackup.php +++ b/GkeBackup/metadata/V1/Gkebackup.php @@ -29,7 +29,7 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); $pool->internalAddGeneratedFile( ' -ÿO +ÕT )google/cloud/gkebackup/v1/gkebackup.protogoogle.cloud.gkebackup.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto&google/cloud/gkebackup/v1/backup.proto+google/cloud/gkebackup/v1/backup_plan.proto\'google/cloud/gkebackup/v1/restore.proto,google/cloud/gkebackup/v1/restore_plan.proto&google/cloud/gkebackup/v1/volume.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"€ OperationMetadata4 create_time ( 2.google.protobuf.TimestampBàA1 @@ -43,64 +43,64 @@ public static function initOnce() { parent ( B)àAúA# !locations.googleapis.com/Location? backup_plan ( 2%.google.cloud.gkebackup.v1.BackupPlanBàA -backup_plan_id ( BàA"œ +backup_plan_id ( BàA"° ListBackupPlansRequest9 parent ( B)àAúA# -!locations.googleapis.com/Location - page_size ( +!locations.googleapis.com/Location + page_size (BàA -page_token (  -filter (  -order_by ( "„ +page_token ( BàA +filter ( BàA +order_by ( BàA"„ ListBackupPlansResponse; backup_plans ( 2%.google.cloud.gkebackup.v1.BackupPlan next_page_token (  unreachable ( "Q GetBackupPlanRequest9 name ( B+àAúA% -#gkebackup.googleapis.com/BackupPlan"‹ +#gkebackup.googleapis.com/BackupPlan" UpdateBackupPlanRequest? - backup_plan ( 2%.google.cloud.gkebackup.v1.BackupPlanBàA/ - update_mask ( 2.google.protobuf.FieldMask"b + backup_plan ( 2%.google.cloud.gkebackup.v1.BackupPlanBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"g DeleteBackupPlanRequest9 name ( B+àAúA% -#gkebackup.googleapis.com/BackupPlan -etag ( "˜ +#gkebackup.googleapis.com/BackupPlan +etag ( BàA"¢ CreateBackupRequest; parent ( B+àAúA% -#gkebackup.googleapis.com/BackupPlan1 -backup ( 2!.google.cloud.gkebackup.v1.Backup - backup_id ( "š +#gkebackup.googleapis.com/BackupPlan6 +backup ( 2!.google.cloud.gkebackup.v1.BackupBàA + backup_id ( BàA"® ListBackupsRequest; parent ( B+àAúA% -#gkebackup.googleapis.com/BackupPlan - page_size ( +#gkebackup.googleapis.com/BackupPlan + page_size (BàA -page_token (  -filter (  -order_by ( "b +page_token ( BàA +filter ( BàA +order_by ( BàA"b ListBackupsResponse2 backups ( 2!.google.cloud.gkebackup.v1.Backup next_page_token ( "I GetBackupRequest5 name ( B\'àAúA! -gkebackup.googleapis.com/Backup"~ +gkebackup.googleapis.com/Backup"ƒ UpdateBackupRequest6 -backup ( 2!.google.cloud.gkebackup.v1.BackupBàA/ - update_mask ( 2.google.protobuf.FieldMask"i +backup ( 2!.google.cloud.gkebackup.v1.BackupBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"s DeleteBackupRequest5 name ( B\'àAúA! -gkebackup.googleapis.com/Backup -etag (  -force ("œ +gkebackup.googleapis.com/Backup +etag ( BàA +force (BàA"° ListVolumeBackupsRequest7 parent ( B\'àAúA! -gkebackup.googleapis.com/Backup - page_size ( +gkebackup.googleapis.com/Backup + page_size (BàA -page_token (  -filter (  -order_by ( "u +page_token ( BàA +filter ( BàA +order_by ( BàA"u ListVolumeBackupsResponse? volume_backups ( 2\'.google.cloud.gkebackup.v1.VolumeBackup next_page_token ( "U @@ -111,73 +111,79 @@ public static function initOnce() { parent ( B)àAúA# !locations.googleapis.com/LocationA restore_plan ( 2&.google.cloud.gkebackup.v1.RestorePlanBàA -restore_plan_id ( BàA" +restore_plan_id ( BàA"± ListRestorePlansRequest9 parent ( B)àAúA# -!locations.googleapis.com/Location - page_size ( +!locations.googleapis.com/Location + page_size (BàA -page_token (  -filter (  -order_by ( "‡ +page_token ( BàA +filter ( BàA +order_by ( BàA"‡ ListRestorePlansResponse= restore_plans ( 2&.google.cloud.gkebackup.v1.RestorePlan next_page_token (  unreachable ( "S GetRestorePlanRequest: name ( B,àAúA& -$gkebackup.googleapis.com/RestorePlan"Ž +$gkebackup.googleapis.com/RestorePlan"“ UpdateRestorePlanRequestA - restore_plan ( 2&.google.cloud.gkebackup.v1.RestorePlanBàA/ - update_mask ( 2.google.protobuf.FieldMask"s + restore_plan ( 2&.google.cloud.gkebackup.v1.RestorePlanBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"} DeleteRestorePlanRequest: name ( B,àAúA& -$gkebackup.googleapis.com/RestorePlan -etag (  -force ("§ +$gkebackup.googleapis.com/RestorePlan +etag ( BàA +force (BàA"§ CreateRestoreRequest< parent ( B,àAúA& $gkebackup.googleapis.com/RestorePlan8 restore ( 2".google.cloud.gkebackup.v1.RestoreBàA -restore_id ( BàA"œ +restore_id ( BàA"° ListRestoresRequest< parent ( B,àAúA& -$gkebackup.googleapis.com/RestorePlan - page_size ( +$gkebackup.googleapis.com/RestorePlan + page_size (BàA -page_token (  -filter (  -order_by ( "z +page_token ( BàA +filter ( BàA +order_by ( BàA"z ListRestoresResponse4 restores ( 2".google.cloud.gkebackup.v1.Restore next_page_token (  unreachable ( "K GetRestoreRequest6 name ( B(àAúA" - gkebackup.googleapis.com/Restore" + gkebackup.googleapis.com/Restore"† UpdateRestoreRequest8 -restore ( 2".google.cloud.gkebackup.v1.RestoreBàA/ - update_mask ( 2.google.protobuf.FieldMask"k +restore ( 2".google.cloud.gkebackup.v1.RestoreBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"u DeleteRestoreRequest6 name ( B(àAúA" - gkebackup.googleapis.com/Restore -etag (  -force ("ž + gkebackup.googleapis.com/Restore +etag ( BàA +force (BàA"² ListVolumeRestoresRequest8 parent ( B(àAúA" - gkebackup.googleapis.com/Restore - page_size ( + gkebackup.googleapis.com/Restore + page_size (BàA -page_token (  -filter (  -order_by ( "x +page_token ( BàA +filter ( BàA +order_by ( BàA"x ListVolumeRestoresResponseA volume_restores ( 2(.google.cloud.gkebackup.v1.VolumeRestore next_page_token ( "W GetVolumeRestoreRequest< name ( B.àAúA( -&gkebackup.googleapis.com/VolumeRestore2Å( +&gkebackup.googleapis.com/VolumeRestore"[ + GetBackupIndexDownloadUrlRequest7 +backup ( B\'àAúA! +gkebackup.googleapis.com/Backup"< +!GetBackupIndexDownloadUrlResponse + +signed_url ( BàA2Æ* BackupForGKEò CreateBackupPlan2.google.cloud.gkebackup.v1.CreateBackupPlanRequest.google.longrunning.Operation"ŠÊA @@ -217,7 +223,8 @@ public static function initOnce() { DeleteRestore/.google.cloud.gkebackup.v1.DeleteRestoreRequest.google.longrunning.Operation"wÊA* google.protobuf.EmptyOperationMetadataÚAname‚Óä“=*;/v1/{name=projects/*/locations/*/restorePlans/*/restores/*}à ListVolumeRestores4.google.cloud.gkebackup.v1.ListVolumeRestoresRequest5.google.cloud.gkebackup.v1.ListVolumeRestoresResponse"]ÚAparent‚Óä“NL/v1/{parent=projects/*/locations/*/restorePlans/*/restores/*}/volumeRestoresÍ -GetVolumeRestore2.google.cloud.gkebackup.v1.GetVolumeRestoreRequest(.google.cloud.gkebackup.v1.VolumeRestore"[ÚAname‚Óä“NL/v1/{name=projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*}LÊAgkebackup.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB¡ +GetVolumeRestore2.google.cloud.gkebackup.v1.GetVolumeRestoreRequest(.google.cloud.gkebackup.v1.VolumeRestore"[ÚAname‚Óä“NL/v1/{name=projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*}þ +GetBackupIndexDownloadUrl;.google.cloud.gkebackup.v1.GetBackupIndexDownloadUrlRequest<.google.cloud.gkebackup.v1.GetBackupIndexDownloadUrlResponse"fÚAbackup‚Óä“WU/v1/{backup=projects/*/locations/*/backupPlans/*/backups/*}:getBackupIndexDownloadUrlLÊAgkebackup.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB¡ com.google.cloud.gkebackup.v1BGKEBackupProtoPZ;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppbªGoogle.Cloud.GkeBackup.V1ÊGoogle\\Cloud\\GkeBackup\\V1êGoogle::Cloud::GkeBackup::V1êA^ container.googleapis.com/Cluster:projects/{project}/locations/{location}/clusters/{cluster}êAx !cloudkms.googleapis.com/CryptoKeySprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}bproto3' diff --git a/GkeBackup/metadata/V1/Restore.php b/GkeBackup/metadata/V1/Restore.php index 63426464d76d402599e9052b460427c51f595cb1..331187846cb456db3c2a96f964761220f3c25493 100644 GIT binary patch delta 608 zcmZvZ&raJw5XNOEQIc`&kOifdLBSFr_0~6N1#RI_4pC5~79=c_EMbe;b=NjMR_cL6 zRf)qq1eYGDa^S)nAdYZDLV_o#dgOrZwfG}(TkUVY`DVVkm_J`QKGXG++3~slr#yK& z1!j*%v5@q=;M;6O82+vft4pQpMU5o*uNu~iH@Mho&EU^kub|)XvKCZwI$o-qnzoKz z=ofGkkKoHx4xJBBUy&jSKQTTe)7UiH^Qxx zMz`qM$77@WLrG_#=?8%~%KGNo$S$SgnxfNSaq$e6AE0xi!Ngj!6~!!0VkUSm2`K46 zEB57x#vb?gXcYPb8rhm#D#jseKorN_#?!`B%1H(T_kS_j=-iN9M+x zLk+C-nt7nhEJ(*7uK-?NXcY_$8Xsp>V5#}nNN{ET=;Ykuft933xU;%Nr47cAMgz&h PEW12(HPzT}{@3pT7Bj3v delta 463 zcmZXQze>YU6vnw}YnziMwYRj59YP0%ZtgA)q8$_|l@^Lai0y4nO_Pv6x;iUH(7gKy?d6Vdt*G2Zj*(l0;o+EMqa?S zJhyKTXb&&bJ&F1_OZ%d@8DF6e7+oh0BNpIIzKkh(Z`_tuLR#2^mP9-F0G-Xs2FUfm zi~U{O?a>lw0Smo2=rVI4RGm~wO{PUqfAte?)FmNTJ_!yKgEa6$X-KqzA4MSNk8yLrf)^Z3wWA^M8=VUDL$ Mz{gx+{Fa+a-yJfA=Kufz diff --git a/GkeBackup/metadata/V1/RestorePlan.php b/GkeBackup/metadata/V1/RestorePlan.php index dea49e1ab569393784ff5f850dc2b269859f8480..6b207b777950c28a645c25f0993464cd6d478976 100644 GIT binary patch delta 76 zcmX@hf1Q8BRVJ40oLoAS?U)rO=5SADWo}~JGP#3!fusZ%cS>q;a#3bMNoIbY1giq0 d2B#DA14qWmHY}$Z-6wOfIq2?{KeJ_8|a%pgMX>V>A X1t0+^36ntt%K<`@4Fy88R0V?qsT&h& diff --git a/GkeBackup/samples/V1/BackupForGKEClient/get_backup_index_download_url.php b/GkeBackup/samples/V1/BackupForGKEClient/get_backup_index_download_url.php new file mode 100644 index 000000000000..9e8dd874dec3 --- /dev/null +++ b/GkeBackup/samples/V1/BackupForGKEClient/get_backup_index_download_url.php @@ -0,0 +1,78 @@ +setBackup($formattedBackup); + + // Call the API and handle any network failures. + try { + /** @var GetBackupIndexDownloadUrlResponse $response */ + $response = $backupForGKEClient->getBackupIndexDownloadUrl($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedBackup = BackupForGKEClient::backupName( + '[PROJECT]', + '[LOCATION]', + '[BACKUP_PLAN]', + '[BACKUP]' + ); + + get_backup_index_download_url_sample($formattedBackup); +} +// [END gkebackup_v1_generated_BackupForGKE_GetBackupIndexDownloadUrl_sync] diff --git a/GkeBackup/src/V1/Backup.php b/GkeBackup/src/V1/Backup.php index bfca3d5564e6..14f35f1f0cde 100644 --- a/GkeBackup/src/V1/Backup.php +++ b/GkeBackup/src/V1/Backup.php @@ -13,7 +13,6 @@ * some portion of the state of a GKE cluster, the record of the backup * operation itself, and an anchor for the underlying artifacts that * comprise the Backup (the config backup and VolumeBackups). - * Next id: 28 * * Generated from protobuf message google.cloud.gkebackup.v1.Backup */ @@ -54,15 +53,15 @@ class Backup extends \Google\Protobuf\Internal\Message */ private $manual = false; /** - * A set of custom labels supplied by user. + * Optional. A set of custom labels supplied by user. * - * Generated from protobuf field map labels = 6; + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; */ private $labels; /** - * Minimum age for this Backup (in days). If this field is set to a non-zero - * value, the Backup will be "locked" against deletion (either manual or - * automatic deletion) for the number of days provided (measured from the + * Optional. Minimum age for this Backup (in days). If this field is set to a + * non-zero value, the Backup will be "locked" against deletion (either manual + * or automatic deletion) for the number of days provided (measured from the * creation time of the Backup). MUST be an integer value between 0-90 * (inclusive). * Defaults to parent BackupPlan's @@ -70,7 +69,7 @@ class Backup extends \Google\Protobuf\Internal\Message * setting and may only be increased * (either at creation time or in a subsequent update). * - * Generated from protobuf field int32 delete_lock_days = 7; + * Generated from protobuf field int32 delete_lock_days = 7 [(.google.api.field_behavior) = OPTIONAL]; */ private $delete_lock_days = 0; /** @@ -82,8 +81,8 @@ class Backup extends \Google\Protobuf\Internal\Message */ private $delete_lock_expire_time = null; /** - * The age (in days) after which this Backup will be automatically deleted. - * Must be an integer value >= 0: + * Optional. The age (in days) after which this Backup will be automatically + * deleted. Must be an integer value >= 0: * - If 0, no automatic deletion will occur for this Backup. * - If not 0, this must be >= * [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days] and @@ -93,7 +92,7 @@ class Backup extends \Google\Protobuf\Internal\Message * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] * value. * - * Generated from protobuf field int32 retain_days = 9; + * Generated from protobuf field int32 retain_days = 9 [(.google.api.field_behavior) = OPTIONAL]; */ private $retain_days = 0; /** @@ -191,9 +190,9 @@ class Backup extends \Google\Protobuf\Internal\Message */ private $etag = ''; /** - * User specified descriptive string for this Backup. + * Optional. User specified descriptive string for this Backup. * - * Generated from protobuf field string description = 25; + * Generated from protobuf field string description = 25 [(.google.api.field_behavior) = OPTIONAL]; */ private $description = ''; /** @@ -231,11 +230,11 @@ class Backup extends \Google\Protobuf\Internal\Message * manually by a user or via a schedule in the BackupPlan. A value of True * means that the Backup was created manually. * @type array|\Google\Protobuf\Internal\MapField $labels - * A set of custom labels supplied by user. + * Optional. A set of custom labels supplied by user. * @type int $delete_lock_days - * Minimum age for this Backup (in days). If this field is set to a non-zero - * value, the Backup will be "locked" against deletion (either manual or - * automatic deletion) for the number of days provided (measured from the + * Optional. Minimum age for this Backup (in days). If this field is set to a + * non-zero value, the Backup will be "locked" against deletion (either manual + * or automatic deletion) for the number of days provided (measured from the * creation time of the Backup). MUST be an integer value between 0-90 * (inclusive). * Defaults to parent BackupPlan's @@ -247,8 +246,8 @@ class Backup extends \Google\Protobuf\Internal\Message * backup (calculated from create_time + * [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days]). * @type int $retain_days - * The age (in days) after which this Backup will be automatically deleted. - * Must be an integer value >= 0: + * Optional. The age (in days) after which this Backup will be automatically + * deleted. Must be an integer value >= 0: * - If 0, no automatic deletion will occur for this Backup. * - If not 0, this must be >= * [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days] and @@ -312,7 +311,7 @@ class Backup extends \Google\Protobuf\Internal\Message * `UpdateBackup` or `DeleteBackup` to ensure that their change will be * applied to the same version of the resource. * @type string $description - * User specified descriptive string for this Backup. + * Optional. User specified descriptive string for this Backup. * @type int $pod_count * Output only. The total number of Kubernetes Pods contained in the Backup. * @type int|string $config_backup_size_bytes @@ -483,9 +482,9 @@ public function setManual($var) } /** - * A set of custom labels supplied by user. + * Optional. A set of custom labels supplied by user. * - * Generated from protobuf field map labels = 6; + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\MapField */ public function getLabels() @@ -494,9 +493,9 @@ public function getLabels() } /** - * A set of custom labels supplied by user. + * Optional. A set of custom labels supplied by user. * - * Generated from protobuf field map labels = 6; + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; * @param array|\Google\Protobuf\Internal\MapField $var * @return $this */ @@ -509,9 +508,9 @@ public function setLabels($var) } /** - * Minimum age for this Backup (in days). If this field is set to a non-zero - * value, the Backup will be "locked" against deletion (either manual or - * automatic deletion) for the number of days provided (measured from the + * Optional. Minimum age for this Backup (in days). If this field is set to a + * non-zero value, the Backup will be "locked" against deletion (either manual + * or automatic deletion) for the number of days provided (measured from the * creation time of the Backup). MUST be an integer value between 0-90 * (inclusive). * Defaults to parent BackupPlan's @@ -519,7 +518,7 @@ public function setLabels($var) * setting and may only be increased * (either at creation time or in a subsequent update). * - * Generated from protobuf field int32 delete_lock_days = 7; + * Generated from protobuf field int32 delete_lock_days = 7 [(.google.api.field_behavior) = OPTIONAL]; * @return int */ public function getDeleteLockDays() @@ -528,9 +527,9 @@ public function getDeleteLockDays() } /** - * Minimum age for this Backup (in days). If this field is set to a non-zero - * value, the Backup will be "locked" against deletion (either manual or - * automatic deletion) for the number of days provided (measured from the + * Optional. Minimum age for this Backup (in days). If this field is set to a + * non-zero value, the Backup will be "locked" against deletion (either manual + * or automatic deletion) for the number of days provided (measured from the * creation time of the Backup). MUST be an integer value between 0-90 * (inclusive). * Defaults to parent BackupPlan's @@ -538,7 +537,7 @@ public function getDeleteLockDays() * setting and may only be increased * (either at creation time or in a subsequent update). * - * Generated from protobuf field int32 delete_lock_days = 7; + * Generated from protobuf field int32 delete_lock_days = 7 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var * @return $this */ @@ -591,8 +590,8 @@ public function setDeleteLockExpireTime($var) } /** - * The age (in days) after which this Backup will be automatically deleted. - * Must be an integer value >= 0: + * Optional. The age (in days) after which this Backup will be automatically + * deleted. Must be an integer value >= 0: * - If 0, no automatic deletion will occur for this Backup. * - If not 0, this must be >= * [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days] and @@ -602,7 +601,7 @@ public function setDeleteLockExpireTime($var) * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] * value. * - * Generated from protobuf field int32 retain_days = 9; + * Generated from protobuf field int32 retain_days = 9 [(.google.api.field_behavior) = OPTIONAL]; * @return int */ public function getRetainDays() @@ -611,8 +610,8 @@ public function getRetainDays() } /** - * The age (in days) after which this Backup will be automatically deleted. - * Must be an integer value >= 0: + * Optional. The age (in days) after which this Backup will be automatically + * deleted. Must be an integer value >= 0: * - If 0, no automatic deletion will occur for this Backup. * - If not 0, this must be >= * [delete_lock_days][google.cloud.gkebackup.v1.Backup.delete_lock_days] and @@ -622,7 +621,7 @@ public function getRetainDays() * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] * value. * - * Generated from protobuf field int32 retain_days = 9; + * Generated from protobuf field int32 retain_days = 9 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var * @return $this */ @@ -1128,9 +1127,9 @@ public function setEtag($var) } /** - * User specified descriptive string for this Backup. + * Optional. User specified descriptive string for this Backup. * - * Generated from protobuf field string description = 25; + * Generated from protobuf field string description = 25 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getDescription() @@ -1139,9 +1138,9 @@ public function getDescription() } /** - * User specified descriptive string for this Backup. + * Optional. User specified descriptive string for this Backup. * - * Generated from protobuf field string description = 25; + * Generated from protobuf field string description = 25 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ diff --git a/GkeBackup/src/V1/Backup/ClusterMetadata.php b/GkeBackup/src/V1/Backup/ClusterMetadata.php index 68f29ff4e68b..9459515fc959 100644 --- a/GkeBackup/src/V1/Backup/ClusterMetadata.php +++ b/GkeBackup/src/V1/Backup/ClusterMetadata.php @@ -16,26 +16,27 @@ class ClusterMetadata extends \Google\Protobuf\Internal\Message { /** - * The source cluster from which this Backup was created. + * Output only. The source cluster from which this Backup was created. * Valid formats: * - `projects/*/locations/*/clusters/*` * - `projects/*/zones/*/clusters/*` * This is inherited from the parent BackupPlan's * [cluster][google.cloud.gkebackup.v1.BackupPlan.cluster] field. * - * Generated from protobuf field string cluster = 1; + * Generated from protobuf field string cluster = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $cluster = ''; /** - * The Kubernetes server version of the source cluster. + * Output only. The Kubernetes server version of the source cluster. * - * Generated from protobuf field string k8s_version = 2; + * Generated from protobuf field string k8s_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $k8s_version = ''; /** - * A list of the Backup for GKE CRD versions found in the cluster. + * Output only. A list of the Backup for GKE CRD versions found in the + * cluster. * - * Generated from protobuf field map backup_crd_versions = 3; + * Generated from protobuf field map backup_crd_versions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $backup_crd_versions; protected $platform_version; @@ -47,20 +48,21 @@ class ClusterMetadata extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $cluster - * The source cluster from which this Backup was created. + * Output only. The source cluster from which this Backup was created. * Valid formats: * - `projects/*/locations/*/clusters/*` * - `projects/*/zones/*/clusters/*` * This is inherited from the parent BackupPlan's * [cluster][google.cloud.gkebackup.v1.BackupPlan.cluster] field. * @type string $k8s_version - * The Kubernetes server version of the source cluster. + * Output only. The Kubernetes server version of the source cluster. * @type array|\Google\Protobuf\Internal\MapField $backup_crd_versions - * A list of the Backup for GKE CRD versions found in the cluster. + * Output only. A list of the Backup for GKE CRD versions found in the + * cluster. * @type string $gke_version - * GKE version + * Output only. GKE version * @type string $anthos_version - * Anthos version + * Output only. Anthos version * } */ public function __construct($data = NULL) { @@ -69,14 +71,14 @@ public function __construct($data = NULL) { } /** - * The source cluster from which this Backup was created. + * Output only. The source cluster from which this Backup was created. * Valid formats: * - `projects/*/locations/*/clusters/*` * - `projects/*/zones/*/clusters/*` * This is inherited from the parent BackupPlan's * [cluster][google.cloud.gkebackup.v1.BackupPlan.cluster] field. * - * Generated from protobuf field string cluster = 1; + * Generated from protobuf field string cluster = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string */ public function getCluster() @@ -85,14 +87,14 @@ public function getCluster() } /** - * The source cluster from which this Backup was created. + * Output only. The source cluster from which this Backup was created. * Valid formats: * - `projects/*/locations/*/clusters/*` * - `projects/*/zones/*/clusters/*` * This is inherited from the parent BackupPlan's * [cluster][google.cloud.gkebackup.v1.BackupPlan.cluster] field. * - * Generated from protobuf field string cluster = 1; + * Generated from protobuf field string cluster = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var * @return $this */ @@ -105,9 +107,9 @@ public function setCluster($var) } /** - * The Kubernetes server version of the source cluster. + * Output only. The Kubernetes server version of the source cluster. * - * Generated from protobuf field string k8s_version = 2; + * Generated from protobuf field string k8s_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string */ public function getK8SVersion() @@ -116,9 +118,9 @@ public function getK8SVersion() } /** - * The Kubernetes server version of the source cluster. + * Output only. The Kubernetes server version of the source cluster. * - * Generated from protobuf field string k8s_version = 2; + * Generated from protobuf field string k8s_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var * @return $this */ @@ -131,9 +133,10 @@ public function setK8SVersion($var) } /** - * A list of the Backup for GKE CRD versions found in the cluster. + * Output only. A list of the Backup for GKE CRD versions found in the + * cluster. * - * Generated from protobuf field map backup_crd_versions = 3; + * Generated from protobuf field map backup_crd_versions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Protobuf\Internal\MapField */ public function getBackupCrdVersions() @@ -142,9 +145,10 @@ public function getBackupCrdVersions() } /** - * A list of the Backup for GKE CRD versions found in the cluster. + * Output only. A list of the Backup for GKE CRD versions found in the + * cluster. * - * Generated from protobuf field map backup_crd_versions = 3; + * Generated from protobuf field map backup_crd_versions = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param array|\Google\Protobuf\Internal\MapField $var * @return $this */ @@ -157,9 +161,9 @@ public function setBackupCrdVersions($var) } /** - * GKE version + * Output only. GKE version * - * Generated from protobuf field string gke_version = 4; + * Generated from protobuf field string gke_version = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string */ public function getGkeVersion() @@ -173,9 +177,9 @@ public function hasGkeVersion() } /** - * GKE version + * Output only. GKE version * - * Generated from protobuf field string gke_version = 4; + * Generated from protobuf field string gke_version = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var * @return $this */ @@ -188,9 +192,9 @@ public function setGkeVersion($var) } /** - * Anthos version + * Output only. Anthos version * - * Generated from protobuf field string anthos_version = 5; + * Generated from protobuf field string anthos_version = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string */ public function getAnthosVersion() @@ -204,9 +208,9 @@ public function hasAnthosVersion() } /** - * Anthos version + * Output only. Anthos version * - * Generated from protobuf field string anthos_version = 5; + * Generated from protobuf field string anthos_version = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var * @return $this */ diff --git a/GkeBackup/src/V1/BackupPlan.php b/GkeBackup/src/V1/BackupPlan.php index 0aabf85843e8..a40d94a28280 100644 --- a/GkeBackup/src/V1/BackupPlan.php +++ b/GkeBackup/src/V1/BackupPlan.php @@ -43,9 +43,9 @@ class BackupPlan extends \Google\Protobuf\Internal\Message */ private $update_time = null; /** - * User specified descriptive string for this BackupPlan. + * Optional. User specified descriptive string for this BackupPlan. * - * Generated from protobuf field string description = 5; + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; */ private $description = ''; /** @@ -58,21 +58,23 @@ class BackupPlan extends \Google\Protobuf\Internal\Message */ private $cluster = ''; /** - * RetentionPolicy governs lifecycle of Backups created under this plan. + * Optional. RetentionPolicy governs lifecycle of Backups created under this + * plan. * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy retention_policy = 7; + * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy retention_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; */ private $retention_policy = null; /** - * A set of custom labels supplied by user. + * Optional. A set of custom labels supplied by user. * - * Generated from protobuf field map labels = 8; + * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; */ private $labels; /** - * Defines a schedule for automatic Backup creation via this BackupPlan. + * Optional. Defines a schedule for automatic Backup creation via this + * BackupPlan. * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.Schedule backup_schedule = 9; + * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.Schedule backup_schedule = 9 [(.google.api.field_behavior) = OPTIONAL]; */ private $backup_schedule = null; /** @@ -89,20 +91,20 @@ class BackupPlan extends \Google\Protobuf\Internal\Message */ private $etag = ''; /** - * This flag indicates whether this BackupPlan has been deactivated. + * Optional. This flag indicates whether this BackupPlan has been deactivated. * Setting this field to True locks the BackupPlan such that no further * updates will be allowed (except deletes), including the deactivated field * itself. It also prevents any new Backups from being created via this * BackupPlan (including scheduled Backups). * Default: False * - * Generated from protobuf field bool deactivated = 11; + * Generated from protobuf field bool deactivated = 11 [(.google.api.field_behavior) = OPTIONAL]; */ private $deactivated = false; /** - * Defines the configuration of Backups created via this BackupPlan. + * Optional. Defines the configuration of Backups created via this BackupPlan. * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.BackupConfig backup_config = 12; + * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.BackupConfig backup_config = 12 [(.google.api.field_behavior) = OPTIONAL]; */ private $backup_config = null; /** @@ -128,6 +130,21 @@ class BackupPlan extends \Google\Protobuf\Internal\Message * Generated from protobuf field string state_reason = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $state_reason = ''; + /** + * Output only. A number that represents the current risk level of this + * BackupPlan from RPO perspective with 1 being no risk and 5 being highest + * risk. + * + * Generated from protobuf field int32 rpo_risk_level = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $rpo_risk_level = 0; + /** + * Output only. Human-readable description of why the BackupPlan is in the + * current rpo_risk_level and action items if any. + * + * Generated from protobuf field string rpo_risk_reason = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $rpo_risk_reason = ''; /** * Constructor. @@ -147,18 +164,20 @@ class BackupPlan extends \Google\Protobuf\Internal\Message * Output only. The timestamp when this BackupPlan resource was last * updated. * @type string $description - * User specified descriptive string for this BackupPlan. + * Optional. User specified descriptive string for this BackupPlan. * @type string $cluster * Required. Immutable. The source cluster from which Backups will be created * via this BackupPlan. Valid formats: * - `projects/*/locations/*/clusters/*` * - `projects/*/zones/*/clusters/*` * @type \Google\Cloud\GkeBackup\V1\BackupPlan\RetentionPolicy $retention_policy - * RetentionPolicy governs lifecycle of Backups created under this plan. + * Optional. RetentionPolicy governs lifecycle of Backups created under this + * plan. * @type array|\Google\Protobuf\Internal\MapField $labels - * A set of custom labels supplied by user. + * Optional. A set of custom labels supplied by user. * @type \Google\Cloud\GkeBackup\V1\BackupPlan\Schedule $backup_schedule - * Defines a schedule for automatic Backup creation via this BackupPlan. + * Optional. Defines a schedule for automatic Backup creation via this + * BackupPlan. * @type string $etag * Output only. `etag` is used for optimistic concurrency control as a way to * help prevent simultaneous updates of a backup plan from overwriting each @@ -169,14 +188,14 @@ class BackupPlan extends \Google\Protobuf\Internal\Message * `UpdateBackupPlan` or `DeleteBackupPlan` to ensure that their change * will be applied to the same version of the resource. * @type bool $deactivated - * This flag indicates whether this BackupPlan has been deactivated. + * Optional. This flag indicates whether this BackupPlan has been deactivated. * Setting this field to True locks the BackupPlan such that no further * updates will be allowed (except deletes), including the deactivated field * itself. It also prevents any new Backups from being created via this * BackupPlan (including scheduled Backups). * Default: False * @type \Google\Cloud\GkeBackup\V1\BackupPlan\BackupConfig $backup_config - * Defines the configuration of Backups created via this BackupPlan. + * Optional. Defines the configuration of Backups created via this BackupPlan. * @type int $protected_pod_count * Output only. The number of Kubernetes Pods backed up in the * last successful Backup created via this BackupPlan. @@ -188,6 +207,13 @@ class BackupPlan extends \Google\Protobuf\Internal\Message * @type string $state_reason * Output only. Human-readable description of why BackupPlan is in the current * `state` + * @type int $rpo_risk_level + * Output only. A number that represents the current risk level of this + * BackupPlan from RPO perspective with 1 being no risk and 5 being highest + * risk. + * @type string $rpo_risk_reason + * Output only. Human-readable description of why the BackupPlan is in the + * current rpo_risk_level and action items if any. * } */ public function __construct($data = NULL) { @@ -326,9 +352,9 @@ public function setUpdateTime($var) } /** - * User specified descriptive string for this BackupPlan. + * Optional. User specified descriptive string for this BackupPlan. * - * Generated from protobuf field string description = 5; + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getDescription() @@ -337,9 +363,9 @@ public function getDescription() } /** - * User specified descriptive string for this BackupPlan. + * Optional. User specified descriptive string for this BackupPlan. * - * Generated from protobuf field string description = 5; + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -384,9 +410,10 @@ public function setCluster($var) } /** - * RetentionPolicy governs lifecycle of Backups created under this plan. + * Optional. RetentionPolicy governs lifecycle of Backups created under this + * plan. * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy retention_policy = 7; + * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy retention_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\GkeBackup\V1\BackupPlan\RetentionPolicy|null */ public function getRetentionPolicy() @@ -405,9 +432,10 @@ public function clearRetentionPolicy() } /** - * RetentionPolicy governs lifecycle of Backups created under this plan. + * Optional. RetentionPolicy governs lifecycle of Backups created under this + * plan. * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy retention_policy = 7; + * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy retention_policy = 7 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\GkeBackup\V1\BackupPlan\RetentionPolicy $var * @return $this */ @@ -420,9 +448,9 @@ public function setRetentionPolicy($var) } /** - * A set of custom labels supplied by user. + * Optional. A set of custom labels supplied by user. * - * Generated from protobuf field map labels = 8; + * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\MapField */ public function getLabels() @@ -431,9 +459,9 @@ public function getLabels() } /** - * A set of custom labels supplied by user. + * Optional. A set of custom labels supplied by user. * - * Generated from protobuf field map labels = 8; + * Generated from protobuf field map labels = 8 [(.google.api.field_behavior) = OPTIONAL]; * @param array|\Google\Protobuf\Internal\MapField $var * @return $this */ @@ -446,9 +474,10 @@ public function setLabels($var) } /** - * Defines a schedule for automatic Backup creation via this BackupPlan. + * Optional. Defines a schedule for automatic Backup creation via this + * BackupPlan. * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.Schedule backup_schedule = 9; + * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.Schedule backup_schedule = 9 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\GkeBackup\V1\BackupPlan\Schedule|null */ public function getBackupSchedule() @@ -467,9 +496,10 @@ public function clearBackupSchedule() } /** - * Defines a schedule for automatic Backup creation via this BackupPlan. + * Optional. Defines a schedule for automatic Backup creation via this + * BackupPlan. * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.Schedule backup_schedule = 9; + * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.Schedule backup_schedule = 9 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\GkeBackup\V1\BackupPlan\Schedule $var * @return $this */ @@ -522,14 +552,14 @@ public function setEtag($var) } /** - * This flag indicates whether this BackupPlan has been deactivated. + * Optional. This flag indicates whether this BackupPlan has been deactivated. * Setting this field to True locks the BackupPlan such that no further * updates will be allowed (except deletes), including the deactivated field * itself. It also prevents any new Backups from being created via this * BackupPlan (including scheduled Backups). * Default: False * - * Generated from protobuf field bool deactivated = 11; + * Generated from protobuf field bool deactivated = 11 [(.google.api.field_behavior) = OPTIONAL]; * @return bool */ public function getDeactivated() @@ -538,14 +568,14 @@ public function getDeactivated() } /** - * This flag indicates whether this BackupPlan has been deactivated. + * Optional. This flag indicates whether this BackupPlan has been deactivated. * Setting this field to True locks the BackupPlan such that no further * updates will be allowed (except deletes), including the deactivated field * itself. It also prevents any new Backups from being created via this * BackupPlan (including scheduled Backups). * Default: False * - * Generated from protobuf field bool deactivated = 11; + * Generated from protobuf field bool deactivated = 11 [(.google.api.field_behavior) = OPTIONAL]; * @param bool $var * @return $this */ @@ -558,9 +588,9 @@ public function setDeactivated($var) } /** - * Defines the configuration of Backups created via this BackupPlan. + * Optional. Defines the configuration of Backups created via this BackupPlan. * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.BackupConfig backup_config = 12; + * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.BackupConfig backup_config = 12 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\GkeBackup\V1\BackupPlan\BackupConfig|null */ public function getBackupConfig() @@ -579,9 +609,9 @@ public function clearBackupConfig() } /** - * Defines the configuration of Backups created via this BackupPlan. + * Optional. Defines the configuration of Backups created via this BackupPlan. * - * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.BackupConfig backup_config = 12; + * Generated from protobuf field .google.cloud.gkebackup.v1.BackupPlan.BackupConfig backup_config = 12 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\GkeBackup\V1\BackupPlan\BackupConfig $var * @return $this */ @@ -681,5 +711,63 @@ public function setStateReason($var) return $this; } + /** + * Output only. A number that represents the current risk level of this + * BackupPlan from RPO perspective with 1 being no risk and 5 being highest + * risk. + * + * Generated from protobuf field int32 rpo_risk_level = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getRpoRiskLevel() + { + return $this->rpo_risk_level; + } + + /** + * Output only. A number that represents the current risk level of this + * BackupPlan from RPO perspective with 1 being no risk and 5 being highest + * risk. + * + * Generated from protobuf field int32 rpo_risk_level = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setRpoRiskLevel($var) + { + GPBUtil::checkInt32($var); + $this->rpo_risk_level = $var; + + return $this; + } + + /** + * Output only. Human-readable description of why the BackupPlan is in the + * current rpo_risk_level and action items if any. + * + * Generated from protobuf field string rpo_risk_reason = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getRpoRiskReason() + { + return $this->rpo_risk_reason; + } + + /** + * Output only. Human-readable description of why the BackupPlan is in the + * current rpo_risk_level and action items if any. + * + * Generated from protobuf field string rpo_risk_reason = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setRpoRiskReason($var) + { + GPBUtil::checkString($var, True); + $this->rpo_risk_reason = $var; + + return $this; + } + } diff --git a/GkeBackup/src/V1/BackupPlan/BackupConfig.php b/GkeBackup/src/V1/BackupPlan/BackupConfig.php index 699d078da634..78ecbf783f33 100644 --- a/GkeBackup/src/V1/BackupPlan/BackupConfig.php +++ b/GkeBackup/src/V1/BackupPlan/BackupConfig.php @@ -17,28 +17,28 @@ class BackupConfig extends \Google\Protobuf\Internal\Message { /** - * This flag specifies whether volume data should be backed up when - * PVCs are included in the scope of a Backup. + * Optional. This flag specifies whether volume data should be backed up + * when PVCs are included in the scope of a Backup. * Default: False * - * Generated from protobuf field bool include_volume_data = 4; + * Generated from protobuf field bool include_volume_data = 4 [(.google.api.field_behavior) = OPTIONAL]; */ private $include_volume_data = false; /** - * This flag specifies whether Kubernetes Secret resources should be - * included when they fall into the scope of Backups. + * Optional. This flag specifies whether Kubernetes Secret resources should + * be included when they fall into the scope of Backups. * Default: False * - * Generated from protobuf field bool include_secrets = 5; + * Generated from protobuf field bool include_secrets = 5 [(.google.api.field_behavior) = OPTIONAL]; */ private $include_secrets = false; /** - * This defines a customer managed encryption key that will be used to - * encrypt the "config" portion (the Kubernetes resources) of Backups - * created via this plan. + * Optional. This defines a customer managed encryption key that will be + * used to encrypt the "config" portion (the Kubernetes resources) of + * Backups created via this plan. * Default (empty): Config backup artifacts will not be encrypted. * - * Generated from protobuf field .google.cloud.gkebackup.v1.EncryptionKey encryption_key = 6; + * Generated from protobuf field .google.cloud.gkebackup.v1.EncryptionKey encryption_key = 6 [(.google.api.field_behavior) = OPTIONAL]; */ private $encryption_key = null; protected $backup_scope; @@ -57,17 +57,17 @@ class BackupConfig extends \Google\Protobuf\Internal\Message * If set, include just the resources referenced by the listed * ProtectedApplications. * @type bool $include_volume_data - * This flag specifies whether volume data should be backed up when - * PVCs are included in the scope of a Backup. + * Optional. This flag specifies whether volume data should be backed up + * when PVCs are included in the scope of a Backup. * Default: False * @type bool $include_secrets - * This flag specifies whether Kubernetes Secret resources should be - * included when they fall into the scope of Backups. + * Optional. This flag specifies whether Kubernetes Secret resources should + * be included when they fall into the scope of Backups. * Default: False * @type \Google\Cloud\GkeBackup\V1\EncryptionKey $encryption_key - * This defines a customer managed encryption key that will be used to - * encrypt the "config" portion (the Kubernetes resources) of Backups - * created via this plan. + * Optional. This defines a customer managed encryption key that will be + * used to encrypt the "config" portion (the Kubernetes resources) of + * Backups created via this plan. * Default (empty): Config backup artifacts will not be encrypted. * } */ @@ -172,11 +172,11 @@ public function setSelectedApplications($var) } /** - * This flag specifies whether volume data should be backed up when - * PVCs are included in the scope of a Backup. + * Optional. This flag specifies whether volume data should be backed up + * when PVCs are included in the scope of a Backup. * Default: False * - * Generated from protobuf field bool include_volume_data = 4; + * Generated from protobuf field bool include_volume_data = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return bool */ public function getIncludeVolumeData() @@ -185,11 +185,11 @@ public function getIncludeVolumeData() } /** - * This flag specifies whether volume data should be backed up when - * PVCs are included in the scope of a Backup. + * Optional. This flag specifies whether volume data should be backed up + * when PVCs are included in the scope of a Backup. * Default: False * - * Generated from protobuf field bool include_volume_data = 4; + * Generated from protobuf field bool include_volume_data = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param bool $var * @return $this */ @@ -202,11 +202,11 @@ public function setIncludeVolumeData($var) } /** - * This flag specifies whether Kubernetes Secret resources should be - * included when they fall into the scope of Backups. + * Optional. This flag specifies whether Kubernetes Secret resources should + * be included when they fall into the scope of Backups. * Default: False * - * Generated from protobuf field bool include_secrets = 5; + * Generated from protobuf field bool include_secrets = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return bool */ public function getIncludeSecrets() @@ -215,11 +215,11 @@ public function getIncludeSecrets() } /** - * This flag specifies whether Kubernetes Secret resources should be - * included when they fall into the scope of Backups. + * Optional. This flag specifies whether Kubernetes Secret resources should + * be included when they fall into the scope of Backups. * Default: False * - * Generated from protobuf field bool include_secrets = 5; + * Generated from protobuf field bool include_secrets = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param bool $var * @return $this */ @@ -232,12 +232,12 @@ public function setIncludeSecrets($var) } /** - * This defines a customer managed encryption key that will be used to - * encrypt the "config" portion (the Kubernetes resources) of Backups - * created via this plan. + * Optional. This defines a customer managed encryption key that will be + * used to encrypt the "config" portion (the Kubernetes resources) of + * Backups created via this plan. * Default (empty): Config backup artifacts will not be encrypted. * - * Generated from protobuf field .google.cloud.gkebackup.v1.EncryptionKey encryption_key = 6; + * Generated from protobuf field .google.cloud.gkebackup.v1.EncryptionKey encryption_key = 6 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\GkeBackup\V1\EncryptionKey|null */ public function getEncryptionKey() @@ -256,12 +256,12 @@ public function clearEncryptionKey() } /** - * This defines a customer managed encryption key that will be used to - * encrypt the "config" portion (the Kubernetes resources) of Backups - * created via this plan. + * Optional. This defines a customer managed encryption key that will be + * used to encrypt the "config" portion (the Kubernetes resources) of + * Backups created via this plan. * Default (empty): Config backup artifacts will not be encrypted. * - * Generated from protobuf field .google.cloud.gkebackup.v1.EncryptionKey encryption_key = 6; + * Generated from protobuf field .google.cloud.gkebackup.v1.EncryptionKey encryption_key = 6 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\GkeBackup\V1\EncryptionKey $var * @return $this */ diff --git a/GkeBackup/src/V1/BackupPlan/RetentionPolicy.php b/GkeBackup/src/V1/BackupPlan/RetentionPolicy.php index dcf4c1c69dd1..8aa0e8f0ab35 100644 --- a/GkeBackup/src/V1/BackupPlan/RetentionPolicy.php +++ b/GkeBackup/src/V1/BackupPlan/RetentionPolicy.php @@ -16,7 +16,7 @@ class RetentionPolicy extends \Google\Protobuf\Internal\Message { /** - * Minimum age for Backups created via this BackupPlan (in days). + * Optional. Minimum age for Backups created via this BackupPlan (in days). * This field MUST be an integer value between 0-90 (inclusive). * A Backup created under this BackupPlan will NOT be deletable until it * reaches Backup's (create_time + backup_delete_lock_days). @@ -25,38 +25,39 @@ class RetentionPolicy extends \Google\Protobuf\Internal\Message * the new value. * Default: 0 (no delete blocking) * - * Generated from protobuf field int32 backup_delete_lock_days = 1; + * Generated from protobuf field int32 backup_delete_lock_days = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $backup_delete_lock_days = 0; /** - * The default maximum age of a Backup created via this BackupPlan. - * This field MUST be an integer value >= 0 and <= 365. - * If specified, a Backup created under this BackupPlan will be - * automatically deleted after its age reaches (create_time + - * backup_retain_days). - * If not specified, Backups created under this BackupPlan will NOT be - * subject to automatic deletion. - * Updating this field does NOT affect existing Backups under it. Backups - * created AFTER a successful update will automatically pick up the new - * value. - * NOTE: backup_retain_days must be >= + * Optional. The default maximum age of a Backup created via this + * BackupPlan. This field MUST be an integer value >= 0 and <= 365. If + * specified, a Backup created under this BackupPlan will be automatically + * deleted after its age reaches (create_time + backup_retain_days). If not + * specified, Backups created under this BackupPlan will NOT be subject to + * automatic deletion. Updating this field does NOT affect existing Backups + * under it. Backups created AFTER a successful update will automatically + * pick up the new value. NOTE: backup_retain_days must be >= * [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days]. * If * [cron_schedule][google.cloud.gkebackup.v1.BackupPlan.Schedule.cron_schedule] * is defined, then this must be - * <= 360 * the creation interval. + * <= 360 * the creation interval. If + * [rpo_config][google.cloud.gkebackup.v1.BackupPlan.Schedule.rpo_config] is + * defined, then this must be + * <= 360 * [target_rpo_minutes][Schedule.rpo_config.target_rpo_minutes] / + * (1440minutes/day). * Default: 0 (no automatic deletion) * - * Generated from protobuf field int32 backup_retain_days = 2; + * Generated from protobuf field int32 backup_retain_days = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $backup_retain_days = 0; /** - * This flag denotes whether the retention policy of this BackupPlan is - * locked. If set to True, no further update is allowed on this policy, - * including the `locked` field itself. + * Optional. This flag denotes whether the retention policy of this + * BackupPlan is locked. If set to True, no further update is allowed on + * this policy, including the `locked` field itself. * Default: False * - * Generated from protobuf field bool locked = 3; + * Generated from protobuf field bool locked = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $locked = false; @@ -67,7 +68,7 @@ class RetentionPolicy extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type int $backup_delete_lock_days - * Minimum age for Backups created via this BackupPlan (in days). + * Optional. Minimum age for Backups created via this BackupPlan (in days). * This field MUST be an integer value between 0-90 (inclusive). * A Backup created under this BackupPlan will NOT be deletable until it * reaches Backup's (create_time + backup_delete_lock_days). @@ -76,27 +77,28 @@ class RetentionPolicy extends \Google\Protobuf\Internal\Message * the new value. * Default: 0 (no delete blocking) * @type int $backup_retain_days - * The default maximum age of a Backup created via this BackupPlan. - * This field MUST be an integer value >= 0 and <= 365. - * If specified, a Backup created under this BackupPlan will be - * automatically deleted after its age reaches (create_time + - * backup_retain_days). - * If not specified, Backups created under this BackupPlan will NOT be - * subject to automatic deletion. - * Updating this field does NOT affect existing Backups under it. Backups - * created AFTER a successful update will automatically pick up the new - * value. - * NOTE: backup_retain_days must be >= + * Optional. The default maximum age of a Backup created via this + * BackupPlan. This field MUST be an integer value >= 0 and <= 365. If + * specified, a Backup created under this BackupPlan will be automatically + * deleted after its age reaches (create_time + backup_retain_days). If not + * specified, Backups created under this BackupPlan will NOT be subject to + * automatic deletion. Updating this field does NOT affect existing Backups + * under it. Backups created AFTER a successful update will automatically + * pick up the new value. NOTE: backup_retain_days must be >= * [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days]. * If * [cron_schedule][google.cloud.gkebackup.v1.BackupPlan.Schedule.cron_schedule] * is defined, then this must be - * <= 360 * the creation interval. + * <= 360 * the creation interval. If + * [rpo_config][google.cloud.gkebackup.v1.BackupPlan.Schedule.rpo_config] is + * defined, then this must be + * <= 360 * [target_rpo_minutes][Schedule.rpo_config.target_rpo_minutes] / + * (1440minutes/day). * Default: 0 (no automatic deletion) * @type bool $locked - * This flag denotes whether the retention policy of this BackupPlan is - * locked. If set to True, no further update is allowed on this policy, - * including the `locked` field itself. + * Optional. This flag denotes whether the retention policy of this + * BackupPlan is locked. If set to True, no further update is allowed on + * this policy, including the `locked` field itself. * Default: False * } */ @@ -106,7 +108,7 @@ public function __construct($data = NULL) { } /** - * Minimum age for Backups created via this BackupPlan (in days). + * Optional. Minimum age for Backups created via this BackupPlan (in days). * This field MUST be an integer value between 0-90 (inclusive). * A Backup created under this BackupPlan will NOT be deletable until it * reaches Backup's (create_time + backup_delete_lock_days). @@ -115,7 +117,7 @@ public function __construct($data = NULL) { * the new value. * Default: 0 (no delete blocking) * - * Generated from protobuf field int32 backup_delete_lock_days = 1; + * Generated from protobuf field int32 backup_delete_lock_days = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return int */ public function getBackupDeleteLockDays() @@ -124,7 +126,7 @@ public function getBackupDeleteLockDays() } /** - * Minimum age for Backups created via this BackupPlan (in days). + * Optional. Minimum age for Backups created via this BackupPlan (in days). * This field MUST be an integer value between 0-90 (inclusive). * A Backup created under this BackupPlan will NOT be deletable until it * reaches Backup's (create_time + backup_delete_lock_days). @@ -133,7 +135,7 @@ public function getBackupDeleteLockDays() * the new value. * Default: 0 (no delete blocking) * - * Generated from protobuf field int32 backup_delete_lock_days = 1; + * Generated from protobuf field int32 backup_delete_lock_days = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var * @return $this */ @@ -146,25 +148,26 @@ public function setBackupDeleteLockDays($var) } /** - * The default maximum age of a Backup created via this BackupPlan. - * This field MUST be an integer value >= 0 and <= 365. - * If specified, a Backup created under this BackupPlan will be - * automatically deleted after its age reaches (create_time + - * backup_retain_days). - * If not specified, Backups created under this BackupPlan will NOT be - * subject to automatic deletion. - * Updating this field does NOT affect existing Backups under it. Backups - * created AFTER a successful update will automatically pick up the new - * value. - * NOTE: backup_retain_days must be >= + * Optional. The default maximum age of a Backup created via this + * BackupPlan. This field MUST be an integer value >= 0 and <= 365. If + * specified, a Backup created under this BackupPlan will be automatically + * deleted after its age reaches (create_time + backup_retain_days). If not + * specified, Backups created under this BackupPlan will NOT be subject to + * automatic deletion. Updating this field does NOT affect existing Backups + * under it. Backups created AFTER a successful update will automatically + * pick up the new value. NOTE: backup_retain_days must be >= * [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days]. * If * [cron_schedule][google.cloud.gkebackup.v1.BackupPlan.Schedule.cron_schedule] * is defined, then this must be - * <= 360 * the creation interval. + * <= 360 * the creation interval. If + * [rpo_config][google.cloud.gkebackup.v1.BackupPlan.Schedule.rpo_config] is + * defined, then this must be + * <= 360 * [target_rpo_minutes][Schedule.rpo_config.target_rpo_minutes] / + * (1440minutes/day). * Default: 0 (no automatic deletion) * - * Generated from protobuf field int32 backup_retain_days = 2; + * Generated from protobuf field int32 backup_retain_days = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int */ public function getBackupRetainDays() @@ -173,25 +176,26 @@ public function getBackupRetainDays() } /** - * The default maximum age of a Backup created via this BackupPlan. - * This field MUST be an integer value >= 0 and <= 365. - * If specified, a Backup created under this BackupPlan will be - * automatically deleted after its age reaches (create_time + - * backup_retain_days). - * If not specified, Backups created under this BackupPlan will NOT be - * subject to automatic deletion. - * Updating this field does NOT affect existing Backups under it. Backups - * created AFTER a successful update will automatically pick up the new - * value. - * NOTE: backup_retain_days must be >= + * Optional. The default maximum age of a Backup created via this + * BackupPlan. This field MUST be an integer value >= 0 and <= 365. If + * specified, a Backup created under this BackupPlan will be automatically + * deleted after its age reaches (create_time + backup_retain_days). If not + * specified, Backups created under this BackupPlan will NOT be subject to + * automatic deletion. Updating this field does NOT affect existing Backups + * under it. Backups created AFTER a successful update will automatically + * pick up the new value. NOTE: backup_retain_days must be >= * [backup_delete_lock_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_delete_lock_days]. * If * [cron_schedule][google.cloud.gkebackup.v1.BackupPlan.Schedule.cron_schedule] * is defined, then this must be - * <= 360 * the creation interval. + * <= 360 * the creation interval. If + * [rpo_config][google.cloud.gkebackup.v1.BackupPlan.Schedule.rpo_config] is + * defined, then this must be + * <= 360 * [target_rpo_minutes][Schedule.rpo_config.target_rpo_minutes] / + * (1440minutes/day). * Default: 0 (no automatic deletion) * - * Generated from protobuf field int32 backup_retain_days = 2; + * Generated from protobuf field int32 backup_retain_days = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var * @return $this */ @@ -204,12 +208,12 @@ public function setBackupRetainDays($var) } /** - * This flag denotes whether the retention policy of this BackupPlan is - * locked. If set to True, no further update is allowed on this policy, - * including the `locked` field itself. + * Optional. This flag denotes whether the retention policy of this + * BackupPlan is locked. If set to True, no further update is allowed on + * this policy, including the `locked` field itself. * Default: False * - * Generated from protobuf field bool locked = 3; + * Generated from protobuf field bool locked = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return bool */ public function getLocked() @@ -218,12 +222,12 @@ public function getLocked() } /** - * This flag denotes whether the retention policy of this BackupPlan is - * locked. If set to True, no further update is allowed on this policy, - * including the `locked` field itself. + * Optional. This flag denotes whether the retention policy of this + * BackupPlan is locked. If set to True, no further update is allowed on + * this policy, including the `locked` field itself. * Default: False * - * Generated from protobuf field bool locked = 3; + * Generated from protobuf field bool locked = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param bool $var * @return $this */ diff --git a/GkeBackup/src/V1/BackupPlan/Schedule.php b/GkeBackup/src/V1/BackupPlan/Schedule.php index 5919bd1baddd..c1b3cf7dc546 100644 --- a/GkeBackup/src/V1/BackupPlan/Schedule.php +++ b/GkeBackup/src/V1/BackupPlan/Schedule.php @@ -17,24 +17,47 @@ class Schedule extends \Google\Protobuf\Internal\Message { /** - * A standard [cron](https://wikipedia.com/wiki/cron) string that defines a - * repeating schedule for creating Backups via this BackupPlan. If this is - * defined, then + * Optional. A standard [cron](https://wikipedia.com/wiki/cron) string that + * defines a repeating schedule for creating Backups via this BackupPlan. + * This is mutually exclusive with the + * [rpo_config][google.cloud.gkebackup.v1.BackupPlan.Schedule.rpo_config] + * field since at most one schedule can be defined for a BackupPlan. If this + * is defined, then * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] * must also be defined. * Default (empty): no automatic backup creation will occur. * - * Generated from protobuf field string cron_schedule = 1; + * Generated from protobuf field string cron_schedule = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $cron_schedule = ''; /** - * This flag denotes whether automatic Backup creation is paused for this - * BackupPlan. + * Optional. This flag denotes whether automatic Backup creation is paused + * for this BackupPlan. * Default: False * - * Generated from protobuf field bool paused = 2; + * Generated from protobuf field bool paused = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $paused = false; + /** + * Optional. Defines the RPO schedule configuration for this BackupPlan. + * This is mutually exclusive with the + * [cron_schedule][google.cloud.gkebackup.v1.BackupPlan.Schedule.cron_schedule] + * field since at most one schedule can be defined for a BackupPLan. If this + * is defined, then + * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] + * must also be defined. + * Default (empty): no automatic backup creation will occur. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RpoConfig rpo_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $rpo_config = null; + /** + * Output only. Start time of next scheduled backup under this BackupPlan by + * either cron_schedule or rpo config. + * + * Generated from protobuf field .google.protobuf.Timestamp next_scheduled_backup_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $next_scheduled_backup_time = null; /** * Constructor. @@ -43,16 +66,31 @@ class Schedule extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $cron_schedule - * A standard [cron](https://wikipedia.com/wiki/cron) string that defines a - * repeating schedule for creating Backups via this BackupPlan. If this is - * defined, then + * Optional. A standard [cron](https://wikipedia.com/wiki/cron) string that + * defines a repeating schedule for creating Backups via this BackupPlan. + * This is mutually exclusive with the + * [rpo_config][google.cloud.gkebackup.v1.BackupPlan.Schedule.rpo_config] + * field since at most one schedule can be defined for a BackupPlan. If this + * is defined, then * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] * must also be defined. * Default (empty): no automatic backup creation will occur. * @type bool $paused - * This flag denotes whether automatic Backup creation is paused for this - * BackupPlan. + * Optional. This flag denotes whether automatic Backup creation is paused + * for this BackupPlan. * Default: False + * @type \Google\Cloud\GkeBackup\V1\RpoConfig $rpo_config + * Optional. Defines the RPO schedule configuration for this BackupPlan. + * This is mutually exclusive with the + * [cron_schedule][google.cloud.gkebackup.v1.BackupPlan.Schedule.cron_schedule] + * field since at most one schedule can be defined for a BackupPLan. If this + * is defined, then + * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] + * must also be defined. + * Default (empty): no automatic backup creation will occur. + * @type \Google\Protobuf\Timestamp $next_scheduled_backup_time + * Output only. Start time of next scheduled backup under this BackupPlan by + * either cron_schedule or rpo config. * } */ public function __construct($data = NULL) { @@ -61,14 +99,17 @@ public function __construct($data = NULL) { } /** - * A standard [cron](https://wikipedia.com/wiki/cron) string that defines a - * repeating schedule for creating Backups via this BackupPlan. If this is - * defined, then + * Optional. A standard [cron](https://wikipedia.com/wiki/cron) string that + * defines a repeating schedule for creating Backups via this BackupPlan. + * This is mutually exclusive with the + * [rpo_config][google.cloud.gkebackup.v1.BackupPlan.Schedule.rpo_config] + * field since at most one schedule can be defined for a BackupPlan. If this + * is defined, then * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] * must also be defined. * Default (empty): no automatic backup creation will occur. * - * Generated from protobuf field string cron_schedule = 1; + * Generated from protobuf field string cron_schedule = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getCronSchedule() @@ -77,14 +118,17 @@ public function getCronSchedule() } /** - * A standard [cron](https://wikipedia.com/wiki/cron) string that defines a - * repeating schedule for creating Backups via this BackupPlan. If this is - * defined, then + * Optional. A standard [cron](https://wikipedia.com/wiki/cron) string that + * defines a repeating schedule for creating Backups via this BackupPlan. + * This is mutually exclusive with the + * [rpo_config][google.cloud.gkebackup.v1.BackupPlan.Schedule.rpo_config] + * field since at most one schedule can be defined for a BackupPlan. If this + * is defined, then * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] * must also be defined. * Default (empty): no automatic backup creation will occur. * - * Generated from protobuf field string cron_schedule = 1; + * Generated from protobuf field string cron_schedule = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -97,11 +141,11 @@ public function setCronSchedule($var) } /** - * This flag denotes whether automatic Backup creation is paused for this - * BackupPlan. + * Optional. This flag denotes whether automatic Backup creation is paused + * for this BackupPlan. * Default: False * - * Generated from protobuf field bool paused = 2; + * Generated from protobuf field bool paused = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return bool */ public function getPaused() @@ -110,11 +154,11 @@ public function getPaused() } /** - * This flag denotes whether automatic Backup creation is paused for this - * BackupPlan. + * Optional. This flag denotes whether automatic Backup creation is paused + * for this BackupPlan. * Default: False * - * Generated from protobuf field bool paused = 2; + * Generated from protobuf field bool paused = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param bool $var * @return $this */ @@ -126,6 +170,94 @@ public function setPaused($var) return $this; } + /** + * Optional. Defines the RPO schedule configuration for this BackupPlan. + * This is mutually exclusive with the + * [cron_schedule][google.cloud.gkebackup.v1.BackupPlan.Schedule.cron_schedule] + * field since at most one schedule can be defined for a BackupPLan. If this + * is defined, then + * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] + * must also be defined. + * Default (empty): no automatic backup creation will occur. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RpoConfig rpo_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\GkeBackup\V1\RpoConfig|null + */ + public function getRpoConfig() + { + return $this->rpo_config; + } + + public function hasRpoConfig() + { + return isset($this->rpo_config); + } + + public function clearRpoConfig() + { + unset($this->rpo_config); + } + + /** + * Optional. Defines the RPO schedule configuration for this BackupPlan. + * This is mutually exclusive with the + * [cron_schedule][google.cloud.gkebackup.v1.BackupPlan.Schedule.cron_schedule] + * field since at most one schedule can be defined for a BackupPLan. If this + * is defined, then + * [backup_retain_days][google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy.backup_retain_days] + * must also be defined. + * Default (empty): no automatic backup creation will occur. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.RpoConfig rpo_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\GkeBackup\V1\RpoConfig $var + * @return $this + */ + public function setRpoConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\RpoConfig::class); + $this->rpo_config = $var; + + return $this; + } + + /** + * Output only. Start time of next scheduled backup under this BackupPlan by + * either cron_schedule or rpo config. + * + * Generated from protobuf field .google.protobuf.Timestamp next_scheduled_backup_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getNextScheduledBackupTime() + { + return $this->next_scheduled_backup_time; + } + + public function hasNextScheduledBackupTime() + { + return isset($this->next_scheduled_backup_time); + } + + public function clearNextScheduledBackupTime() + { + unset($this->next_scheduled_backup_time); + } + + /** + * Output only. Start time of next scheduled backup under this BackupPlan by + * either cron_schedule or rpo config. + * + * Generated from protobuf field .google.protobuf.Timestamp next_scheduled_backup_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setNextScheduledBackupTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->next_scheduled_backup_time = $var; + + return $this; + } + } diff --git a/GkeBackup/src/V1/Client/BackupForGKEClient.php b/GkeBackup/src/V1/Client/BackupForGKEClient.php index 1383df4c0ddc..1595a6777f57 100644 --- a/GkeBackup/src/V1/Client/BackupForGKEClient.php +++ b/GkeBackup/src/V1/Client/BackupForGKEClient.php @@ -45,6 +45,8 @@ use Google\Cloud\GkeBackup\V1\DeleteBackupRequest; use Google\Cloud\GkeBackup\V1\DeleteRestorePlanRequest; use Google\Cloud\GkeBackup\V1\DeleteRestoreRequest; +use Google\Cloud\GkeBackup\V1\GetBackupIndexDownloadUrlRequest; +use Google\Cloud\GkeBackup\V1\GetBackupIndexDownloadUrlResponse; use Google\Cloud\GkeBackup\V1\GetBackupPlanRequest; use Google\Cloud\GkeBackup\V1\GetBackupRequest; use Google\Cloud\GkeBackup\V1\GetRestorePlanRequest; @@ -97,6 +99,7 @@ * @method PromiseInterface deleteRestoreAsync(DeleteRestoreRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteRestorePlanAsync(DeleteRestorePlanRequest $request, array $optionalArgs = []) * @method PromiseInterface getBackupAsync(GetBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBackupIndexDownloadUrlAsync(GetBackupIndexDownloadUrlRequest $request, array $optionalArgs = []) * @method PromiseInterface getBackupPlanAsync(GetBackupPlanRequest $request, array $optionalArgs = []) * @method PromiseInterface getRestoreAsync(GetRestoreRequest $request, array $optionalArgs = []) * @method PromiseInterface getRestorePlanAsync(GetRestorePlanRequest $request, array $optionalArgs = []) @@ -718,6 +721,33 @@ public function getBackup(GetBackupRequest $request, array $callOptions = []): B return $this->startApiCall('GetBackup', $request, $callOptions)->wait(); } + /** + * Retrieve the link to the backupIndex. + * + * The async variant is {@see BackupForGKEClient::getBackupIndexDownloadUrlAsync()} + * . + * + * @example samples/V1/BackupForGKEClient/get_backup_index_download_url.php + * + * @param GetBackupIndexDownloadUrlRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return GetBackupIndexDownloadUrlResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBackupIndexDownloadUrl(GetBackupIndexDownloadUrlRequest $request, array $callOptions = []): GetBackupIndexDownloadUrlResponse + { + return $this->startApiCall('GetBackupIndexDownloadUrl', $request, $callOptions)->wait(); + } + /** * Retrieve the details of a single BackupPlan. * diff --git a/GkeBackup/src/V1/CreateBackupRequest.php b/GkeBackup/src/V1/CreateBackupRequest.php index 04af42529332..eba540c15e31 100644 --- a/GkeBackup/src/V1/CreateBackupRequest.php +++ b/GkeBackup/src/V1/CreateBackupRequest.php @@ -23,13 +23,13 @@ class CreateBackupRequest extends \Google\Protobuf\Internal\Message */ private $parent = ''; /** - * The Backup resource to create. + * Optional. The Backup resource to create. * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup backup = 2; + * Generated from protobuf field .google.cloud.gkebackup.v1.Backup backup = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $backup = null; /** - * The client-provided short name for the Backup resource. + * Optional. The client-provided short name for the Backup resource. * This name must: * - be between 1 and 63 characters long (inclusive) * - consist of only lower-case ASCII letters, numbers, and dashes @@ -37,7 +37,7 @@ class CreateBackupRequest extends \Google\Protobuf\Internal\Message * - end with a lower-case letter or number * - be unique within the set of Backups in this BackupPlan * - * Generated from protobuf field string backup_id = 3; + * Generated from protobuf field string backup_id = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $backup_id = ''; @@ -45,8 +45,8 @@ class CreateBackupRequest extends \Google\Protobuf\Internal\Message * @param string $parent Required. The BackupPlan within which to create the Backup. * Format: `projects/*/locations/*/backupPlans/*` * Please see {@see BackupForGKEClient::backupPlanName()} for help formatting this field. - * @param \Google\Cloud\GkeBackup\V1\Backup $backup The Backup resource to create. - * @param string $backupId The client-provided short name for the Backup resource. + * @param \Google\Cloud\GkeBackup\V1\Backup $backup Optional. The Backup resource to create. + * @param string $backupId Optional. The client-provided short name for the Backup resource. * This name must: * * - be between 1 and 63 characters long (inclusive) @@ -77,9 +77,9 @@ public static function build(string $parent, \Google\Cloud\GkeBackup\V1\Backup $ * Required. The BackupPlan within which to create the Backup. * Format: `projects/*/locations/*/backupPlans/*` * @type \Google\Cloud\GkeBackup\V1\Backup $backup - * The Backup resource to create. + * Optional. The Backup resource to create. * @type string $backup_id - * The client-provided short name for the Backup resource. + * Optional. The client-provided short name for the Backup resource. * This name must: * - be between 1 and 63 characters long (inclusive) * - consist of only lower-case ASCII letters, numbers, and dashes @@ -122,9 +122,9 @@ public function setParent($var) } /** - * The Backup resource to create. + * Optional. The Backup resource to create. * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup backup = 2; + * Generated from protobuf field .google.cloud.gkebackup.v1.Backup backup = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\GkeBackup\V1\Backup|null */ public function getBackup() @@ -143,9 +143,9 @@ public function clearBackup() } /** - * The Backup resource to create. + * Optional. The Backup resource to create. * - * Generated from protobuf field .google.cloud.gkebackup.v1.Backup backup = 2; + * Generated from protobuf field .google.cloud.gkebackup.v1.Backup backup = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\GkeBackup\V1\Backup $var * @return $this */ @@ -158,7 +158,7 @@ public function setBackup($var) } /** - * The client-provided short name for the Backup resource. + * Optional. The client-provided short name for the Backup resource. * This name must: * - be between 1 and 63 characters long (inclusive) * - consist of only lower-case ASCII letters, numbers, and dashes @@ -166,7 +166,7 @@ public function setBackup($var) * - end with a lower-case letter or number * - be unique within the set of Backups in this BackupPlan * - * Generated from protobuf field string backup_id = 3; + * Generated from protobuf field string backup_id = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getBackupId() @@ -175,7 +175,7 @@ public function getBackupId() } /** - * The client-provided short name for the Backup resource. + * Optional. The client-provided short name for the Backup resource. * This name must: * - be between 1 and 63 characters long (inclusive) * - consist of only lower-case ASCII letters, numbers, and dashes @@ -183,7 +183,7 @@ public function getBackupId() * - end with a lower-case letter or number * - be unique within the set of Backups in this BackupPlan * - * Generated from protobuf field string backup_id = 3; + * Generated from protobuf field string backup_id = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ diff --git a/GkeBackup/src/V1/DeleteBackupPlanRequest.php b/GkeBackup/src/V1/DeleteBackupPlanRequest.php index 2a3e8d7ece23..f51af9702249 100644 --- a/GkeBackup/src/V1/DeleteBackupPlanRequest.php +++ b/GkeBackup/src/V1/DeleteBackupPlanRequest.php @@ -23,11 +23,11 @@ class DeleteBackupPlanRequest extends \Google\Protobuf\Internal\Message */ private $name = ''; /** - * If provided, this value must match the current value of the + * Optional. If provided, this value must match the current value of the * target BackupPlan's [etag][google.cloud.gkebackup.v1.BackupPlan.etag] field * or the request is rejected. * - * Generated from protobuf field string etag = 2; + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $etag = ''; @@ -56,7 +56,7 @@ public static function build(string $name): self * Required. Fully qualified BackupPlan name. * Format: `projects/*/locations/*/backupPlans/*` * @type string $etag - * If provided, this value must match the current value of the + * Optional. If provided, this value must match the current value of the * target BackupPlan's [etag][google.cloud.gkebackup.v1.BackupPlan.etag] field * or the request is rejected. * } @@ -95,11 +95,11 @@ public function setName($var) } /** - * If provided, this value must match the current value of the + * Optional. If provided, this value must match the current value of the * target BackupPlan's [etag][google.cloud.gkebackup.v1.BackupPlan.etag] field * or the request is rejected. * - * Generated from protobuf field string etag = 2; + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getEtag() @@ -108,11 +108,11 @@ public function getEtag() } /** - * If provided, this value must match the current value of the + * Optional. If provided, this value must match the current value of the * target BackupPlan's [etag][google.cloud.gkebackup.v1.BackupPlan.etag] field * or the request is rejected. * - * Generated from protobuf field string etag = 2; + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ diff --git a/GkeBackup/src/V1/DeleteBackupRequest.php b/GkeBackup/src/V1/DeleteBackupRequest.php index f697e4bb537a..38d7dd1e12e1 100644 --- a/GkeBackup/src/V1/DeleteBackupRequest.php +++ b/GkeBackup/src/V1/DeleteBackupRequest.php @@ -23,19 +23,19 @@ class DeleteBackupRequest extends \Google\Protobuf\Internal\Message */ private $name = ''; /** - * If provided, this value must match the current value of the + * Optional. If provided, this value must match the current value of the * target Backup's [etag][google.cloud.gkebackup.v1.Backup.etag] field or the * request is rejected. * - * Generated from protobuf field string etag = 2; + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $etag = ''; /** - * If set to true, any VolumeBackups below this Backup will also be deleted. - * Otherwise, the request will only succeed if the Backup has no + * Optional. If set to true, any VolumeBackups below this Backup will also be + * deleted. Otherwise, the request will only succeed if the Backup has no * VolumeBackups. * - * Generated from protobuf field bool force = 3; + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $force = false; @@ -64,12 +64,12 @@ public static function build(string $name): self * Required. Name of the Backup resource. * Format: `projects/*/locations/*/backupPlans/*/backups/*` * @type string $etag - * If provided, this value must match the current value of the + * Optional. If provided, this value must match the current value of the * target Backup's [etag][google.cloud.gkebackup.v1.Backup.etag] field or the * request is rejected. * @type bool $force - * If set to true, any VolumeBackups below this Backup will also be deleted. - * Otherwise, the request will only succeed if the Backup has no + * Optional. If set to true, any VolumeBackups below this Backup will also be + * deleted. Otherwise, the request will only succeed if the Backup has no * VolumeBackups. * } */ @@ -107,11 +107,11 @@ public function setName($var) } /** - * If provided, this value must match the current value of the + * Optional. If provided, this value must match the current value of the * target Backup's [etag][google.cloud.gkebackup.v1.Backup.etag] field or the * request is rejected. * - * Generated from protobuf field string etag = 2; + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getEtag() @@ -120,11 +120,11 @@ public function getEtag() } /** - * If provided, this value must match the current value of the + * Optional. If provided, this value must match the current value of the * target Backup's [etag][google.cloud.gkebackup.v1.Backup.etag] field or the * request is rejected. * - * Generated from protobuf field string etag = 2; + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -137,11 +137,11 @@ public function setEtag($var) } /** - * If set to true, any VolumeBackups below this Backup will also be deleted. - * Otherwise, the request will only succeed if the Backup has no + * Optional. If set to true, any VolumeBackups below this Backup will also be + * deleted. Otherwise, the request will only succeed if the Backup has no * VolumeBackups. * - * Generated from protobuf field bool force = 3; + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return bool */ public function getForce() @@ -150,11 +150,11 @@ public function getForce() } /** - * If set to true, any VolumeBackups below this Backup will also be deleted. - * Otherwise, the request will only succeed if the Backup has no + * Optional. If set to true, any VolumeBackups below this Backup will also be + * deleted. Otherwise, the request will only succeed if the Backup has no * VolumeBackups. * - * Generated from protobuf field bool force = 3; + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param bool $var * @return $this */ diff --git a/GkeBackup/src/V1/DeleteRestorePlanRequest.php b/GkeBackup/src/V1/DeleteRestorePlanRequest.php index 35a3f05f7e35..62f46b43dbb2 100644 --- a/GkeBackup/src/V1/DeleteRestorePlanRequest.php +++ b/GkeBackup/src/V1/DeleteRestorePlanRequest.php @@ -23,19 +23,19 @@ class DeleteRestorePlanRequest extends \Google\Protobuf\Internal\Message */ private $name = ''; /** - * If provided, this value must match the current value of the + * Optional. If provided, this value must match the current value of the * target RestorePlan's [etag][google.cloud.gkebackup.v1.RestorePlan.etag] * field or the request is rejected. * - * Generated from protobuf field string etag = 2; + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $etag = ''; /** - * If set to true, any Restores below this RestorePlan will also be deleted. - * Otherwise, the request will only succeed if the RestorePlan has no + * Optional. If set to true, any Restores below this RestorePlan will also be + * deleted. Otherwise, the request will only succeed if the RestorePlan has no * Restores. * - * Generated from protobuf field bool force = 3; + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $force = false; @@ -64,12 +64,12 @@ public static function build(string $name): self * Required. Fully qualified RestorePlan name. * Format: `projects/*/locations/*/restorePlans/*` * @type string $etag - * If provided, this value must match the current value of the + * Optional. If provided, this value must match the current value of the * target RestorePlan's [etag][google.cloud.gkebackup.v1.RestorePlan.etag] * field or the request is rejected. * @type bool $force - * If set to true, any Restores below this RestorePlan will also be deleted. - * Otherwise, the request will only succeed if the RestorePlan has no + * Optional. If set to true, any Restores below this RestorePlan will also be + * deleted. Otherwise, the request will only succeed if the RestorePlan has no * Restores. * } */ @@ -107,11 +107,11 @@ public function setName($var) } /** - * If provided, this value must match the current value of the + * Optional. If provided, this value must match the current value of the * target RestorePlan's [etag][google.cloud.gkebackup.v1.RestorePlan.etag] * field or the request is rejected. * - * Generated from protobuf field string etag = 2; + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getEtag() @@ -120,11 +120,11 @@ public function getEtag() } /** - * If provided, this value must match the current value of the + * Optional. If provided, this value must match the current value of the * target RestorePlan's [etag][google.cloud.gkebackup.v1.RestorePlan.etag] * field or the request is rejected. * - * Generated from protobuf field string etag = 2; + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -137,11 +137,11 @@ public function setEtag($var) } /** - * If set to true, any Restores below this RestorePlan will also be deleted. - * Otherwise, the request will only succeed if the RestorePlan has no + * Optional. If set to true, any Restores below this RestorePlan will also be + * deleted. Otherwise, the request will only succeed if the RestorePlan has no * Restores. * - * Generated from protobuf field bool force = 3; + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return bool */ public function getForce() @@ -150,11 +150,11 @@ public function getForce() } /** - * If set to true, any Restores below this RestorePlan will also be deleted. - * Otherwise, the request will only succeed if the RestorePlan has no + * Optional. If set to true, any Restores below this RestorePlan will also be + * deleted. Otherwise, the request will only succeed if the RestorePlan has no * Restores. * - * Generated from protobuf field bool force = 3; + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param bool $var * @return $this */ diff --git a/GkeBackup/src/V1/DeleteRestoreRequest.php b/GkeBackup/src/V1/DeleteRestoreRequest.php index 48707f2e15e3..a9d1e56e8859 100644 --- a/GkeBackup/src/V1/DeleteRestoreRequest.php +++ b/GkeBackup/src/V1/DeleteRestoreRequest.php @@ -23,19 +23,19 @@ class DeleteRestoreRequest extends \Google\Protobuf\Internal\Message */ private $name = ''; /** - * If provided, this value must match the current value of the + * Optional. If provided, this value must match the current value of the * target Restore's [etag][google.cloud.gkebackup.v1.Restore.etag] field or * the request is rejected. * - * Generated from protobuf field string etag = 2; + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $etag = ''; /** - * If set to true, any VolumeRestores below this restore will also be deleted. - * Otherwise, the request will only succeed if the restore has no + * Optional. If set to true, any VolumeRestores below this restore will also + * be deleted. Otherwise, the request will only succeed if the restore has no * VolumeRestores. * - * Generated from protobuf field bool force = 3; + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $force = false; @@ -64,12 +64,12 @@ public static function build(string $name): self * Required. Full name of the Restore * Format: `projects/*/locations/*/restorePlans/*/restores/*` * @type string $etag - * If provided, this value must match the current value of the + * Optional. If provided, this value must match the current value of the * target Restore's [etag][google.cloud.gkebackup.v1.Restore.etag] field or * the request is rejected. * @type bool $force - * If set to true, any VolumeRestores below this restore will also be deleted. - * Otherwise, the request will only succeed if the restore has no + * Optional. If set to true, any VolumeRestores below this restore will also + * be deleted. Otherwise, the request will only succeed if the restore has no * VolumeRestores. * } */ @@ -107,11 +107,11 @@ public function setName($var) } /** - * If provided, this value must match the current value of the + * Optional. If provided, this value must match the current value of the * target Restore's [etag][google.cloud.gkebackup.v1.Restore.etag] field or * the request is rejected. * - * Generated from protobuf field string etag = 2; + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getEtag() @@ -120,11 +120,11 @@ public function getEtag() } /** - * If provided, this value must match the current value of the + * Optional. If provided, this value must match the current value of the * target Restore's [etag][google.cloud.gkebackup.v1.Restore.etag] field or * the request is rejected. * - * Generated from protobuf field string etag = 2; + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -137,11 +137,11 @@ public function setEtag($var) } /** - * If set to true, any VolumeRestores below this restore will also be deleted. - * Otherwise, the request will only succeed if the restore has no + * Optional. If set to true, any VolumeRestores below this restore will also + * be deleted. Otherwise, the request will only succeed if the restore has no * VolumeRestores. * - * Generated from protobuf field bool force = 3; + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return bool */ public function getForce() @@ -150,11 +150,11 @@ public function getForce() } /** - * If set to true, any VolumeRestores below this restore will also be deleted. - * Otherwise, the request will only succeed if the restore has no + * Optional. If set to true, any VolumeRestores below this restore will also + * be deleted. Otherwise, the request will only succeed if the restore has no * VolumeRestores. * - * Generated from protobuf field bool force = 3; + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param bool $var * @return $this */ diff --git a/GkeBackup/src/V1/EncryptionKey.php b/GkeBackup/src/V1/EncryptionKey.php index cd137eb2dc20..8281addfa0a1 100644 --- a/GkeBackup/src/V1/EncryptionKey.php +++ b/GkeBackup/src/V1/EncryptionKey.php @@ -17,10 +17,10 @@ class EncryptionKey extends \Google\Protobuf\Internal\Message { /** - * Google Cloud KMS encryption key. Format: + * Optional. Google Cloud KMS encryption key. Format: * `projects/*/locations/*/keyRings/*/cryptoKeys/*` * - * Generated from protobuf field string gcp_kms_encryption_key = 1 [(.google.api.resource_reference) = { + * Generated from protobuf field string gcp_kms_encryption_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { */ private $gcp_kms_encryption_key = ''; @@ -31,7 +31,7 @@ class EncryptionKey extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $gcp_kms_encryption_key - * Google Cloud KMS encryption key. Format: + * Optional. Google Cloud KMS encryption key. Format: * `projects/*/locations/*/keyRings/*/cryptoKeys/*` * } */ @@ -41,10 +41,10 @@ public function __construct($data = NULL) { } /** - * Google Cloud KMS encryption key. Format: + * Optional. Google Cloud KMS encryption key. Format: * `projects/*/locations/*/keyRings/*/cryptoKeys/*` * - * Generated from protobuf field string gcp_kms_encryption_key = 1 [(.google.api.resource_reference) = { + * Generated from protobuf field string gcp_kms_encryption_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { * @return string */ public function getGcpKmsEncryptionKey() @@ -53,10 +53,10 @@ public function getGcpKmsEncryptionKey() } /** - * Google Cloud KMS encryption key. Format: + * Optional. Google Cloud KMS encryption key. Format: * `projects/*/locations/*/keyRings/*/cryptoKeys/*` * - * Generated from protobuf field string gcp_kms_encryption_key = 1 [(.google.api.resource_reference) = { + * Generated from protobuf field string gcp_kms_encryption_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { * @param string $var * @return $this */ diff --git a/GkeBackup/src/V1/ExclusionWindow.php b/GkeBackup/src/V1/ExclusionWindow.php new file mode 100644 index 000000000000..536795ca6c17 --- /dev/null +++ b/GkeBackup/src/V1/ExclusionWindow.php @@ -0,0 +1,268 @@ +google.cloud.gkebackup.v1.ExclusionWindow + */ +class ExclusionWindow extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Specifies the start time of the window using time of the day in + * UTC. + * + * Generated from protobuf field .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $start_time = null; + /** + * Required. Specifies duration of the window. Restrictions for duration based + * on the recurrence type to allow some time for backup to happen: + * - single_occurrence_date: no restriction, but UI may warn about this when + * duration >= target RPO + * - daily window: duration < 24 hours + * - weekly window: + * - days of week includes all seven days of a week: duration < 24 hours + * - all other weekly window: duration < 168 hours (i.e., 24 * 7 hours) + * + * Generated from protobuf field .google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $duration = null; + protected $recurrence; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\TimeOfDay $start_time + * Required. Specifies the start time of the window using time of the day in + * UTC. + * @type \Google\Protobuf\Duration $duration + * Required. Specifies duration of the window. Restrictions for duration based + * on the recurrence type to allow some time for backup to happen: + * - single_occurrence_date: no restriction, but UI may warn about this when + * duration >= target RPO + * - daily window: duration < 24 hours + * - weekly window: + * - days of week includes all seven days of a week: duration < 24 hours + * - all other weekly window: duration < 168 hours (i.e., 24 * 7 hours) + * @type \Google\Type\Date $single_occurrence_date + * No recurrence. The exclusion window occurs only once and on this + * date in UTC. + * @type bool $daily + * The exclusion window occurs every day if set to "True". + * Specifying this field to "False" is an error. + * @type \Google\Cloud\GkeBackup\V1\ExclusionWindow\DayOfWeekList $days_of_week + * The exclusion window occurs on these days of each week in UTC. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\BackupPlan::initOnce(); + parent::__construct($data); + } + + /** + * Required. Specifies the start time of the window using time of the day in + * UTC. + * + * Generated from protobuf field .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Type\TimeOfDay|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Required. Specifies the start time of the window using time of the day in + * UTC. + * + * Generated from protobuf field .google.type.TimeOfDay start_time = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Type\TimeOfDay $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class); + $this->start_time = $var; + + return $this; + } + + /** + * Required. Specifies duration of the window. Restrictions for duration based + * on the recurrence type to allow some time for backup to happen: + * - single_occurrence_date: no restriction, but UI may warn about this when + * duration >= target RPO + * - daily window: duration < 24 hours + * - weekly window: + * - days of week includes all seven days of a week: duration < 24 hours + * - all other weekly window: duration < 168 hours (i.e., 24 * 7 hours) + * + * Generated from protobuf field .google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Required. Specifies duration of the window. Restrictions for duration based + * on the recurrence type to allow some time for backup to happen: + * - single_occurrence_date: no restriction, but UI may warn about this when + * duration >= target RPO + * - daily window: duration < 24 hours + * - weekly window: + * - days of week includes all seven days of a week: duration < 24 hours + * - all other weekly window: duration < 168 hours (i.e., 24 * 7 hours) + * + * Generated from protobuf field .google.protobuf.Duration duration = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + + /** + * No recurrence. The exclusion window occurs only once and on this + * date in UTC. + * + * Generated from protobuf field .google.type.Date single_occurrence_date = 3; + * @return \Google\Type\Date|null + */ + public function getSingleOccurrenceDate() + { + return $this->readOneof(3); + } + + public function hasSingleOccurrenceDate() + { + return $this->hasOneof(3); + } + + /** + * No recurrence. The exclusion window occurs only once and on this + * date in UTC. + * + * Generated from protobuf field .google.type.Date single_occurrence_date = 3; + * @param \Google\Type\Date $var + * @return $this + */ + public function setSingleOccurrenceDate($var) + { + GPBUtil::checkMessage($var, \Google\Type\Date::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The exclusion window occurs every day if set to "True". + * Specifying this field to "False" is an error. + * + * Generated from protobuf field bool daily = 4; + * @return bool + */ + public function getDaily() + { + return $this->readOneof(4); + } + + public function hasDaily() + { + return $this->hasOneof(4); + } + + /** + * The exclusion window occurs every day if set to "True". + * Specifying this field to "False" is an error. + * + * Generated from protobuf field bool daily = 4; + * @param bool $var + * @return $this + */ + public function setDaily($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * The exclusion window occurs on these days of each week in UTC. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList days_of_week = 5; + * @return \Google\Cloud\GkeBackup\V1\ExclusionWindow\DayOfWeekList|null + */ + public function getDaysOfWeek() + { + return $this->readOneof(5); + } + + public function hasDaysOfWeek() + { + return $this->hasOneof(5); + } + + /** + * The exclusion window occurs on these days of each week in UTC. + * + * Generated from protobuf field .google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList days_of_week = 5; + * @param \Google\Cloud\GkeBackup\V1\ExclusionWindow\DayOfWeekList $var + * @return $this + */ + public function setDaysOfWeek($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\GkeBackup\V1\ExclusionWindow\DayOfWeekList::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getRecurrence() + { + return $this->whichOneof("recurrence"); + } + +} + diff --git a/GkeBackup/src/V1/ExclusionWindow/DayOfWeekList.php b/GkeBackup/src/V1/ExclusionWindow/DayOfWeekList.php new file mode 100644 index 000000000000..78dc1367438f --- /dev/null +++ b/GkeBackup/src/V1/ExclusionWindow/DayOfWeekList.php @@ -0,0 +1,68 @@ +google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList + */ +class DayOfWeekList extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A list of days of week. + * + * Generated from protobuf field repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $days_of_week; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $days_of_week + * Optional. A list of days of week. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\BackupPlan::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A list of days of week. + * + * Generated from protobuf field repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDaysOfWeek() + { + return $this->days_of_week; + } + + /** + * Optional. A list of days of week. + * + * Generated from protobuf field repeated .google.type.DayOfWeek days_of_week = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDaysOfWeek($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Type\DayOfWeek::class); + $this->days_of_week = $arr; + + return $this; + } + +} + + diff --git a/GkeBackup/src/V1/Gapic/BackupForGKEGapicClient.php b/GkeBackup/src/V1/Gapic/BackupForGKEGapicClient.php index 9d999175ff00..04c6f0217cdf 100644 --- a/GkeBackup/src/V1/Gapic/BackupForGKEGapicClient.php +++ b/GkeBackup/src/V1/Gapic/BackupForGKEGapicClient.php @@ -46,6 +46,8 @@ use Google\Cloud\GkeBackup\V1\DeleteBackupRequest; use Google\Cloud\GkeBackup\V1\DeleteRestorePlanRequest; use Google\Cloud\GkeBackup\V1\DeleteRestoreRequest; +use Google\Cloud\GkeBackup\V1\GetBackupIndexDownloadUrlRequest; +use Google\Cloud\GkeBackup\V1\GetBackupIndexDownloadUrlResponse; use Google\Cloud\GkeBackup\V1\GetBackupPlanRequest; use Google\Cloud\GkeBackup\V1\GetBackupRequest; use Google\Cloud\GkeBackup\V1\GetRestorePlanRequest; @@ -722,9 +724,9 @@ public function __construct(array $options = []) * Optional. * * @type Backup $backup - * The Backup resource to create. + * Optional. The Backup resource to create. * @type string $backupId - * The client-provided short name for the Backup resource. + * Optional. The client-provided short name for the Backup resource. * This name must: * * - be between 1 and 63 characters long (inclusive) @@ -1086,12 +1088,12 @@ public function createRestorePlan( * Optional. * * @type string $etag - * If provided, this value must match the current value of the + * Optional. If provided, this value must match the current value of the * target Backup's [etag][google.cloud.gkebackup.v1.Backup.etag] field or the * request is rejected. * @type bool $force - * If set to true, any VolumeBackups below this Backup will also be deleted. - * Otherwise, the request will only succeed if the Backup has no + * Optional. If set to true, any VolumeBackups below this Backup will also be + * deleted. Otherwise, the request will only succeed if the Backup has no * VolumeBackups. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an @@ -1174,7 +1176,7 @@ public function deleteBackup($name, array $optionalArgs = []) * Optional. * * @type string $etag - * If provided, this value must match the current value of the + * Optional. If provided, this value must match the current value of the * target BackupPlan's [etag][google.cloud.gkebackup.v1.BackupPlan.etag] field * or the request is rejected. * @type RetrySettings|array $retrySettings @@ -1254,12 +1256,12 @@ public function deleteBackupPlan($name, array $optionalArgs = []) * Optional. * * @type string $etag - * If provided, this value must match the current value of the + * Optional. If provided, this value must match the current value of the * target Restore's [etag][google.cloud.gkebackup.v1.Restore.etag] field or * the request is rejected. * @type bool $force - * If set to true, any VolumeRestores below this restore will also be deleted. - * Otherwise, the request will only succeed if the restore has no + * Optional. If set to true, any VolumeRestores below this restore will also + * be deleted. Otherwise, the request will only succeed if the restore has no * VolumeRestores. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an @@ -1342,12 +1344,12 @@ public function deleteRestore($name, array $optionalArgs = []) * Optional. * * @type string $etag - * If provided, this value must match the current value of the + * Optional. If provided, this value must match the current value of the * target RestorePlan's [etag][google.cloud.gkebackup.v1.RestorePlan.etag] * field or the request is rejected. * @type bool $force - * If set to true, any Restores below this RestorePlan will also be deleted. - * Otherwise, the request will only succeed if the RestorePlan has no + * Optional. If set to true, any Restores below this RestorePlan will also be + * deleted. Otherwise, the request will only succeed if the RestorePlan has no * Restores. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an @@ -1436,6 +1438,56 @@ public function getBackup($name, array $optionalArgs = []) )->wait(); } + /** + * Retrieve the link to the backupIndex. + * + * Sample code: + * ``` + * $backupForGKEClient = new BackupForGKEClient(); + * try { + * $formattedBackup = $backupForGKEClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); + * $response = $backupForGKEClient->getBackupIndexDownloadUrl($formattedBackup); + * } finally { + * $backupForGKEClient->close(); + * } + * ``` + * + * @param string $backup Required. Full name of Backup resource. + * Format: + * projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup} + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\GkeBackup\V1\GetBackupIndexDownloadUrlResponse + * + * @throws ApiException if the remote call fails + */ + public function getBackupIndexDownloadUrl($backup, array $optionalArgs = []) + { + $request = new GetBackupIndexDownloadUrlRequest(); + $requestParamHeaders = []; + $request->setBackup($backup); + $requestParamHeaders['backup'] = $backup; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'GetBackupIndexDownloadUrl', + GetBackupIndexDownloadUrlResponse::class, + $optionalArgs, + $request + )->wait(); + } + /** * Retrieve the details of a single BackupPlan. * @@ -1722,9 +1774,9 @@ public function getVolumeRestore($name, array $optionalArgs = []) * of values will be returned. Any page token used here must have * been generated by a previous call to the API. * @type string $filter - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * @type string $orderBy - * Field by which to sort the results. + * Optional. Field by which to sort the results. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on @@ -1812,9 +1864,9 @@ public function listBackupPlans($parent, array $optionalArgs = []) * of values will be returned. Any page token used here must have * been generated by a previous call to the API. * @type string $filter - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * @type string $orderBy - * Field by which to sort the results. + * Optional. Field by which to sort the results. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on @@ -1902,9 +1954,9 @@ public function listBackups($parent, array $optionalArgs = []) * of values will be returned. Any page token used here must have * been generated by a previous call to the API. * @type string $filter - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * @type string $orderBy - * Field by which to sort the results. + * Optional. Field by which to sort the results. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on @@ -1992,9 +2044,9 @@ public function listRestorePlans($parent, array $optionalArgs = []) * of values will be returned. Any page token used here must have * been generated by a previous call to the API. * @type string $filter - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * @type string $orderBy - * Field by which to sort the results. + * Optional. Field by which to sort the results. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on @@ -2082,9 +2134,9 @@ public function listRestores($parent, array $optionalArgs = []) * of values will be returned. Any page token used here must have * been generated by a previous call to the API. * @type string $filter - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * @type string $orderBy - * Field by which to sort the results. + * Optional. Field by which to sort the results. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on @@ -2172,9 +2224,9 @@ public function listVolumeBackups($parent, array $optionalArgs = []) * of values will be returned. Any page token used here must have * been generated by a previous call to the API. * @type string $filter - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * @type string $orderBy - * Field by which to sort the results. + * Optional. Field by which to sort the results. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on @@ -2266,7 +2318,7 @@ public function listVolumeRestores($parent, array $optionalArgs = []) * Optional. * * @type FieldMask $updateMask - * This is used to specify the fields to be overwritten in the + * Optional. This is used to specify the fields to be overwritten in the * Backup targeted for update. The values for each of these * updated fields will be taken from the `backup_plan` provided * with this request. Field names are relative to the root of the resource. @@ -2353,7 +2405,7 @@ public function updateBackup($backup, array $optionalArgs = []) * Optional. * * @type FieldMask $updateMask - * This is used to specify the fields to be overwritten in the + * Optional. This is used to specify the fields to be overwritten in the * BackupPlan targeted for update. The values for each of these * updated fields will be taken from the `backup_plan` provided * with this request. Field names are relative to the root of the resource @@ -2441,7 +2493,7 @@ public function updateBackupPlan($backupPlan, array $optionalArgs = []) * Optional. * * @type FieldMask $updateMask - * This is used to specify the fields to be overwritten in the + * Optional. This is used to specify the fields to be overwritten in the * Restore targeted for update. The values for each of these * updated fields will be taken from the `restore` provided * with this request. Field names are relative to the root of the resource. @@ -2528,7 +2580,7 @@ public function updateRestore($restore, array $optionalArgs = []) * Optional. * * @type FieldMask $updateMask - * This is used to specify the fields to be overwritten in the + * Optional. This is used to specify the fields to be overwritten in the * RestorePlan targeted for update. The values for each of these * updated fields will be taken from the `restore_plan` provided * with this request. Field names are relative to the root of the resource. diff --git a/GkeBackup/src/V1/GetBackupIndexDownloadUrlRequest.php b/GkeBackup/src/V1/GetBackupIndexDownloadUrlRequest.php new file mode 100644 index 000000000000..22e0e1abcaae --- /dev/null +++ b/GkeBackup/src/V1/GetBackupIndexDownloadUrlRequest.php @@ -0,0 +1,91 @@ +google.cloud.gkebackup.v1.GetBackupIndexDownloadUrlRequest + */ +class GetBackupIndexDownloadUrlRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Full name of Backup resource. + * Format: + * projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup} + * + * Generated from protobuf field string backup = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $backup = ''; + + /** + * @param string $backup Required. Full name of Backup resource. + * Format: + * projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup} + * Please see {@see BackupForGKEClient::backupName()} for help formatting this field. + * + * @return \Google\Cloud\GkeBackup\V1\GetBackupIndexDownloadUrlRequest + * + * @experimental + */ + public static function build(string $backup): self + { + return (new self()) + ->setBackup($backup); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $backup + * Required. Full name of Backup resource. + * Format: + * projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Required. Full name of Backup resource. + * Format: + * projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup} + * + * Generated from protobuf field string backup = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getBackup() + { + return $this->backup; + } + + /** + * Required. Full name of Backup resource. + * Format: + * projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup} + * + * Generated from protobuf field string backup = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setBackup($var) + { + GPBUtil::checkString($var, True); + $this->backup = $var; + + return $this; + } + +} + diff --git a/GkeBackup/src/V1/GetBackupIndexDownloadUrlResponse.php b/GkeBackup/src/V1/GetBackupIndexDownloadUrlResponse.php new file mode 100644 index 000000000000..9bb59fbd826c --- /dev/null +++ b/GkeBackup/src/V1/GetBackupIndexDownloadUrlResponse.php @@ -0,0 +1,60 @@ +google.cloud.gkebackup.v1.GetBackupIndexDownloadUrlResponse + */ +class GetBackupIndexDownloadUrlResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string signed_url = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $signed_url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $signed_url + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\Gkebackup::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string signed_url = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSignedUrl() + { + return $this->signed_url; + } + + /** + * Generated from protobuf field string signed_url = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSignedUrl($var) + { + GPBUtil::checkString($var, True); + $this->signed_url = $var; + + return $this; + } + +} + diff --git a/GkeBackup/src/V1/ListBackupPlansRequest.php b/GkeBackup/src/V1/ListBackupPlansRequest.php index 15b50efd9178..695e16389a7c 100644 --- a/GkeBackup/src/V1/ListBackupPlansRequest.php +++ b/GkeBackup/src/V1/ListBackupPlansRequest.php @@ -23,37 +23,37 @@ class ListBackupPlansRequest extends \Google\Protobuf\Internal\Message */ private $parent = ''; /** - * The target number of results to return in a single response. + * Optional. The target number of results to return in a single response. * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should + * Note that the response may include a partial list and a caller should * only rely on the response's * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] * to determine if there are more instances left to be queried. * - * Generated from protobuf field int32 page_size = 2; + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $page_size = 0; /** - * The value of + * Optional. The value of * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] * received from a previous `ListBackupPlans` call. * Provide this to retrieve the subsequent page in a multi-page list of * results. When paginating, all other parameters provided to * `ListBackupPlans` must match the call that provided the page token. * - * Generated from protobuf field string page_token = 3; + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $page_token = ''; /** - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * - * Generated from protobuf field string filter = 4; + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; */ private $filter = ''; /** - * Field by which to sort the results. + * Optional. Field by which to sort the results. * - * Generated from protobuf field string order_by = 5; + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; */ private $order_by = ''; @@ -82,23 +82,23 @@ public static function build(string $parent): self * Required. The location that contains the BackupPlans to list. * Format: `projects/*/locations/*` * @type int $page_size - * The target number of results to return in a single response. + * Optional. The target number of results to return in a single response. * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should + * Note that the response may include a partial list and a caller should * only rely on the response's * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] * to determine if there are more instances left to be queried. * @type string $page_token - * The value of + * Optional. The value of * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] * received from a previous `ListBackupPlans` call. * Provide this to retrieve the subsequent page in a multi-page list of * results. When paginating, all other parameters provided to * `ListBackupPlans` must match the call that provided the page token. * @type string $filter - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * @type string $order_by - * Field by which to sort the results. + * Optional. Field by which to sort the results. * } */ public function __construct($data = NULL) { @@ -135,14 +135,14 @@ public function setParent($var) } /** - * The target number of results to return in a single response. + * Optional. The target number of results to return in a single response. * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should + * Note that the response may include a partial list and a caller should * only rely on the response's * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] * to determine if there are more instances left to be queried. * - * Generated from protobuf field int32 page_size = 2; + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int */ public function getPageSize() @@ -151,14 +151,14 @@ public function getPageSize() } /** - * The target number of results to return in a single response. + * Optional. The target number of results to return in a single response. * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should + * Note that the response may include a partial list and a caller should * only rely on the response's * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] * to determine if there are more instances left to be queried. * - * Generated from protobuf field int32 page_size = 2; + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var * @return $this */ @@ -171,14 +171,14 @@ public function setPageSize($var) } /** - * The value of + * Optional. The value of * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] * received from a previous `ListBackupPlans` call. * Provide this to retrieve the subsequent page in a multi-page list of * results. When paginating, all other parameters provided to * `ListBackupPlans` must match the call that provided the page token. * - * Generated from protobuf field string page_token = 3; + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getPageToken() @@ -187,14 +187,14 @@ public function getPageToken() } /** - * The value of + * Optional. The value of * [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token] * received from a previous `ListBackupPlans` call. * Provide this to retrieve the subsequent page in a multi-page list of * results. When paginating, all other parameters provided to * `ListBackupPlans` must match the call that provided the page token. * - * Generated from protobuf field string page_token = 3; + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -207,9 +207,9 @@ public function setPageToken($var) } /** - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * - * Generated from protobuf field string filter = 4; + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getFilter() @@ -218,9 +218,9 @@ public function getFilter() } /** - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * - * Generated from protobuf field string filter = 4; + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -233,9 +233,9 @@ public function setFilter($var) } /** - * Field by which to sort the results. + * Optional. Field by which to sort the results. * - * Generated from protobuf field string order_by = 5; + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getOrderBy() @@ -244,9 +244,9 @@ public function getOrderBy() } /** - * Field by which to sort the results. + * Optional. Field by which to sort the results. * - * Generated from protobuf field string order_by = 5; + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ diff --git a/GkeBackup/src/V1/ListBackupsRequest.php b/GkeBackup/src/V1/ListBackupsRequest.php index 60aab63eff86..96df7bc2c9a9 100644 --- a/GkeBackup/src/V1/ListBackupsRequest.php +++ b/GkeBackup/src/V1/ListBackupsRequest.php @@ -23,37 +23,37 @@ class ListBackupsRequest extends \Google\Protobuf\Internal\Message */ private $parent = ''; /** - * The target number of results to return in a single response. + * Optional. The target number of results to return in a single response. * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should + * Note that the response may include a partial list and a caller should * only rely on the response's * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] * to determine if there are more instances left to be queried. * - * Generated from protobuf field int32 page_size = 2; + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $page_size = 0; /** - * The value of + * Optional. The value of * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] * received from a previous `ListBackups` call. * Provide this to retrieve the subsequent page in a multi-page list of * results. When paginating, all other parameters provided to * `ListBackups` must match the call that provided the page token. * - * Generated from protobuf field string page_token = 3; + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $page_token = ''; /** - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * - * Generated from protobuf field string filter = 4; + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; */ private $filter = ''; /** - * Field by which to sort the results. + * Optional. Field by which to sort the results. * - * Generated from protobuf field string order_by = 5; + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; */ private $order_by = ''; @@ -82,23 +82,23 @@ public static function build(string $parent): self * Required. The BackupPlan that contains the Backups to list. * Format: `projects/*/locations/*/backupPlans/*` * @type int $page_size - * The target number of results to return in a single response. + * Optional. The target number of results to return in a single response. * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should + * Note that the response may include a partial list and a caller should * only rely on the response's * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] * to determine if there are more instances left to be queried. * @type string $page_token - * The value of + * Optional. The value of * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] * received from a previous `ListBackups` call. * Provide this to retrieve the subsequent page in a multi-page list of * results. When paginating, all other parameters provided to * `ListBackups` must match the call that provided the page token. * @type string $filter - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * @type string $order_by - * Field by which to sort the results. + * Optional. Field by which to sort the results. * } */ public function __construct($data = NULL) { @@ -135,14 +135,14 @@ public function setParent($var) } /** - * The target number of results to return in a single response. + * Optional. The target number of results to return in a single response. * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should + * Note that the response may include a partial list and a caller should * only rely on the response's * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] * to determine if there are more instances left to be queried. * - * Generated from protobuf field int32 page_size = 2; + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int */ public function getPageSize() @@ -151,14 +151,14 @@ public function getPageSize() } /** - * The target number of results to return in a single response. + * Optional. The target number of results to return in a single response. * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should + * Note that the response may include a partial list and a caller should * only rely on the response's * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] * to determine if there are more instances left to be queried. * - * Generated from protobuf field int32 page_size = 2; + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var * @return $this */ @@ -171,14 +171,14 @@ public function setPageSize($var) } /** - * The value of + * Optional. The value of * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] * received from a previous `ListBackups` call. * Provide this to retrieve the subsequent page in a multi-page list of * results. When paginating, all other parameters provided to * `ListBackups` must match the call that provided the page token. * - * Generated from protobuf field string page_token = 3; + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getPageToken() @@ -187,14 +187,14 @@ public function getPageToken() } /** - * The value of + * Optional. The value of * [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token] * received from a previous `ListBackups` call. * Provide this to retrieve the subsequent page in a multi-page list of * results. When paginating, all other parameters provided to * `ListBackups` must match the call that provided the page token. * - * Generated from protobuf field string page_token = 3; + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -207,9 +207,9 @@ public function setPageToken($var) } /** - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * - * Generated from protobuf field string filter = 4; + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getFilter() @@ -218,9 +218,9 @@ public function getFilter() } /** - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * - * Generated from protobuf field string filter = 4; + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -233,9 +233,9 @@ public function setFilter($var) } /** - * Field by which to sort the results. + * Optional. Field by which to sort the results. * - * Generated from protobuf field string order_by = 5; + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getOrderBy() @@ -244,9 +244,9 @@ public function getOrderBy() } /** - * Field by which to sort the results. + * Optional. Field by which to sort the results. * - * Generated from protobuf field string order_by = 5; + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ diff --git a/GkeBackup/src/V1/ListRestorePlansRequest.php b/GkeBackup/src/V1/ListRestorePlansRequest.php index 518e95220644..d248a5151d0b 100644 --- a/GkeBackup/src/V1/ListRestorePlansRequest.php +++ b/GkeBackup/src/V1/ListRestorePlansRequest.php @@ -23,37 +23,37 @@ class ListRestorePlansRequest extends \Google\Protobuf\Internal\Message */ private $parent = ''; /** - * The target number of results to return in a single response. + * Optional. The target number of results to return in a single response. * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should + * Note that the response may include a partial list and a caller should * only rely on the response's * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] * to determine if there are more instances left to be queried. * - * Generated from protobuf field int32 page_size = 2; + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $page_size = 0; /** - * The value of + * Optional. The value of * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] * received from a previous `ListRestorePlans` call. * Provide this to retrieve the subsequent page in a multi-page list of * results. When paginating, all other parameters provided to * `ListRestorePlans` must match the call that provided the page token. * - * Generated from protobuf field string page_token = 3; + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $page_token = ''; /** - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * - * Generated from protobuf field string filter = 4; + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; */ private $filter = ''; /** - * Field by which to sort the results. + * Optional. Field by which to sort the results. * - * Generated from protobuf field string order_by = 5; + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; */ private $order_by = ''; @@ -82,23 +82,23 @@ public static function build(string $parent): self * Required. The location that contains the RestorePlans to list. * Format: `projects/*/locations/*` * @type int $page_size - * The target number of results to return in a single response. + * Optional. The target number of results to return in a single response. * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should + * Note that the response may include a partial list and a caller should * only rely on the response's * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] * to determine if there are more instances left to be queried. * @type string $page_token - * The value of + * Optional. The value of * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] * received from a previous `ListRestorePlans` call. * Provide this to retrieve the subsequent page in a multi-page list of * results. When paginating, all other parameters provided to * `ListRestorePlans` must match the call that provided the page token. * @type string $filter - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * @type string $order_by - * Field by which to sort the results. + * Optional. Field by which to sort the results. * } */ public function __construct($data = NULL) { @@ -135,14 +135,14 @@ public function setParent($var) } /** - * The target number of results to return in a single response. + * Optional. The target number of results to return in a single response. * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should + * Note that the response may include a partial list and a caller should * only rely on the response's * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] * to determine if there are more instances left to be queried. * - * Generated from protobuf field int32 page_size = 2; + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int */ public function getPageSize() @@ -151,14 +151,14 @@ public function getPageSize() } /** - * The target number of results to return in a single response. + * Optional. The target number of results to return in a single response. * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should + * Note that the response may include a partial list and a caller should * only rely on the response's * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] * to determine if there are more instances left to be queried. * - * Generated from protobuf field int32 page_size = 2; + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var * @return $this */ @@ -171,14 +171,14 @@ public function setPageSize($var) } /** - * The value of + * Optional. The value of * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] * received from a previous `ListRestorePlans` call. * Provide this to retrieve the subsequent page in a multi-page list of * results. When paginating, all other parameters provided to * `ListRestorePlans` must match the call that provided the page token. * - * Generated from protobuf field string page_token = 3; + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getPageToken() @@ -187,14 +187,14 @@ public function getPageToken() } /** - * The value of + * Optional. The value of * [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token] * received from a previous `ListRestorePlans` call. * Provide this to retrieve the subsequent page in a multi-page list of * results. When paginating, all other parameters provided to * `ListRestorePlans` must match the call that provided the page token. * - * Generated from protobuf field string page_token = 3; + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -207,9 +207,9 @@ public function setPageToken($var) } /** - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * - * Generated from protobuf field string filter = 4; + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getFilter() @@ -218,9 +218,9 @@ public function getFilter() } /** - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * - * Generated from protobuf field string filter = 4; + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -233,9 +233,9 @@ public function setFilter($var) } /** - * Field by which to sort the results. + * Optional. Field by which to sort the results. * - * Generated from protobuf field string order_by = 5; + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getOrderBy() @@ -244,9 +244,9 @@ public function getOrderBy() } /** - * Field by which to sort the results. + * Optional. Field by which to sort the results. * - * Generated from protobuf field string order_by = 5; + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ diff --git a/GkeBackup/src/V1/ListRestoresRequest.php b/GkeBackup/src/V1/ListRestoresRequest.php index 7088cd271f9a..8acc753feb5c 100644 --- a/GkeBackup/src/V1/ListRestoresRequest.php +++ b/GkeBackup/src/V1/ListRestoresRequest.php @@ -23,37 +23,37 @@ class ListRestoresRequest extends \Google\Protobuf\Internal\Message */ private $parent = ''; /** - * The target number of results to return in a single response. + * Optional. The target number of results to return in a single response. * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should + * Note that the response may include a partial list and a caller should * only rely on the response's * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] * to determine if there are more instances left to be queried. * - * Generated from protobuf field int32 page_size = 2; + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $page_size = 0; /** - * The value of + * Optional. The value of * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] * received from a previous `ListRestores` call. * Provide this to retrieve the subsequent page in a multi-page list of * results. When paginating, all other parameters provided to `ListRestores` * must match the call that provided the page token. * - * Generated from protobuf field string page_token = 3; + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $page_token = ''; /** - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * - * Generated from protobuf field string filter = 4; + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; */ private $filter = ''; /** - * Field by which to sort the results. + * Optional. Field by which to sort the results. * - * Generated from protobuf field string order_by = 5; + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; */ private $order_by = ''; @@ -82,23 +82,23 @@ public static function build(string $parent): self * Required. The RestorePlan that contains the Restores to list. * Format: `projects/*/locations/*/restorePlans/*` * @type int $page_size - * The target number of results to return in a single response. + * Optional. The target number of results to return in a single response. * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should + * Note that the response may include a partial list and a caller should * only rely on the response's * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] * to determine if there are more instances left to be queried. * @type string $page_token - * The value of + * Optional. The value of * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] * received from a previous `ListRestores` call. * Provide this to retrieve the subsequent page in a multi-page list of * results. When paginating, all other parameters provided to `ListRestores` * must match the call that provided the page token. * @type string $filter - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * @type string $order_by - * Field by which to sort the results. + * Optional. Field by which to sort the results. * } */ public function __construct($data = NULL) { @@ -135,14 +135,14 @@ public function setParent($var) } /** - * The target number of results to return in a single response. + * Optional. The target number of results to return in a single response. * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should + * Note that the response may include a partial list and a caller should * only rely on the response's * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] * to determine if there are more instances left to be queried. * - * Generated from protobuf field int32 page_size = 2; + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int */ public function getPageSize() @@ -151,14 +151,14 @@ public function getPageSize() } /** - * The target number of results to return in a single response. + * Optional. The target number of results to return in a single response. * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should + * Note that the response may include a partial list and a caller should * only rely on the response's * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] * to determine if there are more instances left to be queried. * - * Generated from protobuf field int32 page_size = 2; + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var * @return $this */ @@ -171,14 +171,14 @@ public function setPageSize($var) } /** - * The value of + * Optional. The value of * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] * received from a previous `ListRestores` call. * Provide this to retrieve the subsequent page in a multi-page list of * results. When paginating, all other parameters provided to `ListRestores` * must match the call that provided the page token. * - * Generated from protobuf field string page_token = 3; + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getPageToken() @@ -187,14 +187,14 @@ public function getPageToken() } /** - * The value of + * Optional. The value of * [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token] * received from a previous `ListRestores` call. * Provide this to retrieve the subsequent page in a multi-page list of * results. When paginating, all other parameters provided to `ListRestores` * must match the call that provided the page token. * - * Generated from protobuf field string page_token = 3; + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -207,9 +207,9 @@ public function setPageToken($var) } /** - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * - * Generated from protobuf field string filter = 4; + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getFilter() @@ -218,9 +218,9 @@ public function getFilter() } /** - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * - * Generated from protobuf field string filter = 4; + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -233,9 +233,9 @@ public function setFilter($var) } /** - * Field by which to sort the results. + * Optional. Field by which to sort the results. * - * Generated from protobuf field string order_by = 5; + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getOrderBy() @@ -244,9 +244,9 @@ public function getOrderBy() } /** - * Field by which to sort the results. + * Optional. Field by which to sort the results. * - * Generated from protobuf field string order_by = 5; + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ diff --git a/GkeBackup/src/V1/ListVolumeBackupsRequest.php b/GkeBackup/src/V1/ListVolumeBackupsRequest.php index 04332e02b83b..898d8c12025a 100644 --- a/GkeBackup/src/V1/ListVolumeBackupsRequest.php +++ b/GkeBackup/src/V1/ListVolumeBackupsRequest.php @@ -23,37 +23,37 @@ class ListVolumeBackupsRequest extends \Google\Protobuf\Internal\Message */ private $parent = ''; /** - * The target number of results to return in a single response. + * Optional. The target number of results to return in a single response. * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should + * Note that the response may include a partial list and a caller should * only rely on the response's * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] * to determine if there are more instances left to be queried. * - * Generated from protobuf field int32 page_size = 2; + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $page_size = 0; /** - * The value of + * Optional. The value of * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] * received from a previous `ListVolumeBackups` call. * Provide this to retrieve the subsequent page in a multi-page list of * results. When paginating, all other parameters provided to * `ListVolumeBackups` must match the call that provided the page token. * - * Generated from protobuf field string page_token = 3; + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $page_token = ''; /** - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * - * Generated from protobuf field string filter = 4; + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; */ private $filter = ''; /** - * Field by which to sort the results. + * Optional. Field by which to sort the results. * - * Generated from protobuf field string order_by = 5; + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; */ private $order_by = ''; @@ -82,23 +82,23 @@ public static function build(string $parent): self * Required. The Backup that contains the VolumeBackups to list. * Format: `projects/*/locations/*/backupPlans/*/backups/*` * @type int $page_size - * The target number of results to return in a single response. + * Optional. The target number of results to return in a single response. * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should + * Note that the response may include a partial list and a caller should * only rely on the response's * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] * to determine if there are more instances left to be queried. * @type string $page_token - * The value of + * Optional. The value of * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] * received from a previous `ListVolumeBackups` call. * Provide this to retrieve the subsequent page in a multi-page list of * results. When paginating, all other parameters provided to * `ListVolumeBackups` must match the call that provided the page token. * @type string $filter - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * @type string $order_by - * Field by which to sort the results. + * Optional. Field by which to sort the results. * } */ public function __construct($data = NULL) { @@ -135,14 +135,14 @@ public function setParent($var) } /** - * The target number of results to return in a single response. + * Optional. The target number of results to return in a single response. * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should + * Note that the response may include a partial list and a caller should * only rely on the response's * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] * to determine if there are more instances left to be queried. * - * Generated from protobuf field int32 page_size = 2; + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int */ public function getPageSize() @@ -151,14 +151,14 @@ public function getPageSize() } /** - * The target number of results to return in a single response. + * Optional. The target number of results to return in a single response. * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should + * Note that the response may include a partial list and a caller should * only rely on the response's * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] * to determine if there are more instances left to be queried. * - * Generated from protobuf field int32 page_size = 2; + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var * @return $this */ @@ -171,14 +171,14 @@ public function setPageSize($var) } /** - * The value of + * Optional. The value of * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] * received from a previous `ListVolumeBackups` call. * Provide this to retrieve the subsequent page in a multi-page list of * results. When paginating, all other parameters provided to * `ListVolumeBackups` must match the call that provided the page token. * - * Generated from protobuf field string page_token = 3; + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getPageToken() @@ -187,14 +187,14 @@ public function getPageToken() } /** - * The value of + * Optional. The value of * [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token] * received from a previous `ListVolumeBackups` call. * Provide this to retrieve the subsequent page in a multi-page list of * results. When paginating, all other parameters provided to * `ListVolumeBackups` must match the call that provided the page token. * - * Generated from protobuf field string page_token = 3; + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -207,9 +207,9 @@ public function setPageToken($var) } /** - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * - * Generated from protobuf field string filter = 4; + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getFilter() @@ -218,9 +218,9 @@ public function getFilter() } /** - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * - * Generated from protobuf field string filter = 4; + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -233,9 +233,9 @@ public function setFilter($var) } /** - * Field by which to sort the results. + * Optional. Field by which to sort the results. * - * Generated from protobuf field string order_by = 5; + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getOrderBy() @@ -244,9 +244,9 @@ public function getOrderBy() } /** - * Field by which to sort the results. + * Optional. Field by which to sort the results. * - * Generated from protobuf field string order_by = 5; + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ diff --git a/GkeBackup/src/V1/ListVolumeRestoresRequest.php b/GkeBackup/src/V1/ListVolumeRestoresRequest.php index 094aa5c701d6..c093c1d18232 100644 --- a/GkeBackup/src/V1/ListVolumeRestoresRequest.php +++ b/GkeBackup/src/V1/ListVolumeRestoresRequest.php @@ -23,37 +23,37 @@ class ListVolumeRestoresRequest extends \Google\Protobuf\Internal\Message */ private $parent = ''; /** - * The target number of results to return in a single response. + * Optional. The target number of results to return in a single response. * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should + * Note that the response may include a partial list and a caller should * only rely on the response's * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] * to determine if there are more instances left to be queried. * - * Generated from protobuf field int32 page_size = 2; + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $page_size = 0; /** - * The value of + * Optional. The value of * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] * received from a previous `ListVolumeRestores` call. * Provide this to retrieve the subsequent page in a multi-page list of * results. When paginating, all other parameters provided to * `ListVolumeRestores` must match the call that provided the page token. * - * Generated from protobuf field string page_token = 3; + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $page_token = ''; /** - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * - * Generated from protobuf field string filter = 4; + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; */ private $filter = ''; /** - * Field by which to sort the results. + * Optional. Field by which to sort the results. * - * Generated from protobuf field string order_by = 5; + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; */ private $order_by = ''; @@ -82,23 +82,23 @@ public static function build(string $parent): self * Required. The Restore that contains the VolumeRestores to list. * Format: `projects/*/locations/*/restorePlans/*/restores/*` * @type int $page_size - * The target number of results to return in a single response. + * Optional. The target number of results to return in a single response. * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should + * Note that the response may include a partial list and a caller should * only rely on the response's * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] * to determine if there are more instances left to be queried. * @type string $page_token - * The value of + * Optional. The value of * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] * received from a previous `ListVolumeRestores` call. * Provide this to retrieve the subsequent page in a multi-page list of * results. When paginating, all other parameters provided to * `ListVolumeRestores` must match the call that provided the page token. * @type string $filter - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * @type string $order_by - * Field by which to sort the results. + * Optional. Field by which to sort the results. * } */ public function __construct($data = NULL) { @@ -135,14 +135,14 @@ public function setParent($var) } /** - * The target number of results to return in a single response. + * Optional. The target number of results to return in a single response. * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should + * Note that the response may include a partial list and a caller should * only rely on the response's * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] * to determine if there are more instances left to be queried. * - * Generated from protobuf field int32 page_size = 2; + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int */ public function getPageSize() @@ -151,14 +151,14 @@ public function getPageSize() } /** - * The target number of results to return in a single response. + * Optional. The target number of results to return in a single response. * If not specified, a default value will be chosen by the service. - * Note that the response may inclue a partial list and a caller should + * Note that the response may include a partial list and a caller should * only rely on the response's * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] * to determine if there are more instances left to be queried. * - * Generated from protobuf field int32 page_size = 2; + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var * @return $this */ @@ -171,14 +171,14 @@ public function setPageSize($var) } /** - * The value of + * Optional. The value of * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] * received from a previous `ListVolumeRestores` call. * Provide this to retrieve the subsequent page in a multi-page list of * results. When paginating, all other parameters provided to * `ListVolumeRestores` must match the call that provided the page token. * - * Generated from protobuf field string page_token = 3; + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getPageToken() @@ -187,14 +187,14 @@ public function getPageToken() } /** - * The value of + * Optional. The value of * [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token] * received from a previous `ListVolumeRestores` call. * Provide this to retrieve the subsequent page in a multi-page list of * results. When paginating, all other parameters provided to * `ListVolumeRestores` must match the call that provided the page token. * - * Generated from protobuf field string page_token = 3; + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -207,9 +207,9 @@ public function setPageToken($var) } /** - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * - * Generated from protobuf field string filter = 4; + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getFilter() @@ -218,9 +218,9 @@ public function getFilter() } /** - * Field match expression used to filter the results. + * Optional. Field match expression used to filter the results. * - * Generated from protobuf field string filter = 4; + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -233,9 +233,9 @@ public function setFilter($var) } /** - * Field by which to sort the results. + * Optional. Field by which to sort the results. * - * Generated from protobuf field string order_by = 5; + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getOrderBy() @@ -244,9 +244,9 @@ public function getOrderBy() } /** - * Field by which to sort the results. + * Optional. Field by which to sort the results. * - * Generated from protobuf field string order_by = 5; + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ diff --git a/GkeBackup/src/V1/NamespacedName.php b/GkeBackup/src/V1/NamespacedName.php index 23000d7a7da7..8c72b92e04f0 100644 --- a/GkeBackup/src/V1/NamespacedName.php +++ b/GkeBackup/src/V1/NamespacedName.php @@ -16,15 +16,15 @@ class NamespacedName extends \Google\Protobuf\Internal\Message { /** - * The Namespace of the Kubernetes resource. + * Optional. The Namespace of the Kubernetes resource. * - * Generated from protobuf field string namespace = 1; + * Generated from protobuf field string namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $namespace = ''; /** - * The name of the Kubernetes resource. + * Optional. The name of the Kubernetes resource. * - * Generated from protobuf field string name = 2; + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $name = ''; @@ -35,9 +35,9 @@ class NamespacedName extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $namespace - * The Namespace of the Kubernetes resource. + * Optional. The Namespace of the Kubernetes resource. * @type string $name - * The name of the Kubernetes resource. + * Optional. The name of the Kubernetes resource. * } */ public function __construct($data = NULL) { @@ -46,9 +46,9 @@ public function __construct($data = NULL) { } /** - * The Namespace of the Kubernetes resource. + * Optional. The Namespace of the Kubernetes resource. * - * Generated from protobuf field string namespace = 1; + * Generated from protobuf field string namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getNamespace() @@ -57,9 +57,9 @@ public function getNamespace() } /** - * The Namespace of the Kubernetes resource. + * Optional. The Namespace of the Kubernetes resource. * - * Generated from protobuf field string namespace = 1; + * Generated from protobuf field string namespace = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -72,9 +72,9 @@ public function setNamespace($var) } /** - * The name of the Kubernetes resource. + * Optional. The name of the Kubernetes resource. * - * Generated from protobuf field string name = 2; + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getName() @@ -83,9 +83,9 @@ public function getName() } /** - * The name of the Kubernetes resource. + * Optional. The name of the Kubernetes resource. * - * Generated from protobuf field string name = 2; + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ diff --git a/GkeBackup/src/V1/NamespacedNames.php b/GkeBackup/src/V1/NamespacedNames.php index 89a860984ac8..ea0494a0e587 100644 --- a/GkeBackup/src/V1/NamespacedNames.php +++ b/GkeBackup/src/V1/NamespacedNames.php @@ -16,9 +16,9 @@ class NamespacedNames extends \Google\Protobuf\Internal\Message { /** - * A list of namespaced Kubernetes resources. + * Optional. A list of namespaced Kubernetes resources. * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.NamespacedName namespaced_names = 1; + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.NamespacedName namespaced_names = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $namespaced_names; @@ -29,7 +29,7 @@ class NamespacedNames extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type array<\Google\Cloud\GkeBackup\V1\NamespacedName>|\Google\Protobuf\Internal\RepeatedField $namespaced_names - * A list of namespaced Kubernetes resources. + * Optional. A list of namespaced Kubernetes resources. * } */ public function __construct($data = NULL) { @@ -38,9 +38,9 @@ public function __construct($data = NULL) { } /** - * A list of namespaced Kubernetes resources. + * Optional. A list of namespaced Kubernetes resources. * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.NamespacedName namespaced_names = 1; + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.NamespacedName namespaced_names = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField */ public function getNamespacedNames() @@ -49,9 +49,9 @@ public function getNamespacedNames() } /** - * A list of namespaced Kubernetes resources. + * Optional. A list of namespaced Kubernetes resources. * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.NamespacedName namespaced_names = 1; + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.NamespacedName namespaced_names = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param array<\Google\Cloud\GkeBackup\V1\NamespacedName>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ diff --git a/GkeBackup/src/V1/Namespaces.php b/GkeBackup/src/V1/Namespaces.php index 641c9e3e1187..4b4da96f2ba9 100644 --- a/GkeBackup/src/V1/Namespaces.php +++ b/GkeBackup/src/V1/Namespaces.php @@ -16,9 +16,9 @@ class Namespaces extends \Google\Protobuf\Internal\Message { /** - * A list of Kubernetes Namespaces + * Optional. A list of Kubernetes Namespaces * - * Generated from protobuf field repeated string namespaces = 1; + * Generated from protobuf field repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $namespaces; @@ -29,7 +29,7 @@ class Namespaces extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type array|\Google\Protobuf\Internal\RepeatedField $namespaces - * A list of Kubernetes Namespaces + * Optional. A list of Kubernetes Namespaces * } */ public function __construct($data = NULL) { @@ -38,9 +38,9 @@ public function __construct($data = NULL) { } /** - * A list of Kubernetes Namespaces + * Optional. A list of Kubernetes Namespaces * - * Generated from protobuf field repeated string namespaces = 1; + * Generated from protobuf field repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField */ public function getNamespaces() @@ -49,9 +49,9 @@ public function getNamespaces() } /** - * A list of Kubernetes Namespaces + * Optional. A list of Kubernetes Namespaces * - * Generated from protobuf field repeated string namespaces = 1; + * Generated from protobuf field repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param array|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ diff --git a/GkeBackup/src/V1/Restore.php b/GkeBackup/src/V1/Restore.php index 77e155319877..507ac802f4b8 100644 --- a/GkeBackup/src/V1/Restore.php +++ b/GkeBackup/src/V1/Restore.php @@ -11,7 +11,6 @@ /** * Represents both a request to Restore some portion of a Backup into * a target GKE cluster and a record of the restore operation itself. - * Next id: 18 * * Generated from protobuf message google.cloud.gkebackup.v1.Restore */ diff --git a/GkeBackup/src/V1/RestoreConfig.php b/GkeBackup/src/V1/RestoreConfig.php index 18650010ca6f..8ed78f7c6f7f 100644 --- a/GkeBackup/src/V1/RestoreConfig.php +++ b/GkeBackup/src/V1/RestoreConfig.php @@ -10,63 +10,64 @@ /** * Configuration of a restore. - * Next id: 12 * * Generated from protobuf message google.cloud.gkebackup.v1.RestoreConfig */ class RestoreConfig extends \Google\Protobuf\Internal\Message { /** - * Specifies the mechanism to be used to restore volume data. + * Optional. Specifies the mechanism to be used to restore volume data. * Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as * NO_VOLUME_DATA_RESTORATION). * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy volume_data_restore_policy = 1; + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy volume_data_restore_policy = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $volume_data_restore_policy = 0; /** - * Defines the behavior for handling the situation where cluster-scoped - * resources being restored already exist in the target cluster. This MUST be - * set to a value other than CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if + * Optional. Defines the behavior for handling the situation where + * cluster-scoped resources being restored already exist in the target + * cluster. This MUST be set to a value other than + * CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if * [cluster_resource_restore_scope][google.cloud.gkebackup.v1.RestoreConfig.cluster_resource_restore_scope] * is not empty. * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy cluster_resource_conflict_policy = 2; + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy cluster_resource_conflict_policy = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $cluster_resource_conflict_policy = 0; /** - * Defines the behavior for handling the situation where sets of namespaced - * resources being restored already exist in the target cluster. This MUST be - * set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED. + * Optional. Defines the behavior for handling the situation where sets of + * namespaced resources being restored already exist in the target cluster. + * This MUST be set to a value other than + * NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED. * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode namespaced_resource_restore_mode = 3; + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode namespaced_resource_restore_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $namespaced_resource_restore_mode = 0; /** - * Identifies the cluster-scoped resources to restore from the Backup. - * Not specifying it means NO cluster resource will be restored. + * Optional. Identifies the cluster-scoped resources to restore from the + * Backup. Not specifying it means NO cluster resource will be restored. * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4; + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4 [(.google.api.field_behavior) = OPTIONAL]; */ private $cluster_resource_restore_scope = null; /** - * A list of transformation rules to be applied against Kubernetes resources - * as they are selected for restoration from a Backup. Rules are executed in - * order defined - this order matters, as changes made by a rule may impact - * the filtering logic of subsequent rules. An empty list means no + * Optional. A list of transformation rules to be applied against Kubernetes + * resources as they are selected for restoration from a Backup. Rules are + * executed in order defined - this order matters, as changes made by a rule + * may impact the filtering logic of subsequent rules. An empty list means no * substitution will occur. * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8; + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; */ private $substitution_rules; /** - * A list of transformation rules to be applied against Kubernetes resources - * as they are selected for restoration from a Backup. Rules are executed in - * order defined - this order matters, as changes made by a rule may impact - * the filtering logic of subsequent rules. An empty list means no + * Optional. A list of transformation rules to be applied against Kubernetes + * resources as they are selected for restoration from a Backup. Rules are + * executed in order defined - this order matters, as changes made by a rule + * may impact the filtering logic of subsequent rules. An empty list means no * transformation will occur. * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11; + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL]; */ private $transformation_rules; protected $namespaced_resource_restore_scope; @@ -78,22 +79,24 @@ class RestoreConfig extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type int $volume_data_restore_policy - * Specifies the mechanism to be used to restore volume data. + * Optional. Specifies the mechanism to be used to restore volume data. * Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as * NO_VOLUME_DATA_RESTORATION). * @type int $cluster_resource_conflict_policy - * Defines the behavior for handling the situation where cluster-scoped - * resources being restored already exist in the target cluster. This MUST be - * set to a value other than CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if + * Optional. Defines the behavior for handling the situation where + * cluster-scoped resources being restored already exist in the target + * cluster. This MUST be set to a value other than + * CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if * [cluster_resource_restore_scope][google.cloud.gkebackup.v1.RestoreConfig.cluster_resource_restore_scope] * is not empty. * @type int $namespaced_resource_restore_mode - * Defines the behavior for handling the situation where sets of namespaced - * resources being restored already exist in the target cluster. This MUST be - * set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED. + * Optional. Defines the behavior for handling the situation where sets of + * namespaced resources being restored already exist in the target cluster. + * This MUST be set to a value other than + * NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED. * @type \Google\Cloud\GkeBackup\V1\RestoreConfig\ClusterResourceRestoreScope $cluster_resource_restore_scope - * Identifies the cluster-scoped resources to restore from the Backup. - * Not specifying it means NO cluster resource will be restored. + * Optional. Identifies the cluster-scoped resources to restore from the + * Backup. Not specifying it means NO cluster resource will be restored. * @type bool $all_namespaces * Restore all namespaced resources in the Backup if set to "True". * Specifying this field to "False" is an error. @@ -111,16 +114,16 @@ class RestoreConfig extends \Google\Protobuf\Internal\Message * A list of selected namespaces excluded from restoration. All * namespaces except those in this list will be restored. * @type array<\Google\Cloud\GkeBackup\V1\RestoreConfig\SubstitutionRule>|\Google\Protobuf\Internal\RepeatedField $substitution_rules - * A list of transformation rules to be applied against Kubernetes resources - * as they are selected for restoration from a Backup. Rules are executed in - * order defined - this order matters, as changes made by a rule may impact - * the filtering logic of subsequent rules. An empty list means no + * Optional. A list of transformation rules to be applied against Kubernetes + * resources as they are selected for restoration from a Backup. Rules are + * executed in order defined - this order matters, as changes made by a rule + * may impact the filtering logic of subsequent rules. An empty list means no * substitution will occur. * @type array<\Google\Cloud\GkeBackup\V1\RestoreConfig\TransformationRule>|\Google\Protobuf\Internal\RepeatedField $transformation_rules - * A list of transformation rules to be applied against Kubernetes resources - * as they are selected for restoration from a Backup. Rules are executed in - * order defined - this order matters, as changes made by a rule may impact - * the filtering logic of subsequent rules. An empty list means no + * Optional. A list of transformation rules to be applied against Kubernetes + * resources as they are selected for restoration from a Backup. Rules are + * executed in order defined - this order matters, as changes made by a rule + * may impact the filtering logic of subsequent rules. An empty list means no * transformation will occur. * } */ @@ -130,11 +133,11 @@ public function __construct($data = NULL) { } /** - * Specifies the mechanism to be used to restore volume data. + * Optional. Specifies the mechanism to be used to restore volume data. * Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as * NO_VOLUME_DATA_RESTORATION). * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy volume_data_restore_policy = 1; + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy volume_data_restore_policy = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return int */ public function getVolumeDataRestorePolicy() @@ -143,11 +146,11 @@ public function getVolumeDataRestorePolicy() } /** - * Specifies the mechanism to be used to restore volume data. + * Optional. Specifies the mechanism to be used to restore volume data. * Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as * NO_VOLUME_DATA_RESTORATION). * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy volume_data_restore_policy = 1; + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy volume_data_restore_policy = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var * @return $this */ @@ -160,13 +163,14 @@ public function setVolumeDataRestorePolicy($var) } /** - * Defines the behavior for handling the situation where cluster-scoped - * resources being restored already exist in the target cluster. This MUST be - * set to a value other than CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if + * Optional. Defines the behavior for handling the situation where + * cluster-scoped resources being restored already exist in the target + * cluster. This MUST be set to a value other than + * CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if * [cluster_resource_restore_scope][google.cloud.gkebackup.v1.RestoreConfig.cluster_resource_restore_scope] * is not empty. * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy cluster_resource_conflict_policy = 2; + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy cluster_resource_conflict_policy = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int */ public function getClusterResourceConflictPolicy() @@ -175,13 +179,14 @@ public function getClusterResourceConflictPolicy() } /** - * Defines the behavior for handling the situation where cluster-scoped - * resources being restored already exist in the target cluster. This MUST be - * set to a value other than CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if + * Optional. Defines the behavior for handling the situation where + * cluster-scoped resources being restored already exist in the target + * cluster. This MUST be set to a value other than + * CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if * [cluster_resource_restore_scope][google.cloud.gkebackup.v1.RestoreConfig.cluster_resource_restore_scope] * is not empty. * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy cluster_resource_conflict_policy = 2; + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy cluster_resource_conflict_policy = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var * @return $this */ @@ -194,11 +199,12 @@ public function setClusterResourceConflictPolicy($var) } /** - * Defines the behavior for handling the situation where sets of namespaced - * resources being restored already exist in the target cluster. This MUST be - * set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED. + * Optional. Defines the behavior for handling the situation where sets of + * namespaced resources being restored already exist in the target cluster. + * This MUST be set to a value other than + * NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED. * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode namespaced_resource_restore_mode = 3; + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode namespaced_resource_restore_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return int */ public function getNamespacedResourceRestoreMode() @@ -207,11 +213,12 @@ public function getNamespacedResourceRestoreMode() } /** - * Defines the behavior for handling the situation where sets of namespaced - * resources being restored already exist in the target cluster. This MUST be - * set to a value other than NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED. + * Optional. Defines the behavior for handling the situation where sets of + * namespaced resources being restored already exist in the target cluster. + * This MUST be set to a value other than + * NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED. * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode namespaced_resource_restore_mode = 3; + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode namespaced_resource_restore_mode = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var * @return $this */ @@ -224,10 +231,10 @@ public function setNamespacedResourceRestoreMode($var) } /** - * Identifies the cluster-scoped resources to restore from the Backup. - * Not specifying it means NO cluster resource will be restored. + * Optional. Identifies the cluster-scoped resources to restore from the + * Backup. Not specifying it means NO cluster resource will be restored. * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4; + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\GkeBackup\V1\RestoreConfig\ClusterResourceRestoreScope|null */ public function getClusterResourceRestoreScope() @@ -246,10 +253,10 @@ public function clearClusterResourceRestoreScope() } /** - * Identifies the cluster-scoped resources to restore from the Backup. - * Not specifying it means NO cluster resource will be restored. + * Optional. Identifies the cluster-scoped resources to restore from the + * Backup. Not specifying it means NO cluster resource will be restored. * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4; + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope cluster_resource_restore_scope = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\GkeBackup\V1\RestoreConfig\ClusterResourceRestoreScope $var * @return $this */ @@ -429,13 +436,13 @@ public function setExcludedNamespaces($var) } /** - * A list of transformation rules to be applied against Kubernetes resources - * as they are selected for restoration from a Backup. Rules are executed in - * order defined - this order matters, as changes made by a rule may impact - * the filtering logic of subsequent rules. An empty list means no + * Optional. A list of transformation rules to be applied against Kubernetes + * resources as they are selected for restoration from a Backup. Rules are + * executed in order defined - this order matters, as changes made by a rule + * may impact the filtering logic of subsequent rules. An empty list means no * substitution will occur. * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8; + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField */ public function getSubstitutionRules() @@ -444,13 +451,13 @@ public function getSubstitutionRules() } /** - * A list of transformation rules to be applied against Kubernetes resources - * as they are selected for restoration from a Backup. Rules are executed in - * order defined - this order matters, as changes made by a rule may impact - * the filtering logic of subsequent rules. An empty list means no + * Optional. A list of transformation rules to be applied against Kubernetes + * resources as they are selected for restoration from a Backup. Rules are + * executed in order defined - this order matters, as changes made by a rule + * may impact the filtering logic of subsequent rules. An empty list means no * substitution will occur. * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8; + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule substitution_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; * @param array<\Google\Cloud\GkeBackup\V1\RestoreConfig\SubstitutionRule>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ @@ -463,13 +470,13 @@ public function setSubstitutionRules($var) } /** - * A list of transformation rules to be applied against Kubernetes resources - * as they are selected for restoration from a Backup. Rules are executed in - * order defined - this order matters, as changes made by a rule may impact - * the filtering logic of subsequent rules. An empty list means no + * Optional. A list of transformation rules to be applied against Kubernetes + * resources as they are selected for restoration from a Backup. Rules are + * executed in order defined - this order matters, as changes made by a rule + * may impact the filtering logic of subsequent rules. An empty list means no * transformation will occur. * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11; + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField */ public function getTransformationRules() @@ -478,13 +485,13 @@ public function getTransformationRules() } /** - * A list of transformation rules to be applied against Kubernetes resources - * as they are selected for restoration from a Backup. Rules are executed in - * order defined - this order matters, as changes made by a rule may impact - * the filtering logic of subsequent rules. An empty list means no + * Optional. A list of transformation rules to be applied against Kubernetes + * resources as they are selected for restoration from a Backup. Rules are + * executed in order defined - this order matters, as changes made by a rule + * may impact the filtering logic of subsequent rules. An empty list means no * transformation will occur. * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11; + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.TransformationRule transformation_rules = 11 [(.google.api.field_behavior) = OPTIONAL]; * @param array<\Google\Cloud\GkeBackup\V1\RestoreConfig\TransformationRule>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ diff --git a/GkeBackup/src/V1/RestoreConfig/ClusterResourceRestoreScope.php b/GkeBackup/src/V1/RestoreConfig/ClusterResourceRestoreScope.php index 8261700f3aa1..036eb0ccf132 100644 --- a/GkeBackup/src/V1/RestoreConfig/ClusterResourceRestoreScope.php +++ b/GkeBackup/src/V1/RestoreConfig/ClusterResourceRestoreScope.php @@ -31,35 +31,35 @@ class ClusterResourceRestoreScope extends \Google\Protobuf\Internal\Message { /** - * A list of cluster-scoped resource group kinds to restore from the - * backup. If specified, only the selected resources will be restored. + * Optional. A list of cluster-scoped resource group kinds to restore from + * the backup. If specified, only the selected resources will be restored. * Mutually exclusive to any other field in the message. * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1; + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $selected_group_kinds; /** - * A list of cluster-scoped resource group kinds to NOT restore from the - * backup. If specified, all valid cluster-scoped resources will be + * Optional. A list of cluster-scoped resource group kinds to NOT restore + * from the backup. If specified, all valid cluster-scoped resources will be * restored except for those specified in the list. * Mutually exclusive to any other field in the message. * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2; + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $excluded_group_kinds; /** - * If True, all valid cluster-scoped resources will be restored. + * Optional. If True, all valid cluster-scoped resources will be restored. * Mutually exclusive to any other field in the message. * - * Generated from protobuf field bool all_group_kinds = 3; + * Generated from protobuf field bool all_group_kinds = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $all_group_kinds = false; /** - * If True, no cluster-scoped resources will be restored. + * Optional. If True, no cluster-scoped resources will be restored. * This has the same restore scope as if the message is not defined. * Mutually exclusive to any other field in the message. * - * Generated from protobuf field bool no_group_kinds = 4; + * Generated from protobuf field bool no_group_kinds = 4 [(.google.api.field_behavior) = OPTIONAL]; */ private $no_group_kinds = false; @@ -70,19 +70,19 @@ class ClusterResourceRestoreScope extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type array<\Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind>|\Google\Protobuf\Internal\RepeatedField $selected_group_kinds - * A list of cluster-scoped resource group kinds to restore from the - * backup. If specified, only the selected resources will be restored. + * Optional. A list of cluster-scoped resource group kinds to restore from + * the backup. If specified, only the selected resources will be restored. * Mutually exclusive to any other field in the message. * @type array<\Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind>|\Google\Protobuf\Internal\RepeatedField $excluded_group_kinds - * A list of cluster-scoped resource group kinds to NOT restore from the - * backup. If specified, all valid cluster-scoped resources will be + * Optional. A list of cluster-scoped resource group kinds to NOT restore + * from the backup. If specified, all valid cluster-scoped resources will be * restored except for those specified in the list. * Mutually exclusive to any other field in the message. * @type bool $all_group_kinds - * If True, all valid cluster-scoped resources will be restored. + * Optional. If True, all valid cluster-scoped resources will be restored. * Mutually exclusive to any other field in the message. * @type bool $no_group_kinds - * If True, no cluster-scoped resources will be restored. + * Optional. If True, no cluster-scoped resources will be restored. * This has the same restore scope as if the message is not defined. * Mutually exclusive to any other field in the message. * } @@ -93,11 +93,11 @@ public function __construct($data = NULL) { } /** - * A list of cluster-scoped resource group kinds to restore from the - * backup. If specified, only the selected resources will be restored. + * Optional. A list of cluster-scoped resource group kinds to restore from + * the backup. If specified, only the selected resources will be restored. * Mutually exclusive to any other field in the message. * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1; + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField */ public function getSelectedGroupKinds() @@ -106,11 +106,11 @@ public function getSelectedGroupKinds() } /** - * A list of cluster-scoped resource group kinds to restore from the - * backup. If specified, only the selected resources will be restored. + * Optional. A list of cluster-scoped resource group kinds to restore from + * the backup. If specified, only the selected resources will be restored. * Mutually exclusive to any other field in the message. * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1; + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind selected_group_kinds = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param array<\Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ @@ -123,12 +123,12 @@ public function setSelectedGroupKinds($var) } /** - * A list of cluster-scoped resource group kinds to NOT restore from the - * backup. If specified, all valid cluster-scoped resources will be + * Optional. A list of cluster-scoped resource group kinds to NOT restore + * from the backup. If specified, all valid cluster-scoped resources will be * restored except for those specified in the list. * Mutually exclusive to any other field in the message. * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2; + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField */ public function getExcludedGroupKinds() @@ -137,12 +137,12 @@ public function getExcludedGroupKinds() } /** - * A list of cluster-scoped resource group kinds to NOT restore from the - * backup. If specified, all valid cluster-scoped resources will be + * Optional. A list of cluster-scoped resource group kinds to NOT restore + * from the backup. If specified, all valid cluster-scoped resources will be * restored except for those specified in the list. * Mutually exclusive to any other field in the message. * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2; + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind excluded_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param array<\Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ @@ -155,10 +155,10 @@ public function setExcludedGroupKinds($var) } /** - * If True, all valid cluster-scoped resources will be restored. + * Optional. If True, all valid cluster-scoped resources will be restored. * Mutually exclusive to any other field in the message. * - * Generated from protobuf field bool all_group_kinds = 3; + * Generated from protobuf field bool all_group_kinds = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return bool */ public function getAllGroupKinds() @@ -167,10 +167,10 @@ public function getAllGroupKinds() } /** - * If True, all valid cluster-scoped resources will be restored. + * Optional. If True, all valid cluster-scoped resources will be restored. * Mutually exclusive to any other field in the message. * - * Generated from protobuf field bool all_group_kinds = 3; + * Generated from protobuf field bool all_group_kinds = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param bool $var * @return $this */ @@ -183,11 +183,11 @@ public function setAllGroupKinds($var) } /** - * If True, no cluster-scoped resources will be restored. + * Optional. If True, no cluster-scoped resources will be restored. * This has the same restore scope as if the message is not defined. * Mutually exclusive to any other field in the message. * - * Generated from protobuf field bool no_group_kinds = 4; + * Generated from protobuf field bool no_group_kinds = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return bool */ public function getNoGroupKinds() @@ -196,11 +196,11 @@ public function getNoGroupKinds() } /** - * If True, no cluster-scoped resources will be restored. + * Optional. If True, no cluster-scoped resources will be restored. * This has the same restore scope as if the message is not defined. * Mutually exclusive to any other field in the message. * - * Generated from protobuf field bool no_group_kinds = 4; + * Generated from protobuf field bool no_group_kinds = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param bool $var * @return $this */ diff --git a/GkeBackup/src/V1/RestoreConfig/GroupKind.php b/GkeBackup/src/V1/RestoreConfig/GroupKind.php index fdec85a47b1f..113d90cca3e0 100644 --- a/GkeBackup/src/V1/RestoreConfig/GroupKind.php +++ b/GkeBackup/src/V1/RestoreConfig/GroupKind.php @@ -18,18 +18,19 @@ class GroupKind extends \Google\Protobuf\Internal\Message { /** - * API group string of a Kubernetes resource, e.g. + * Optional. API group string of a Kubernetes resource, e.g. * "apiextensions.k8s.io", "storage.k8s.io", etc. * Note: use empty string for core API group * - * Generated from protobuf field string resource_group = 1; + * Generated from protobuf field string resource_group = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $resource_group = ''; /** - * Kind of a Kubernetes resource, e.g. - * "CustomResourceDefinition", "StorageClass", etc. + * Optional. Kind of a Kubernetes resource, must be in UpperCamelCase + * (PascalCase) and singular form. E.g. "CustomResourceDefinition", + * "StorageClass", etc. * - * Generated from protobuf field string resource_kind = 2; + * Generated from protobuf field string resource_kind = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $resource_kind = ''; @@ -40,12 +41,13 @@ class GroupKind extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $resource_group - * API group string of a Kubernetes resource, e.g. + * Optional. API group string of a Kubernetes resource, e.g. * "apiextensions.k8s.io", "storage.k8s.io", etc. * Note: use empty string for core API group * @type string $resource_kind - * Kind of a Kubernetes resource, e.g. - * "CustomResourceDefinition", "StorageClass", etc. + * Optional. Kind of a Kubernetes resource, must be in UpperCamelCase + * (PascalCase) and singular form. E.g. "CustomResourceDefinition", + * "StorageClass", etc. * } */ public function __construct($data = NULL) { @@ -54,11 +56,11 @@ public function __construct($data = NULL) { } /** - * API group string of a Kubernetes resource, e.g. + * Optional. API group string of a Kubernetes resource, e.g. * "apiextensions.k8s.io", "storage.k8s.io", etc. * Note: use empty string for core API group * - * Generated from protobuf field string resource_group = 1; + * Generated from protobuf field string resource_group = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getResourceGroup() @@ -67,11 +69,11 @@ public function getResourceGroup() } /** - * API group string of a Kubernetes resource, e.g. + * Optional. API group string of a Kubernetes resource, e.g. * "apiextensions.k8s.io", "storage.k8s.io", etc. * Note: use empty string for core API group * - * Generated from protobuf field string resource_group = 1; + * Generated from protobuf field string resource_group = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -84,10 +86,11 @@ public function setResourceGroup($var) } /** - * Kind of a Kubernetes resource, e.g. - * "CustomResourceDefinition", "StorageClass", etc. + * Optional. Kind of a Kubernetes resource, must be in UpperCamelCase + * (PascalCase) and singular form. E.g. "CustomResourceDefinition", + * "StorageClass", etc. * - * Generated from protobuf field string resource_kind = 2; + * Generated from protobuf field string resource_kind = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getResourceKind() @@ -96,10 +99,11 @@ public function getResourceKind() } /** - * Kind of a Kubernetes resource, e.g. - * "CustomResourceDefinition", "StorageClass", etc. + * Optional. Kind of a Kubernetes resource, must be in UpperCamelCase + * (PascalCase) and singular form. E.g. "CustomResourceDefinition", + * "StorageClass", etc. * - * Generated from protobuf field string resource_kind = 2; + * Generated from protobuf field string resource_kind = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ diff --git a/GkeBackup/src/V1/RestoreConfig/ResourceFilter.php b/GkeBackup/src/V1/RestoreConfig/ResourceFilter.php index 77ce3b54041e..e38c24245306 100644 --- a/GkeBackup/src/V1/RestoreConfig/ResourceFilter.php +++ b/GkeBackup/src/V1/RestoreConfig/ResourceFilter.php @@ -18,35 +18,33 @@ class ResourceFilter extends \Google\Protobuf\Internal\Message { /** - * (Filtering parameter) Any resource subject to transformation must be - * contained within one of the listed Kubernetes Namespace in the Backup. - * If this field is not provided, no namespace filtering will be performed - * (all resources in all Namespaces, including all cluster-scoped resources, - * will be candidates for transformation). - * To mix cluster-scoped and namespaced resources in the same rule, use an - * empty string ("") as one of the target namespaces. + * Optional. (Filtering parameter) Any resource subject to transformation + * must be contained within one of the listed Kubernetes Namespace in the + * Backup. If this field is not provided, no namespace filtering will be + * performed (all resources in all Namespaces, including all cluster-scoped + * resources, will be candidates for transformation). * - * Generated from protobuf field repeated string namespaces = 1; + * Generated from protobuf field repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $namespaces; /** - * (Filtering parameter) Any resource subject to transformation must belong - * to one of the listed "types". If this field is not provided, no type - * filtering will be performed (all resources of all types matching previous - * filtering parameters will be candidates for transformation). + * Optional. (Filtering parameter) Any resource subject to transformation + * must belong to one of the listed "types". If this field is not provided, + * no type filtering will be performed (all resources of all types matching + * previous filtering parameters will be candidates for transformation). * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2; + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $group_kinds; /** - * This is a [JSONPath] + * Optional. This is a [JSONPath] * (https://github.com/json-path/JsonPath/blob/master/README.md) * expression that matches specific fields of candidate * resources and it operates as a filtering parameter (resources that * are not matched with this expression will not be candidates for * transformation). * - * Generated from protobuf field string json_path = 3; + * Generated from protobuf field string json_path = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $json_path = ''; @@ -57,20 +55,18 @@ class ResourceFilter extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type array|\Google\Protobuf\Internal\RepeatedField $namespaces - * (Filtering parameter) Any resource subject to transformation must be - * contained within one of the listed Kubernetes Namespace in the Backup. - * If this field is not provided, no namespace filtering will be performed - * (all resources in all Namespaces, including all cluster-scoped resources, - * will be candidates for transformation). - * To mix cluster-scoped and namespaced resources in the same rule, use an - * empty string ("") as one of the target namespaces. + * Optional. (Filtering parameter) Any resource subject to transformation + * must be contained within one of the listed Kubernetes Namespace in the + * Backup. If this field is not provided, no namespace filtering will be + * performed (all resources in all Namespaces, including all cluster-scoped + * resources, will be candidates for transformation). * @type array<\Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind>|\Google\Protobuf\Internal\RepeatedField $group_kinds - * (Filtering parameter) Any resource subject to transformation must belong - * to one of the listed "types". If this field is not provided, no type - * filtering will be performed (all resources of all types matching previous - * filtering parameters will be candidates for transformation). + * Optional. (Filtering parameter) Any resource subject to transformation + * must belong to one of the listed "types". If this field is not provided, + * no type filtering will be performed (all resources of all types matching + * previous filtering parameters will be candidates for transformation). * @type string $json_path - * This is a [JSONPath] + * Optional. This is a [JSONPath] * (https://github.com/json-path/JsonPath/blob/master/README.md) * expression that matches specific fields of candidate * resources and it operates as a filtering parameter (resources that @@ -84,15 +80,13 @@ public function __construct($data = NULL) { } /** - * (Filtering parameter) Any resource subject to transformation must be - * contained within one of the listed Kubernetes Namespace in the Backup. - * If this field is not provided, no namespace filtering will be performed - * (all resources in all Namespaces, including all cluster-scoped resources, - * will be candidates for transformation). - * To mix cluster-scoped and namespaced resources in the same rule, use an - * empty string ("") as one of the target namespaces. + * Optional. (Filtering parameter) Any resource subject to transformation + * must be contained within one of the listed Kubernetes Namespace in the + * Backup. If this field is not provided, no namespace filtering will be + * performed (all resources in all Namespaces, including all cluster-scoped + * resources, will be candidates for transformation). * - * Generated from protobuf field repeated string namespaces = 1; + * Generated from protobuf field repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField */ public function getNamespaces() @@ -101,15 +95,13 @@ public function getNamespaces() } /** - * (Filtering parameter) Any resource subject to transformation must be - * contained within one of the listed Kubernetes Namespace in the Backup. - * If this field is not provided, no namespace filtering will be performed - * (all resources in all Namespaces, including all cluster-scoped resources, - * will be candidates for transformation). - * To mix cluster-scoped and namespaced resources in the same rule, use an - * empty string ("") as one of the target namespaces. + * Optional. (Filtering parameter) Any resource subject to transformation + * must be contained within one of the listed Kubernetes Namespace in the + * Backup. If this field is not provided, no namespace filtering will be + * performed (all resources in all Namespaces, including all cluster-scoped + * resources, will be candidates for transformation). * - * Generated from protobuf field repeated string namespaces = 1; + * Generated from protobuf field repeated string namespaces = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param array|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ @@ -122,12 +114,12 @@ public function setNamespaces($var) } /** - * (Filtering parameter) Any resource subject to transformation must belong - * to one of the listed "types". If this field is not provided, no type - * filtering will be performed (all resources of all types matching previous - * filtering parameters will be candidates for transformation). + * Optional. (Filtering parameter) Any resource subject to transformation + * must belong to one of the listed "types". If this field is not provided, + * no type filtering will be performed (all resources of all types matching + * previous filtering parameters will be candidates for transformation). * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2; + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField */ public function getGroupKinds() @@ -136,12 +128,12 @@ public function getGroupKinds() } /** - * (Filtering parameter) Any resource subject to transformation must belong - * to one of the listed "types". If this field is not provided, no type - * filtering will be performed (all resources of all types matching previous - * filtering parameters will be candidates for transformation). + * Optional. (Filtering parameter) Any resource subject to transformation + * must belong to one of the listed "types". If this field is not provided, + * no type filtering will be performed (all resources of all types matching + * previous filtering parameters will be candidates for transformation). * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2; + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param array<\Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ @@ -154,14 +146,14 @@ public function setGroupKinds($var) } /** - * This is a [JSONPath] + * Optional. This is a [JSONPath] * (https://github.com/json-path/JsonPath/blob/master/README.md) * expression that matches specific fields of candidate * resources and it operates as a filtering parameter (resources that * are not matched with this expression will not be candidates for * transformation). * - * Generated from protobuf field string json_path = 3; + * Generated from protobuf field string json_path = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getJsonPath() @@ -170,14 +162,14 @@ public function getJsonPath() } /** - * This is a [JSONPath] + * Optional. This is a [JSONPath] * (https://github.com/json-path/JsonPath/blob/master/README.md) * expression that matches specific fields of candidate * resources and it operates as a filtering parameter (resources that * are not matched with this expression will not be candidates for * transformation). * - * Generated from protobuf field string json_path = 3; + * Generated from protobuf field string json_path = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ diff --git a/GkeBackup/src/V1/RestoreConfig/SubstitutionRule.php b/GkeBackup/src/V1/RestoreConfig/SubstitutionRule.php index 17a89f8ac5cc..ff8814479e82 100644 --- a/GkeBackup/src/V1/RestoreConfig/SubstitutionRule.php +++ b/GkeBackup/src/V1/RestoreConfig/SubstitutionRule.php @@ -18,25 +18,24 @@ class SubstitutionRule extends \Google\Protobuf\Internal\Message { /** - * (Filtering parameter) Any resource subject to substitution must be - * contained within one of the listed Kubernetes Namespace in the Backup. + * Optional. (Filtering parameter) Any resource subject to substitution must + * be contained within one of the listed Kubernetes Namespace in the Backup. * If this field is not provided, no namespace filtering will be performed * (all resources in all Namespaces, including all cluster-scoped resources, * will be candidates for substitution). * To mix cluster-scoped and namespaced resources in the same rule, use an * empty string ("") as one of the target namespaces. * - * Generated from protobuf field repeated string target_namespaces = 1; + * Generated from protobuf field repeated string target_namespaces = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $target_namespaces; /** - * (Filtering parameter) Any resource subject to substitution must belong to - * one of the listed "types". - * If this field is not provided, no type filtering will be performed (all - * resources of all types matching previous filtering parameters will be - * candidates for substitution). + * Optional. (Filtering parameter) Any resource subject to substitution must + * belong to one of the listed "types". If this field is not provided, no + * type filtering will be performed (all resources of all types matching + * previous filtering parameters will be candidates for substitution). * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2; + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $target_group_kinds; /** @@ -52,7 +51,7 @@ class SubstitutionRule extends \Google\Protobuf\Internal\Message */ private $target_json_path = ''; /** - * (Filtering parameter) This is a [regular expression] + * Optional. (Filtering parameter) This is a [regular expression] * (https://en.wikipedia.org/wiki/Regular_expression) * that is compared against the fields matched by the target_json_path * expression (and must also have passed the previous filters). @@ -62,15 +61,16 @@ class SubstitutionRule extends \Google\Protobuf\Internal\Message * substitution. Note that an empty (e.g., "", rather than unspecified) * value for this field will only match empty fields. * - * Generated from protobuf field string original_value_pattern = 4; + * Generated from protobuf field string original_value_pattern = 4 [(.google.api.field_behavior) = OPTIONAL]; */ private $original_value_pattern = ''; /** - * This is the new value to set for any fields that pass the filtering and - * selection criteria. To remove a value from a Kubernetes resource, either - * leave this field unspecified, or set it to the empty string (""). + * Optional. This is the new value to set for any fields that pass the + * filtering and selection criteria. To remove a value from a Kubernetes + * resource, either leave this field unspecified, or set it to the empty + * string (""). * - * Generated from protobuf field string new_value = 5; + * Generated from protobuf field string new_value = 5 [(.google.api.field_behavior) = OPTIONAL]; */ private $new_value = ''; @@ -81,19 +81,18 @@ class SubstitutionRule extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type array|\Google\Protobuf\Internal\RepeatedField $target_namespaces - * (Filtering parameter) Any resource subject to substitution must be - * contained within one of the listed Kubernetes Namespace in the Backup. + * Optional. (Filtering parameter) Any resource subject to substitution must + * be contained within one of the listed Kubernetes Namespace in the Backup. * If this field is not provided, no namespace filtering will be performed * (all resources in all Namespaces, including all cluster-scoped resources, * will be candidates for substitution). * To mix cluster-scoped and namespaced resources in the same rule, use an * empty string ("") as one of the target namespaces. * @type array<\Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind>|\Google\Protobuf\Internal\RepeatedField $target_group_kinds - * (Filtering parameter) Any resource subject to substitution must belong to - * one of the listed "types". - * If this field is not provided, no type filtering will be performed (all - * resources of all types matching previous filtering parameters will be - * candidates for substitution). + * Optional. (Filtering parameter) Any resource subject to substitution must + * belong to one of the listed "types". If this field is not provided, no + * type filtering will be performed (all resources of all types matching + * previous filtering parameters will be candidates for substitution). * @type string $target_json_path * Required. This is a [JSONPath] * (https://kubernetes.io/docs/reference/kubectl/jsonpath/) @@ -103,7 +102,7 @@ class SubstitutionRule extends \Google\Protobuf\Internal\Message * substitution) as well as a field identifier (identifies exactly which * fields out of the candidate resources will be modified). * @type string $original_value_pattern - * (Filtering parameter) This is a [regular expression] + * Optional. (Filtering parameter) This is a [regular expression] * (https://en.wikipedia.org/wiki/Regular_expression) * that is compared against the fields matched by the target_json_path * expression (and must also have passed the previous filters). @@ -113,9 +112,10 @@ class SubstitutionRule extends \Google\Protobuf\Internal\Message * substitution. Note that an empty (e.g., "", rather than unspecified) * value for this field will only match empty fields. * @type string $new_value - * This is the new value to set for any fields that pass the filtering and - * selection criteria. To remove a value from a Kubernetes resource, either - * leave this field unspecified, or set it to the empty string (""). + * Optional. This is the new value to set for any fields that pass the + * filtering and selection criteria. To remove a value from a Kubernetes + * resource, either leave this field unspecified, or set it to the empty + * string (""). * } */ public function __construct($data = NULL) { @@ -124,15 +124,15 @@ public function __construct($data = NULL) { } /** - * (Filtering parameter) Any resource subject to substitution must be - * contained within one of the listed Kubernetes Namespace in the Backup. + * Optional. (Filtering parameter) Any resource subject to substitution must + * be contained within one of the listed Kubernetes Namespace in the Backup. * If this field is not provided, no namespace filtering will be performed * (all resources in all Namespaces, including all cluster-scoped resources, * will be candidates for substitution). * To mix cluster-scoped and namespaced resources in the same rule, use an * empty string ("") as one of the target namespaces. * - * Generated from protobuf field repeated string target_namespaces = 1; + * Generated from protobuf field repeated string target_namespaces = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField */ public function getTargetNamespaces() @@ -141,15 +141,15 @@ public function getTargetNamespaces() } /** - * (Filtering parameter) Any resource subject to substitution must be - * contained within one of the listed Kubernetes Namespace in the Backup. + * Optional. (Filtering parameter) Any resource subject to substitution must + * be contained within one of the listed Kubernetes Namespace in the Backup. * If this field is not provided, no namespace filtering will be performed * (all resources in all Namespaces, including all cluster-scoped resources, * will be candidates for substitution). * To mix cluster-scoped and namespaced resources in the same rule, use an * empty string ("") as one of the target namespaces. * - * Generated from protobuf field repeated string target_namespaces = 1; + * Generated from protobuf field repeated string target_namespaces = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param array|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ @@ -162,13 +162,12 @@ public function setTargetNamespaces($var) } /** - * (Filtering parameter) Any resource subject to substitution must belong to - * one of the listed "types". - * If this field is not provided, no type filtering will be performed (all - * resources of all types matching previous filtering parameters will be - * candidates for substitution). + * Optional. (Filtering parameter) Any resource subject to substitution must + * belong to one of the listed "types". If this field is not provided, no + * type filtering will be performed (all resources of all types matching + * previous filtering parameters will be candidates for substitution). * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2; + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField */ public function getTargetGroupKinds() @@ -177,13 +176,12 @@ public function getTargetGroupKinds() } /** - * (Filtering parameter) Any resource subject to substitution must belong to - * one of the listed "types". - * If this field is not provided, no type filtering will be performed (all - * resources of all types matching previous filtering parameters will be - * candidates for substitution). + * Optional. (Filtering parameter) Any resource subject to substitution must + * belong to one of the listed "types". If this field is not provided, no + * type filtering will be performed (all resources of all types matching + * previous filtering parameters will be candidates for substitution). * - * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2; + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.RestoreConfig.GroupKind target_group_kinds = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param array<\Google\Cloud\GkeBackup\V1\RestoreConfig\GroupKind>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ @@ -234,7 +232,7 @@ public function setTargetJsonPath($var) } /** - * (Filtering parameter) This is a [regular expression] + * Optional. (Filtering parameter) This is a [regular expression] * (https://en.wikipedia.org/wiki/Regular_expression) * that is compared against the fields matched by the target_json_path * expression (and must also have passed the previous filters). @@ -244,7 +242,7 @@ public function setTargetJsonPath($var) * substitution. Note that an empty (e.g., "", rather than unspecified) * value for this field will only match empty fields. * - * Generated from protobuf field string original_value_pattern = 4; + * Generated from protobuf field string original_value_pattern = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getOriginalValuePattern() @@ -253,7 +251,7 @@ public function getOriginalValuePattern() } /** - * (Filtering parameter) This is a [regular expression] + * Optional. (Filtering parameter) This is a [regular expression] * (https://en.wikipedia.org/wiki/Regular_expression) * that is compared against the fields matched by the target_json_path * expression (and must also have passed the previous filters). @@ -263,7 +261,7 @@ public function getOriginalValuePattern() * substitution. Note that an empty (e.g., "", rather than unspecified) * value for this field will only match empty fields. * - * Generated from protobuf field string original_value_pattern = 4; + * Generated from protobuf field string original_value_pattern = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -276,11 +274,12 @@ public function setOriginalValuePattern($var) } /** - * This is the new value to set for any fields that pass the filtering and - * selection criteria. To remove a value from a Kubernetes resource, either - * leave this field unspecified, or set it to the empty string (""). + * Optional. This is the new value to set for any fields that pass the + * filtering and selection criteria. To remove a value from a Kubernetes + * resource, either leave this field unspecified, or set it to the empty + * string (""). * - * Generated from protobuf field string new_value = 5; + * Generated from protobuf field string new_value = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getNewValue() @@ -289,11 +288,12 @@ public function getNewValue() } /** - * This is the new value to set for any fields that pass the filtering and - * selection criteria. To remove a value from a Kubernetes resource, either - * leave this field unspecified, or set it to the empty string (""). + * Optional. This is the new value to set for any fields that pass the + * filtering and selection criteria. To remove a value from a Kubernetes + * resource, either leave this field unspecified, or set it to the empty + * string (""). * - * Generated from protobuf field string new_value = 5; + * Generated from protobuf field string new_value = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ diff --git a/GkeBackup/src/V1/RestoreConfig/TransformationRule.php b/GkeBackup/src/V1/RestoreConfig/TransformationRule.php index 6bf07d8c31b0..a6858e598e85 100644 --- a/GkeBackup/src/V1/RestoreConfig/TransformationRule.php +++ b/GkeBackup/src/V1/RestoreConfig/TransformationRule.php @@ -27,19 +27,19 @@ class TransformationRule extends \Google\Protobuf\Internal\Message */ private $field_actions; /** - * This field is used to specify a set of fields that should be used to - * determine which resources in backup should be acted upon by the supplied - * transformation rule actions, and this will ensure that only specific - * resources are affected by transformation rule actions. + * Optional. This field is used to specify a set of fields that should be + * used to determine which resources in backup should be acted upon by the + * supplied transformation rule actions, and this will ensure that only + * specific resources are affected by transformation rule actions. * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resource_filter = 2; + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resource_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $resource_filter = null; /** - * The description is a user specified string description of the + * Optional. The description is a user specified string description of the * transformation rule. * - * Generated from protobuf field string description = 3; + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $description = ''; @@ -55,12 +55,12 @@ class TransformationRule extends \Google\Protobuf\Internal\Message * they could potentially interfere with each other and the first operation * could affect the outcome of the second operation. * @type \Google\Cloud\GkeBackup\V1\RestoreConfig\ResourceFilter $resource_filter - * This field is used to specify a set of fields that should be used to - * determine which resources in backup should be acted upon by the supplied - * transformation rule actions, and this will ensure that only specific - * resources are affected by transformation rule actions. + * Optional. This field is used to specify a set of fields that should be + * used to determine which resources in backup should be acted upon by the + * supplied transformation rule actions, and this will ensure that only + * specific resources are affected by transformation rule actions. * @type string $description - * The description is a user specified string description of the + * Optional. The description is a user specified string description of the * transformation rule. * } */ @@ -102,12 +102,12 @@ public function setFieldActions($var) } /** - * This field is used to specify a set of fields that should be used to - * determine which resources in backup should be acted upon by the supplied - * transformation rule actions, and this will ensure that only specific - * resources are affected by transformation rule actions. + * Optional. This field is used to specify a set of fields that should be + * used to determine which resources in backup should be acted upon by the + * supplied transformation rule actions, and this will ensure that only + * specific resources are affected by transformation rule actions. * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resource_filter = 2; + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resource_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\GkeBackup\V1\RestoreConfig\ResourceFilter|null */ public function getResourceFilter() @@ -126,12 +126,12 @@ public function clearResourceFilter() } /** - * This field is used to specify a set of fields that should be used to - * determine which resources in backup should be acted upon by the supplied - * transformation rule actions, and this will ensure that only specific - * resources are affected by transformation rule actions. + * Optional. This field is used to specify a set of fields that should be + * used to determine which resources in backup should be acted upon by the + * supplied transformation rule actions, and this will ensure that only + * specific resources are affected by transformation rule actions. * - * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resource_filter = 2; + * Generated from protobuf field .google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter resource_filter = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\GkeBackup\V1\RestoreConfig\ResourceFilter $var * @return $this */ @@ -144,10 +144,10 @@ public function setResourceFilter($var) } /** - * The description is a user specified string description of the + * Optional. The description is a user specified string description of the * transformation rule. * - * Generated from protobuf field string description = 3; + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getDescription() @@ -156,10 +156,10 @@ public function getDescription() } /** - * The description is a user specified string description of the + * Optional. The description is a user specified string description of the * transformation rule. * - * Generated from protobuf field string description = 3; + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ diff --git a/GkeBackup/src/V1/RestoreConfig/TransformationRuleAction.php b/GkeBackup/src/V1/RestoreConfig/TransformationRuleAction.php index 93fc1fbb7ed9..68b6480a2c71 100644 --- a/GkeBackup/src/V1/RestoreConfig/TransformationRuleAction.php +++ b/GkeBackup/src/V1/RestoreConfig/TransformationRuleAction.php @@ -23,24 +23,24 @@ class TransformationRuleAction extends \Google\Protobuf\Internal\Message */ private $op = 0; /** - * A string containing a JSON Pointer value that references the location in - * the target document to move the value from. + * Optional. A string containing a JSON Pointer value that references the + * location in the target document to move the value from. * - * Generated from protobuf field string from_path = 2; + * Generated from protobuf field string from_path = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $from_path = ''; /** - * A string containing a JSON-Pointer value that references a location - * within the target document where the operation is performed. + * Optional. A string containing a JSON-Pointer value that references a + * location within the target document where the operation is performed. * - * Generated from protobuf field string path = 3; + * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $path = ''; /** - * A string that specifies the desired value in string format to + * Optional. A string that specifies the desired value in string format to * use for transformation. * - * Generated from protobuf field string value = 4; + * Generated from protobuf field string value = 4 [(.google.api.field_behavior) = OPTIONAL]; */ private $value = ''; @@ -53,13 +53,13 @@ class TransformationRuleAction extends \Google\Protobuf\Internal\Message * @type int $op * Required. op specifies the operation to perform. * @type string $from_path - * A string containing a JSON Pointer value that references the location in - * the target document to move the value from. + * Optional. A string containing a JSON Pointer value that references the + * location in the target document to move the value from. * @type string $path - * A string containing a JSON-Pointer value that references a location - * within the target document where the operation is performed. + * Optional. A string containing a JSON-Pointer value that references a + * location within the target document where the operation is performed. * @type string $value - * A string that specifies the desired value in string format to + * Optional. A string that specifies the desired value in string format to * use for transformation. * } */ @@ -95,10 +95,10 @@ public function setOp($var) } /** - * A string containing a JSON Pointer value that references the location in - * the target document to move the value from. + * Optional. A string containing a JSON Pointer value that references the + * location in the target document to move the value from. * - * Generated from protobuf field string from_path = 2; + * Generated from protobuf field string from_path = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getFromPath() @@ -107,10 +107,10 @@ public function getFromPath() } /** - * A string containing a JSON Pointer value that references the location in - * the target document to move the value from. + * Optional. A string containing a JSON Pointer value that references the + * location in the target document to move the value from. * - * Generated from protobuf field string from_path = 2; + * Generated from protobuf field string from_path = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -123,10 +123,10 @@ public function setFromPath($var) } /** - * A string containing a JSON-Pointer value that references a location - * within the target document where the operation is performed. + * Optional. A string containing a JSON-Pointer value that references a + * location within the target document where the operation is performed. * - * Generated from protobuf field string path = 3; + * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getPath() @@ -135,10 +135,10 @@ public function getPath() } /** - * A string containing a JSON-Pointer value that references a location - * within the target document where the operation is performed. + * Optional. A string containing a JSON-Pointer value that references a + * location within the target document where the operation is performed. * - * Generated from protobuf field string path = 3; + * Generated from protobuf field string path = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -151,10 +151,10 @@ public function setPath($var) } /** - * A string that specifies the desired value in string format to + * Optional. A string that specifies the desired value in string format to * use for transformation. * - * Generated from protobuf field string value = 4; + * Generated from protobuf field string value = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getValue() @@ -163,10 +163,10 @@ public function getValue() } /** - * A string that specifies the desired value in string format to + * Optional. A string that specifies the desired value in string format to * use for transformation. * - * Generated from protobuf field string value = 4; + * Generated from protobuf field string value = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ diff --git a/GkeBackup/src/V1/RestorePlan.php b/GkeBackup/src/V1/RestorePlan.php index 790ed5d6b420..a30a581392dc 100644 --- a/GkeBackup/src/V1/RestorePlan.php +++ b/GkeBackup/src/V1/RestorePlan.php @@ -11,7 +11,6 @@ /** * The configuration of a potential series of Restore operations to be performed * against Backups belong to a particular BackupPlan. - * Next id: 13 * * Generated from protobuf message google.cloud.gkebackup.v1.RestorePlan */ @@ -46,9 +45,9 @@ class RestorePlan extends \Google\Protobuf\Internal\Message */ private $update_time = null; /** - * User specified descriptive string for this RestorePlan. + * Optional. User specified descriptive string for this RestorePlan. * - * Generated from protobuf field string description = 5; + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; */ private $description = ''; /** @@ -77,9 +76,9 @@ class RestorePlan extends \Google\Protobuf\Internal\Message */ private $restore_config = null; /** - * A set of custom labels supplied by user. + * Optional. A set of custom labels supplied by user. * - * Generated from protobuf field map labels = 9; + * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; */ private $labels; /** @@ -130,7 +129,7 @@ class RestorePlan extends \Google\Protobuf\Internal\Message * Output only. The timestamp when this RestorePlan resource was last * updated. * @type string $description - * User specified descriptive string for this RestorePlan. + * Optional. User specified descriptive string for this RestorePlan. * @type string $backup_plan * Required. Immutable. A reference to the * [BackupPlan][google.cloud.gkebackup.v1.BackupPlan] from which Backups may @@ -145,7 +144,7 @@ class RestorePlan extends \Google\Protobuf\Internal\Message * @type \Google\Cloud\GkeBackup\V1\RestoreConfig $restore_config * Required. Configuration of Restores created via this RestorePlan. * @type array|\Google\Protobuf\Internal\MapField $labels - * A set of custom labels supplied by user. + * Optional. A set of custom labels supplied by user. * @type string $etag * Output only. `etag` is used for optimistic concurrency control as a way to * help prevent simultaneous updates of a restore from overwriting each other. @@ -302,9 +301,9 @@ public function setUpdateTime($var) } /** - * User specified descriptive string for this RestorePlan. + * Optional. User specified descriptive string for this RestorePlan. * - * Generated from protobuf field string description = 5; + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getDescription() @@ -313,9 +312,9 @@ public function getDescription() } /** - * User specified descriptive string for this RestorePlan. + * Optional. User specified descriptive string for this RestorePlan. * - * Generated from protobuf field string description = 5; + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -430,9 +429,9 @@ public function setRestoreConfig($var) } /** - * A set of custom labels supplied by user. + * Optional. A set of custom labels supplied by user. * - * Generated from protobuf field map labels = 9; + * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\MapField */ public function getLabels() @@ -441,9 +440,9 @@ public function getLabels() } /** - * A set of custom labels supplied by user. + * Optional. A set of custom labels supplied by user. * - * Generated from protobuf field map labels = 9; + * Generated from protobuf field map labels = 9 [(.google.api.field_behavior) = OPTIONAL]; * @param array|\Google\Protobuf\Internal\MapField $var * @return $this */ diff --git a/GkeBackup/src/V1/RpoConfig.php b/GkeBackup/src/V1/RpoConfig.php new file mode 100644 index 000000000000..1411b177b521 --- /dev/null +++ b/GkeBackup/src/V1/RpoConfig.php @@ -0,0 +1,150 @@ +google.cloud.gkebackup.v1.RpoConfig + */ +class RpoConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Defines the target RPO for the BackupPlan in minutes, which means + * the target maximum data loss in time that is acceptable for this + * BackupPlan. This must be at least 60, i.e., 1 hour, and at most 86400, + * i.e., 60 days. + * + * Generated from protobuf field int32 target_rpo_minutes = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $target_rpo_minutes = 0; + /** + * Optional. User specified time windows during which backup can NOT happen + * for this BackupPlan - backups should start and finish outside of any given + * exclusion window. Note: backup jobs will be scheduled to start and + * finish outside the duration of the window as much as possible, but + * running jobs will not get canceled when it runs into the window. + * All the time and date values in exclusion_windows entry in the API are in + * UTC. + * We only allow <=1 recurrence (daily or weekly) exclusion window for a + * BackupPlan while no restriction on number of single occurrence + * windows. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $exclusion_windows; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $target_rpo_minutes + * Required. Defines the target RPO for the BackupPlan in minutes, which means + * the target maximum data loss in time that is acceptable for this + * BackupPlan. This must be at least 60, i.e., 1 hour, and at most 86400, + * i.e., 60 days. + * @type array<\Google\Cloud\GkeBackup\V1\ExclusionWindow>|\Google\Protobuf\Internal\RepeatedField $exclusion_windows + * Optional. User specified time windows during which backup can NOT happen + * for this BackupPlan - backups should start and finish outside of any given + * exclusion window. Note: backup jobs will be scheduled to start and + * finish outside the duration of the window as much as possible, but + * running jobs will not get canceled when it runs into the window. + * All the time and date values in exclusion_windows entry in the API are in + * UTC. + * We only allow <=1 recurrence (daily or weekly) exclusion window for a + * BackupPlan while no restriction on number of single occurrence + * windows. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Gkebackup\V1\BackupPlan::initOnce(); + parent::__construct($data); + } + + /** + * Required. Defines the target RPO for the BackupPlan in minutes, which means + * the target maximum data loss in time that is acceptable for this + * BackupPlan. This must be at least 60, i.e., 1 hour, and at most 86400, + * i.e., 60 days. + * + * Generated from protobuf field int32 target_rpo_minutes = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getTargetRpoMinutes() + { + return $this->target_rpo_minutes; + } + + /** + * Required. Defines the target RPO for the BackupPlan in minutes, which means + * the target maximum data loss in time that is acceptable for this + * BackupPlan. This must be at least 60, i.e., 1 hour, and at most 86400, + * i.e., 60 days. + * + * Generated from protobuf field int32 target_rpo_minutes = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setTargetRpoMinutes($var) + { + GPBUtil::checkInt32($var); + $this->target_rpo_minutes = $var; + + return $this; + } + + /** + * Optional. User specified time windows during which backup can NOT happen + * for this BackupPlan - backups should start and finish outside of any given + * exclusion window. Note: backup jobs will be scheduled to start and + * finish outside the duration of the window as much as possible, but + * running jobs will not get canceled when it runs into the window. + * All the time and date values in exclusion_windows entry in the API are in + * UTC. + * We only allow <=1 recurrence (daily or weekly) exclusion window for a + * BackupPlan while no restriction on number of single occurrence + * windows. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExclusionWindows() + { + return $this->exclusion_windows; + } + + /** + * Optional. User specified time windows during which backup can NOT happen + * for this BackupPlan - backups should start and finish outside of any given + * exclusion window. Note: backup jobs will be scheduled to start and + * finish outside the duration of the window as much as possible, but + * running jobs will not get canceled when it runs into the window. + * All the time and date values in exclusion_windows entry in the API are in + * UTC. + * We only allow <=1 recurrence (daily or weekly) exclusion window for a + * BackupPlan while no restriction on number of single occurrence + * windows. + * + * Generated from protobuf field repeated .google.cloud.gkebackup.v1.ExclusionWindow exclusion_windows = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Cloud\GkeBackup\V1\ExclusionWindow>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExclusionWindows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GkeBackup\V1\ExclusionWindow::class); + $this->exclusion_windows = $arr; + + return $this; + } + +} + diff --git a/GkeBackup/src/V1/UpdateBackupPlanRequest.php b/GkeBackup/src/V1/UpdateBackupPlanRequest.php index 89dbbefb7e0a..c9b1dc03e998 100644 --- a/GkeBackup/src/V1/UpdateBackupPlanRequest.php +++ b/GkeBackup/src/V1/UpdateBackupPlanRequest.php @@ -23,7 +23,7 @@ class UpdateBackupPlanRequest extends \Google\Protobuf\Internal\Message */ private $backup_plan = null; /** - * This is used to specify the fields to be overwritten in the + * Optional. This is used to specify the fields to be overwritten in the * BackupPlan targeted for update. The values for each of these * updated fields will be taken from the `backup_plan` provided * with this request. Field names are relative to the root of the resource @@ -33,14 +33,14 @@ class UpdateBackupPlanRequest extends \Google\Protobuf\Internal\Message * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored * and are not used to update the target BackupPlan. * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $update_mask = null; /** * @param \Google\Cloud\GkeBackup\V1\BackupPlan $backupPlan Required. A new version of the BackupPlan resource that contains updated * fields. This may be sparsely populated if an `update_mask` is provided. - * @param \Google\Protobuf\FieldMask $updateMask This is used to specify the fields to be overwritten in the + * @param \Google\Protobuf\FieldMask $updateMask Optional. This is used to specify the fields to be overwritten in the * BackupPlan targeted for update. The values for each of these * updated fields will be taken from the `backup_plan` provided * with this request. Field names are relative to the root of the resource @@ -71,7 +71,7 @@ public static function build(\Google\Cloud\GkeBackup\V1\BackupPlan $backupPlan, * Required. A new version of the BackupPlan resource that contains updated * fields. This may be sparsely populated if an `update_mask` is provided. * @type \Google\Protobuf\FieldMask $update_mask - * This is used to specify the fields to be overwritten in the + * Optional. This is used to specify the fields to be overwritten in the * BackupPlan targeted for update. The values for each of these * updated fields will be taken from the `backup_plan` provided * with this request. Field names are relative to the root of the resource @@ -126,7 +126,7 @@ public function setBackupPlan($var) } /** - * This is used to specify the fields to be overwritten in the + * Optional. This is used to specify the fields to be overwritten in the * BackupPlan targeted for update. The values for each of these * updated fields will be taken from the `backup_plan` provided * with this request. Field names are relative to the root of the resource @@ -136,7 +136,7 @@ public function setBackupPlan($var) * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored * and are not used to update the target BackupPlan. * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\FieldMask|null */ public function getUpdateMask() @@ -155,7 +155,7 @@ public function clearUpdateMask() } /** - * This is used to specify the fields to be overwritten in the + * Optional. This is used to specify the fields to be overwritten in the * BackupPlan targeted for update. The values for each of these * updated fields will be taken from the `backup_plan` provided * with this request. Field names are relative to the root of the resource @@ -165,7 +165,7 @@ public function clearUpdateMask() * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored * and are not used to update the target BackupPlan. * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Protobuf\FieldMask $var * @return $this */ diff --git a/GkeBackup/src/V1/UpdateBackupRequest.php b/GkeBackup/src/V1/UpdateBackupRequest.php index 21e4d1a6b2d2..dab48be081e8 100644 --- a/GkeBackup/src/V1/UpdateBackupRequest.php +++ b/GkeBackup/src/V1/UpdateBackupRequest.php @@ -23,7 +23,7 @@ class UpdateBackupRequest extends \Google\Protobuf\Internal\Message */ private $backup = null; /** - * This is used to specify the fields to be overwritten in the + * Optional. This is used to specify the fields to be overwritten in the * Backup targeted for update. The values for each of these * updated fields will be taken from the `backup_plan` provided * with this request. Field names are relative to the root of the resource. @@ -32,14 +32,14 @@ class UpdateBackupRequest extends \Google\Protobuf\Internal\Message * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored * and are not used to update the target Backup. * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $update_mask = null; /** * @param \Google\Cloud\GkeBackup\V1\Backup $backup Required. A new version of the Backup resource that contains updated * fields. This may be sparsely populated if an `update_mask` is provided. - * @param \Google\Protobuf\FieldMask $updateMask This is used to specify the fields to be overwritten in the + * @param \Google\Protobuf\FieldMask $updateMask Optional. This is used to specify the fields to be overwritten in the * Backup targeted for update. The values for each of these * updated fields will be taken from the `backup_plan` provided * with this request. Field names are relative to the root of the resource. @@ -69,7 +69,7 @@ public static function build(\Google\Cloud\GkeBackup\V1\Backup $backup, \Google\ * Required. A new version of the Backup resource that contains updated * fields. This may be sparsely populated if an `update_mask` is provided. * @type \Google\Protobuf\FieldMask $update_mask - * This is used to specify the fields to be overwritten in the + * Optional. This is used to specify the fields to be overwritten in the * Backup targeted for update. The values for each of these * updated fields will be taken from the `backup_plan` provided * with this request. Field names are relative to the root of the resource. @@ -123,7 +123,7 @@ public function setBackup($var) } /** - * This is used to specify the fields to be overwritten in the + * Optional. This is used to specify the fields to be overwritten in the * Backup targeted for update. The values for each of these * updated fields will be taken from the `backup_plan` provided * with this request. Field names are relative to the root of the resource. @@ -132,7 +132,7 @@ public function setBackup($var) * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored * and are not used to update the target Backup. * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\FieldMask|null */ public function getUpdateMask() @@ -151,7 +151,7 @@ public function clearUpdateMask() } /** - * This is used to specify the fields to be overwritten in the + * Optional. This is used to specify the fields to be overwritten in the * Backup targeted for update. The values for each of these * updated fields will be taken from the `backup_plan` provided * with this request. Field names are relative to the root of the resource. @@ -160,7 +160,7 @@ public function clearUpdateMask() * Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored * and are not used to update the target Backup. * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Protobuf\FieldMask $var * @return $this */ diff --git a/GkeBackup/src/V1/UpdateRestorePlanRequest.php b/GkeBackup/src/V1/UpdateRestorePlanRequest.php index bf142759e668..3adc4d73521c 100644 --- a/GkeBackup/src/V1/UpdateRestorePlanRequest.php +++ b/GkeBackup/src/V1/UpdateRestorePlanRequest.php @@ -23,7 +23,7 @@ class UpdateRestorePlanRequest extends \Google\Protobuf\Internal\Message */ private $restore_plan = null; /** - * This is used to specify the fields to be overwritten in the + * Optional. This is used to specify the fields to be overwritten in the * RestorePlan targeted for update. The values for each of these * updated fields will be taken from the `restore_plan` provided * with this request. Field names are relative to the root of the resource. @@ -32,14 +32,14 @@ class UpdateRestorePlanRequest extends \Google\Protobuf\Internal\Message * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored * and are not used to update the target RestorePlan. * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $update_mask = null; /** * @param \Google\Cloud\GkeBackup\V1\RestorePlan $restorePlan Required. A new version of the RestorePlan resource that contains updated * fields. This may be sparsely populated if an `update_mask` is provided. - * @param \Google\Protobuf\FieldMask $updateMask This is used to specify the fields to be overwritten in the + * @param \Google\Protobuf\FieldMask $updateMask Optional. This is used to specify the fields to be overwritten in the * RestorePlan targeted for update. The values for each of these * updated fields will be taken from the `restore_plan` provided * with this request. Field names are relative to the root of the resource. @@ -69,7 +69,7 @@ public static function build(\Google\Cloud\GkeBackup\V1\RestorePlan $restorePlan * Required. A new version of the RestorePlan resource that contains updated * fields. This may be sparsely populated if an `update_mask` is provided. * @type \Google\Protobuf\FieldMask $update_mask - * This is used to specify the fields to be overwritten in the + * Optional. This is used to specify the fields to be overwritten in the * RestorePlan targeted for update. The values for each of these * updated fields will be taken from the `restore_plan` provided * with this request. Field names are relative to the root of the resource. @@ -123,7 +123,7 @@ public function setRestorePlan($var) } /** - * This is used to specify the fields to be overwritten in the + * Optional. This is used to specify the fields to be overwritten in the * RestorePlan targeted for update. The values for each of these * updated fields will be taken from the `restore_plan` provided * with this request. Field names are relative to the root of the resource. @@ -132,7 +132,7 @@ public function setRestorePlan($var) * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored * and are not used to update the target RestorePlan. * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\FieldMask|null */ public function getUpdateMask() @@ -151,7 +151,7 @@ public function clearUpdateMask() } /** - * This is used to specify the fields to be overwritten in the + * Optional. This is used to specify the fields to be overwritten in the * RestorePlan targeted for update. The values for each of these * updated fields will be taken from the `restore_plan` provided * with this request. Field names are relative to the root of the resource. @@ -160,7 +160,7 @@ public function clearUpdateMask() * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored * and are not used to update the target RestorePlan. * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Protobuf\FieldMask $var * @return $this */ diff --git a/GkeBackup/src/V1/UpdateRestoreRequest.php b/GkeBackup/src/V1/UpdateRestoreRequest.php index d8aab57556f6..48d26040d097 100644 --- a/GkeBackup/src/V1/UpdateRestoreRequest.php +++ b/GkeBackup/src/V1/UpdateRestoreRequest.php @@ -23,7 +23,7 @@ class UpdateRestoreRequest extends \Google\Protobuf\Internal\Message */ private $restore = null; /** - * This is used to specify the fields to be overwritten in the + * Optional. This is used to specify the fields to be overwritten in the * Restore targeted for update. The values for each of these * updated fields will be taken from the `restore` provided * with this request. Field names are relative to the root of the resource. @@ -32,14 +32,14 @@ class UpdateRestoreRequest extends \Google\Protobuf\Internal\Message * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored * and are not used to update the target Restore. * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $update_mask = null; /** * @param \Google\Cloud\GkeBackup\V1\Restore $restore Required. A new version of the Restore resource that contains updated * fields. This may be sparsely populated if an `update_mask` is provided. - * @param \Google\Protobuf\FieldMask $updateMask This is used to specify the fields to be overwritten in the + * @param \Google\Protobuf\FieldMask $updateMask Optional. This is used to specify the fields to be overwritten in the * Restore targeted for update. The values for each of these * updated fields will be taken from the `restore` provided * with this request. Field names are relative to the root of the resource. @@ -69,7 +69,7 @@ public static function build(\Google\Cloud\GkeBackup\V1\Restore $restore, \Googl * Required. A new version of the Restore resource that contains updated * fields. This may be sparsely populated if an `update_mask` is provided. * @type \Google\Protobuf\FieldMask $update_mask - * This is used to specify the fields to be overwritten in the + * Optional. This is used to specify the fields to be overwritten in the * Restore targeted for update. The values for each of these * updated fields will be taken from the `restore` provided * with this request. Field names are relative to the root of the resource. @@ -123,7 +123,7 @@ public function setRestore($var) } /** - * This is used to specify the fields to be overwritten in the + * Optional. This is used to specify the fields to be overwritten in the * Restore targeted for update. The values for each of these * updated fields will be taken from the `restore` provided * with this request. Field names are relative to the root of the resource. @@ -132,7 +132,7 @@ public function setRestore($var) * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored * and are not used to update the target Restore. * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\FieldMask|null */ public function getUpdateMask() @@ -151,7 +151,7 @@ public function clearUpdateMask() } /** - * This is used to specify the fields to be overwritten in the + * Optional. This is used to specify the fields to be overwritten in the * Restore targeted for update. The values for each of these * updated fields will be taken from the `restore` provided * with this request. Field names are relative to the root of the resource. @@ -160,7 +160,7 @@ public function clearUpdateMask() * Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored * and are not used to update the target Restore. * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Protobuf\FieldMask $var * @return $this */ diff --git a/GkeBackup/src/V1/VolumeBackup.php b/GkeBackup/src/V1/VolumeBackup.php index 174fffee2a32..1ba75dbbbf80 100644 --- a/GkeBackup/src/V1/VolumeBackup.php +++ b/GkeBackup/src/V1/VolumeBackup.php @@ -12,7 +12,6 @@ * Represents the backup of a specific persistent volume as a component of a * Backup - both the record of the operation and a pointer to the underlying * storage-specific artifacts. - * Next id: 14 * * Generated from protobuf message google.cloud.gkebackup.v1.VolumeBackup */ diff --git a/GkeBackup/src/V1/VolumeRestore.php b/GkeBackup/src/V1/VolumeRestore.php index 9641926b1968..c7fc47ba06b6 100644 --- a/GkeBackup/src/V1/VolumeRestore.php +++ b/GkeBackup/src/V1/VolumeRestore.php @@ -10,7 +10,6 @@ /** * Represents the operation of restoring a volume from a VolumeBackup. - * Next id: 13 * * Generated from protobuf message google.cloud.gkebackup.v1.VolumeRestore */ diff --git a/GkeBackup/src/V1/gapic_metadata.json b/GkeBackup/src/V1/gapic_metadata.json index 5ff16291a2e9..6f12478d150e 100644 --- a/GkeBackup/src/V1/gapic_metadata.json +++ b/GkeBackup/src/V1/gapic_metadata.json @@ -55,6 +55,11 @@ "getBackup" ] }, + "GetBackupIndexDownloadUrl": { + "methods": [ + "getBackupIndexDownloadUrl" + ] + }, "GetBackupPlan": { "methods": [ "getBackupPlan" diff --git a/GkeBackup/src/V1/resources/backup_for_gke_client_config.json b/GkeBackup/src/V1/resources/backup_for_gke_client_config.json index 105a1e008577..3e02520d4f8c 100644 --- a/GkeBackup/src/V1/resources/backup_for_gke_client_config.json +++ b/GkeBackup/src/V1/resources/backup_for_gke_client_config.json @@ -103,6 +103,11 @@ "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "GetBackupIndexDownloadUrl": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "GetBackupPlan": { "timeout_millis": 60000, "retry_codes_name": "retry_policy_1_codes", diff --git a/GkeBackup/src/V1/resources/backup_for_gke_descriptor_config.php b/GkeBackup/src/V1/resources/backup_for_gke_descriptor_config.php index 4805e85319c6..d9791f6c3b9f 100644 --- a/GkeBackup/src/V1/resources/backup_for_gke_descriptor_config.php +++ b/GkeBackup/src/V1/resources/backup_for_gke_descriptor_config.php @@ -247,6 +247,18 @@ ], ], ], + 'GetBackupIndexDownloadUrl' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\GkeBackup\V1\GetBackupIndexDownloadUrlResponse', + 'headerParams' => [ + [ + 'keyName' => 'backup', + 'fieldAccessors' => [ + 'getBackup', + ], + ], + ], + ], 'GetBackupPlan' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\GkeBackup\V1\BackupPlan', diff --git a/GkeBackup/src/V1/resources/backup_for_gke_rest_client_config.php b/GkeBackup/src/V1/resources/backup_for_gke_rest_client_config.php index 043e32abae6d..f35ff0dd33d0 100644 --- a/GkeBackup/src/V1/resources/backup_for_gke_rest_client_config.php +++ b/GkeBackup/src/V1/resources/backup_for_gke_rest_client_config.php @@ -115,6 +115,17 @@ ], ], ], + 'GetBackupIndexDownloadUrl' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{backup=projects/*/locations/*/backupPlans/*/backups/*}:getBackupIndexDownloadUrl', + 'placeholders' => [ + 'backup' => [ + 'getters' => [ + 'getBackup', + ], + ], + ], + ], 'GetBackupPlan' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupPlans/*}', @@ -441,7 +452,7 @@ ], 'DeleteOperation' => [ 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', 'placeholders' => [ 'name' => [ 'getters' => [ diff --git a/GkeBackup/tests/Unit/V1/BackupForGKEClientTest.php b/GkeBackup/tests/Unit/V1/BackupForGKEClientTest.php index 9125ba101615..38ececbf1574 100644 --- a/GkeBackup/tests/Unit/V1/BackupForGKEClientTest.php +++ b/GkeBackup/tests/Unit/V1/BackupForGKEClientTest.php @@ -30,6 +30,7 @@ use Google\Cloud\GkeBackup\V1\Backup; use Google\Cloud\GkeBackup\V1\BackupForGKEClient; use Google\Cloud\GkeBackup\V1\BackupPlan; +use Google\Cloud\GkeBackup\V1\GetBackupIndexDownloadUrlResponse; use Google\Cloud\GkeBackup\V1\ListBackupPlansResponse; use Google\Cloud\GkeBackup\V1\ListBackupsResponse; use Google\Cloud\GkeBackup\V1\ListRestorePlansResponse; @@ -258,6 +259,8 @@ public function createBackupPlanTest() $deactivated = true; $protectedPodCount = 1494678716; $stateReason = 'stateReason282113458'; + $rpoRiskLevel = 1939768030; + $rpoRiskReason = 'rpoRiskReason167896166'; $expectedResponse = new BackupPlan(); $expectedResponse->setName($name); $expectedResponse->setUid($uid); @@ -267,6 +270,8 @@ public function createBackupPlanTest() $expectedResponse->setDeactivated($deactivated); $expectedResponse->setProtectedPodCount($protectedPodCount); $expectedResponse->setStateReason($stateReason); + $expectedResponse->setRpoRiskLevel($rpoRiskLevel); + $expectedResponse->setRpoRiskReason($rpoRiskReason); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); @@ -1234,6 +1239,66 @@ public function getBackupExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function getBackupIndexDownloadUrlTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $signedUrl = 'signedUrl-979536436'; + $expectedResponse = new GetBackupIndexDownloadUrlResponse(); + $expectedResponse->setSignedUrl($signedUrl); + $transport->addResponse($expectedResponse); + // Mock request + $formattedBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); + $response = $gapicClient->getBackupIndexDownloadUrl($formattedBackup); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/GetBackupIndexDownloadUrl', $actualFuncCall); + $actualValue = $actualRequestObject->getBackup(); + $this->assertProtobufEquals($formattedBackup, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupIndexDownloadUrlExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); + try { + $gapicClient->getBackupIndexDownloadUrl($formattedBackup); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function getBackupPlanTest() { @@ -1251,6 +1316,8 @@ public function getBackupPlanTest() $deactivated = true; $protectedPodCount = 1494678716; $stateReason = 'stateReason282113458'; + $rpoRiskLevel = 1939768030; + $rpoRiskReason = 'rpoRiskReason167896166'; $expectedResponse = new BackupPlan(); $expectedResponse->setName($name2); $expectedResponse->setUid($uid); @@ -1260,6 +1327,8 @@ public function getBackupPlanTest() $expectedResponse->setDeactivated($deactivated); $expectedResponse->setProtectedPodCount($protectedPodCount); $expectedResponse->setStateReason($stateReason); + $expectedResponse->setRpoRiskLevel($rpoRiskLevel); + $expectedResponse->setRpoRiskReason($rpoRiskReason); $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); @@ -2188,6 +2257,8 @@ public function updateBackupPlanTest() $deactivated = true; $protectedPodCount = 1494678716; $stateReason = 'stateReason282113458'; + $rpoRiskLevel = 1939768030; + $rpoRiskReason = 'rpoRiskReason167896166'; $expectedResponse = new BackupPlan(); $expectedResponse->setName($name); $expectedResponse->setUid($uid); @@ -2197,6 +2268,8 @@ public function updateBackupPlanTest() $expectedResponse->setDeactivated($deactivated); $expectedResponse->setProtectedPodCount($protectedPodCount); $expectedResponse->setStateReason($stateReason); + $expectedResponse->setRpoRiskLevel($rpoRiskLevel); + $expectedResponse->setRpoRiskReason($rpoRiskReason); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); diff --git a/GkeBackup/tests/Unit/V1/Client/BackupForGKEClientTest.php b/GkeBackup/tests/Unit/V1/Client/BackupForGKEClientTest.php index a343f18cc28a..765151839caf 100644 --- a/GkeBackup/tests/Unit/V1/Client/BackupForGKEClientTest.php +++ b/GkeBackup/tests/Unit/V1/Client/BackupForGKEClientTest.php @@ -38,6 +38,8 @@ use Google\Cloud\GkeBackup\V1\DeleteBackupRequest; use Google\Cloud\GkeBackup\V1\DeleteRestorePlanRequest; use Google\Cloud\GkeBackup\V1\DeleteRestoreRequest; +use Google\Cloud\GkeBackup\V1\GetBackupIndexDownloadUrlRequest; +use Google\Cloud\GkeBackup\V1\GetBackupIndexDownloadUrlResponse; use Google\Cloud\GkeBackup\V1\GetBackupPlanRequest; use Google\Cloud\GkeBackup\V1\GetBackupRequest; use Google\Cloud\GkeBackup\V1\GetRestorePlanRequest; @@ -291,6 +293,8 @@ public function createBackupPlanTest() $deactivated = true; $protectedPodCount = 1494678716; $stateReason = 'stateReason282113458'; + $rpoRiskLevel = 1939768030; + $rpoRiskReason = 'rpoRiskReason167896166'; $expectedResponse = new BackupPlan(); $expectedResponse->setName($name); $expectedResponse->setUid($uid); @@ -300,6 +304,8 @@ public function createBackupPlanTest() $expectedResponse->setDeactivated($deactivated); $expectedResponse->setProtectedPodCount($protectedPodCount); $expectedResponse->setStateReason($stateReason); + $expectedResponse->setRpoRiskLevel($rpoRiskLevel); + $expectedResponse->setRpoRiskReason($rpoRiskReason); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); @@ -1311,6 +1317,70 @@ public function getBackupExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function getBackupIndexDownloadUrlTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $signedUrl = 'signedUrl-979536436'; + $expectedResponse = new GetBackupIndexDownloadUrlResponse(); + $expectedResponse->setSignedUrl($signedUrl); + $transport->addResponse($expectedResponse); + // Mock request + $formattedBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); + $request = (new GetBackupIndexDownloadUrlRequest()) + ->setBackup($formattedBackup); + $response = $gapicClient->getBackupIndexDownloadUrl($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.gkebackup.v1.BackupForGKE/GetBackupIndexDownloadUrl', $actualFuncCall); + $actualValue = $actualRequestObject->getBackup(); + $this->assertProtobufEquals($formattedBackup, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupIndexDownloadUrlExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]', '[BACKUP]'); + $request = (new GetBackupIndexDownloadUrlRequest()) + ->setBackup($formattedBackup); + try { + $gapicClient->getBackupIndexDownloadUrl($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function getBackupPlanTest() { @@ -1328,6 +1398,8 @@ public function getBackupPlanTest() $deactivated = true; $protectedPodCount = 1494678716; $stateReason = 'stateReason282113458'; + $rpoRiskLevel = 1939768030; + $rpoRiskReason = 'rpoRiskReason167896166'; $expectedResponse = new BackupPlan(); $expectedResponse->setName($name2); $expectedResponse->setUid($uid); @@ -1337,6 +1409,8 @@ public function getBackupPlanTest() $expectedResponse->setDeactivated($deactivated); $expectedResponse->setProtectedPodCount($protectedPodCount); $expectedResponse->setStateReason($stateReason); + $expectedResponse->setRpoRiskLevel($rpoRiskLevel); + $expectedResponse->setRpoRiskReason($rpoRiskReason); $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->backupPlanName('[PROJECT]', '[LOCATION]', '[BACKUP_PLAN]'); @@ -2313,6 +2387,8 @@ public function updateBackupPlanTest() $deactivated = true; $protectedPodCount = 1494678716; $stateReason = 'stateReason282113458'; + $rpoRiskLevel = 1939768030; + $rpoRiskReason = 'rpoRiskReason167896166'; $expectedResponse = new BackupPlan(); $expectedResponse->setName($name); $expectedResponse->setUid($uid); @@ -2322,6 +2398,8 @@ public function updateBackupPlanTest() $expectedResponse->setDeactivated($deactivated); $expectedResponse->setProtectedPodCount($protectedPodCount); $expectedResponse->setStateReason($stateReason); + $expectedResponse->setRpoRiskLevel($rpoRiskLevel); + $expectedResponse->setRpoRiskReason($rpoRiskReason); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); From 9d9ecd3c2d315df5f2e5bd1262d219088bb29cb4 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:29:46 -0700 Subject: [PATCH 05/86] feat: add custom datetime format for Cloud Storage subscriptions (#7181) PiperOrigin-RevId: 619178723 Source-Link: https://github.com/googleapis/googleapis/commit/811a857dd5e5a500127d0470f16c2caca366435d Source-Link: https://github.com/googleapis/googleapis-gen/commit/768fb44d4daaea946a291f6795a50af26a515488 Copy-Tag: eyJwIjoiUHViU3ViLy5Pd2xCb3QueWFtbCIsImgiOiI3NjhmYjQ0ZDRkYWFlYTk0NmEyOTFmNjc5NWE1MGFmMjZhNTE1NDg4In0= --- PubSub/metadata/V1/Pubsub.php | Bin 15557 -> 15596 bytes PubSub/src/V1/CloudStorageConfig.php | 42 ++++++++++++++++++ .../AwsKinesis/State.php | 2 +- 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/PubSub/metadata/V1/Pubsub.php b/PubSub/metadata/V1/Pubsub.php index ec0231ac15d02616e0ca1969e33c08005abbedf4..416804f66cdf0c3546bdfc7e3cc7df7e44430523 100644 GIT binary patch delta 55 zcmX?F`KEHiS!TvFo6j+Gi!pwkd`mK2R+UR4Ei)%IFEKYYJ|(dvwImbBNXswEO)Qb% K+H5Y>rvw0tP!)&( delta 25 hcmaD;d9-rFS!Twio6j+Gi!q*?d`mKYbB0ul5&)kM3kCoH diff --git a/PubSub/src/V1/CloudStorageConfig.php b/PubSub/src/V1/CloudStorageConfig.php index a0f563a6387c..136d636c81c5 100644 --- a/PubSub/src/V1/CloudStorageConfig.php +++ b/PubSub/src/V1/CloudStorageConfig.php @@ -39,6 +39,14 @@ class CloudStorageConfig extends \Google\Protobuf\Internal\Message * Generated from protobuf field string filename_suffix = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $filename_suffix = ''; + /** + * Optional. User-provided format string specifying how to represent datetimes + * in Cloud Storage filenames. See the [datetime format + * guidance](https://cloud.google.com/pubsub/docs/create-cloudstorage-subscription#file_names). + * + * Generated from protobuf field string filename_datetime_format = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $filename_datetime_format = ''; /** * Optional. The maximum duration that can elapse before a new Cloud Storage * file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not @@ -82,6 +90,10 @@ class CloudStorageConfig extends \Google\Protobuf\Internal\Message * Optional. User-provided suffix for Cloud Storage filename. See the [object * naming requirements](https://cloud.google.com/storage/docs/objects#naming). * Must not end in "/". + * @type string $filename_datetime_format + * Optional. User-provided format string specifying how to represent datetimes + * in Cloud Storage filenames. See the [datetime format + * guidance](https://cloud.google.com/pubsub/docs/create-cloudstorage-subscription#file_names). * @type \Google\Cloud\PubSub\V1\CloudStorageConfig\TextConfig $text_config * Optional. If set, message data will be written to Cloud Storage in text * format. @@ -196,6 +208,36 @@ public function setFilenameSuffix($var) return $this; } + /** + * Optional. User-provided format string specifying how to represent datetimes + * in Cloud Storage filenames. See the [datetime format + * guidance](https://cloud.google.com/pubsub/docs/create-cloudstorage-subscription#file_names). + * + * Generated from protobuf field string filename_datetime_format = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilenameDatetimeFormat() + { + return $this->filename_datetime_format; + } + + /** + * Optional. User-provided format string specifying how to represent datetimes + * in Cloud Storage filenames. See the [datetime format + * guidance](https://cloud.google.com/pubsub/docs/create-cloudstorage-subscription#file_names). + * + * Generated from protobuf field string filename_datetime_format = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilenameDatetimeFormat($var) + { + GPBUtil::checkString($var, True); + $this->filename_datetime_format = $var; + + return $this; + } + /** * Optional. If set, message data will be written to Cloud Storage in text * format. diff --git a/PubSub/src/V1/IngestionDataSourceSettings/AwsKinesis/State.php b/PubSub/src/V1/IngestionDataSourceSettings/AwsKinesis/State.php index 6c40b2decc19..0c0dd003845d 100644 --- a/PubSub/src/V1/IngestionDataSourceSettings/AwsKinesis/State.php +++ b/PubSub/src/V1/IngestionDataSourceSettings/AwsKinesis/State.php @@ -41,7 +41,7 @@ class State const KINESIS_PERMISSION_DENIED = 2; /** * Permission denied encountered while publishing to the topic. This can - * happen due to Pub/Sub SA has not been granted the [appropriate publish + * happen if the Pub/Sub SA has not been granted the [appropriate publish * permissions](https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher) * * Generated from protobuf enum PUBLISH_PERMISSION_DENIED = 3; From e799bccd8cabd785e6282a469f61e3bf0ce19243 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:30:08 -0700 Subject: [PATCH 06/86] feat: Add `rollout_info` field to `QuotaDetails` message (#7183) docs: update comment of `contact_email` to make it optional as opposed to required docs: update sample URL in field for `service_request_quota_uri` PiperOrigin-RevId: 619290180 Source-Link: https://github.com/googleapis/googleapis/commit/2c24fa58df01faf95b55d6578a1fe2d625a453f8 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f2c194aaade29350c965775ccf83586025e3f29c Copy-Tag: eyJwIjoiUXVvdGFzLy5Pd2xCb3QueWFtbCIsImgiOiJmMmMxOTRhYWFkZTI5MzUwYzk2NTc3NWNjZjgzNTg2MDI1ZTNmMjljIn0= feat: Add `rollout_info` field to `QuotaDetails` message PiperOrigin-RevId: 621249697 Source-Link: https://github.com/googleapis/googleapis/commit/a74854dfc497c175b997b7fe1b264a898f594da6 Source-Link: https://github.com/googleapis/googleapis-gen/commit/c9c7eb0653b6593d1e1d24551f31237513fe0a48 Copy-Tag: eyJwIjoiUXVvdGFzLy5Pd2xCb3QueWFtbCIsImgiOiJjOWM3ZWIwNjUzYjY1OTNkMWUxZDI0NTUxZjMxMjM3NTEzZmUwYTQ4In0= --- Quotas/metadata/V1/Resources.php | Bin 3965 -> 4064 bytes .../create_quota_preference.php | 17 +---- .../update_quota_preference.php | 17 +---- Quotas/src/V1/QuotaDetails.php | 52 ++++++++++++++ Quotas/src/V1/QuotaInfo.php | 48 ++++--------- Quotas/src/V1/QuotaPreference.php | 26 +++++-- Quotas/src/V1/RolloutInfo.php | 67 ++++++++++++++++++ .../Unit/V1/Client/CloudQuotasClientTest.php | 10 --- 8 files changed, 156 insertions(+), 81 deletions(-) create mode 100644 Quotas/src/V1/RolloutInfo.php diff --git a/Quotas/metadata/V1/Resources.php b/Quotas/metadata/V1/Resources.php index 099ecb88b061f6445bf8e87de8be8522ea353555..0c1a99bbc068b536fc90a8681a3857c3925bf885 100644 GIT binary patch delta 152 zcmew>_dtHbaVDm-lABL5xw100ZszBh#wabt#haX;SCW`q5}%rzn3*HNqrj-a>BRiN zk!5l_ukq$@oJW}%qbKj-m6Z^(;o>RE&&kOzEs4*}OUsvF1}fz?Qk$H}CuO1+1d;Is kN+_vuaU*es#JTwM^V0J(^U~v?`Xv~FS~)h~1q_AOR=| bLI&VL1mHmev%m@X0|6bAxeXn&JPxD*L8KO< diff --git a/Quotas/samples/V1/CloudQuotasClient/create_quota_preference.php b/Quotas/samples/V1/CloudQuotasClient/create_quota_preference.php index a9c0885addc2..362fbcbab178 100644 --- a/Quotas/samples/V1/CloudQuotasClient/create_quota_preference.php +++ b/Quotas/samples/V1/CloudQuotasClient/create_quota_preference.php @@ -42,20 +42,12 @@ * @param string $quotaPreferenceService The name of the service to which the quota preference is applied. * @param string $quotaPreferenceQuotaId The id of the quota to which the quota preference is applied. A * quota name is unique in the service. Example: `CpusPerProjectPerRegion` - * @param string $quotaPreferenceContactEmail Input only. An email address that can be used for quota related - * communication between the Google Cloud and the user in case the Google - * Cloud needs further information to make a decision on whether the user - * preferred quota can be granted. - * - * The Google account for the email address must have quota update permission - * for the project, folder or organization this quota preference is for. */ function create_quota_preference_sample( string $formattedParent, int $quotaPreferenceQuotaConfigPreferredValue, string $quotaPreferenceService, - string $quotaPreferenceQuotaId, - string $quotaPreferenceContactEmail + string $quotaPreferenceQuotaId ): void { // Create a client. $cloudQuotasClient = new CloudQuotasClient(); @@ -66,8 +58,7 @@ function create_quota_preference_sample( $quotaPreference = (new QuotaPreference()) ->setQuotaConfig($quotaPreferenceQuotaConfig) ->setService($quotaPreferenceService) - ->setQuotaId($quotaPreferenceQuotaId) - ->setContactEmail($quotaPreferenceContactEmail); + ->setQuotaId($quotaPreferenceQuotaId); $request = (new CreateQuotaPreferenceRequest()) ->setParent($formattedParent) ->setQuotaPreference($quotaPreference); @@ -97,14 +88,12 @@ function callSample(): void $quotaPreferenceQuotaConfigPreferredValue = 0; $quotaPreferenceService = '[SERVICE]'; $quotaPreferenceQuotaId = '[QUOTA_ID]'; - $quotaPreferenceContactEmail = '[CONTACT_EMAIL]'; create_quota_preference_sample( $formattedParent, $quotaPreferenceQuotaConfigPreferredValue, $quotaPreferenceService, - $quotaPreferenceQuotaId, - $quotaPreferenceContactEmail + $quotaPreferenceQuotaId ); } // [END cloudquotas_v1_generated_CloudQuotas_CreateQuotaPreference_sync] diff --git a/Quotas/samples/V1/CloudQuotasClient/update_quota_preference.php b/Quotas/samples/V1/CloudQuotasClient/update_quota_preference.php index d41e973a1a9b..4300d0fe1f94 100644 --- a/Quotas/samples/V1/CloudQuotasClient/update_quota_preference.php +++ b/Quotas/samples/V1/CloudQuotasClient/update_quota_preference.php @@ -38,19 +38,11 @@ * @param string $quotaPreferenceService The name of the service to which the quota preference is applied. * @param string $quotaPreferenceQuotaId The id of the quota to which the quota preference is applied. A * quota name is unique in the service. Example: `CpusPerProjectPerRegion` - * @param string $quotaPreferenceContactEmail Input only. An email address that can be used for quota related - * communication between the Google Cloud and the user in case the Google - * Cloud needs further information to make a decision on whether the user - * preferred quota can be granted. - * - * The Google account for the email address must have quota update permission - * for the project, folder or organization this quota preference is for. */ function update_quota_preference_sample( int $quotaPreferenceQuotaConfigPreferredValue, string $quotaPreferenceService, - string $quotaPreferenceQuotaId, - string $quotaPreferenceContactEmail + string $quotaPreferenceQuotaId ): void { // Create a client. $cloudQuotasClient = new CloudQuotasClient(); @@ -61,8 +53,7 @@ function update_quota_preference_sample( $quotaPreference = (new QuotaPreference()) ->setQuotaConfig($quotaPreferenceQuotaConfig) ->setService($quotaPreferenceService) - ->setQuotaId($quotaPreferenceQuotaId) - ->setContactEmail($quotaPreferenceContactEmail); + ->setQuotaId($quotaPreferenceQuotaId); $request = (new UpdateQuotaPreferenceRequest()) ->setQuotaPreference($quotaPreference); @@ -90,13 +81,11 @@ function callSample(): void $quotaPreferenceQuotaConfigPreferredValue = 0; $quotaPreferenceService = '[SERVICE]'; $quotaPreferenceQuotaId = '[QUOTA_ID]'; - $quotaPreferenceContactEmail = '[CONTACT_EMAIL]'; update_quota_preference_sample( $quotaPreferenceQuotaConfigPreferredValue, $quotaPreferenceService, - $quotaPreferenceQuotaId, - $quotaPreferenceContactEmail + $quotaPreferenceQuotaId ); } // [END cloudquotas_v1_generated_CloudQuotas_UpdateQuotaPreference_sync] diff --git a/Quotas/src/V1/QuotaDetails.php b/Quotas/src/V1/QuotaDetails.php index 2162ae832009..989b3f46d03b 100644 --- a/Quotas/src/V1/QuotaDetails.php +++ b/Quotas/src/V1/QuotaDetails.php @@ -21,6 +21,14 @@ class QuotaDetails extends \Google\Protobuf\Internal\Message * Generated from protobuf field int64 value = 1; */ protected $value = 0; + /** + * Rollout information of this quota. + * This field is present only if the effective limit will change due to the + * ongoing rollout of the service config. + * + * Generated from protobuf field .google.api.cloudquotas.v1.RolloutInfo rollout_info = 3; + */ + protected $rollout_info = null; /** * Constructor. @@ -30,6 +38,10 @@ class QuotaDetails extends \Google\Protobuf\Internal\Message * * @type int|string $value * The value currently in effect and being enforced. + * @type \Google\Cloud\CloudQuotas\V1\RolloutInfo $rollout_info + * Rollout information of this quota. + * This field is present only if the effective limit will change due to the + * ongoing rollout of the service config. * } */ public function __construct($data = NULL) { @@ -63,5 +75,45 @@ public function setValue($var) return $this; } + /** + * Rollout information of this quota. + * This field is present only if the effective limit will change due to the + * ongoing rollout of the service config. + * + * Generated from protobuf field .google.api.cloudquotas.v1.RolloutInfo rollout_info = 3; + * @return \Google\Cloud\CloudQuotas\V1\RolloutInfo|null + */ + public function getRolloutInfo() + { + return $this->rollout_info; + } + + public function hasRolloutInfo() + { + return isset($this->rollout_info); + } + + public function clearRolloutInfo() + { + unset($this->rollout_info); + } + + /** + * Rollout information of this quota. + * This field is present only if the effective limit will change due to the + * ongoing rollout of the service config. + * + * Generated from protobuf field .google.api.cloudquotas.v1.RolloutInfo rollout_info = 3; + * @param \Google\Cloud\CloudQuotas\V1\RolloutInfo $var + * @return $this + */ + public function setRolloutInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\CloudQuotas\V1\RolloutInfo::class); + $this->rollout_info = $var; + + return $this; + } + } diff --git a/Quotas/src/V1/QuotaInfo.php b/Quotas/src/V1/QuotaInfo.php index 99c972e954c9..6de76fb1156f 100644 --- a/Quotas/src/V1/QuotaInfo.php +++ b/Quotas/src/V1/QuotaInfo.php @@ -120,15 +120,9 @@ class QuotaInfo extends \Google\Protobuf\Internal\Message */ protected $is_concurrent = false; /** - * URI to the page where the user can request more quotas for the cloud - * service, such as - * https://docs.google.com/spreadsheet/viewform?formkey=abc123&entry_0={email}&entry_1={id}. - * Google Developers Console UI replace {email} with the current - * user's e-mail, {id} with the current project number, or organization ID - * with "organizations/" prefix. For example, - * https://docs.google.com/spreadsheet/viewform?formkey=abc123&entry_0=johndoe@gmail.com&entry_1=25463754, - * or - * https://docs.google.com/spreadsheet/viewform?formkey=abc123&entry_0=johndoe@gmail.com&entry_1=organizations/26474422. + * URI to the page where users can request more quota for the cloud + * service—for example, + * https://console.cloud.google.com/iam-admin/quotas. * * Generated from protobuf field string service_request_quota_uri = 17; */ @@ -184,15 +178,9 @@ class QuotaInfo extends \Google\Protobuf\Internal\Message * Whether the quota is a concurrent quota. Concurrent quotas are enforced * on the total number of concurrent operations in flight at any given time. * @type string $service_request_quota_uri - * URI to the page where the user can request more quotas for the cloud - * service, such as - * https://docs.google.com/spreadsheet/viewform?formkey=abc123&entry_0={email}&entry_1={id}. - * Google Developers Console UI replace {email} with the current - * user's e-mail, {id} with the current project number, or organization ID - * with "organizations/" prefix. For example, - * https://docs.google.com/spreadsheet/viewform?formkey=abc123&entry_0=johndoe@gmail.com&entry_1=25463754, - * or - * https://docs.google.com/spreadsheet/viewform?formkey=abc123&entry_0=johndoe@gmail.com&entry_1=organizations/26474422. + * URI to the page where users can request more quota for the cloud + * service—for example, + * https://console.cloud.google.com/iam-admin/quotas. * } */ public function __construct($data = NULL) { @@ -627,15 +615,9 @@ public function setIsConcurrent($var) } /** - * URI to the page where the user can request more quotas for the cloud - * service, such as - * https://docs.google.com/spreadsheet/viewform?formkey=abc123&entry_0={email}&entry_1={id}. - * Google Developers Console UI replace {email} with the current - * user's e-mail, {id} with the current project number, or organization ID - * with "organizations/" prefix. For example, - * https://docs.google.com/spreadsheet/viewform?formkey=abc123&entry_0=johndoe@gmail.com&entry_1=25463754, - * or - * https://docs.google.com/spreadsheet/viewform?formkey=abc123&entry_0=johndoe@gmail.com&entry_1=organizations/26474422. + * URI to the page where users can request more quota for the cloud + * service—for example, + * https://console.cloud.google.com/iam-admin/quotas. * * Generated from protobuf field string service_request_quota_uri = 17; * @return string @@ -646,15 +628,9 @@ public function getServiceRequestQuotaUri() } /** - * URI to the page where the user can request more quotas for the cloud - * service, such as - * https://docs.google.com/spreadsheet/viewform?formkey=abc123&entry_0={email}&entry_1={id}. - * Google Developers Console UI replace {email} with the current - * user's e-mail, {id} with the current project number, or organization ID - * with "organizations/" prefix. For example, - * https://docs.google.com/spreadsheet/viewform?formkey=abc123&entry_0=johndoe@gmail.com&entry_1=25463754, - * or - * https://docs.google.com/spreadsheet/viewform?formkey=abc123&entry_0=johndoe@gmail.com&entry_1=organizations/26474422. + * URI to the page where users can request more quota for the cloud + * service—for example, + * https://console.cloud.google.com/iam-admin/quotas. * * Generated from protobuf field string service_request_quota_uri = 17; * @param string $var diff --git a/Quotas/src/V1/QuotaPreference.php b/Quotas/src/V1/QuotaPreference.php index bdc6cfeaf09c..8d6834043a21 100644 --- a/Quotas/src/V1/QuotaPreference.php +++ b/Quotas/src/V1/QuotaPreference.php @@ -97,14 +97,17 @@ class QuotaPreference extends \Google\Protobuf\Internal\Message */ protected $justification = ''; /** - * Required. Input only. An email address that can be used for quota related + * Input only. An email address that can be used for quota related * communication between the Google Cloud and the user in case the Google * Cloud needs further information to make a decision on whether the user * preferred quota can be granted. + * The email address is optional for decrease quota preferences. In another + * word, QuotaConfig.preferred_value is smaller than the + * QuotaDetails.reset_value. It is required for increase quota preferences. * The Google account for the email address must have quota update permission * for the project, folder or organization this quota preference is for. * - * Generated from protobuf field string contact_email = 12 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string contact_email = 12 [(.google.api.field_behavior) = INPUT_ONLY]; */ protected $contact_email = ''; @@ -154,10 +157,13 @@ class QuotaPreference extends \Google\Protobuf\Internal\Message * @type string $justification * The reason / justification for this quota preference. * @type string $contact_email - * Required. Input only. An email address that can be used for quota related + * Input only. An email address that can be used for quota related * communication between the Google Cloud and the user in case the Google * Cloud needs further information to make a decision on whether the user * preferred quota can be granted. + * The email address is optional for decrease quota preferences. In another + * word, QuotaConfig.preferred_value is smaller than the + * QuotaDetails.reset_value. It is required for increase quota preferences. * The Google account for the email address must have quota update permission * for the project, folder or organization this quota preference is for. * } @@ -496,14 +502,17 @@ public function setJustification($var) } /** - * Required. Input only. An email address that can be used for quota related + * Input only. An email address that can be used for quota related * communication between the Google Cloud and the user in case the Google * Cloud needs further information to make a decision on whether the user * preferred quota can be granted. + * The email address is optional for decrease quota preferences. In another + * word, QuotaConfig.preferred_value is smaller than the + * QuotaDetails.reset_value. It is required for increase quota preferences. * The Google account for the email address must have quota update permission * for the project, folder or organization this quota preference is for. * - * Generated from protobuf field string contact_email = 12 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string contact_email = 12 [(.google.api.field_behavior) = INPUT_ONLY]; * @return string */ public function getContactEmail() @@ -512,14 +521,17 @@ public function getContactEmail() } /** - * Required. Input only. An email address that can be used for quota related + * Input only. An email address that can be used for quota related * communication between the Google Cloud and the user in case the Google * Cloud needs further information to make a decision on whether the user * preferred quota can be granted. + * The email address is optional for decrease quota preferences. In another + * word, QuotaConfig.preferred_value is smaller than the + * QuotaDetails.reset_value. It is required for increase quota preferences. * The Google account for the email address must have quota update permission * for the project, folder or organization this quota preference is for. * - * Generated from protobuf field string contact_email = 12 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string contact_email = 12 [(.google.api.field_behavior) = INPUT_ONLY]; * @param string $var * @return $this */ diff --git a/Quotas/src/V1/RolloutInfo.php b/Quotas/src/V1/RolloutInfo.php new file mode 100644 index 000000000000..1d0c7e5fec54 --- /dev/null +++ b/Quotas/src/V1/RolloutInfo.php @@ -0,0 +1,67 @@ +google.api.cloudquotas.v1.RolloutInfo + */ +class RolloutInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Whether there is an ongoing rollout for a quota or not. + * + * Generated from protobuf field bool ongoing_rollout = 1; + */ + protected $ongoing_rollout = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $ongoing_rollout + * Whether there is an ongoing rollout for a quota or not. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Api\Cloudquotas\V1\Resources::initOnce(); + parent::__construct($data); + } + + /** + * Whether there is an ongoing rollout for a quota or not. + * + * Generated from protobuf field bool ongoing_rollout = 1; + * @return bool + */ + public function getOngoingRollout() + { + return $this->ongoing_rollout; + } + + /** + * Whether there is an ongoing rollout for a quota or not. + * + * Generated from protobuf field bool ongoing_rollout = 1; + * @param bool $var + * @return $this + */ + public function setOngoingRollout($var) + { + GPBUtil::checkBool($var); + $this->ongoing_rollout = $var; + + return $this; + } + +} + diff --git a/Quotas/tests/Unit/V1/Client/CloudQuotasClientTest.php b/Quotas/tests/Unit/V1/Client/CloudQuotasClientTest.php index 8408287238b9..57d02caed947 100644 --- a/Quotas/tests/Unit/V1/Client/CloudQuotasClientTest.php +++ b/Quotas/tests/Unit/V1/Client/CloudQuotasClientTest.php @@ -107,8 +107,6 @@ public function createQuotaPreferenceTest() $quotaPreference->setService($quotaPreferenceService); $quotaPreferenceQuotaId = 'quotaPreferenceQuotaId1917192384'; $quotaPreference->setQuotaId($quotaPreferenceQuotaId); - $quotaPreferenceContactEmail = 'quotaPreferenceContactEmail-1724666769'; - $quotaPreference->setContactEmail($quotaPreferenceContactEmail); $request = (new CreateQuotaPreferenceRequest()) ->setParent($formattedParent) ->setQuotaPreference($quotaPreference); @@ -158,8 +156,6 @@ public function createQuotaPreferenceExceptionTest() $quotaPreference->setService($quotaPreferenceService); $quotaPreferenceQuotaId = 'quotaPreferenceQuotaId1917192384'; $quotaPreference->setQuotaId($quotaPreferenceQuotaId); - $quotaPreferenceContactEmail = 'quotaPreferenceContactEmail-1724666769'; - $quotaPreference->setContactEmail($quotaPreferenceContactEmail); $request = (new CreateQuotaPreferenceRequest()) ->setParent($formattedParent) ->setQuotaPreference($quotaPreference); @@ -517,8 +513,6 @@ public function updateQuotaPreferenceTest() $quotaPreference->setService($quotaPreferenceService); $quotaPreferenceQuotaId = 'quotaPreferenceQuotaId1917192384'; $quotaPreference->setQuotaId($quotaPreferenceQuotaId); - $quotaPreferenceContactEmail = 'quotaPreferenceContactEmail-1724666769'; - $quotaPreference->setContactEmail($quotaPreferenceContactEmail); $request = (new UpdateQuotaPreferenceRequest())->setQuotaPreference($quotaPreference); $response = $gapicClient->updateQuotaPreference($request); $this->assertEquals($expectedResponse, $response); @@ -563,8 +557,6 @@ public function updateQuotaPreferenceExceptionTest() $quotaPreference->setService($quotaPreferenceService); $quotaPreferenceQuotaId = 'quotaPreferenceQuotaId1917192384'; $quotaPreference->setQuotaId($quotaPreferenceQuotaId); - $quotaPreferenceContactEmail = 'quotaPreferenceContactEmail-1724666769'; - $quotaPreference->setContactEmail($quotaPreferenceContactEmail); $request = (new UpdateQuotaPreferenceRequest())->setQuotaPreference($quotaPreference); try { $gapicClient->updateQuotaPreference($request); @@ -615,8 +607,6 @@ public function createQuotaPreferenceAsyncTest() $quotaPreference->setService($quotaPreferenceService); $quotaPreferenceQuotaId = 'quotaPreferenceQuotaId1917192384'; $quotaPreference->setQuotaId($quotaPreferenceQuotaId); - $quotaPreferenceContactEmail = 'quotaPreferenceContactEmail-1724666769'; - $quotaPreference->setContactEmail($quotaPreferenceContactEmail); $request = (new CreateQuotaPreferenceRequest()) ->setParent($formattedParent) ->setQuotaPreference($quotaPreference); From 3ea13def63f1b010f7816c22383096c52893ffa3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:30:45 -0700 Subject: [PATCH 07/86] feat: Add Notebook field to finding's list of attributes (#7188) PiperOrigin-RevId: 619663717 Source-Link: https://github.com/googleapis/googleapis/commit/038629f435226abf4081cb4042c1213ae04718a2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/90ac380358c55e6d6521d4779128316994263e0d Copy-Tag: eyJwIjoiU2VjdXJpdHlDZW50ZXIvLk93bEJvdC55YW1sIiwiaCI6IjkwYWMzODAzNThjNTVlNmQ2NTIxZDQ3NzkxMjgzMTY5OTQyNjNlMGQifQ== docs: Fixed backtick and double quotes mismatch in security_marks.proto PiperOrigin-RevId: 621678383 Source-Link: https://github.com/googleapis/googleapis/commit/3a43ba72f091886f2848d5e0ec55f119644bbe5e Source-Link: https://github.com/googleapis/googleapis-gen/commit/0b3e9012a7da5b61f444a6022e62afe141fac413 Copy-Tag: eyJwIjoiU2VjdXJpdHlDZW50ZXIvLk93bEJvdC55YW1sIiwiaCI6IjBiM2U5MDEyYTdkYTViNjFmNDQ0YTYwMjJlNjJhZmUxNDFmYWM0MTMifQ== --- SecurityCenter/metadata/V1/Finding.php | Bin 7768 -> 7948 bytes SecurityCenter/metadata/V1/Notebook.php | 33 +++++ SecurityCenter/src/V1/Finding.php | 44 ++++++ SecurityCenter/src/V1/Notebook.php | 181 ++++++++++++++++++++++++ SecurityCenter/src/V2/SecurityMarks.php | 72 +++++----- 5 files changed, 294 insertions(+), 36 deletions(-) create mode 100644 SecurityCenter/metadata/V1/Notebook.php create mode 100644 SecurityCenter/src/V1/Notebook.php diff --git a/SecurityCenter/metadata/V1/Finding.php b/SecurityCenter/metadata/V1/Finding.php index f116442853e7b65b08873072037a62075543b24e..a9d14dc3739cf71c68e7bad14743661c230d490b 100644 GIT binary patch delta 96 zcmca%(_^Mh$Kwjme6F3UH$~AD5iS0st>~A6ozb delta 51 zcmV-30L=f4KG;04VFSsAuUsbzER(SdACYPev(^ec1d}KXAhTf)9svQOvw#r4 J3A1||kp$^C5ySuh diff --git a/SecurityCenter/metadata/V1/Notebook.php b/SecurityCenter/metadata/V1/Notebook.php new file mode 100644 index 000000000000..4a3e44210f39 --- /dev/null +++ b/SecurityCenter/metadata/V1/Notebook.php @@ -0,0 +1,33 @@ +internalAddGeneratedFile( + ' +» +-google/cloud/securitycenter/v1/notebook.protogoogle.cloud.securitycenter.v1"x +Notebook +name (  +service (  + last_author ( 8 +notebook_update_time ( 2.google.protobuf.TimestampBç +"com.google.cloud.securitycenter.v1B NotebookProtoPZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpbªGoogle.Cloud.SecurityCenter.V1ÊGoogle\\Cloud\\SecurityCenter\\V1ê!Google::Cloud::SecurityCenter::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/SecurityCenter/src/V1/Finding.php b/SecurityCenter/src/V1/Finding.php index 5a3b0980f8af..b01b12f0aa60 100644 --- a/SecurityCenter/src/V1/Finding.php +++ b/SecurityCenter/src/V1/Finding.php @@ -353,6 +353,12 @@ class Finding extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.cloud.securitycenter.v1.LoadBalancer load_balancers = 58; */ private $load_balancers; + /** + * Notebook associated with the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Notebook notebook = 63; + */ + private $notebook = null; /** * Constructor. @@ -517,6 +523,8 @@ class Finding extends \Google\Protobuf\Internal\Message * Log entries that are relevant to the finding. * @type array<\Google\Cloud\SecurityCenter\V1\LoadBalancer>|\Google\Protobuf\Internal\RepeatedField $load_balancers * The load balancers associated with the finding. + * @type \Google\Cloud\SecurityCenter\V1\Notebook $notebook + * Notebook associated with the finding. * } */ public function __construct($data = NULL) { @@ -1976,5 +1984,41 @@ public function setLoadBalancers($var) return $this; } + /** + * Notebook associated with the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Notebook notebook = 63; + * @return \Google\Cloud\SecurityCenter\V1\Notebook|null + */ + public function getNotebook() + { + return $this->notebook; + } + + public function hasNotebook() + { + return isset($this->notebook); + } + + public function clearNotebook() + { + unset($this->notebook); + } + + /** + * Notebook associated with the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Notebook notebook = 63; + * @param \Google\Cloud\SecurityCenter\V1\Notebook $var + * @return $this + */ + public function setNotebook($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Notebook::class); + $this->notebook = $var; + + return $this; + } + } diff --git a/SecurityCenter/src/V1/Notebook.php b/SecurityCenter/src/V1/Notebook.php new file mode 100644 index 000000000000..f99a176980c8 --- /dev/null +++ b/SecurityCenter/src/V1/Notebook.php @@ -0,0 +1,181 @@ +google.cloud.securitycenter.v1.Notebook + */ +class Notebook extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the notebook. + * + * Generated from protobuf field string name = 1; + */ + private $name = ''; + /** + * The source notebook service, for example, "Colab Enterprise". + * + * Generated from protobuf field string service = 2; + */ + private $service = ''; + /** + * The user ID of the latest author to modify the notebook. + * + * Generated from protobuf field string last_author = 3; + */ + private $last_author = ''; + /** + * The most recent time the notebook was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp notebook_update_time = 4; + */ + private $notebook_update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the notebook. + * @type string $service + * The source notebook service, for example, "Colab Enterprise". + * @type string $last_author + * The user ID of the latest author to modify the notebook. + * @type \Google\Protobuf\Timestamp $notebook_update_time + * The most recent time the notebook was updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\Notebook::initOnce(); + parent::__construct($data); + } + + /** + * The name of the notebook. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the notebook. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The source notebook service, for example, "Colab Enterprise". + * + * Generated from protobuf field string service = 2; + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * The source notebook service, for example, "Colab Enterprise". + * + * Generated from protobuf field string service = 2; + * @param string $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkString($var, True); + $this->service = $var; + + return $this; + } + + /** + * The user ID of the latest author to modify the notebook. + * + * Generated from protobuf field string last_author = 3; + * @return string + */ + public function getLastAuthor() + { + return $this->last_author; + } + + /** + * The user ID of the latest author to modify the notebook. + * + * Generated from protobuf field string last_author = 3; + * @param string $var + * @return $this + */ + public function setLastAuthor($var) + { + GPBUtil::checkString($var, True); + $this->last_author = $var; + + return $this; + } + + /** + * The most recent time the notebook was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp notebook_update_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getNotebookUpdateTime() + { + return $this->notebook_update_time; + } + + public function hasNotebookUpdateTime() + { + return isset($this->notebook_update_time); + } + + public function clearNotebookUpdateTime() + { + unset($this->notebook_update_time); + } + + /** + * The most recent time the notebook was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp notebook_update_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setNotebookUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->notebook_update_time = $var; + + return $this; + } + +} + diff --git a/SecurityCenter/src/V2/SecurityMarks.php b/SecurityCenter/src/V2/SecurityMarks.php index e2a2b0cb58e4..8c450731cc93 100644 --- a/SecurityCenter/src/V2/SecurityMarks.php +++ b/SecurityCenter/src/V2/SecurityMarks.php @@ -45,21 +45,21 @@ class SecurityMarks extends \Google\Protobuf\Internal\Message private $marks; /** * The canonical name of the marks. The following list shows some examples: - * + `organizations/{organization_id}/assets/{asset_id}/securityMarks" + * + `organizations/{organization_id}/assets/{asset_id}/securityMarks` * + - * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks` * + - * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks" - * + `folders/{folder_id}/assets/{asset_id}/securityMarks" + * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` + * + `folders/{folder_id}/assets/{asset_id}/securityMarks` * + - * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks` * + - * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks" - * + `projects/{project_number}/assets/{asset_id}/securityMarks" + * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` + * + `projects/{project_number}/assets/{asset_id}/securityMarks` * + - * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks" + * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks` * + - * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks" + * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` * * Generated from protobuf field string canonical_name = 3; */ @@ -90,21 +90,21 @@ class SecurityMarks extends \Google\Protobuf\Internal\Message * characters must be between 1 - 4096 characters (inclusive) * @type string $canonical_name * The canonical name of the marks. The following list shows some examples: - * + `organizations/{organization_id}/assets/{asset_id}/securityMarks" + * + `organizations/{organization_id}/assets/{asset_id}/securityMarks` * + - * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks` * + - * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks" - * + `folders/{folder_id}/assets/{asset_id}/securityMarks" + * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` + * + `folders/{folder_id}/assets/{asset_id}/securityMarks` * + - * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks` * + - * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks" - * + `projects/{project_number}/assets/{asset_id}/securityMarks" + * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` + * + `projects/{project_number}/assets/{asset_id}/securityMarks` * + - * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks" + * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks` * + - * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks" + * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` * } */ public function __construct($data = NULL) { @@ -192,21 +192,21 @@ public function setMarks($var) /** * The canonical name of the marks. The following list shows some examples: - * + `organizations/{organization_id}/assets/{asset_id}/securityMarks" + * + `organizations/{organization_id}/assets/{asset_id}/securityMarks` * + - * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks` * + - * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks" - * + `folders/{folder_id}/assets/{asset_id}/securityMarks" + * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` + * + `folders/{folder_id}/assets/{asset_id}/securityMarks` * + - * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks` * + - * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks" - * + `projects/{project_number}/assets/{asset_id}/securityMarks" + * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` + * + `projects/{project_number}/assets/{asset_id}/securityMarks` * + - * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks" + * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks` * + - * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks" + * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` * * Generated from protobuf field string canonical_name = 3; * @return string @@ -218,21 +218,21 @@ public function getCanonicalName() /** * The canonical name of the marks. The following list shows some examples: - * + `organizations/{organization_id}/assets/{asset_id}/securityMarks" + * + `organizations/{organization_id}/assets/{asset_id}/securityMarks` * + - * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + * `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks` * + - * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks" - * + `folders/{folder_id}/assets/{asset_id}/securityMarks" + * `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` + * + `folders/{folder_id}/assets/{asset_id}/securityMarks` * + - * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks" + * `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks` * + - * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks" - * + `projects/{project_number}/assets/{asset_id}/securityMarks" + * `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` + * + `projects/{project_number}/assets/{asset_id}/securityMarks` * + - * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks" + * `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks` * + - * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks" + * `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` * * Generated from protobuf field string canonical_name = 3; * @param string $var From a4e6f70681dd74d098f2e83f00eb42800ee13818 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:31:05 -0700 Subject: [PATCH 08/86] docs: Allow 14 week backup retention for Firestore daily backups (#7190) * docs: correct BackupSchedule recurrence docs that mentioned specific time of day chore: fix typo in DeleteBackupScheduleRequest PiperOrigin-RevId: 619912852 Source-Link: https://github.com/googleapis/googleapis/commit/8fe68cf33c51264152c321321ee78b8a3197f497 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1a8186f74665611f485811ac5ab643c9f05655c7 Copy-Tag: eyJwIjoiRmlyZXN0b3JlLy5Pd2xCb3QueWFtbCIsImgiOiIxYTgxODZmNzQ2NjU2MTFmNDg1ODExYWM1YWI2NDNjOWYwNTY1NWM3In0= * docs: Allow 14 week backup retention for Firestore daily backups PiperOrigin-RevId: 621269025 Source-Link: https://github.com/googleapis/googleapis/commit/d0ed6724c4f2868bf4c6d8e0fe9223221f0f0e50 Source-Link: https://github.com/googleapis/googleapis-gen/commit/73c87bc51e565666bf4e399b194b3d71e1340ee7 Copy-Tag: eyJwIjoiRmlyZXN0b3JlLy5Pd2xCb3QueWFtbCIsImgiOiI3M2M4N2JjNTFlNTY1NjY2YmY0ZTM5OWIxOTRiM2Q3MWUxMzQwZWU3In0= --- Firestore/src/Admin/V1/BackupSchedule.php | 12 ++++++------ .../src/Admin/V1/Client/FirestoreAdminClient.php | 3 +-- Firestore/src/Admin/V1/DailyRecurrence.php | 2 +- .../src/Admin/V1/DeleteBackupScheduleRequest.php | 10 +++++----- .../src/Admin/V1/Gapic/FirestoreAdminGapicClient.php | 5 ++--- 5 files changed, 15 insertions(+), 17 deletions(-) diff --git a/Firestore/src/Admin/V1/BackupSchedule.php b/Firestore/src/Admin/V1/BackupSchedule.php index 087f0aa9fbef..7bc6d9a42f69 100644 --- a/Firestore/src/Admin/V1/BackupSchedule.php +++ b/Firestore/src/Admin/V1/BackupSchedule.php @@ -76,9 +76,9 @@ class BackupSchedule extends \Google\Protobuf\Internal\Message * At what relative time in the future, compared to its creation time, * the backup should be deleted, e.g. keep backups for 7 days. * @type \Google\Cloud\Firestore\Admin\V1\DailyRecurrence $daily_recurrence - * For a schedule that runs daily at a specified time. + * For a schedule that runs daily. * @type \Google\Cloud\Firestore\Admin\V1\WeeklyRecurrence $weekly_recurrence - * For a schedule that runs weekly on a specific day and time. + * For a schedule that runs weekly on a specific day. * } */ public function __construct($data = NULL) { @@ -239,7 +239,7 @@ public function setRetention($var) } /** - * For a schedule that runs daily at a specified time. + * For a schedule that runs daily. * * Generated from protobuf field .google.firestore.admin.v1.DailyRecurrence daily_recurrence = 7; * @return \Google\Cloud\Firestore\Admin\V1\DailyRecurrence|null @@ -255,7 +255,7 @@ public function hasDailyRecurrence() } /** - * For a schedule that runs daily at a specified time. + * For a schedule that runs daily. * * Generated from protobuf field .google.firestore.admin.v1.DailyRecurrence daily_recurrence = 7; * @param \Google\Cloud\Firestore\Admin\V1\DailyRecurrence $var @@ -270,7 +270,7 @@ public function setDailyRecurrence($var) } /** - * For a schedule that runs weekly on a specific day and time. + * For a schedule that runs weekly on a specific day. * * Generated from protobuf field .google.firestore.admin.v1.WeeklyRecurrence weekly_recurrence = 8; * @return \Google\Cloud\Firestore\Admin\V1\WeeklyRecurrence|null @@ -286,7 +286,7 @@ public function hasWeeklyRecurrence() } /** - * For a schedule that runs weekly on a specific day and time. + * For a schedule that runs weekly on a specific day. * * Generated from protobuf field .google.firestore.admin.v1.WeeklyRecurrence weekly_recurrence = 8; * @param \Google\Cloud\Firestore\Admin\V1\WeeklyRecurrence $var diff --git a/Firestore/src/Admin/V1/Client/FirestoreAdminClient.php b/Firestore/src/Admin/V1/Client/FirestoreAdminClient.php index 2492ae0051b5..79a6c44df21d 100644 --- a/Firestore/src/Admin/V1/Client/FirestoreAdminClient.php +++ b/Firestore/src/Admin/V1/Client/FirestoreAdminClient.php @@ -468,8 +468,7 @@ public function __call($method, $args) /** * Creates a backup schedule on a database. * At most two backup schedules can be configured on a database, one daily - * backup schedule with retention up to 7 days and one weekly backup schedule - * with retention up to 14 weeks. + * backup schedule and one weekly backup schedule. * * The async variant is {@see FirestoreAdminClient::createBackupScheduleAsync()} . * diff --git a/Firestore/src/Admin/V1/DailyRecurrence.php b/Firestore/src/Admin/V1/DailyRecurrence.php index b85092807c38..c5e9a366080a 100644 --- a/Firestore/src/Admin/V1/DailyRecurrence.php +++ b/Firestore/src/Admin/V1/DailyRecurrence.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Represent a recurring schedule that runs at a specific time every day. + * Represents a recurring schedule that runs at a specific time every day. * The time zone is UTC. * * Generated from protobuf message google.firestore.admin.v1.DailyRecurrence diff --git a/Firestore/src/Admin/V1/DeleteBackupScheduleRequest.php b/Firestore/src/Admin/V1/DeleteBackupScheduleRequest.php index 28ed0c4c6fa8..088449a9b01c 100644 --- a/Firestore/src/Admin/V1/DeleteBackupScheduleRequest.php +++ b/Firestore/src/Admin/V1/DeleteBackupScheduleRequest.php @@ -16,7 +16,7 @@ class DeleteBackupScheduleRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The name of backup schedule. + * Required. The name of the backup schedule. * Format * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` * @@ -25,7 +25,7 @@ class DeleteBackupScheduleRequest extends \Google\Protobuf\Internal\Message private $name = ''; /** - * @param string $name Required. The name of backup schedule. + * @param string $name Required. The name of the backup schedule. * * Format * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` @@ -48,7 +48,7 @@ public static function build(string $name): self * Optional. Data for populating the Message object. * * @type string $name - * Required. The name of backup schedule. + * Required. The name of the backup schedule. * Format * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` * } @@ -59,7 +59,7 @@ public function __construct($data = NULL) { } /** - * Required. The name of backup schedule. + * Required. The name of the backup schedule. * Format * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` * @@ -72,7 +72,7 @@ public function getName() } /** - * Required. The name of backup schedule. + * Required. The name of the backup schedule. * Format * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` * diff --git a/Firestore/src/Admin/V1/Gapic/FirestoreAdminGapicClient.php b/Firestore/src/Admin/V1/Gapic/FirestoreAdminGapicClient.php index 4544571da821..cd7cc58d7b65 100644 --- a/Firestore/src/Admin/V1/Gapic/FirestoreAdminGapicClient.php +++ b/Firestore/src/Admin/V1/Gapic/FirestoreAdminGapicClient.php @@ -575,8 +575,7 @@ public function __construct(array $options = []) /** * Creates a backup schedule on a database. * At most two backup schedules can be configured on a database, one daily - * backup schedule with retention up to 7 days and one weekly backup schedule - * with retention up to 14 weeks. + * backup schedule and one weekly backup schedule. * * Sample code: * ``` @@ -822,7 +821,7 @@ public function deleteBackup($name, array $optionalArgs = []) * } * ``` * - * @param string $name Required. The name of backup schedule. + * @param string $name Required. The name of the backup schedule. * * Format * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` From fe82c2abaf006508b20d3d0e57b8a383e74059e0 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:31:19 -0700 Subject: [PATCH 09/86] feat: add tag key id support (#7191) docs: add tagKeyIds example for ResourceSearchResult.tags PiperOrigin-RevId: 619997195 Source-Link: https://github.com/googleapis/googleapis/commit/a585563caf022392e6f3a560b413b349ab32d9f1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/086562a14d036601cac3d425118b0b2a28ed2a49 Copy-Tag: eyJwIjoiQXNzZXQvLk93bEJvdC55YW1sIiwiaCI6IjA4NjU2MmExNGQwMzY2MDFjYWMzZDQyNTExOGIwYjJhMjhlZDJhNDkifQ== --- Asset/metadata/V1/Assets.php | Bin 7496 -> 7537 bytes Asset/src/V1/ResourceSearchResult.php | 8 +++++ Asset/src/V1/Tag.php | 44 ++++++++++++++++++++++++++ 3 files changed, 52 insertions(+) diff --git a/Asset/metadata/V1/Assets.php b/Asset/metadata/V1/Assets.php index 89b345e65450a18214b1cac6f41e29ce30db8eda..37483f121749a475e3c094e209a89185e469cdc2 100644 GIT binary patch delta 153 zcmX?M_0eiW1q4g{Sz=CUssuAwoCzc@$;AT~2WepeOECkboVd6+;-Q8)@p5rP Q*sQ6QKxLcv@^x1q);I=1P{A9EO!#%pr;CLLyx3C5h?r*{PKhj0%hzoE{7vjEq8JT$~`$ ivc#OyR0(FVIOF8Cyix*8Kv^d)E{=Gprp?cIyZHf*I~cbB diff --git a/Asset/src/V1/ResourceSearchResult.php b/Asset/src/V1/ResourceSearchResult.php index 2612c4071c39..29ebba27d2fe 100644 --- a/Asset/src/V1/ResourceSearchResult.php +++ b/Asset/src/V1/ResourceSearchResult.php @@ -340,6 +340,7 @@ class ResourceSearchResult extends \Google\Protobuf\Internal\Message * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -361,6 +362,7 @@ class ResourceSearchResult extends \Google\Protobuf\Internal\Message * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -627,6 +629,7 @@ class ResourceSearchResult extends \Google\Protobuf\Internal\Message * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -644,6 +647,7 @@ class ResourceSearchResult extends \Google\Protobuf\Internal\Message * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -1671,6 +1675,7 @@ public function setTagValueIds($var) * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -1694,6 +1699,7 @@ public function getTags() * - `tagKeys:"123456789/env*"` * - `tagKeys="123456789/env"` * - `tagKeys:"env"` + * - `tagKeyIds="tagKeys/123"` * - `tagValues:"env"` * - `tagValues:"env/prod"` * - `tagValues:"123456789/env/prod*"` @@ -1724,6 +1730,7 @@ public function setTags($var) * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` @@ -1748,6 +1755,7 @@ public function getEffectiveTags() * - `effectiveTagKeys:"123456789/env*"` * - `effectiveTagKeys="123456789/env"` * - `effectiveTagKeys:"env"` + * - `effectiveTagKeyIds="tagKeys/123"` * - `effectiveTagValues:"env"` * - `effectiveTagValues:"env/prod"` * - `effectiveTagValues:"123456789/env/prod*"` diff --git a/Asset/src/V1/Tag.php b/Asset/src/V1/Tag.php index 24563e6b1129..0283e2cad396 100644 --- a/Asset/src/V1/Tag.php +++ b/Asset/src/V1/Tag.php @@ -22,6 +22,12 @@ class Tag extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional string tag_key = 1; */ private $tag_key = null; + /** + * TagKey ID, in the format of tagKeys/{TAG_KEY_ID}. + * + * Generated from protobuf field optional string tag_key_id = 2; + */ + private $tag_key_id = null; /** * TagValue namespaced name, in the format of * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}. @@ -44,6 +50,8 @@ class Tag extends \Google\Protobuf\Internal\Message * * @type string $tag_key * TagKey namespaced name, in the format of {ORG_ID}/{TAG_KEY_SHORT_NAME}. + * @type string $tag_key_id + * TagKey ID, in the format of tagKeys/{TAG_KEY_ID}. * @type string $tag_value * TagValue namespaced name, in the format of * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}. @@ -92,6 +100,42 @@ public function setTagKey($var) return $this; } + /** + * TagKey ID, in the format of tagKeys/{TAG_KEY_ID}. + * + * Generated from protobuf field optional string tag_key_id = 2; + * @return string + */ + public function getTagKeyId() + { + return isset($this->tag_key_id) ? $this->tag_key_id : ''; + } + + public function hasTagKeyId() + { + return isset($this->tag_key_id); + } + + public function clearTagKeyId() + { + unset($this->tag_key_id); + } + + /** + * TagKey ID, in the format of tagKeys/{TAG_KEY_ID}. + * + * Generated from protobuf field optional string tag_key_id = 2; + * @param string $var + * @return $this + */ + public function setTagKeyId($var) + { + GPBUtil::checkString($var, True); + $this->tag_key_id = $var; + + return $this; + } + /** * TagValue namespaced name, in the format of * {ORG_ID}/{TAG_KEY_SHORT_NAME}/{TAG_VALUE_SHORT_NAME}. From d5d5b64dfcf2215652b7aa546e57330ef3895a7c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:31:34 -0700 Subject: [PATCH 10/86] feat: Add encoding format to `.google.cloud.security.privateca.v1.CaPool` Resource (#7194) docs: A comment for field `maximum_lifetime` in message `.google.cloud.security.privateca.v1.CaPool` is changed docs: A comment for field `maximum_lifetime` in message `.google.cloud.security.privateca.v1.CertificateTemplate` is changed docs: A comment for field `subject_key_id` in message `.google.cloud.security.privateca.v1.CertificateConfig` is changed docs: A comment for method `FetchCaCerts` in service `CertificateAuthorityService` is changed docs: A comment for field `ignore_dependent_resources` in message `.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest` is changed docs: A comment for field `ignore_dependent_resources` in message `.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest` is changed docs: A comment for field `ignore_dependent_resources` in message `.google.cloud.security.privateca.v1.DeleteCaPoolRequest` is changed docs: A comment for field `ca_certs` in message `.google.cloud.security.privateca.v1.FetchCaCertsResponse` is changed PiperOrigin-RevId: 620969058 Source-Link: https://github.com/googleapis/googleapis/commit/8d326d5a7e7146e41ecce7f921e51c97504f7487 Source-Link: https://github.com/googleapis/googleapis-gen/commit/24634b50df6fde9fd2485a0ec2705a99722707f3 Copy-Tag: eyJwIjoiU2VjdXJpdHlQcml2YXRlQ2EvLk93bEJvdC55YW1sIiwiaCI6IjI0NjM0YjUwZGY2ZmRlOWZkMjQ4NWEwZWMyNzA1YTk5NzIyNzA3ZjMifQ== --- SecurityPrivateCa/metadata/V1/Resources.php | Bin 13701 -> 13878 bytes .../fetch_ca_certs.php | 2 +- .../src/V1/CaPool/IssuancePolicy.php | 24 +++---- .../src/V1/CaPool/PublishingOptions.php | 46 ++++++++++++ .../PublishingOptions/EncodingFormat.php | 66 ++++++++++++++++++ .../src/V1/CertificateConfig.php | 16 ++--- .../src/V1/CertificateTemplate.php | 8 +-- .../CertificateAuthorityServiceClient.php | 2 +- .../src/V1/DeleteCaPoolRequest.php | 8 +-- .../V1/DeleteCertificateAuthorityRequest.php | 16 ++--- .../V1/DisableCertificateAuthorityRequest.php | 8 +-- .../src/V1/FetchCaCertsResponse.php | 8 +-- ...CertificateAuthorityServiceGapicClient.php | 10 +-- 13 files changed, 163 insertions(+), 51 deletions(-) create mode 100644 SecurityPrivateCa/src/V1/CaPool/PublishingOptions/EncodingFormat.php diff --git a/SecurityPrivateCa/metadata/V1/Resources.php b/SecurityPrivateCa/metadata/V1/Resources.php index f9fb319f9ce59eca170d641954066812926a9cfd..0c029414de8e50085b8a2e0e41ee57c3756a28ec 100644 GIT binary patch delta 136 zcmZq8-j=h0hneY4>SjLXqZ~{N1vX#h&R}Hv%{bYP*IQaBlZ!t!FF8LYGcP?pEx#x? zu|$Gdfl-6c$a^v)ulD4dJc34gu22PTV0kCz2ab$N&Rl$`!b0*~(yo5a{w|(=?vr1s V$Z-m>b1}QP1_>~2?&STW4gjOaDdqqG delta 34 qcmdm%)0(}3hnZ=0%4R<1qZ~{h_%>hV&R}Hpo@~$Sz1fQIk2(O`0t^HI diff --git a/SecurityPrivateCa/samples/V1/CertificateAuthorityServiceClient/fetch_ca_certs.php b/SecurityPrivateCa/samples/V1/CertificateAuthorityServiceClient/fetch_ca_certs.php index 7115e909c4f2..7af5353fdd79 100644 --- a/SecurityPrivateCa/samples/V1/CertificateAuthorityServiceClient/fetch_ca_certs.php +++ b/SecurityPrivateCa/samples/V1/CertificateAuthorityServiceClient/fetch_ca_certs.php @@ -31,7 +31,7 @@ /** * FetchCaCerts returns the current trust anchor for the * [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA - * certificate chains for all Certificate Authorities in the ENABLED, + * certificate chains for all certificate authorities in the ENABLED, * DISABLED, or STAGED states. * * @param string $formattedCaPool The resource name for the diff --git a/SecurityPrivateCa/src/V1/CaPool/IssuancePolicy.php b/SecurityPrivateCa/src/V1/CaPool/IssuancePolicy.php index c465fee89533..cbcd012ec8e0 100644 --- a/SecurityPrivateCa/src/V1/CaPool/IssuancePolicy.php +++ b/SecurityPrivateCa/src/V1/CaPool/IssuancePolicy.php @@ -31,9 +31,9 @@ class IssuancePolicy extends \Google\Protobuf\Internal\Message * if the issuing * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] * expires before a - * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested - * maximum_lifetime, the effective lifetime will be explicitly truncated to - * match it. + * [Certificate][google.cloud.security.privateca.v1.Certificate] resource's + * requested maximum_lifetime, the effective lifetime will be explicitly + * truncated to match it. * * Generated from protobuf field .google.protobuf.Duration maximum_lifetime = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -110,9 +110,9 @@ class IssuancePolicy extends \Google\Protobuf\Internal\Message * if the issuing * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] * expires before a - * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested - * maximum_lifetime, the effective lifetime will be explicitly truncated to - * match it. + * [Certificate][google.cloud.security.privateca.v1.Certificate] resource's + * requested maximum_lifetime, the effective lifetime will be explicitly + * truncated to match it. * @type \Google\Cloud\Security\PrivateCA\V1\CaPool\IssuancePolicy\IssuanceModes $allowed_issuance_modes * Optional. If specified, then only methods allowed in the * [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes] @@ -196,9 +196,9 @@ public function setAllowedKeyTypes($var) * if the issuing * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] * expires before a - * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested - * maximum_lifetime, the effective lifetime will be explicitly truncated to - * match it. + * [Certificate][google.cloud.security.privateca.v1.Certificate] resource's + * requested maximum_lifetime, the effective lifetime will be explicitly + * truncated to match it. * * Generated from protobuf field .google.protobuf.Duration maximum_lifetime = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Duration|null @@ -224,9 +224,9 @@ public function clearMaximumLifetime() * if the issuing * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] * expires before a - * [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested - * maximum_lifetime, the effective lifetime will be explicitly truncated to - * match it. + * [Certificate][google.cloud.security.privateca.v1.Certificate] resource's + * requested maximum_lifetime, the effective lifetime will be explicitly + * truncated to match it. * * Generated from protobuf field .google.protobuf.Duration maximum_lifetime = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Protobuf\Duration $var diff --git a/SecurityPrivateCa/src/V1/CaPool/PublishingOptions.php b/SecurityPrivateCa/src/V1/CaPool/PublishingOptions.php index cca2e1adf183..cda886beb680 100644 --- a/SecurityPrivateCa/src/V1/CaPool/PublishingOptions.php +++ b/SecurityPrivateCa/src/V1/CaPool/PublishingOptions.php @@ -47,6 +47,15 @@ class PublishingOptions extends \Google\Protobuf\Internal\Message * Generated from protobuf field bool publish_crl = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $publish_crl = false; + /** + * Optional. Specifies the encoding format of each + * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + * resource's CA certificate and CRLs. If this is omitted, CA certificates + * and CRLs will be published in PEM. + * + * Generated from protobuf field .google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat encoding_format = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $encoding_format = 0; /** * Constructor. @@ -72,6 +81,11 @@ class PublishingOptions extends \Google\Protobuf\Internal\Message * extension will not be written in issued certificates. CRLs will expire 7 * days from their creation. However, we will rebuild daily. CRLs are also * rebuilt shortly after a certificate is revoked. + * @type int $encoding_format + * Optional. Specifies the encoding format of each + * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + * resource's CA certificate and CRLs. If this is omitted, CA certificates + * and CRLs will be published in PEM. * } */ public function __construct($data = NULL) { @@ -159,6 +173,38 @@ public function setPublishCrl($var) return $this; } + /** + * Optional. Specifies the encoding format of each + * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + * resource's CA certificate and CRLs. If this is omitted, CA certificates + * and CRLs will be published in PEM. + * + * Generated from protobuf field .google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat encoding_format = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getEncodingFormat() + { + return $this->encoding_format; + } + + /** + * Optional. Specifies the encoding format of each + * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + * resource's CA certificate and CRLs. If this is omitted, CA certificates + * and CRLs will be published in PEM. + * + * Generated from protobuf field .google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat encoding_format = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setEncodingFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Security\PrivateCA\V1\CaPool\PublishingOptions\EncodingFormat::class); + $this->encoding_format = $var; + + return $this; + } + } diff --git a/SecurityPrivateCa/src/V1/CaPool/PublishingOptions/EncodingFormat.php b/SecurityPrivateCa/src/V1/CaPool/PublishingOptions/EncodingFormat.php new file mode 100644 index 000000000000..9f9bf64012e5 --- /dev/null +++ b/SecurityPrivateCa/src/V1/CaPool/PublishingOptions/EncodingFormat.php @@ -0,0 +1,66 @@ +google.cloud.security.privateca.v1.CaPool.PublishingOptions.EncodingFormat + */ +class EncodingFormat +{ + /** + * Not specified. By default, PEM format will be used. + * + * Generated from protobuf enum ENCODING_FORMAT_UNSPECIFIED = 0; + */ + const ENCODING_FORMAT_UNSPECIFIED = 0; + /** + * The + * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s + * CA certificate and CRLs will be published in PEM format. + * + * Generated from protobuf enum PEM = 1; + */ + const PEM = 1; + /** + * The + * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s + * CA certificate and CRLs will be published in DER format. + * + * Generated from protobuf enum DER = 2; + */ + const DER = 2; + + private static $valueToName = [ + self::ENCODING_FORMAT_UNSPECIFIED => 'ENCODING_FORMAT_UNSPECIFIED', + self::PEM => 'PEM', + self::DER => 'DER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/SecurityPrivateCa/src/V1/CertificateConfig.php b/SecurityPrivateCa/src/V1/CertificateConfig.php index 167afe63fb99..d78b705cd8ec 100644 --- a/SecurityPrivateCa/src/V1/CertificateConfig.php +++ b/SecurityPrivateCa/src/V1/CertificateConfig.php @@ -47,8 +47,8 @@ class CertificateConfig extends \Google\Protobuf\Internal\Message /** * Optional. When specified this provides a custom SKI to be used in the * certificate. This should only be used to maintain a SKI of an existing CA - * originally created outside CAS, which was not generated using method (1) - * described in RFC 5280 section 4.2.1.2. + * originally created outside CA service, which was not generated using method + * (1) described in RFC 5280 section 4.2.1.2. * * Generated from protobuf field .google.cloud.security.privateca.v1.CertificateConfig.KeyId subject_key_id = 4 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -78,8 +78,8 @@ class CertificateConfig extends \Google\Protobuf\Internal\Message * @type \Google\Cloud\Security\PrivateCA\V1\CertificateConfig\KeyId $subject_key_id * Optional. When specified this provides a custom SKI to be used in the * certificate. This should only be used to maintain a SKI of an existing CA - * originally created outside CAS, which was not generated using method (1) - * described in RFC 5280 section 4.2.1.2. + * originally created outside CA service, which was not generated using method + * (1) described in RFC 5280 section 4.2.1.2. * } */ public function __construct($data = NULL) { @@ -216,8 +216,8 @@ public function setPublicKey($var) /** * Optional. When specified this provides a custom SKI to be used in the * certificate. This should only be used to maintain a SKI of an existing CA - * originally created outside CAS, which was not generated using method (1) - * described in RFC 5280 section 4.2.1.2. + * originally created outside CA service, which was not generated using method + * (1) described in RFC 5280 section 4.2.1.2. * * Generated from protobuf field .google.cloud.security.privateca.v1.CertificateConfig.KeyId subject_key_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\Security\PrivateCA\V1\CertificateConfig\KeyId|null @@ -240,8 +240,8 @@ public function clearSubjectKeyId() /** * Optional. When specified this provides a custom SKI to be used in the * certificate. This should only be used to maintain a SKI of an existing CA - * originally created outside CAS, which was not generated using method (1) - * described in RFC 5280 section 4.2.1.2. + * originally created outside CA service, which was not generated using method + * (1) described in RFC 5280 section 4.2.1.2. * * Generated from protobuf field .google.cloud.security.privateca.v1.CertificateConfig.KeyId subject_key_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\Security\PrivateCA\V1\CertificateConfig\KeyId $var diff --git a/SecurityPrivateCa/src/V1/CertificateTemplate.php b/SecurityPrivateCa/src/V1/CertificateTemplate.php index a7e36a15f23b..011b3d338d29 100644 --- a/SecurityPrivateCa/src/V1/CertificateTemplate.php +++ b/SecurityPrivateCa/src/V1/CertificateTemplate.php @@ -29,7 +29,7 @@ class CertificateTemplate extends \Google\Protobuf\Internal\Message * Optional. The maximum lifetime allowed for issued * [Certificates][google.cloud.security.privateca.v1.Certificate] that use * this template. If the issuing - * [CaPool][google.cloud.security.privateca.v1.CaPool]'s + * [CaPool][google.cloud.security.privateca.v1.CaPool] resource's * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy] * specifies a * [maximum_lifetime][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.maximum_lifetime] @@ -134,7 +134,7 @@ class CertificateTemplate extends \Google\Protobuf\Internal\Message * Optional. The maximum lifetime allowed for issued * [Certificates][google.cloud.security.privateca.v1.Certificate] that use * this template. If the issuing - * [CaPool][google.cloud.security.privateca.v1.CaPool]'s + * [CaPool][google.cloud.security.privateca.v1.CaPool] resource's * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy] * specifies a * [maximum_lifetime][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.maximum_lifetime] @@ -233,7 +233,7 @@ public function setName($var) * Optional. The maximum lifetime allowed for issued * [Certificates][google.cloud.security.privateca.v1.Certificate] that use * this template. If the issuing - * [CaPool][google.cloud.security.privateca.v1.CaPool]'s + * [CaPool][google.cloud.security.privateca.v1.CaPool] resource's * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy] * specifies a * [maximum_lifetime][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.maximum_lifetime] @@ -268,7 +268,7 @@ public function clearMaximumLifetime() * Optional. The maximum lifetime allowed for issued * [Certificates][google.cloud.security.privateca.v1.Certificate] that use * this template. If the issuing - * [CaPool][google.cloud.security.privateca.v1.CaPool]'s + * [CaPool][google.cloud.security.privateca.v1.CaPool] resource's * [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy] * specifies a * [maximum_lifetime][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.maximum_lifetime] diff --git a/SecurityPrivateCa/src/V1/Client/CertificateAuthorityServiceClient.php b/SecurityPrivateCa/src/V1/Client/CertificateAuthorityServiceClient.php index 3763985c70a6..12ee2ed90943 100644 --- a/SecurityPrivateCa/src/V1/Client/CertificateAuthorityServiceClient.php +++ b/SecurityPrivateCa/src/V1/Client/CertificateAuthorityServiceClient.php @@ -722,7 +722,7 @@ public function enableCertificateAuthority(EnableCertificateAuthorityRequest $re /** * FetchCaCerts returns the current trust anchor for the * [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA - * certificate chains for all Certificate Authorities in the ENABLED, + * certificate chains for all certificate authorities in the ENABLED, * DISABLED, or STAGED states. * * The async variant is diff --git a/SecurityPrivateCa/src/V1/DeleteCaPoolRequest.php b/SecurityPrivateCa/src/V1/DeleteCaPoolRequest.php index e7863118d507..3ec222a3eb34 100644 --- a/SecurityPrivateCa/src/V1/DeleteCaPoolRequest.php +++ b/SecurityPrivateCa/src/V1/DeleteCaPoolRequest.php @@ -43,7 +43,7 @@ class DeleteCaPoolRequest extends \Google\Protobuf\Internal\Message /** * Optional. This field allows this pool to be deleted even if it's being * depended on by another resource. However, doing so may result in unintended - * and unrecoverable effects on any dependent resource(s) since the pool will + * and unrecoverable effects on any dependent resources since the pool will * no longer be able to issue certificates. * * Generated from protobuf field bool ignore_dependent_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -91,7 +91,7 @@ public static function build(string $name): self * @type bool $ignore_dependent_resources * Optional. This field allows this pool to be deleted even if it's being * depended on by another resource. However, doing so may result in unintended - * and unrecoverable effects on any dependent resource(s) since the pool will + * and unrecoverable effects on any dependent resources since the pool will * no longer be able to issue certificates. * } */ @@ -179,7 +179,7 @@ public function setRequestId($var) /** * Optional. This field allows this pool to be deleted even if it's being * depended on by another resource. However, doing so may result in unintended - * and unrecoverable effects on any dependent resource(s) since the pool will + * and unrecoverable effects on any dependent resources since the pool will * no longer be able to issue certificates. * * Generated from protobuf field bool ignore_dependent_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; @@ -193,7 +193,7 @@ public function getIgnoreDependentResources() /** * Optional. This field allows this pool to be deleted even if it's being * depended on by another resource. However, doing so may result in unintended - * and unrecoverable effects on any dependent resource(s) since the pool will + * and unrecoverable effects on any dependent resources since the pool will * no longer be able to issue certificates. * * Generated from protobuf field bool ignore_dependent_resources = 4 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/SecurityPrivateCa/src/V1/DeleteCertificateAuthorityRequest.php b/SecurityPrivateCa/src/V1/DeleteCertificateAuthorityRequest.php index ddedcbb19599..4ea2eca8345b 100644 --- a/SecurityPrivateCa/src/V1/DeleteCertificateAuthorityRequest.php +++ b/SecurityPrivateCa/src/V1/DeleteCertificateAuthorityRequest.php @@ -56,9 +56,9 @@ class DeleteCertificateAuthorityRequest extends \Google\Protobuf\Internal\Messag */ private $skip_grace_period = false; /** - * Optional. This field allows this ca to be deleted even if it's being + * Optional. This field allows this CA to be deleted even if it's being * depended on by another resource. However, doing so may result in unintended - * and unrecoverable effects on any dependent resource(s) since the CA will + * and unrecoverable effects on any dependent resources since the CA will * no longer be able to issue certificates. * * Generated from protobuf field bool ignore_dependent_resources = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -111,9 +111,9 @@ public static function build(string $name): self * soon as possible without a 30-day grace period where undeletion would have * been allowed. If you proceed, there will be no way to recover this CA. * @type bool $ignore_dependent_resources - * Optional. This field allows this ca to be deleted even if it's being + * Optional. This field allows this CA to be deleted even if it's being * depended on by another resource. However, doing so may result in unintended - * and unrecoverable effects on any dependent resource(s) since the CA will + * and unrecoverable effects on any dependent resources since the CA will * no longer be able to issue certificates. * } */ @@ -257,9 +257,9 @@ public function setSkipGracePeriod($var) } /** - * Optional. This field allows this ca to be deleted even if it's being + * Optional. This field allows this CA to be deleted even if it's being * depended on by another resource. However, doing so may result in unintended - * and unrecoverable effects on any dependent resource(s) since the CA will + * and unrecoverable effects on any dependent resources since the CA will * no longer be able to issue certificates. * * Generated from protobuf field bool ignore_dependent_resources = 6 [(.google.api.field_behavior) = OPTIONAL]; @@ -271,9 +271,9 @@ public function getIgnoreDependentResources() } /** - * Optional. This field allows this ca to be deleted even if it's being + * Optional. This field allows this CA to be deleted even if it's being * depended on by another resource. However, doing so may result in unintended - * and unrecoverable effects on any dependent resource(s) since the CA will + * and unrecoverable effects on any dependent resources since the CA will * no longer be able to issue certificates. * * Generated from protobuf field bool ignore_dependent_resources = 6 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/SecurityPrivateCa/src/V1/DisableCertificateAuthorityRequest.php b/SecurityPrivateCa/src/V1/DisableCertificateAuthorityRequest.php index caeaf67f4297..30a7981cff7f 100644 --- a/SecurityPrivateCa/src/V1/DisableCertificateAuthorityRequest.php +++ b/SecurityPrivateCa/src/V1/DisableCertificateAuthorityRequest.php @@ -43,7 +43,7 @@ class DisableCertificateAuthorityRequest extends \Google\Protobuf\Internal\Messa /** * Optional. This field allows this CA to be disabled even if it's being * depended on by another resource. However, doing so may result in unintended - * and unrecoverable effects on any dependent resource(s) since the CA will + * and unrecoverable effects on any dependent resources since the CA will * no longer be able to issue certificates. * * Generated from protobuf field bool ignore_dependent_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -91,7 +91,7 @@ public static function build(string $name): self * @type bool $ignore_dependent_resources * Optional. This field allows this CA to be disabled even if it's being * depended on by another resource. However, doing so may result in unintended - * and unrecoverable effects on any dependent resource(s) since the CA will + * and unrecoverable effects on any dependent resources since the CA will * no longer be able to issue certificates. * } */ @@ -179,7 +179,7 @@ public function setRequestId($var) /** * Optional. This field allows this CA to be disabled even if it's being * depended on by another resource. However, doing so may result in unintended - * and unrecoverable effects on any dependent resource(s) since the CA will + * and unrecoverable effects on any dependent resources since the CA will * no longer be able to issue certificates. * * Generated from protobuf field bool ignore_dependent_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -193,7 +193,7 @@ public function getIgnoreDependentResources() /** * Optional. This field allows this CA to be disabled even if it's being * depended on by another resource. However, doing so may result in unintended - * and unrecoverable effects on any dependent resource(s) since the CA will + * and unrecoverable effects on any dependent resources since the CA will * no longer be able to issue certificates. * * Generated from protobuf field bool ignore_dependent_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/SecurityPrivateCa/src/V1/FetchCaCertsResponse.php b/SecurityPrivateCa/src/V1/FetchCaCertsResponse.php index 029c99c48e1a..75f654a40638 100644 --- a/SecurityPrivateCa/src/V1/FetchCaCertsResponse.php +++ b/SecurityPrivateCa/src/V1/FetchCaCertsResponse.php @@ -17,7 +17,7 @@ class FetchCaCertsResponse extends \Google\Protobuf\Internal\Message { /** - * The PEM encoded CA certificate chains of all Certificate Authorities in + * The PEM encoded CA certificate chains of all certificate authorities in * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED, * DISABLED, or STAGED states. * @@ -32,7 +32,7 @@ class FetchCaCertsResponse extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type array<\Google\Cloud\Security\PrivateCA\V1\FetchCaCertsResponse\CertChain>|\Google\Protobuf\Internal\RepeatedField $ca_certs - * The PEM encoded CA certificate chains of all Certificate Authorities in + * The PEM encoded CA certificate chains of all certificate authorities in * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED, * DISABLED, or STAGED states. * } @@ -43,7 +43,7 @@ public function __construct($data = NULL) { } /** - * The PEM encoded CA certificate chains of all Certificate Authorities in + * The PEM encoded CA certificate chains of all certificate authorities in * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED, * DISABLED, or STAGED states. * @@ -56,7 +56,7 @@ public function getCaCerts() } /** - * The PEM encoded CA certificate chains of all Certificate Authorities in + * The PEM encoded CA certificate chains of all certificate authorities in * this [CaPool][google.cloud.security.privateca.v1.CaPool] in the ENABLED, * DISABLED, or STAGED states. * diff --git a/SecurityPrivateCa/src/V1/Gapic/CertificateAuthorityServiceGapicClient.php b/SecurityPrivateCa/src/V1/Gapic/CertificateAuthorityServiceGapicClient.php index a9df9416bb3a..345b9e8bf9f3 100644 --- a/SecurityPrivateCa/src/V1/Gapic/CertificateAuthorityServiceGapicClient.php +++ b/SecurityPrivateCa/src/V1/Gapic/CertificateAuthorityServiceGapicClient.php @@ -1090,7 +1090,7 @@ public function createCertificateTemplate($parent, $certificateTemplateId, $cert * @type bool $ignoreDependentResources * Optional. This field allows this pool to be deleted even if it's being * depended on by another resource. However, doing so may result in unintended - * and unrecoverable effects on any dependent resource(s) since the pool will + * and unrecoverable effects on any dependent resources since the pool will * no longer be able to issue certificates. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an @@ -1189,9 +1189,9 @@ public function deleteCaPool($name, array $optionalArgs = []) * soon as possible without a 30-day grace period where undeletion would have * been allowed. If you proceed, there will be no way to recover this CA. * @type bool $ignoreDependentResources - * Optional. This field allows this ca to be deleted even if it's being + * Optional. This field allows this CA to be deleted even if it's being * depended on by another resource. However, doing so may result in unintended - * and unrecoverable effects on any dependent resource(s) since the CA will + * and unrecoverable effects on any dependent resources since the CA will * no longer be able to issue certificates. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an @@ -1376,7 +1376,7 @@ public function deleteCertificateTemplate($name, array $optionalArgs = []) * @type bool $ignoreDependentResources * Optional. This field allows this CA to be disabled even if it's being * depended on by another resource. However, doing so may result in unintended - * and unrecoverable effects on any dependent resource(s) since the CA will + * and unrecoverable effects on any dependent resources since the CA will * no longer be able to issue certificates. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an @@ -1495,7 +1495,7 @@ public function enableCertificateAuthority($name, array $optionalArgs = []) /** * FetchCaCerts returns the current trust anchor for the * [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA - * certificate chains for all Certificate Authorities in the ENABLED, + * certificate chains for all certificate authorities in the ENABLED, * DISABLED, or STAGED states. * * Sample code: From d4bc7abd1cdcfdcedff725bb6af41868382537cf Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:31:48 -0700 Subject: [PATCH 11/86] feat(spanner): adding `EXPECTED_FULFILLMENT_PERIOD` to the indicate instance creation times (with `FULFILLMENT_PERIOD_NORMAL` or `FULFILLMENT_PERIOD_EXTENDED` ENUM) with the extended instance creation time triggered by On-Demand Capacity Feature (#7200) PiperOrigin-RevId: 621488048 Source-Link: https://github.com/googleapis/googleapis/commit/0aa0992a5430c211a73c9b861d65e1e8a7a91a9e Source-Link: https://github.com/googleapis/googleapis-gen/commit/b8ad4c73a5c05fed8bcfddb931326996c3441791 Copy-Tag: eyJwIjoiU3Bhbm5lci8uT3dsQm90LnlhbWwiLCJoIjoiYjhhZDRjNzNhNWMwNWZlZDhiY2ZkZGI5MzEzMjY5OTZjMzQ0MTc5MSJ9 --- Spanner/metadata/Admin/Instance/V1/Common.php | Bin 1110 -> 1231 bytes .../Instance/V1/SpannerInstanceAdmin.php | Bin 14576 -> 14756 bytes .../Instance/V1/CreateInstanceMetadata.php | 34 ++++++++++ .../Admin/Instance/V1/FulfillmentPeriod.php | 63 ++++++++++++++++++ .../Instance/V1/UpdateInstanceMetadata.php | 34 ++++++++++ 5 files changed, 131 insertions(+) create mode 100644 Spanner/src/Admin/Instance/V1/FulfillmentPeriod.php diff --git a/Spanner/metadata/Admin/Instance/V1/Common.php b/Spanner/metadata/Admin/Instance/V1/Common.php index 6c3d9512622eb73f986d485f8b2eff8ad57724d5..4e83339471a1d21a0b2b153ece57ff0d84ca93c0 100644 GIT binary patch delta 152 zcmcb{ah`L7G84-K7B1b1-nx@Rm^RdFm2(NYmFA>n=H%q2=9L7b7G>tA2q|&NxrO?; zdHVSHy84C02e<}#`n$x3`UMBLI(xc#y1EE32+49uVo~GgALQ%kBfuym&n1mT+BG7? V)z1Z}pULSjBbQ3@W-ewQMgXJkD--|# delta 24 gcmX@ld5vR(G84;lW-i@{-nx@Rm^N&#We#El0B3Ip*#H0l diff --git a/Spanner/metadata/Admin/Instance/V1/SpannerInstanceAdmin.php b/Spanner/metadata/Admin/Instance/V1/SpannerInstanceAdmin.php index 1ca2ce379fb7b5b643dd21f8cbd75629c5429e23..e063ce16eedddfceebbb98fa2636ff3607d9d036 100644 GIT binary patch delta 185 zcmexRxTJW)L>88QY#g)F1Y;5h.google.protobuf.Timestamp end_time = 4; */ private $end_time = null; + /** + * The expected fulfillment period of this create operation. + * + * Generated from protobuf field .google.spanner.admin.instance.v1.FulfillmentPeriod expected_fulfillment_period = 5; + */ + private $expected_fulfillment_period = 0; /** * Constructor. @@ -63,6 +69,8 @@ class CreateInstanceMetadata extends \Google\Protobuf\Internal\Message * cannot be cancelled again. * @type \Google\Protobuf\Timestamp $end_time * The time at which this operation failed or was completed successfully. + * @type int $expected_fulfillment_period + * The expected fulfillment period of this create operation. * } */ public function __construct($data = NULL) { @@ -222,5 +230,31 @@ public function setEndTime($var) return $this; } + /** + * The expected fulfillment period of this create operation. + * + * Generated from protobuf field .google.spanner.admin.instance.v1.FulfillmentPeriod expected_fulfillment_period = 5; + * @return int + */ + public function getExpectedFulfillmentPeriod() + { + return $this->expected_fulfillment_period; + } + + /** + * The expected fulfillment period of this create operation. + * + * Generated from protobuf field .google.spanner.admin.instance.v1.FulfillmentPeriod expected_fulfillment_period = 5; + * @param int $var + * @return $this + */ + public function setExpectedFulfillmentPeriod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Spanner\Admin\Instance\V1\FulfillmentPeriod::class); + $this->expected_fulfillment_period = $var; + + return $this; + } + } diff --git a/Spanner/src/Admin/Instance/V1/FulfillmentPeriod.php b/Spanner/src/Admin/Instance/V1/FulfillmentPeriod.php new file mode 100644 index 000000000000..3fa91d6d998b --- /dev/null +++ b/Spanner/src/Admin/Instance/V1/FulfillmentPeriod.php @@ -0,0 +1,63 @@ +google.spanner.admin.instance.v1.FulfillmentPeriod + */ +class FulfillmentPeriod +{ + /** + * Not specified. + * + * Generated from protobuf enum FULFILLMENT_PERIOD_UNSPECIFIED = 0; + */ + const FULFILLMENT_PERIOD_UNSPECIFIED = 0; + /** + * Normal fulfillment period. The operation is expected to complete within + * minutes. + * + * Generated from protobuf enum FULFILLMENT_PERIOD_NORMAL = 1; + */ + const FULFILLMENT_PERIOD_NORMAL = 1; + /** + * Extended fulfillment period. It can take up to an hour for the operation + * to complete. + * + * Generated from protobuf enum FULFILLMENT_PERIOD_EXTENDED = 2; + */ + const FULFILLMENT_PERIOD_EXTENDED = 2; + + private static $valueToName = [ + self::FULFILLMENT_PERIOD_UNSPECIFIED => 'FULFILLMENT_PERIOD_UNSPECIFIED', + self::FULFILLMENT_PERIOD_NORMAL => 'FULFILLMENT_PERIOD_NORMAL', + self::FULFILLMENT_PERIOD_EXTENDED => 'FULFILLMENT_PERIOD_EXTENDED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Spanner/src/Admin/Instance/V1/UpdateInstanceMetadata.php b/Spanner/src/Admin/Instance/V1/UpdateInstanceMetadata.php index 0091bc689b83..a679660b4d0f 100644 --- a/Spanner/src/Admin/Instance/V1/UpdateInstanceMetadata.php +++ b/Spanner/src/Admin/Instance/V1/UpdateInstanceMetadata.php @@ -44,6 +44,12 @@ class UpdateInstanceMetadata extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; */ private $end_time = null; + /** + * The expected fulfillment period of this update operation. + * + * Generated from protobuf field .google.spanner.admin.instance.v1.FulfillmentPeriod expected_fulfillment_period = 5; + */ + private $expected_fulfillment_period = 0; /** * Constructor. @@ -63,6 +69,8 @@ class UpdateInstanceMetadata extends \Google\Protobuf\Internal\Message * cannot be cancelled again. * @type \Google\Protobuf\Timestamp $end_time * The time at which this operation failed or was completed successfully. + * @type int $expected_fulfillment_period + * The expected fulfillment period of this update operation. * } */ public function __construct($data = NULL) { @@ -222,5 +230,31 @@ public function setEndTime($var) return $this; } + /** + * The expected fulfillment period of this update operation. + * + * Generated from protobuf field .google.spanner.admin.instance.v1.FulfillmentPeriod expected_fulfillment_period = 5; + * @return int + */ + public function getExpectedFulfillmentPeriod() + { + return $this->expected_fulfillment_period; + } + + /** + * The expected fulfillment period of this update operation. + * + * Generated from protobuf field .google.spanner.admin.instance.v1.FulfillmentPeriod expected_fulfillment_period = 5; + * @param int $var + * @return $this + */ + public function setExpectedFulfillmentPeriod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Spanner\Admin\Instance\V1\FulfillmentPeriod::class); + $this->expected_fulfillment_period = $var; + + return $this; + } + } From 21a61d8aca2c82ee42e1d8d73a455aa7201422be Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:32:13 -0700 Subject: [PATCH 12/86] docs: state one Resource Allowance per region per project limitation on v1alpha (#7202) docs: A comment for field `max_run_duration` in message `.google.cloud.batch.v1alpha.TaskSpec` and `.google.cloud.batch.v1.TaskSpec` is changed docs: add non-negative restriction comment for usage_resource_allowance.spec.limit.limit exposed on v1alpha PiperOrigin-RevId: 621609903 Source-Link: https://github.com/googleapis/googleapis/commit/e48fc793090755f640c3d899dff900ad6ba94cb9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/767ac3a4d6af59f044b4428d7ba51a88a5817c59 Copy-Tag: eyJwIjoiQmF0Y2gvLk93bEJvdC55YW1sIiwiaCI6Ijc2N2FjM2E0ZDZhZjU5ZjA0NGI0NDI4ZDdiYTUxYTg4YTU4MTdjNTkifQ== --- Batch/src/V1/TaskSpec.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Batch/src/V1/TaskSpec.php b/Batch/src/V1/TaskSpec.php index ddcd57645654..0b87d0fed3cf 100644 --- a/Batch/src/V1/TaskSpec.php +++ b/Batch/src/V1/TaskSpec.php @@ -38,6 +38,8 @@ class TaskSpec extends \Google\Protobuf\Internal\Message /** * Maximum duration the task should run. * The task will be killed and marked as FAILED if over this limit. + * The valid value range for max_run_duration in seconds is [0, + * 315576000000.999999999], * * Generated from protobuf field .google.protobuf.Duration max_run_duration = 4; */ @@ -104,6 +106,8 @@ class TaskSpec extends \Google\Protobuf\Internal\Message * @type \Google\Protobuf\Duration $max_run_duration * Maximum duration the task should run. * The task will be killed and marked as FAILED if over this limit. + * The valid value range for max_run_duration in seconds is [0, + * 315576000000.999999999], * @type int $max_retry_count * Maximum number of retries on failures. * The default, 0, which means never retry. @@ -211,6 +215,8 @@ public function setComputeResource($var) /** * Maximum duration the task should run. * The task will be killed and marked as FAILED if over this limit. + * The valid value range for max_run_duration in seconds is [0, + * 315576000000.999999999], * * Generated from protobuf field .google.protobuf.Duration max_run_duration = 4; * @return \Google\Protobuf\Duration|null @@ -233,6 +239,8 @@ public function clearMaxRunDuration() /** * Maximum duration the task should run. * The task will be killed and marked as FAILED if over this limit. + * The valid value range for max_run_duration in seconds is [0, + * 315576000000.999999999], * * Generated from protobuf field .google.protobuf.Duration max_run_duration = 4; * @param \Google\Protobuf\Duration $var From 04af6b49e31ddd2bdc2c2fae6aea2ce4227693f6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:32:31 -0700 Subject: [PATCH 13/86] feat: add GetSettings and UpdateSettings methods at the Project-level to advisorynotifications.googleapis.com (#7203) docs: adding docs for new project level settings methods PiperOrigin-RevId: 621647197 Source-Link: https://github.com/googleapis/googleapis/commit/39692d046b0f57acc76533a4154280e573a9d6f1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/5d0ab2fe8b379dfae651b350f38915f2d44af42a Copy-Tag: eyJwIjoiQWR2aXNvcnlOb3RpZmljYXRpb25zLy5Pd2xCb3QueWFtbCIsImgiOiI1ZDBhYjJmZThiMzc5ZGZhZTY1MWIzNTBmMzg5MTVmMmQ0NGFmNDJhIn0= --- AdvisoryNotifications/metadata/V1/Service.php | Bin 5452 -> 5637 bytes .../get_settings.php | 3 +- .../list_notifications.php | 4 +- .../AdvisoryNotificationsServiceClient.php | 36 +++++++++ ...dvisoryNotificationsServiceGapicClient.php | 71 +++++++++++++++++- .../src/V1/GetSettingsRequest.php | 15 ++-- .../src/V1/ListNotificationsRequest.php | 12 +-- AdvisoryNotifications/src/V1/Settings.php | 26 ++++--- ...otifications_service_descriptor_config.php | 2 + ...tifications_service_rest_client_config.php | 13 ++++ 10 files changed, 155 insertions(+), 27 deletions(-) diff --git a/AdvisoryNotifications/metadata/V1/Service.php b/AdvisoryNotifications/metadata/V1/Service.php index 1821b6c4f77df02c01af53b1a6b7311c4255c002..325c9235b57c04a062eadbd43b4b2966b161fa88 100644 GIT binary patch delta 227 zcmX@3)vB|Bmzim`>SliCTkMP%C%@v7W#pL5!TpzGE8{E2jf`BnlNC8tCmZm%FbNq< zp2?~)IfsXXM~kC4wWK67FTL1^V{;DA9wwHVoLn-K8AU`lJMt?tF+QK1Dp<{zbIXw> zFEKZ@>GG4wO!1T72^tzk=?H1*ml^6;gT!qMit@8klS_*Awe)lHlM_oa^YcJ#nAx>L sGnpnU2{njJXT0SIw-IbwE92xXLN0Pq_D05F<6v6!kj>qERj8Z^0Iz9HUjP6A delta 128 zcmZqGIit0Kmzn94@@9VKTkMRTlV5SkGBQu*;Qq^&_sTJwOLwv&r|M)Q9+%B~c(yRH ztl;31nanRLy1A2InTc`dd6}e2-5q8render([ + 'organization' => $organization, + 'location' => $location, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * project_location resource. @@ -213,6 +230,23 @@ public static function projectLocationNotificationName(string $project, string $ ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_settings resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted project_location_settings resource. + */ + public static function projectLocationSettingsName(string $project, string $location): string + { + return self::getPathTemplate('projectLocationSettings')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a settings * resource. @@ -238,8 +272,10 @@ public static function settingsName(string $organization, string $location): str * - notification: organizations/{organization}/locations/{location}/notifications/{notification} * - organizationLocation: organizations/{organization}/locations/{location} * - organizationLocationNotification: organizations/{organization}/locations/{location}/notifications/{notification} + * - organizationLocationSettings: organizations/{organization}/locations/{location}/settings * - projectLocation: projects/{project}/locations/{location} * - projectLocationNotification: projects/{project}/locations/{location}/notifications/{notification} + * - projectLocationSettings: projects/{project}/locations/{location}/settings * - settings: organizations/{organization}/locations/{location}/settings * * The optional $template argument can be supplied to specify a particular pattern, diff --git a/AdvisoryNotifications/src/V1/Gapic/AdvisoryNotificationsServiceGapicClient.php b/AdvisoryNotifications/src/V1/Gapic/AdvisoryNotificationsServiceGapicClient.php index 0f6489b7e47a..b7246dfce687 100644 --- a/AdvisoryNotifications/src/V1/Gapic/AdvisoryNotificationsServiceGapicClient.php +++ b/AdvisoryNotifications/src/V1/Gapic/AdvisoryNotificationsServiceGapicClient.php @@ -100,10 +100,14 @@ class AdvisoryNotificationsServiceGapicClient private static $organizationLocationNotificationNameTemplate; + private static $organizationLocationSettingsNameTemplate; + private static $projectLocationNameTemplate; private static $projectLocationNotificationNameTemplate; + private static $projectLocationSettingsNameTemplate; + private static $settingsNameTemplate; private static $pathTemplateMap; @@ -180,6 +184,17 @@ private static function getOrganizationLocationNotificationNameTemplate() return self::$organizationLocationNotificationNameTemplate; } + private static function getOrganizationLocationSettingsNameTemplate() + { + if (self::$organizationLocationSettingsNameTemplate == null) { + self::$organizationLocationSettingsNameTemplate = new PathTemplate( + 'organizations/{organization}/locations/{location}/settings' + ); + } + + return self::$organizationLocationSettingsNameTemplate; + } + private static function getProjectLocationNameTemplate() { if (self::$projectLocationNameTemplate == null) { @@ -202,6 +217,17 @@ private static function getProjectLocationNotificationNameTemplate() return self::$projectLocationNotificationNameTemplate; } + private static function getProjectLocationSettingsNameTemplate() + { + if (self::$projectLocationSettingsNameTemplate == null) { + self::$projectLocationSettingsNameTemplate = new PathTemplate( + 'projects/{project}/locations/{location}/settings' + ); + } + + return self::$projectLocationSettingsNameTemplate; + } + private static function getSettingsNameTemplate() { if (self::$settingsNameTemplate == null) { @@ -221,8 +247,10 @@ private static function getPathTemplateMap() 'notification' => self::getNotificationNameTemplate(), 'organizationLocation' => self::getOrganizationLocationNameTemplate(), 'organizationLocationNotification' => self::getOrganizationLocationNotificationNameTemplate(), + 'organizationLocationSettings' => self::getOrganizationLocationSettingsNameTemplate(), 'projectLocation' => self::getProjectLocationNameTemplate(), 'projectLocationNotification' => self::getProjectLocationNotificationNameTemplate(), + 'projectLocationSettings' => self::getProjectLocationSettingsNameTemplate(), 'settings' => self::getSettingsNameTemplate(), ]; } @@ -308,6 +336,25 @@ public static function organizationLocationNotificationName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_settings resource. + * + * @param string $organization + * @param string $location + * + * @return string The formatted organization_location_settings resource. + */ + public static function organizationLocationSettingsName( + $organization, + $location + ) { + return self::getOrganizationLocationSettingsNameTemplate()->render([ + 'organization' => $organization, + 'location' => $location, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * project_location resource. @@ -347,6 +394,23 @@ public static function projectLocationNotificationName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_settings resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted project_location_settings resource. + */ + public static function projectLocationSettingsName($project, $location) + { + return self::getProjectLocationSettingsNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a settings * resource. @@ -372,8 +436,10 @@ public static function settingsName($organization, $location) * - notification: organizations/{organization}/locations/{location}/notifications/{notification} * - organizationLocation: organizations/{organization}/locations/{location} * - organizationLocationNotification: organizations/{organization}/locations/{location}/notifications/{notification} + * - organizationLocationSettings: organizations/{organization}/locations/{location}/settings * - projectLocation: projects/{project}/locations/{location} * - projectLocationNotification: projects/{project}/locations/{location}/notifications/{notification} + * - projectLocationSettings: projects/{project}/locations/{location}/settings * - settings: organizations/{organization}/locations/{location}/settings * * The optional $template argument can be supplied to specify a particular pattern, @@ -552,7 +618,8 @@ public function getNotification($name, array $optionalArgs = []) * * @param string $name Required. The resource name of the settings to retrieve. * Format: - * organizations/{organization}/locations/{location}/settings. + * organizations/{organization}/locations/{location}/settings or + * projects/{projects}/locations/{location}/settings. * @param array $optionalArgs { * Optional. * @@ -614,7 +681,7 @@ public function getSettings($name, array $optionalArgs = []) * * @param string $parent Required. The parent, which owns this collection of notifications. * Must be of the form "organizations/{organization}/locations/{location}" - * or "projects/{project}/locations/{location}" + * or "projects/{project}/locations/{location}". * @param array $optionalArgs { * Optional. * diff --git a/AdvisoryNotifications/src/V1/GetSettingsRequest.php b/AdvisoryNotifications/src/V1/GetSettingsRequest.php index ca213364ae8e..1aab7050300b 100644 --- a/AdvisoryNotifications/src/V1/GetSettingsRequest.php +++ b/AdvisoryNotifications/src/V1/GetSettingsRequest.php @@ -18,7 +18,8 @@ class GetSettingsRequest extends \Google\Protobuf\Internal\Message /** * Required. The resource name of the settings to retrieve. * Format: - * organizations/{organization}/locations/{location}/settings. + * organizations/{organization}/locations/{location}/settings or + * projects/{projects}/locations/{location}/settings. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -27,7 +28,8 @@ class GetSettingsRequest extends \Google\Protobuf\Internal\Message /** * @param string $name Required. The resource name of the settings to retrieve. * Format: - * organizations/{organization}/locations/{location}/settings. Please see + * organizations/{organization}/locations/{location}/settings or + * projects/{projects}/locations/{location}/settings. Please see * {@see AdvisoryNotificationsServiceClient::settingsName()} for help formatting this field. * * @return \Google\Cloud\AdvisoryNotifications\V1\GetSettingsRequest @@ -49,7 +51,8 @@ public static function build(string $name): self * @type string $name * Required. The resource name of the settings to retrieve. * Format: - * organizations/{organization}/locations/{location}/settings. + * organizations/{organization}/locations/{location}/settings or + * projects/{projects}/locations/{location}/settings. * } */ public function __construct($data = NULL) { @@ -60,7 +63,8 @@ public function __construct($data = NULL) { /** * Required. The resource name of the settings to retrieve. * Format: - * organizations/{organization}/locations/{location}/settings. + * organizations/{organization}/locations/{location}/settings or + * projects/{projects}/locations/{location}/settings. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -73,7 +77,8 @@ public function getName() /** * Required. The resource name of the settings to retrieve. * Format: - * organizations/{organization}/locations/{location}/settings. + * organizations/{organization}/locations/{location}/settings or + * projects/{projects}/locations/{location}/settings. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/AdvisoryNotifications/src/V1/ListNotificationsRequest.php b/AdvisoryNotifications/src/V1/ListNotificationsRequest.php index 9f6eb8532fb5..8c3e66512911 100644 --- a/AdvisoryNotifications/src/V1/ListNotificationsRequest.php +++ b/AdvisoryNotifications/src/V1/ListNotificationsRequest.php @@ -18,7 +18,7 @@ class ListNotificationsRequest extends \Google\Protobuf\Internal\Message /** * Required. The parent, which owns this collection of notifications. * Must be of the form "organizations/{organization}/locations/{location}" - * or "projects/{project}/locations/{location}" + * or "projects/{project}/locations/{location}". * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -61,8 +61,8 @@ class ListNotificationsRequest extends \Google\Protobuf\Internal\Message /** * @param string $parent Required. The parent, which owns this collection of notifications. * Must be of the form "organizations/{organization}/locations/{location}" - * or "projects/{project}/locations/{location}" - * Please see {@see AdvisoryNotificationsServiceClient::locationName()} for help formatting this field. + * or "projects/{project}/locations/{location}". Please see + * {@see AdvisoryNotificationsServiceClient::locationName()} for help formatting this field. * * @return \Google\Cloud\AdvisoryNotifications\V1\ListNotificationsRequest * @@ -83,7 +83,7 @@ public static function build(string $parent): self * @type string $parent * Required. The parent, which owns this collection of notifications. * Must be of the form "organizations/{organization}/locations/{location}" - * or "projects/{project}/locations/{location}" + * or "projects/{project}/locations/{location}". * @type int $page_size * The maximum number of notifications to return. The service may return * fewer than this value. If unspecified or equal to 0, at most 50 @@ -112,7 +112,7 @@ public function __construct($data = NULL) { /** * Required. The parent, which owns this collection of notifications. * Must be of the form "organizations/{organization}/locations/{location}" - * or "projects/{project}/locations/{location}" + * or "projects/{project}/locations/{location}". * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -125,7 +125,7 @@ public function getParent() /** * Required. The parent, which owns this collection of notifications. * Must be of the form "organizations/{organization}/locations/{location}" - * or "projects/{project}/locations/{location}" + * or "projects/{project}/locations/{location}". * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/AdvisoryNotifications/src/V1/Settings.php b/AdvisoryNotifications/src/V1/Settings.php index 70baa8b3ef7c..162f44a30b15 100644 --- a/AdvisoryNotifications/src/V1/Settings.php +++ b/AdvisoryNotifications/src/V1/Settings.php @@ -16,11 +16,12 @@ class Settings extends \Google\Protobuf\Internal\Message { /** - * Output only. The resource name of the settings to retrieve. + * Identifier. The resource name of the settings to retrieve. * Format: - * organizations/{organization}/locations/{location}/settings. + * organizations/{organization}/locations/{location}/settings or + * projects/{projects}/locations/{location}/settings. * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; */ protected $name = ''; /** @@ -48,9 +49,10 @@ class Settings extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Output only. The resource name of the settings to retrieve. + * Identifier. The resource name of the settings to retrieve. * Format: - * organizations/{organization}/locations/{location}/settings. + * organizations/{organization}/locations/{location}/settings or + * projects/{projects}/locations/{location}/settings. * @type array|\Google\Protobuf\Internal\MapField $notification_settings * Required. Map of each notification type and its settings to get/set all * settings at once. The server will validate the value for each notification @@ -68,11 +70,12 @@ public function __construct($data = NULL) { } /** - * Output only. The resource name of the settings to retrieve. + * Identifier. The resource name of the settings to retrieve. * Format: - * organizations/{organization}/locations/{location}/settings. + * organizations/{organization}/locations/{location}/settings or + * projects/{projects}/locations/{location}/settings. * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @return string */ public function getName() @@ -81,11 +84,12 @@ public function getName() } /** - * Output only. The resource name of the settings to retrieve. + * Identifier. The resource name of the settings to retrieve. * Format: - * organizations/{organization}/locations/{location}/settings. + * organizations/{organization}/locations/{location}/settings or + * projects/{projects}/locations/{location}/settings. * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @param string $var * @return $this */ diff --git a/AdvisoryNotifications/src/V1/resources/advisory_notifications_service_descriptor_config.php b/AdvisoryNotifications/src/V1/resources/advisory_notifications_service_descriptor_config.php index ebb3a6ad425e..50647237c0f0 100644 --- a/AdvisoryNotifications/src/V1/resources/advisory_notifications_service_descriptor_config.php +++ b/AdvisoryNotifications/src/V1/resources/advisory_notifications_service_descriptor_config.php @@ -65,8 +65,10 @@ 'notification' => 'organizations/{organization}/locations/{location}/notifications/{notification}', 'organizationLocation' => 'organizations/{organization}/locations/{location}', 'organizationLocationNotification' => 'organizations/{organization}/locations/{location}/notifications/{notification}', + 'organizationLocationSettings' => 'organizations/{organization}/locations/{location}/settings', 'projectLocation' => 'projects/{project}/locations/{location}', 'projectLocationNotification' => 'projects/{project}/locations/{location}/notifications/{notification}', + 'projectLocationSettings' => 'projects/{project}/locations/{location}/settings', 'settings' => 'organizations/{organization}/locations/{location}/settings', ], ], diff --git a/AdvisoryNotifications/src/V1/resources/advisory_notifications_service_rest_client_config.php b/AdvisoryNotifications/src/V1/resources/advisory_notifications_service_rest_client_config.php index 5dfef8bb6492..bfa0527efbf6 100644 --- a/AdvisoryNotifications/src/V1/resources/advisory_notifications_service_rest_client_config.php +++ b/AdvisoryNotifications/src/V1/resources/advisory_notifications_service_rest_client_config.php @@ -23,6 +23,12 @@ 'GetSettings' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=organizations/*/locations/*/settings}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/settings}', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -52,6 +58,13 @@ 'method' => 'patch', 'uriTemplate' => '/v1/{settings.name=organizations/*/locations/*/settings}', 'body' => 'settings', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{settings.name=projects/*/locations/*/settings}', + 'body' => 'settings', + ], + ], 'placeholders' => [ 'settings.name' => [ 'getters' => [ From 8f7f6812f94e95bd61ca68b774ae2aa8af22e28f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:32:51 -0700 Subject: [PATCH 14/86] feat: add `translation_config` in `RecognitionConfig` message (#7204) Enables specifying target language to perform automatic translation to. PiperOrigin-RevId: 621862394 Source-Link: https://github.com/googleapis/googleapis/commit/9deb78bb23e38621a9e3e14986b4469d4f68c11c Source-Link: https://github.com/googleapis/googleapis-gen/commit/f109618460c3c2ad1c19f0ff6f59c451c2fc830e Copy-Tag: eyJwIjoiU3BlZWNoLy5Pd2xCb3QueWFtbCIsImgiOiJmMTA5NjE4NDYwYzNjMmFkMWMxOWYwZmY2ZjU5YzQ1MWMyZmM4MzBlIn0= --- Speech/metadata/V2/CloudSpeech.php | Bin 21402 -> 21529 bytes Speech/src/V2/RecognitionConfig.php | 48 ++++++++++++++++++++ Speech/src/V2/TranslationConfig.php | 68 ++++++++++++++++++++++++++++ 3 files changed, 116 insertions(+) create mode 100644 Speech/src/V2/TranslationConfig.php diff --git a/Speech/metadata/V2/CloudSpeech.php b/Speech/metadata/V2/CloudSpeech.php index 7af4b35e35172497a9dbe3a079c0c83086c409a8..add940642742a59155111c7973161e4d96d77b96 100644 GIT binary patch delta 139 zcmbQWoN?v~#tn~|S)b2m.google.cloud.speech.v2.TranscriptNormalization transcript_normalization = 11 [(.google.api.field_behavior) = OPTIONAL]; */ private $transcript_normalization = null; + /** + * Optional. Optional configuration used to automatically run translation on + * the given audio to the desired language for supported models. + * + * Generated from protobuf field .google.cloud.speech.v2.TranslationConfig translation_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $translation_config = null; protected $decoding_config; /** @@ -108,6 +115,9 @@ class RecognitionConfig extends \Google\Protobuf\Internal\Message * the transcript with phrases of your choosing. For StreamingRecognize, this * normalization only applies to stable partial transcripts (stability > 0.8) * and final transcripts. + * @type \Google\Cloud\Speech\V2\TranslationConfig $translation_config + * Optional. Optional configuration used to automatically run translation on + * the given audio to the desired language for supported models. * } */ public function __construct($data = NULL) { @@ -379,6 +389,44 @@ public function setTranscriptNormalization($var) return $this; } + /** + * Optional. Optional configuration used to automatically run translation on + * the given audio to the desired language for supported models. + * + * Generated from protobuf field .google.cloud.speech.v2.TranslationConfig translation_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Speech\V2\TranslationConfig|null + */ + public function getTranslationConfig() + { + return $this->translation_config; + } + + public function hasTranslationConfig() + { + return isset($this->translation_config); + } + + public function clearTranslationConfig() + { + unset($this->translation_config); + } + + /** + * Optional. Optional configuration used to automatically run translation on + * the given audio to the desired language for supported models. + * + * Generated from protobuf field .google.cloud.speech.v2.TranslationConfig translation_config = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Speech\V2\TranslationConfig $var + * @return $this + */ + public function setTranslationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Speech\V2\TranslationConfig::class); + $this->translation_config = $var; + + return $this; + } + /** * @return string */ diff --git a/Speech/src/V2/TranslationConfig.php b/Speech/src/V2/TranslationConfig.php new file mode 100644 index 000000000000..9c67811421d7 --- /dev/null +++ b/Speech/src/V2/TranslationConfig.php @@ -0,0 +1,68 @@ +google.cloud.speech.v2.TranslationConfig + */ +class TranslationConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The language code to translate to. + * + * Generated from protobuf field string target_language = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $target_language = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $target_language + * Required. The language code to translate to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce(); + parent::__construct($data); + } + + /** + * Required. The language code to translate to. + * + * Generated from protobuf field string target_language = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTargetLanguage() + { + return $this->target_language; + } + + /** + * Required. The language code to translate to. + * + * Generated from protobuf field string target_language = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTargetLanguage($var) + { + GPBUtil::checkString($var, True); + $this->target_language = $var; + + return $this; + } + +} + From 665ccf6f60844642733ef580ab8793783132902f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 10:33:15 -0700 Subject: [PATCH 15/86] feat: Add DEMAND_GEN_ADS and DEMAND_GEN_ADS_DISCOVER_SURFACE in ReportingContextEnum (#7186) docs: Deprecate DISCOVERY_ADS and document the new enum values PiperOrigin-RevId: 619534137 Source-Link: https://github.com/googleapis/googleapis/commit/b4771b17d48844799d73f88f51de0bf5b7bb05ca Source-Link: https://github.com/googleapis/googleapis-gen/commit/bd9798abf4dd809911e31ec7c2174f9817c72c69 Copy-Tag: eyJwIjoiU2hvcHBpbmdDb21tb25Qcm90b3MvLk93bEJvdC55YW1sIiwiaCI6ImJkOTc5OGFiZjRkZDgwOTkxMWUzMWVjN2MyMTc0Zjk4MTdjNzJjNjkifQ== --- ShoppingCommonProtos/metadata/Type/Types.php | Bin 1573 -> 1634 bytes .../src/Type/ReportingContext.php | 2 +- .../ReportingContext/ReportingContextEnum.php | 18 +++++++++++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ShoppingCommonProtos/metadata/Type/Types.php b/ShoppingCommonProtos/metadata/Type/Types.php index 8cab8d4105425c5ee24a4a006e2ad37279f2ae13..b0f3259bdbf862dba573343c24580b2fcce97e75 100644 GIT binary patch delta 127 zcmZ3=^N44|Sw_Zlo6j-6V-%mp%q0+%T998cT2Z3Z$UONnbD+N{7q5$F zu(N-dYfxmoqf4*=lN1vNqmU36pNp%nqn}H>yQ?2qoL5MhOCD7$9;P!sI5f!3(b-ji KZ?hT8dqx28#3a%H delta 66 zcmaFFvy^AUSw_Z*o6j-6V-&y1#3c}vT998cT2Z2OglY0+=0G7qE?yVU WU}yg@*PzIFN0(p$rp?7H?->C#Zx+J< diff --git a/ShoppingCommonProtos/src/Type/ReportingContext.php b/ShoppingCommonProtos/src/Type/ReportingContext.php index 05559f26d264..de1d9d409014 100644 --- a/ShoppingCommonProtos/src/Type/ReportingContext.php +++ b/ShoppingCommonProtos/src/Type/ReportingContext.php @@ -13,7 +13,7 @@ * Reporting contexts are groups of surfaces and formats for product results on * Google. They can represent the entire destination (for example, [Shopping * ads](https://support.google.com/merchants/answer/6149970)) or a subset of - * formats within a destination (for example, [Discovery + * formats within a destination (for example, [Demand Gen * ads](https://support.google.com/merchants/answer/13389785)). * * Generated from protobuf message google.shopping.type.ReportingContext diff --git a/ShoppingCommonProtos/src/Type/ReportingContext/ReportingContextEnum.php b/ShoppingCommonProtos/src/Type/ReportingContext/ReportingContextEnum.php index 98b0fae8b7ee..e46e27e8374c 100644 --- a/ShoppingCommonProtos/src/Type/ReportingContext/ReportingContextEnum.php +++ b/ShoppingCommonProtos/src/Type/ReportingContext/ReportingContextEnum.php @@ -26,12 +26,26 @@ class ReportingContextEnum */ const SHOPPING_ADS = 1; /** + * Deprecated: Use `DEMAND_GEN_ADS` instead. * [Discovery and Demand Gen * ads](https://support.google.com/merchants/answer/13389785). * - * Generated from protobuf enum DISCOVERY_ADS = 2; + * Generated from protobuf enum DISCOVERY_ADS = 2 [deprecated = true]; */ const DISCOVERY_ADS = 2; + /** + * [Demand Gen ads](https://support.google.com/merchants/answer/13389785). + * + * Generated from protobuf enum DEMAND_GEN_ADS = 13; + */ + const DEMAND_GEN_ADS = 13; + /** + * [Demand Gen ads on Discover + * surface](https://support.google.com/merchants/answer/13389785). + * + * Generated from protobuf enum DEMAND_GEN_ADS_DISCOVER_SURFACE = 14; + */ + const DEMAND_GEN_ADS_DISCOVER_SURFACE = 14; /** * [Video ads](https://support.google.com/google-ads/answer/6340491). * @@ -103,6 +117,8 @@ class ReportingContextEnum self::REPORTING_CONTEXT_ENUM_UNSPECIFIED => 'REPORTING_CONTEXT_ENUM_UNSPECIFIED', self::SHOPPING_ADS => 'SHOPPING_ADS', self::DISCOVERY_ADS => 'DISCOVERY_ADS', + self::DEMAND_GEN_ADS => 'DEMAND_GEN_ADS', + self::DEMAND_GEN_ADS_DISCOVER_SURFACE => 'DEMAND_GEN_ADS_DISCOVER_SURFACE', self::VIDEO_ADS => 'VIDEO_ADS', self::DISPLAY_ADS => 'DISPLAY_ADS', self::LOCAL_INVENTORY_ADS => 'LOCAL_INVENTORY_ADS', From 8dffb6b398ad322936e1f9105e218a4d2a67f5af Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Fri, 5 Apr 2024 11:43:17 -0600 Subject: [PATCH 16/86] chore: add compatibility for Protobuf v4 (#7201) --- CommonProtos/composer.json | 2 +- ShoppingCommonProtos/composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CommonProtos/composer.json b/CommonProtos/composer.json index a5c017838f81..d48a4fcff862 100644 --- a/CommonProtos/composer.json +++ b/CommonProtos/composer.json @@ -6,7 +6,7 @@ "homepage": "https://github.com/googleapis/google-cloud-php-common-protos", "license": "Apache-2.0", "require": { - "google/protobuf": "^3.7.1", + "google/protobuf": "^v3.25.3||^4.26.1", "google/common-protos": "^3.0||^4.0" }, "require-dev": { diff --git a/ShoppingCommonProtos/composer.json b/ShoppingCommonProtos/composer.json index 70a4972233fd..e44a871cd031 100644 --- a/ShoppingCommonProtos/composer.json +++ b/ShoppingCommonProtos/composer.json @@ -18,7 +18,7 @@ }, "require": { "php": "^8.0", - "google/protobuf": "^3.7.1" + "google/protobuf": "^v3.25.3||^4.26.1" }, "require-dev": { "phpunit/phpunit": "^9.0" From fc090055e7a2f3392c57f664c0e84d3ba6ce2da1 Mon Sep 17 00:00:00 2001 From: Vishwaraj Anand Date: Mon, 8 Apr 2024 10:00:43 +0000 Subject: [PATCH 17/86] chore(Storage): fix risky test Requester Pays Test (#7207) --- Storage/tests/System/RequesterPaysTest.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Storage/tests/System/RequesterPaysTest.php b/Storage/tests/System/RequesterPaysTest.php index 95379dcd0c2d..151537744390 100644 --- a/Storage/tests/System/RequesterPaysTest.php +++ b/Storage/tests/System/RequesterPaysTest.php @@ -374,7 +374,8 @@ public function testUploadMethodsWithoutUserProject(callable $call) public function testUploadMethodsWithUserProject(callable $call) { $bucket = self::$requesterClient->bucket(self::$bucketName, true); - $call($bucket); + $objectName = $call($bucket); + $this->assertTrue($bucket->object($objectName)->exists()); } public function uploadMethods() @@ -382,16 +383,20 @@ public function uploadMethods() return [ 'resumable-upload' => [ function (Bucket $bucket) { + $name = uniqid(self::TESTING_PREFIX); $bucket->getResumableUploader(self::$content, [ - 'name' => uniqid(self::TESTING_PREFIX) + 'name' => $name ])->upload(); + return $name; }, ], 'streamable-upload' => [ function (Bucket $bucket) { + $name = uniqid(self::TESTING_PREFIX); $bucket->getStreamableUploader(self::$content, [ - 'name' => uniqid(self::TESTING_PREFIX) + 'name' => $name ])->upload(); + return $name; }, ], ]; From 8900cd7673a131285df4a87a1ca202a5f53c0ae1 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 11:08:04 -0500 Subject: [PATCH 18/86] chore(main): release 0.240.0 (#7185) --- AdvisoryNotifications/VERSION | 2 +- AiPlatform/VERSION | 2 +- Asset/VERSION | 2 +- Batch/VERSION | 2 +- BigQueryAnalyticsHub/VERSION | 2 +- CHANGELOG.md | 318 ++++++++++++++++++++++++++++++ CommonProtos/VERSION | 2 +- CommonProtos/composer.json | 4 +- ConfidentialComputing/VERSION | 2 +- Container/VERSION | 2 +- Firestore/VERSION | 2 +- Firestore/src/FirestoreClient.php | 2 +- GkeBackup/VERSION | 2 +- NetworkManagement/VERSION | 2 +- PubSub/VERSION | 3 +- Quotas/VERSION | 2 +- RecaptchaEnterprise/VERSION | 2 +- SecurityCenter/VERSION | 2 +- SecurityPrivateCa/VERSION | 2 +- ShoppingCommonProtos/VERSION | 2 +- Spanner/VERSION | 2 +- Spanner/src/SpannerClient.php | 2 +- Speech/VERSION | 2 +- Speech/src/SpeechClient.php | 2 +- Storage/VERSION | 2 +- Storage/src/StorageClient.php | 2 +- Translate/VERSION | 2 +- composer.json | 42 ++-- 28 files changed, 367 insertions(+), 48 deletions(-) diff --git a/AdvisoryNotifications/VERSION b/AdvisoryNotifications/VERSION index 7486fdbc50b3..a3df0a6959e1 100644 --- a/AdvisoryNotifications/VERSION +++ b/AdvisoryNotifications/VERSION @@ -1 +1 @@ -0.7.2 +0.8.0 diff --git a/AiPlatform/VERSION b/AiPlatform/VERSION index 93d4c1ef06f1..0f1a7dfc7c40 100644 --- a/AiPlatform/VERSION +++ b/AiPlatform/VERSION @@ -1 +1 @@ -0.36.0 +0.37.0 diff --git a/Asset/VERSION b/Asset/VERSION index ace44233b4aa..15b989e398fc 100644 --- a/Asset/VERSION +++ b/Asset/VERSION @@ -1 +1 @@ -1.15.1 +1.16.0 diff --git a/Batch/VERSION b/Batch/VERSION index 7eb3095a3295..5f2491c5adca 100644 --- a/Batch/VERSION +++ b/Batch/VERSION @@ -1 +1 @@ -0.16.3 +0.16.4 diff --git a/BigQueryAnalyticsHub/VERSION b/BigQueryAnalyticsHub/VERSION index 2b7c5ae01848..8f0916f768f0 100644 --- a/BigQueryAnalyticsHub/VERSION +++ b/BigQueryAnalyticsHub/VERSION @@ -1 +1 @@ -0.4.2 +0.5.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index c7279368719c..c0232ac4e476 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,323 @@ # Changelog +## 0.240.0 + +
google/cloud-advisorynotifications 0.8.0 + + + +### Features + +* Add GetSettings and UpdateSettings methods at the Project-level to advisorynotifications.googleapis.com ([#7203](https://github.com/googleapis/google-cloud-php/issues/7203)) ([04af6b4](https://github.com/googleapis/google-cloud-php/commit/04af6b49e31ddd2bdc2c2fae6aea2ce4227693f6)) + + +### Documentation + +* Adding docs for new project level settings methods ([04af6b4](https://github.com/googleapis/google-cloud-php/commit/04af6b49e31ddd2bdc2c2fae6aea2ce4227693f6)) + +
+ +
google/cloud-ai-platform 0.37.0 + + + +### Features + +* A new enum `HarmBlockMethod` is added ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new field `default` is added to message `.google.cloud.aiplatform.v1.Schema` ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new field `disable_explanations` is added to message `.google.cloud.aiplatform.v1.DeployedModel` ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new field `frequency_penalty` is added to message `.google.cloud.aiplatform.v1.GenerationConfig` ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new field `max_items` is added to message `.google.cloud.aiplatform.v1.Schema` ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new field `max_length` is added to message `.google.cloud.aiplatform.v1.Schema` ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new field `max_properties` is added to message `.google.cloud.aiplatform.v1.Schema` ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new field `maximum` is added to message `.google.cloud.aiplatform.v1.Schema` ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new field `method` is added to message `.google.cloud.aiplatform.v1.SafetySetting` ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new field `min_items` is added to message `.google.cloud.aiplatform.v1.Schema` ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new field `min_length` is added to message `.google.cloud.aiplatform.v1.Schema` ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new field `min_properties` is added to message `.google.cloud.aiplatform.v1.Schema` ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new field `minimum` is added to message `.google.cloud.aiplatform.v1.Schema` ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new field `pattern` is added to message `.google.cloud.aiplatform.v1.Schema` ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new field `persistent_resource_id` is added to message `.google.cloud.aiplatform.v1.CustomJobSpec` ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new field `presence_penalty` is added to message `.google.cloud.aiplatform.v1.GenerationConfig` ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new field `response_mime_type` is added to message `.google.cloud.aiplatform.v1.GenerationConfig` ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new field `system_instruction` is added to message `.google.cloud.aiplatform.v1.GenerateContentRequest` ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new field `title` is added to message `.google.cloud.aiplatform.v1.Schema` ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new message `CreatePersistentResourceOperationMetadata` is added ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new message `CreatePersistentResourceRequest` is added ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new message `DeletePersistentResourceRequest` is added ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new message `GetPersistentResourceRequest` is added ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new message `ListPersistentResourcesRequest` is added ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new message `ListPersistentResourcesResponse` is added ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new message `PersistentResource` is added ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new message `RaySpec` is added ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new message `RebootPersistentResourceOperationMetadata` is added ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new message `RebootPersistentResourceRequest` is added ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new message `ResourcePool` is added ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new message `ResourceRuntime` is added ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new message `ResourceRuntimeSpec` is added ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new message `ServiceAccountSpec` is added ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new message `UpdatePersistentResourceOperationMetadata` is added ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new message `UpdatePersistentResourceRequest` is added ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new resource_definition `aiplatform.googleapis.com/PersistentResource` is added ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new service `PersistentResourceService` is added ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new value `BLOCKLIST` is added to enum `BlockedReason` ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* A new value `PROHIBITED_CONTENT` is added to enum `BlockedReason` ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* Add data_key field in feature online store service ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* Add dedicated_serving_endpoint ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* Add index_config field ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* Add NotebookRuntime resource and APIs to public v1 client library ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* Add Optimized feature store proto ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* GenAiTuningService aiplatform v1 initial release ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) +* GenAiTuningService aiplatform v1 initial release ([#7176](https://github.com/googleapis/google-cloud-php/issues/7176)) ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) + + +### Documentation + +* Documentation updates ([186ccde](https://github.com/googleapis/google-cloud-php/commit/186ccde0f1eefd52133273bb715e42888860467a)) + +
+ +
google/cloud-asset 1.16.0 + + + +### Features + +* Add tag key id support ([#7191](https://github.com/googleapis/google-cloud-php/issues/7191)) ([fe82c2a](https://github.com/googleapis/google-cloud-php/commit/fe82c2abaf006508b20d3d0e57b8a383e74059e0)) + + +### Documentation + +* Add tagKeyIds example for ResourceSearchResult.tags ([fe82c2a](https://github.com/googleapis/google-cloud-php/commit/fe82c2abaf006508b20d3d0e57b8a383e74059e0)) + +
+ +
google/cloud-batch 0.16.4 + + + +### Documentation + +* A comment for field `max_run_duration` in message `.google.cloud.batch.v1alpha.TaskSpec` and `.google.cloud.batch.v1.TaskSpec` is changed ([21a61d8](https://github.com/googleapis/google-cloud-php/commit/21a61d8aca2c82ee42e1d8d73a455aa7201422be)) +* Add non-negative restriction comment for usage_resource_allowance.spec.limit.limit exposed on v1alpha ([21a61d8](https://github.com/googleapis/google-cloud-php/commit/21a61d8aca2c82ee42e1d8d73a455aa7201422be)) +* State one Resource Allowance per region per project limitation on v1alpha ([#7202](https://github.com/googleapis/google-cloud-php/issues/7202)) ([21a61d8](https://github.com/googleapis/google-cloud-php/commit/21a61d8aca2c82ee42e1d8d73a455aa7201422be)) + +
+ +
google/cloud-bigquery-analyticshub 0.5.0 + + + +### Features + +* Support output fields on DcrExchangeConfig specifying selective sharing behavior on a data clean room ([e8658d3](https://github.com/googleapis/google-cloud-php/commit/e8658d39e9808ecf4c904d04e86501af96fba7cc)) +* Support selective sharing on data clean room Listings ([#7156](https://github.com/googleapis/google-cloud-php/issues/7156)) ([e8658d3](https://github.com/googleapis/google-cloud-php/commit/e8658d39e9808ecf4c904d04e86501af96fba7cc)) + +
+ +
google/cloud-common-protos 0.5.1 + + + +
+ +
google/cloud-confidentialcomputing 0.8.0 + + + +### Features + +* Add additional `TokenType` options (`TOKEN_TYPE_PKI` and `TOKEN_TYPE_LIMITED_AWS`) ([#7184](https://github.com/googleapis/google-cloud-php/issues/7184)) ([ef1f418](https://github.com/googleapis/google-cloud-php/commit/ef1f418e94220281656b962939a65c9b1483172e)) + +
+ +
google/cloud-container 1.30.0 + + + +### Features + +* Add several fields to manage state of database encryption update ([#7182](https://github.com/googleapis/google-cloud-php/issues/7182)) ([3a23c95](https://github.com/googleapis/google-cloud-php/commit/3a23c951ad43851a1c584aa7e5e521453eee40ef)) + +
+ +
google/cloud-firestore 1.43.0 + + + +### Features + +* Add Vector Index API ([#7151](https://github.com/googleapis/google-cloud-php/issues/7151)) ([38be7f9](https://github.com/googleapis/google-cloud-php/commit/38be7f92c908866cf49d506ac4af34f0c27bfdfa)) + + +### Documentation + +* Allow 14 week backup retention for Firestore daily backups ([#7190](https://github.com/googleapis/google-cloud-php/issues/7190)) ([a4e6f70](https://github.com/googleapis/google-cloud-php/commit/a4e6f70681dd74d098f2e83f00eb42800ee13818)) + +
+ +
google/cloud-gke-backup 0.7.0 + + + +### Features + +* Add backup indexing ([754cf40](https://github.com/googleapis/google-cloud-php/commit/754cf40dd24d975ad9fd569c4966eb826dbdeaa5)) +* Add smart scheduling ([#7178](https://github.com/googleapis/google-cloud-php/issues/7178)) ([754cf40](https://github.com/googleapis/google-cloud-php/commit/754cf40dd24d975ad9fd569c4966eb826dbdeaa5)) + + +### Documentation + +* Add output only and optional api field behavior label ([754cf40](https://github.com/googleapis/google-cloud-php/commit/754cf40dd24d975ad9fd569c4966eb826dbdeaa5)) +* Remove the next id annotation ([754cf40](https://github.com/googleapis/google-cloud-php/commit/754cf40dd24d975ad9fd569c4966eb826dbdeaa5)) +* Update retention policy and cron schedule comment to include new constraints from smart scheduling ([754cf40](https://github.com/googleapis/google-cloud-php/commit/754cf40dd24d975ad9fd569c4966eb826dbdeaa5)) + +
+ +
google/cloud-network-management 1.7.0 + + + +### Features + +* Add an "unsupported" type of firewall policy rule ([e4937da](https://github.com/googleapis/google-cloud-php/commit/e4937daef2711f3ca5214243af1ed9d1657a27a1)) +* Add new enum values related to Google services ([e4937da](https://github.com/googleapis/google-cloud-php/commit/e4937daef2711f3ca5214243af1ed9d1657a27a1)) +* Add new fields and enum values related to round-trip ([e4937da](https://github.com/googleapis/google-cloud-php/commit/e4937daef2711f3ca5214243af1ed9d1657a27a1)) +* Add new final state fields to Network Management API version v1 ([e4937da](https://github.com/googleapis/google-cloud-php/commit/e4937daef2711f3ca5214243af1ed9d1657a27a1)) +* Add new final state fields to Network Management API version v1 ([#7153](https://github.com/googleapis/google-cloud-php/issues/7153)) ([e4937da](https://github.com/googleapis/google-cloud-php/commit/e4937daef2711f3ca5214243af1ed9d1657a27a1)) + + +### Documentation + +* Update a few outdated comments ([e4937da](https://github.com/googleapis/google-cloud-php/commit/e4937daef2711f3ca5214243af1ed9d1657a27a1)) +* Update comments for fields related to load balancing ([e4937da](https://github.com/googleapis/google-cloud-php/commit/e4937daef2711f3ca5214243af1ed9d1657a27a1)) +* Update final state comments in Network Management API version v1 ([e4937da](https://github.com/googleapis/google-cloud-php/commit/e4937daef2711f3ca5214243af1ed9d1657a27a1)) +* Update possible firewall rule actions comment ([e4937da](https://github.com/googleapis/google-cloud-php/commit/e4937daef2711f3ca5214243af1ed9d1657a27a1)) + +
+ +
google/cloud-pubsub 2.1.0 + + + +### Features + +* Add custom datetime format for Cloud Storage subscriptions ([#7181](https://github.com/googleapis/google-cloud-php/issues/7181)) ([9d9ecd3](https://github.com/googleapis/google-cloud-php/commit/9d9ecd3c2d315df5f2e5bd1262d219088bb29cb4)) + +
+ +
google/cloud-quotas 0.2.0 + + + +### Features + +* Add `rollout_info` field to `QuotaDetails` message ([e799bcc](https://github.com/googleapis/google-cloud-php/commit/e799bccd8cabd785e6282a469f61e3bf0ce19243)) +* Add `rollout_info` field to `QuotaDetails` message ([#7183](https://github.com/googleapis/google-cloud-php/issues/7183)) ([e799bcc](https://github.com/googleapis/google-cloud-php/commit/e799bccd8cabd785e6282a469f61e3bf0ce19243)) + + +### Documentation + +* Update comment of `contact_email` to make it optional as opposed to required ([e799bcc](https://github.com/googleapis/google-cloud-php/commit/e799bccd8cabd785e6282a469f61e3bf0ce19243)) +* Update sample URL in field for `service_request_quota_uri` ([e799bcc](https://github.com/googleapis/google-cloud-php/commit/e799bccd8cabd785e6282a469f61e3bf0ce19243)) + +
+ +
google/cloud-recaptcha-enterprise 1.11.0 + + + +### Features + +* Existing resource_reference option of the field name is removed from message `google.cloud.recaptchaenterprise.v1.RelatedAccountGroupMemberShip` ([#7175](https://github.com/googleapis/google-cloud-php/issues/7175)) ([8574838](https://github.com/googleapis/google-cloud-php/commit/85748387bed4dd1dece6dee255f9efe801f2dbd2)) + +
+ +
google/cloud-security-center 1.27.0 + + + +### Features + +* Add Notebook field to finding's list of attributes ([#7188](https://github.com/googleapis/google-cloud-php/issues/7188)) ([3ea13de](https://github.com/googleapis/google-cloud-php/commit/3ea13def63f1b010f7816c22383096c52893ffa3)) + + +### Documentation + +* Fixed backtick and double quotes mismatch in security_marks.proto ([3ea13de](https://github.com/googleapis/google-cloud-php/commit/3ea13def63f1b010f7816c22383096c52893ffa3)) + +
+ +
google/cloud-security-private-ca 1.7.0 + + + +### Features + +* Add encoding format to `.google.cloud.security.privateca.v1.CaPool` Resource ([#7194](https://github.com/googleapis/google-cloud-php/issues/7194)) ([d5d5b64](https://github.com/googleapis/google-cloud-php/commit/d5d5b64dfcf2215652b7aa546e57330ef3895a7c)) + + +### Documentation + +* A comment for field `ca_certs` in message `.google.cloud.security.privateca.v1.FetchCaCertsResponse` is changed ([d5d5b64](https://github.com/googleapis/google-cloud-php/commit/d5d5b64dfcf2215652b7aa546e57330ef3895a7c)) +* A comment for field `ignore_dependent_resources` in message `.google.cloud.security.privateca.v1.DeleteCaPoolRequest` is changed ([d5d5b64](https://github.com/googleapis/google-cloud-php/commit/d5d5b64dfcf2215652b7aa546e57330ef3895a7c)) +* A comment for field `ignore_dependent_resources` in message `.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest` is changed ([d5d5b64](https://github.com/googleapis/google-cloud-php/commit/d5d5b64dfcf2215652b7aa546e57330ef3895a7c)) +* A comment for field `ignore_dependent_resources` in message `.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest` is changed ([d5d5b64](https://github.com/googleapis/google-cloud-php/commit/d5d5b64dfcf2215652b7aa546e57330ef3895a7c)) +* A comment for field `maximum_lifetime` in message `.google.cloud.security.privateca.v1.CaPool` is changed ([d5d5b64](https://github.com/googleapis/google-cloud-php/commit/d5d5b64dfcf2215652b7aa546e57330ef3895a7c)) +* A comment for field `maximum_lifetime` in message `.google.cloud.security.privateca.v1.CertificateTemplate` is changed ([d5d5b64](https://github.com/googleapis/google-cloud-php/commit/d5d5b64dfcf2215652b7aa546e57330ef3895a7c)) +* A comment for field `subject_key_id` in message `.google.cloud.security.privateca.v1.CertificateConfig` is changed ([d5d5b64](https://github.com/googleapis/google-cloud-php/commit/d5d5b64dfcf2215652b7aa546e57330ef3895a7c)) +* A comment for method `FetchCaCerts` in service `CertificateAuthorityService` is changed ([d5d5b64](https://github.com/googleapis/google-cloud-php/commit/d5d5b64dfcf2215652b7aa546e57330ef3895a7c)) + +
+ +
google/shopping-common-protos 0.3.0 + + + +### Features + +* Add DEMAND_GEN_ADS and DEMAND_GEN_ADS_DISCOVER_SURFACE in ReportingContextEnum ([#7186](https://github.com/googleapis/google-cloud-php/issues/7186)) ([665ccf6](https://github.com/googleapis/google-cloud-php/commit/665ccf6f60844642733ef580ab8793783132902f)) + + +### Documentation + +* Deprecate DISCOVERY_ADS and document the new enum values ([665ccf6](https://github.com/googleapis/google-cloud-php/commit/665ccf6f60844642733ef580ab8793783132902f)) + +
+ +
google/cloud-spanner 1.75.0 + + + +### Features + +* **spanner:** Adding `EXPECTED_FULFILLMENT_PERIOD` to the indicate instance creation times (with `FULFILLMENT_PERIOD_NORMAL` or `FULFILLMENT_PERIOD_EXTENDED` ENUM) with the extended instance creation time triggered by On-Demand Capacity Feature ([#7200](https://github.com/googleapis/google-cloud-php/issues/7200)) ([d4bc7ab](https://github.com/googleapis/google-cloud-php/commit/d4bc7abd1cdcfdcedff725bb6af41868382537cf)) +* **Spanner:** Float 32 support ([#7080](https://github.com/googleapis/google-cloud-php/issues/7080)) ([8d3c0fd](https://github.com/googleapis/google-cloud-php/commit/8d3c0fd2e3f9676941d9f40f3f51aa2622d05428)) + +
+ +
google/cloud-speech 1.18.0 + + + +### Features + +* Add `translation_config` in `RecognitionConfig` message ([#7204](https://github.com/googleapis/google-cloud-php/issues/7204)) ([8f7f681](https://github.com/googleapis/google-cloud-php/commit/8f7f6812f94e95bd61ca68b774ae2aa8af22e28f)) + +
+ +
google/cloud-storage 1.41.1 + + + +
+ +
google/cloud-translate 1.17.4 + + + +
+ ## 0.239.0
google/cloud-apphub 0.1.0 diff --git a/CommonProtos/VERSION b/CommonProtos/VERSION index 8f0916f768f0..4b9fcbec101a 100644 --- a/CommonProtos/VERSION +++ b/CommonProtos/VERSION @@ -1 +1 @@ -0.5.0 +0.5.1 diff --git a/CommonProtos/composer.json b/CommonProtos/composer.json index d48a4fcff862..a4fb4737d16a 100644 --- a/CommonProtos/composer.json +++ b/CommonProtos/composer.json @@ -2,7 +2,9 @@ "name": "google/cloud-common-protos", "type": "library", "description": "Common Protos for Google Cloud APIs", - "keywords": ["google"], + "keywords": [ + "google" + ], "homepage": "https://github.com/googleapis/google-cloud-php-common-protos", "license": "Apache-2.0", "require": { diff --git a/ConfidentialComputing/VERSION b/ConfidentialComputing/VERSION index 7486fdbc50b3..a3df0a6959e1 100644 --- a/ConfidentialComputing/VERSION +++ b/ConfidentialComputing/VERSION @@ -1 +1 @@ -0.7.2 +0.8.0 diff --git a/Container/VERSION b/Container/VERSION index 5e57fb89558c..034552a83eeb 100644 --- a/Container/VERSION +++ b/Container/VERSION @@ -1 +1 @@ -1.29.0 +1.30.0 diff --git a/Firestore/VERSION b/Firestore/VERSION index a50908ca3daf..b978278f05f5 100644 --- a/Firestore/VERSION +++ b/Firestore/VERSION @@ -1 +1 @@ -1.42.0 +1.43.0 diff --git a/Firestore/src/FirestoreClient.php b/Firestore/src/FirestoreClient.php index df1401c10947..472f865cce52 100644 --- a/Firestore/src/FirestoreClient.php +++ b/Firestore/src/FirestoreClient.php @@ -75,7 +75,7 @@ class FirestoreClient use SnapshotTrait; use ValidateTrait; - const VERSION = '1.42.0'; + const VERSION = '1.43.0'; const DEFAULT_DATABASE = '(default)'; diff --git a/GkeBackup/VERSION b/GkeBackup/VERSION index b6160487433b..faef31a4357c 100644 --- a/GkeBackup/VERSION +++ b/GkeBackup/VERSION @@ -1 +1 @@ -0.6.2 +0.7.0 diff --git a/NetworkManagement/VERSION b/NetworkManagement/VERSION index dc1e644a1014..bd8bf882d061 100644 --- a/NetworkManagement/VERSION +++ b/NetworkManagement/VERSION @@ -1 +1 @@ -1.6.0 +1.7.0 diff --git a/PubSub/VERSION b/PubSub/VERSION index 6e1f4db18cf7..7ec1d6db4087 100644 --- a/PubSub/VERSION +++ b/PubSub/VERSION @@ -1,2 +1 @@ -2.0.0 - +2.1.0 diff --git a/Quotas/VERSION b/Quotas/VERSION index 845639eef26c..0ea3a944b399 100644 --- a/Quotas/VERSION +++ b/Quotas/VERSION @@ -1 +1 @@ -0.1.4 +0.2.0 diff --git a/RecaptchaEnterprise/VERSION b/RecaptchaEnterprise/VERSION index 81c871de46b3..1cac385c6cb8 100644 --- a/RecaptchaEnterprise/VERSION +++ b/RecaptchaEnterprise/VERSION @@ -1 +1 @@ -1.10.0 +1.11.0 diff --git a/SecurityCenter/VERSION b/SecurityCenter/VERSION index 5ff8c4f5d2ad..5db08bf2dc57 100644 --- a/SecurityCenter/VERSION +++ b/SecurityCenter/VERSION @@ -1 +1 @@ -1.26.0 +1.27.0 diff --git a/SecurityPrivateCa/VERSION b/SecurityPrivateCa/VERSION index dc1e644a1014..bd8bf882d061 100644 --- a/SecurityPrivateCa/VERSION +++ b/SecurityPrivateCa/VERSION @@ -1 +1 @@ -1.6.0 +1.7.0 diff --git a/ShoppingCommonProtos/VERSION b/ShoppingCommonProtos/VERSION index 0c62199f16ac..0d91a54c7d43 100644 --- a/ShoppingCommonProtos/VERSION +++ b/ShoppingCommonProtos/VERSION @@ -1 +1 @@ -0.2.1 +0.3.0 diff --git a/Spanner/VERSION b/Spanner/VERSION index dc87e8af82f6..7c7053aa2388 100644 --- a/Spanner/VERSION +++ b/Spanner/VERSION @@ -1 +1 @@ -1.74.0 +1.75.0 diff --git a/Spanner/src/SpannerClient.php b/Spanner/src/SpannerClient.php index d1c15835ec5a..fbe4b1539d49 100644 --- a/Spanner/src/SpannerClient.php +++ b/Spanner/src/SpannerClient.php @@ -120,7 +120,7 @@ class SpannerClient use LROTrait; use ValidateTrait; - const VERSION = '1.74.0'; + const VERSION = '1.75.0'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/spanner.data'; const ADMIN_SCOPE = 'https://www.googleapis.com/auth/spanner.admin'; diff --git a/Speech/VERSION b/Speech/VERSION index 511a76e6faf8..84cc529467b0 100644 --- a/Speech/VERSION +++ b/Speech/VERSION @@ -1 +1 @@ -1.17.1 +1.18.0 diff --git a/Speech/src/SpeechClient.php b/Speech/src/SpeechClient.php index 5b35c74aa993..25d7a88a9230 100644 --- a/Speech/src/SpeechClient.php +++ b/Speech/src/SpeechClient.php @@ -50,7 +50,7 @@ class SpeechClient { use ClientTrait; - const VERSION = '1.17.1'; + const VERSION = '1.18.0'; const SCOPE = 'https://www.googleapis.com/auth/cloud-platform'; diff --git a/Storage/VERSION b/Storage/VERSION index 7d47e599800e..f86fb9cbcf1c 100644 --- a/Storage/VERSION +++ b/Storage/VERSION @@ -1 +1 @@ -1.41.0 +1.41.1 diff --git a/Storage/src/StorageClient.php b/Storage/src/StorageClient.php index 19f696ed437d..797b7fe029d2 100644 --- a/Storage/src/StorageClient.php +++ b/Storage/src/StorageClient.php @@ -47,7 +47,7 @@ class StorageClient use ArrayTrait; use ClientTrait; - const VERSION = '1.41.0'; + const VERSION = '1.41.1'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/devstorage.full_control'; const READ_ONLY_SCOPE = 'https://www.googleapis.com/auth/devstorage.read_only'; diff --git a/Translate/VERSION b/Translate/VERSION index b9a05a6dc1d6..b5aaf81f9cf3 100644 --- a/Translate/VERSION +++ b/Translate/VERSION @@ -1 +1 @@ -1.17.3 +1.17.4 diff --git a/composer.json b/composer.json index 2b84a1ee3694..7c936f7989eb 100644 --- a/composer.json +++ b/composer.json @@ -76,8 +76,8 @@ "google/apps-events-subscriptions": "0.1.0", "google/apps-meet": "0.2.0", "google/cloud-access-approval": "1.2.2", - "google/cloud-advisorynotifications": "0.7.2", - "google/cloud-ai-platform": "0.36.0", + "google/cloud-advisorynotifications": "0.8.0", + "google/cloud-ai-platform": "0.37.0", "google/cloud-alloydb": "0.10.0", "google/cloud-api-gateway": "1.3.2", "google/cloud-api-keys": "0.4.2", @@ -86,18 +86,18 @@ "google/cloud-appengine-admin": "1.3.2", "google/cloud-apphub": "0.1.0", "google/cloud-artifact-registry": "0.6.2", - "google/cloud-asset": "1.15.1", + "google/cloud-asset": "1.16.0", "google/cloud-assured-workloads": "0.11.2", "google/cloud-automl": "1.6.2", "google/cloud-bare-metal-solution": "0.6.2", - "google/cloud-batch": "0.16.3", + "google/cloud-batch": "0.16.4", "google/cloud-beyondcorp-appconnections": "0.4.2", "google/cloud-beyondcorp-appconnectors": "0.4.2", "google/cloud-beyondcorp-appgateways": "0.4.2", "google/cloud-beyondcorp-clientconnectorservices": "0.4.2", "google/cloud-beyondcorp-clientgateways": "0.4.2", "google/cloud-bigquery": "1.30.1", - "google/cloud-bigquery-analyticshub": "0.4.2", + "google/cloud-bigquery-analyticshub": "0.5.0", "google/cloud-bigquery-connection": "1.5.2", "google/cloud-bigquery-data-exchange": "0.4.2", "google/cloud-bigquery-datapolicies": "0.5.2", @@ -114,12 +114,12 @@ "google/cloud-channel": "1.9.2", "google/cloud-cloudcontrolspartner": "0.1.0", "google/cloud-commerce-consumer-procurement": "0.2.2", - "google/cloud-common-protos": "0.5.0", + "google/cloud-common-protos": "0.5.1", "google/cloud-compute": "1.16.0", - "google/cloud-confidentialcomputing": "0.7.2", + "google/cloud-confidentialcomputing": "0.8.0", "google/cloud-config": "0.4.0", "google/cloud-contact-center-insights": "1.9.2", - "google/cloud-container": "1.29.0", + "google/cloud-container": "1.30.0", "google/cloud-container-analysis": "0.5.3", "google/cloud-core": "1.56.2", "google/cloud-data-catalog": "1.10.0", @@ -149,10 +149,10 @@ "google/cloud-eventarc": "1.3.2", "google/cloud-eventarc-publishing": "0.6.1", "google/cloud-filestore": "1.5.4", - "google/cloud-firestore": "1.42.0", + "google/cloud-firestore": "1.43.0", "google/cloud-functions": "1.6.2", "google/cloud-game-servers": "1.2.4", - "google/cloud-gke-backup": "0.6.2", + "google/cloud-gke-backup": "0.7.0", "google/cloud-gke-connect-gateway": "0.4.1", "google/cloud-gke-hub": "0.9.2", "google/cloud-gke-multi-cloud": "0.5.2", @@ -174,7 +174,7 @@ "google/cloud-monitoring": "1.9.2", "google/cloud-netapp": "0.2.4", "google/cloud-network-connectivity": "1.5.2", - "google/cloud-network-management": "1.6.0", + "google/cloud-network-management": "1.7.0", "google/cloud-network-security": "0.6.2", "google/cloud-notebooks": "0.7.2", "google/cloud-optimization": "0.6.2", @@ -188,10 +188,10 @@ "google/cloud-policytroubleshooter-iam": "0.2.2", "google/cloud-private-catalog": "0.4.1", "google/cloud-profiler": "1.4.0", - "google/cloud-pubsub": "2.0.0", - "google/cloud-quotas": "0.1.4", + "google/cloud-pubsub": "2.1.0", + "google/cloud-quotas": "0.2.0", "google/cloud-rapidmigrationassessment": "0.3.2", - "google/cloud-recaptcha-enterprise": "1.10.0", + "google/cloud-recaptcha-enterprise": "1.11.0", "google/cloud-recommendations-ai": "0.7.2", "google/cloud-recommender": "1.11.2", "google/cloud-redis": "1.9.2", @@ -203,8 +203,8 @@ "google/cloud-scheduler": "1.10.2", "google/cloud-secret-manager": "1.14.0", "google/cloud-securesourcemanager": "0.2.2", - "google/cloud-security-center": "1.26.0", - "google/cloud-security-private-ca": "1.6.0", + "google/cloud-security-center": "1.27.0", + "google/cloud-security-private-ca": "1.7.0", "google/cloud-security-public-ca": "0.3.2", "google/cloud-securitycentermanagement": "0.2.5", "google/cloud-service-control": "1.4.1", @@ -213,10 +213,10 @@ "google/cloud-service-usage": "1.3.1", "google/cloud-servicehealth": "0.1.3", "google/cloud-shell": "1.3.2", - "google/cloud-spanner": "1.74.0", - "google/cloud-speech": "1.17.1", + "google/cloud-spanner": "1.75.0", + "google/cloud-speech": "1.18.0", "google/cloud-sql-admin": "0.16.0", - "google/cloud-storage": "1.41.0", + "google/cloud-storage": "1.41.1", "google/cloud-storage-transfer": "1.4.2", "google/cloud-storageinsights": "0.3.2", "google/cloud-support": "0.2.2", @@ -226,7 +226,7 @@ "google/cloud-text-to-speech": "1.8.2", "google/cloud-tpu": "1.4.2", "google/cloud-trace": "1.8.3", - "google/cloud-translate": "1.17.3", + "google/cloud-translate": "1.17.4", "google/cloud-video-live-stream": "0.7.2", "google/cloud-video-stitcher": "0.8.2", "google/cloud-video-transcoder": "0.10.2", @@ -240,7 +240,7 @@ "google/cloud-workflows": "0.5.2", "google/grafeas": "0.10.0", "google/longrunning": "0.3.1", - "google/shopping-common-protos": "0.2.1", + "google/shopping-common-protos": "0.3.0", "google/shopping-css": "0.2.2", "google/shopping-merchant-inventories": "0.3.2", "google/shopping-merchant-quota": "0.1.0", From 0c2ecdb41bf4c917181b0c489cdead319dfd0fde Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 10 Apr 2024 14:08:50 -0700 Subject: [PATCH 19/86] feat: support import data from Cloud Spanner, BigTable, SQL and Firestore (#7211) feat: add answer generation APIs feat: add standalone grounding API feat: add standalone ranking API feat: support advanced search boosting feat: add advanced engine model APIs docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 623543290 Source-Link: https://github.com/googleapis/googleapis/commit/5fadb63405833b1b9a4ff84b0e649d9591f2480d Source-Link: https://github.com/googleapis/googleapis-gen/commit/589978b0a33d46e87b7bd0d8017739cdcae2accc Copy-Tag: eyJwIjoiRGlzY292ZXJ5RW5naW5lLy5Pd2xCb3QueWFtbCIsImgiOiI1ODk5NzhiMGEzM2Q0NmU4N2I3YmQwZDgwMTc3MzljZGNhZTJhY2NjIn0= --- DiscoveryEngine/metadata/V1Beta/Answer.php | Bin 0 -> 5051 bytes DiscoveryEngine/metadata/V1Beta/Common.php | Bin 2007 -> 2830 bytes .../V1Beta/ConversationalSearchService.php | Bin 6233 -> 13836 bytes .../V1Beta/DocumentProcessingConfig.php | Bin 2249 -> 2253 bytes .../metadata/V1Beta/DocumentService.php | 16 +- .../metadata/V1Beta/EngineService.php | 25 +- .../V1Beta/GroundedGenerationService.php | Bin 0 -> 2514 bytes DiscoveryEngine/metadata/V1Beta/Grounding.php | 44 ++ .../metadata/V1Beta/ImportConfig.php | Bin 4737 -> 6941 bytes .../metadata/V1Beta/RankService.php | 49 ++ .../metadata/V1Beta/SearchService.php | Bin 8788 -> 9961 bytes .../metadata/V1Beta/SearchTuningService.php | Bin 2906 -> 3047 bytes DiscoveryEngine/metadata/V1Beta/Session.php | Bin 0 -> 2042 bytes .../answer_query.php | 84 +++ .../create_session.php | 81 +++ .../delete_session.php | 78 +++ .../get_answer.php | 78 +++ .../get_session.php | 77 +++ .../list_sessions.php | 82 +++ .../update_session.php | 63 ++ .../EngineServiceClient/pause_engine.php | 80 +++ .../EngineServiceClient/resume_engine.php | 80 +++ .../EngineServiceClient/tune_engine.php | 92 +++ .../check_grounding.php | 76 +++ .../samples/V1beta/RankServiceClient/rank.php | 79 +++ DiscoveryEngine/src/V1beta/Answer.php | 445 ++++++++++++++ .../src/V1beta/Answer/AnswerSkippedReason.php | 79 +++ .../src/V1beta/Answer/Citation.php | 140 +++++ .../src/V1beta/Answer/CitationSource.php | 68 +++ .../V1beta/Answer/QueryUnderstandingInfo.php | 68 +++ .../QueryClassificationInfo.php | 102 ++++ .../QueryClassificationInfo/Type.php | 62 ++ .../src/V1beta/Answer/Reference.php | 109 ++++ .../src/V1beta/Answer/Reference/ChunkInfo.php | 190 ++++++ .../Reference/ChunkInfo/DocumentMetadata.php | 170 ++++++ .../Reference/UnstructuredDocumentInfo.php | 170 ++++++ .../UnstructuredDocumentInfo/ChunkContent.php | 102 ++++ DiscoveryEngine/src/V1beta/Answer/State.php | 69 +++ DiscoveryEngine/src/V1beta/Answer/Step.php | 170 ++++++ .../src/V1beta/Answer/Step/Action.php | 120 ++++ .../V1beta/Answer/Step/Action/Observation.php | 72 +++ .../Step/Action/Observation/SearchResult.php | 210 +++++++ .../Observation/SearchResult/ChunkInfo.php | 146 +++++ .../Observation/SearchResult/SnippetInfo.php | 102 ++++ .../Answer/Step/Action/SearchAction.php | 68 +++ .../src/V1beta/Answer/Step/State.php | 69 +++ .../src/V1beta/AnswerQueryRequest.php | 519 ++++++++++++++++ .../AnswerGenerationSpec.php | 326 ++++++++++ .../AnswerGenerationSpec/ModelSpec.php | 72 +++ .../AnswerGenerationSpec/PromptSpec.php | 68 +++ .../QueryUnderstandingSpec.php | 122 ++++ .../QueryClassificationSpec.php | 68 +++ .../QueryClassificationSpec/Type.php | 62 ++ .../QueryRephraserSpec.php | 110 ++++ .../RelatedQuestionsSpec.php | 68 +++ .../V1beta/AnswerQueryRequest/SafetySpec.php | 72 +++ .../V1beta/AnswerQueryRequest/SearchSpec.php | 109 ++++ .../SearchSpec/SearchParams.php | 268 ++++++++ .../SearchSpec/SearchResultList.php | 68 +++ .../SearchResultList/SearchResult.php | 109 ++++ .../SearchResult/ChunkInfo.php | 102 ++++ .../SearchResult/UnstructuredDocumentInfo.php | 238 ++++++++ .../DocumentContext.php | 102 ++++ .../ExtractiveAnswer.php | 103 ++++ .../ExtractiveSegment.php | 103 ++++ .../src/V1beta/AnswerQueryResponse.php | 155 +++++ DiscoveryEngine/src/V1beta/BigQuerySource.php | 8 +- .../src/V1beta/BigtableOptions.php | 114 ++++ .../V1beta/BigtableOptions/BigtableColumn.php | 218 +++++++ .../BigtableOptions/BigtableColumnFamily.php | 218 +++++++ .../src/V1beta/BigtableOptions/Encoding.php | 62 ++ .../src/V1beta/BigtableOptions/Type.php | 101 +++ DiscoveryEngine/src/V1beta/BigtableSource.php | 191 ++++++ .../src/V1beta/CheckGroundingRequest.php | 189 ++++++ .../src/V1beta/CheckGroundingResponse.php | 159 +++++ .../V1beta/CheckGroundingResponse/Claim.php | 218 +++++++ .../src/V1beta/CheckGroundingSpec.php | 93 +++ .../ConversationalSearchServiceClient.php | 578 ++++++++++++++++++ .../V1beta/Client/DocumentServiceClient.php | 24 + .../src/V1beta/Client/EngineServiceClient.php | 96 +++ .../GroundedGenerationServiceClient.php | 251 ++++++++ .../src/V1beta/Client/RankServiceClient.php | 249 ++++++++ DiscoveryEngine/src/V1beta/CloudSqlSource.php | 281 +++++++++ .../src/V1beta/CreateSessionRequest.php | 132 ++++ .../src/V1beta/DeleteSessionRequest.php | 86 +++ .../ParsingConfig/OcrParsingConfig.php | 35 +- .../src/V1beta/Engine/ChatEngineConfig.php | 8 +- .../src/V1beta/Engine/SearchEngineConfig.php | 8 +- DiscoveryEngine/src/V1beta/FactChunk.php | 147 +++++ .../src/V1beta/FhirStoreSource.php | 117 ++++ .../src/V1beta/FirestoreSource.php | 201 ++++++ DiscoveryEngine/src/V1beta/GcsSource.php | 16 +- .../src/V1beta/GetAnswerRequest.php | 86 +++ .../src/V1beta/GetSessionRequest.php | 86 +++ DiscoveryEngine/src/V1beta/GroundingFact.php | 109 ++++ .../src/V1beta/ImportDocumentsMetadata.php | 34 ++ .../src/V1beta/ImportDocumentsRequest.php | 405 +++++++++--- .../src/V1beta/IndustryVertical.php | 7 + .../src/V1beta/ListSessionsRequest.php | 274 +++++++++ .../src/V1beta/ListSessionsResponse.php | 101 +++ DiscoveryEngine/src/V1beta/PageInfo.php | 8 +- .../src/V1beta/PauseEngineRequest.php | 91 +++ DiscoveryEngine/src/V1beta/Query.php | 109 ++++ DiscoveryEngine/src/V1beta/RankRequest.php | 263 ++++++++ DiscoveryEngine/src/V1beta/RankResponse.php | 69 +++ DiscoveryEngine/src/V1beta/RankingRecord.php | 203 ++++++ .../src/V1beta/ResumeEngineRequest.php | 91 +++ DiscoveryEngine/src/V1beta/SearchRequest.php | 48 +- .../BoostSpec/ConditionBoostSpec.php | 128 ++-- .../ConditionBoostSpec/BoostControlSpec.php | 204 +++++++ .../BoostControlSpec/AttributeType.php | 71 +++ .../BoostControlSpec/ControlPoint.php | 128 ++++ .../BoostControlSpec/InterpolationType.php | 57 ++ .../ExtractiveContentSpec.php | 24 +- .../ContentSearchSpec/SummarySpec.php | 54 ++ .../SummarySpec/ModelSpec.php | 48 +- DiscoveryEngine/src/V1beta/SearchResponse.php | 38 ++ .../SearchResponse/GeoSearchDebugInfo.php | 103 ++++ .../SearchResponse/Summary/Reference.php | 34 ++ .../Summary/Reference/ChunkContent.php | 102 ++++ DiscoveryEngine/src/V1beta/SearchTier.php | 2 +- DiscoveryEngine/src/V1beta/Session.php | 261 ++++++++ DiscoveryEngine/src/V1beta/Session/State.php | 55 ++ DiscoveryEngine/src/V1beta/Session/Turn.php | 113 ++++ DiscoveryEngine/src/V1beta/SolutionType.php | 9 + DiscoveryEngine/src/V1beta/SpannerSource.php | 219 +++++++ .../src/V1beta/TrainCustomModelResponse.php | 54 +- .../src/V1beta/TuneEngineMetadata.php | 75 +++ .../src/V1beta/TuneEngineRequest.php | 92 +++ .../src/V1beta/TuneEngineResponse.php | 33 + .../src/V1beta/UpdateDocumentRequest.php | 73 +++ .../src/V1beta/UpdateSessionRequest.php | 158 +++++ .../src/V1beta/gapic_metadata.json | 78 +++ ...sational_search_service_client_config.json | 35 ++ ...ional_search_service_descriptor_config.php | 104 ++++ ...onal_search_service_rest_client_config.php | 157 +++++ .../document_service_descriptor_config.php | 1 + .../engine_service_client_config.json | 15 + .../engine_service_descriptor_config.php | 43 ++ .../engine_service_rest_client_config.php | 36 ++ ...nded_generation_service_client_config.json | 39 ++ ...d_generation_service_descriptor_config.php | 23 + ..._generation_service_rest_client_config.php | 153 +++++ .../resources/rank_service_client_config.json | 39 ++ .../rank_service_descriptor_config.php | 23 + .../rank_service_rest_client_config.php | 153 +++++ .../search_service_client_config.json | 20 +- .../ConversationalSearchServiceClientTest.php | 538 +++++++++++++++- .../V1beta/Client/EngineServiceClientTest.php | 260 ++++++++ .../GroundedGenerationServiceClientTest.php | 163 +++++ .../V1beta/Client/RankServiceClientTest.php | 160 +++++ 151 files changed, 16372 insertions(+), 246 deletions(-) create mode 100644 DiscoveryEngine/metadata/V1Beta/Answer.php create mode 100644 DiscoveryEngine/metadata/V1Beta/GroundedGenerationService.php create mode 100644 DiscoveryEngine/metadata/V1Beta/Grounding.php create mode 100644 DiscoveryEngine/metadata/V1Beta/RankService.php create mode 100644 DiscoveryEngine/metadata/V1Beta/Session.php create mode 100644 DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/answer_query.php create mode 100644 DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/create_session.php create mode 100644 DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/delete_session.php create mode 100644 DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/get_answer.php create mode 100644 DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/get_session.php create mode 100644 DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/list_sessions.php create mode 100644 DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/update_session.php create mode 100644 DiscoveryEngine/samples/V1beta/EngineServiceClient/pause_engine.php create mode 100644 DiscoveryEngine/samples/V1beta/EngineServiceClient/resume_engine.php create mode 100644 DiscoveryEngine/samples/V1beta/EngineServiceClient/tune_engine.php create mode 100644 DiscoveryEngine/samples/V1beta/GroundedGenerationServiceClient/check_grounding.php create mode 100644 DiscoveryEngine/samples/V1beta/RankServiceClient/rank.php create mode 100644 DiscoveryEngine/src/V1beta/Answer.php create mode 100644 DiscoveryEngine/src/V1beta/Answer/AnswerSkippedReason.php create mode 100644 DiscoveryEngine/src/V1beta/Answer/Citation.php create mode 100644 DiscoveryEngine/src/V1beta/Answer/CitationSource.php create mode 100644 DiscoveryEngine/src/V1beta/Answer/QueryUnderstandingInfo.php create mode 100644 DiscoveryEngine/src/V1beta/Answer/QueryUnderstandingInfo/QueryClassificationInfo.php create mode 100644 DiscoveryEngine/src/V1beta/Answer/QueryUnderstandingInfo/QueryClassificationInfo/Type.php create mode 100644 DiscoveryEngine/src/V1beta/Answer/Reference.php create mode 100644 DiscoveryEngine/src/V1beta/Answer/Reference/ChunkInfo.php create mode 100644 DiscoveryEngine/src/V1beta/Answer/Reference/ChunkInfo/DocumentMetadata.php create mode 100644 DiscoveryEngine/src/V1beta/Answer/Reference/UnstructuredDocumentInfo.php create mode 100644 DiscoveryEngine/src/V1beta/Answer/Reference/UnstructuredDocumentInfo/ChunkContent.php create mode 100644 DiscoveryEngine/src/V1beta/Answer/State.php create mode 100644 DiscoveryEngine/src/V1beta/Answer/Step.php create mode 100644 DiscoveryEngine/src/V1beta/Answer/Step/Action.php create mode 100644 DiscoveryEngine/src/V1beta/Answer/Step/Action/Observation.php create mode 100644 DiscoveryEngine/src/V1beta/Answer/Step/Action/Observation/SearchResult.php create mode 100644 DiscoveryEngine/src/V1beta/Answer/Step/Action/Observation/SearchResult/ChunkInfo.php create mode 100644 DiscoveryEngine/src/V1beta/Answer/Step/Action/Observation/SearchResult/SnippetInfo.php create mode 100644 DiscoveryEngine/src/V1beta/Answer/Step/Action/SearchAction.php create mode 100644 DiscoveryEngine/src/V1beta/Answer/Step/State.php create mode 100644 DiscoveryEngine/src/V1beta/AnswerQueryRequest.php create mode 100644 DiscoveryEngine/src/V1beta/AnswerQueryRequest/AnswerGenerationSpec.php create mode 100644 DiscoveryEngine/src/V1beta/AnswerQueryRequest/AnswerGenerationSpec/ModelSpec.php create mode 100644 DiscoveryEngine/src/V1beta/AnswerQueryRequest/AnswerGenerationSpec/PromptSpec.php create mode 100644 DiscoveryEngine/src/V1beta/AnswerQueryRequest/QueryUnderstandingSpec.php create mode 100644 DiscoveryEngine/src/V1beta/AnswerQueryRequest/QueryUnderstandingSpec/QueryClassificationSpec.php create mode 100644 DiscoveryEngine/src/V1beta/AnswerQueryRequest/QueryUnderstandingSpec/QueryClassificationSpec/Type.php create mode 100644 DiscoveryEngine/src/V1beta/AnswerQueryRequest/QueryUnderstandingSpec/QueryRephraserSpec.php create mode 100644 DiscoveryEngine/src/V1beta/AnswerQueryRequest/RelatedQuestionsSpec.php create mode 100644 DiscoveryEngine/src/V1beta/AnswerQueryRequest/SafetySpec.php create mode 100644 DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec.php create mode 100644 DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchParams.php create mode 100644 DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList.php create mode 100644 DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList/SearchResult.php create mode 100644 DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList/SearchResult/ChunkInfo.php create mode 100644 DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList/SearchResult/UnstructuredDocumentInfo.php create mode 100644 DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList/SearchResult/UnstructuredDocumentInfo/DocumentContext.php create mode 100644 DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList/SearchResult/UnstructuredDocumentInfo/ExtractiveAnswer.php create mode 100644 DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList/SearchResult/UnstructuredDocumentInfo/ExtractiveSegment.php create mode 100644 DiscoveryEngine/src/V1beta/AnswerQueryResponse.php create mode 100644 DiscoveryEngine/src/V1beta/BigtableOptions.php create mode 100644 DiscoveryEngine/src/V1beta/BigtableOptions/BigtableColumn.php create mode 100644 DiscoveryEngine/src/V1beta/BigtableOptions/BigtableColumnFamily.php create mode 100644 DiscoveryEngine/src/V1beta/BigtableOptions/Encoding.php create mode 100644 DiscoveryEngine/src/V1beta/BigtableOptions/Type.php create mode 100644 DiscoveryEngine/src/V1beta/BigtableSource.php create mode 100644 DiscoveryEngine/src/V1beta/CheckGroundingRequest.php create mode 100644 DiscoveryEngine/src/V1beta/CheckGroundingResponse.php create mode 100644 DiscoveryEngine/src/V1beta/CheckGroundingResponse/Claim.php create mode 100644 DiscoveryEngine/src/V1beta/CheckGroundingSpec.php create mode 100644 DiscoveryEngine/src/V1beta/Client/GroundedGenerationServiceClient.php create mode 100644 DiscoveryEngine/src/V1beta/Client/RankServiceClient.php create mode 100644 DiscoveryEngine/src/V1beta/CloudSqlSource.php create mode 100644 DiscoveryEngine/src/V1beta/CreateSessionRequest.php create mode 100644 DiscoveryEngine/src/V1beta/DeleteSessionRequest.php create mode 100644 DiscoveryEngine/src/V1beta/FactChunk.php create mode 100644 DiscoveryEngine/src/V1beta/FhirStoreSource.php create mode 100644 DiscoveryEngine/src/V1beta/FirestoreSource.php create mode 100644 DiscoveryEngine/src/V1beta/GetAnswerRequest.php create mode 100644 DiscoveryEngine/src/V1beta/GetSessionRequest.php create mode 100644 DiscoveryEngine/src/V1beta/GroundingFact.php create mode 100644 DiscoveryEngine/src/V1beta/ListSessionsRequest.php create mode 100644 DiscoveryEngine/src/V1beta/ListSessionsResponse.php create mode 100644 DiscoveryEngine/src/V1beta/PauseEngineRequest.php create mode 100644 DiscoveryEngine/src/V1beta/Query.php create mode 100644 DiscoveryEngine/src/V1beta/RankRequest.php create mode 100644 DiscoveryEngine/src/V1beta/RankResponse.php create mode 100644 DiscoveryEngine/src/V1beta/RankingRecord.php create mode 100644 DiscoveryEngine/src/V1beta/ResumeEngineRequest.php create mode 100644 DiscoveryEngine/src/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec/BoostControlSpec.php create mode 100644 DiscoveryEngine/src/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec/BoostControlSpec/AttributeType.php create mode 100644 DiscoveryEngine/src/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec/BoostControlSpec/ControlPoint.php create mode 100644 DiscoveryEngine/src/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec/BoostControlSpec/InterpolationType.php create mode 100644 DiscoveryEngine/src/V1beta/SearchResponse/GeoSearchDebugInfo.php create mode 100644 DiscoveryEngine/src/V1beta/SearchResponse/Summary/Reference/ChunkContent.php create mode 100644 DiscoveryEngine/src/V1beta/Session.php create mode 100644 DiscoveryEngine/src/V1beta/Session/State.php create mode 100644 DiscoveryEngine/src/V1beta/Session/Turn.php create mode 100644 DiscoveryEngine/src/V1beta/SpannerSource.php create mode 100644 DiscoveryEngine/src/V1beta/TuneEngineMetadata.php create mode 100644 DiscoveryEngine/src/V1beta/TuneEngineRequest.php create mode 100644 DiscoveryEngine/src/V1beta/TuneEngineResponse.php create mode 100644 DiscoveryEngine/src/V1beta/UpdateSessionRequest.php create mode 100644 DiscoveryEngine/src/V1beta/resources/grounded_generation_service_client_config.json create mode 100644 DiscoveryEngine/src/V1beta/resources/grounded_generation_service_descriptor_config.php create mode 100644 DiscoveryEngine/src/V1beta/resources/grounded_generation_service_rest_client_config.php create mode 100644 DiscoveryEngine/src/V1beta/resources/rank_service_client_config.json create mode 100644 DiscoveryEngine/src/V1beta/resources/rank_service_descriptor_config.php create mode 100644 DiscoveryEngine/src/V1beta/resources/rank_service_rest_client_config.php create mode 100644 DiscoveryEngine/tests/Unit/V1beta/Client/GroundedGenerationServiceClientTest.php create mode 100644 DiscoveryEngine/tests/Unit/V1beta/Client/RankServiceClientTest.php diff --git a/DiscoveryEngine/metadata/V1Beta/Answer.php b/DiscoveryEngine/metadata/V1Beta/Answer.php new file mode 100644 index 0000000000000000000000000000000000000000..fe9d77eac85801056d841c5cfa6ec5d64047f107 GIT binary patch literal 5051 zcmcIoOOxBg7LM(C`8b(O8VHVfDG!oK70ASJ1LY8MWn1Hj1lzGZfq*HMM(&vr@kqLQ z420mibr-i_!-gL~QB<*E$BI2mw)_FsRPhJc!0B#D<9P(eAvLASnXL}=gEnZ)zfoywQzB8hMBFoK=-0t*ct*Q4<<9g&C$ClgnPcOBnHLjr1r%*7?td$D?L8W|#ph5+hu9P$d3 zY=n%c$yiig;F?P*YDzIBOB=?a0=W#wSgjq=^jz^!=cNC_LKbIa5qd3%&}BpV5oc%t z`C6pzFj-;*Esz^9FS0#ErZHO8QtkdMfl|h%;tYNPNata3_X>F&j%IW-ouSAS>GOFg z?(irADRx6FdNvk0jKR>e<1Okk)iK&Ew@TIaG+JfQ%IXAeGl6B1zkYmIuLIs&nNmVB$D8zxo zYfF(FgW1T5Ml>lAAuI}mY!BMyPy+`Xhgk=J0BE1$UK;&1ACIQJJ`;io4hvLF`8({LQi65Y12!kO5D z1j0f2>qkDz<;Yz)k%qwBO8N~fs4V*3hjUbBgp!6S?PH`*bFj2`@t-BZ0q$nT73&0+ zu(<7VOTCx{OZs*JW_aP%())|$-D36fG(KSfJD1on>4@-JNC=DMh&H`=V>7+guEV^= zyRMY0uTCva<>#d@=kQYIkK}zg7E&v)H%)=fg_o+$hlExP4ko~{ZoC5}Z!M(3HouH{ z?v<*IhXwEKKuOQQ(Mee>zxf>~azgrU21*m#$tEl&c47w;k1*f!yns(dV;(YLn=%2O z7>%7E0!!Z)Qq9ByS=w92{7y8yB)%8o*XOqQ7+5%S3ugG6$6={|r@J=*7#Fp9Tk9EWPgif6 zw^p^@9Sp1*vi^HH~RQ*YccZ|j|#YG3cPmu71JFZ`nZuK>^gMeiW&BsR9-A5c3AEBBM9ab@HQ z%Hmr3IIgg|GC&W%ZH>N0&`iy1936iBFI8%NZNs4R7B#37g|& zqO>Q}{@Rs&D_`f2H+7@Y!SuSLwOe{y`!;{J#ivXPpE4=UbjqahX_X?TOh2Z(2FWmL zXBs8;4R9RA##+DR&kML(jpNm7djM-Sv2kq<;}Ll;U&v-1FNk^1#CV8Z5RQGoXo&9= K1Dr980sa7Rhk(QY literal 0 HcmV?d00001 diff --git a/DiscoveryEngine/metadata/V1Beta/Common.php b/DiscoveryEngine/metadata/V1Beta/Common.php index 7624b9a3fc45df4885363a6d586499a04920c50c..3b157a327cc809345bb5be16c0a13c02dd2785e1 100644 GIT binary patch delta 456 zcmcc4-zT;~nTchdAeX^JZ-dR@OdgDkNs|{a`-%$*bMbq)I{JioI6DTp#=CiV1_`ih zEt&kDxk*__kxMq%-zPN0)88*XBr?D?-rd#DHOMi z3z*nmIRm*@7$Pfje!%+C`7@;9)lv%Yey<1>9Lu?MKt}KfCFW%#3~&b-;8}z$2GkDaBQ#fXDQBc6 z=9FY4Cl;mZrRV3T=cFbUWESfs=jZCXWn>lwm*f|v3I%~oGe}7+Ni0q+0h$A4)#|6g zlmG=m?D%4kdZ4S;F>$E?ou$B*QJR-6R0`5Rxs^>*T|Xs1ximL54{QpQS*xE6QUx>u UOxFtaF#^?RDHEY~awoeV0L5dUZ2$lO delta 49 zcmV-10M7r87S|83BLW2J3JNfhOE9xn0!RS?O_QJlO#&)`lLQ2Ulc@x!0_+5{QU!1V Hlfep2dioEI diff --git a/DiscoveryEngine/metadata/V1Beta/ConversationalSearchService.php b/DiscoveryEngine/metadata/V1Beta/ConversationalSearchService.php index df5f16352aae7b712cfa09799ca12a770b905584..9b0d05a51f50893449dff387989282ce8b172b07 100644 GIT binary patch literal 13836 zcmd5@U2Ggz74EL%#6FG_`_@f2+o)ZpC2?G5+-#ww>o|1R-a2j*+ws~7aoujmyVv$4 z>zVD$tW&oNARZ8XJ%*i z&$DY=)GxMo@BPlX=l`5LbN-9vjWRr(n5G7`G=~-wtJ?`@gC@$B>6itxlvu5-tx+pc zFgMG3iCStRF*TQ%om)&~r)CyEgIjI0VijmAv2L2{B|26pnU&&LQMU``7PYpiv923* zZ0qbQb+oa9Y2b&p=IExOmGU;#tilHVvbOXBRXI%nL))ZwSu4=Q^nB(rZYyezwldA( zS0)+!%2W`3f6A5Bl3qyI4zf~6Jfhoq-OwFf zE9tMG3?>q5TFIt}SHE_xViXwr3ASO*DA3{434zJhK2kPOW)lgQ-FYTP6yeH@;ZO_D zyfQ`Yf~A)o)0)Snsnj}kJmIrXhEGef3{GE53=1ApsX8Vn5{^}&e(H&YMV*RejB~yj zz-{lZl?K90m-UsjVVFz`reUX2)iYHgnr)mc>C|xA+w-(eOT`S`(6)5bYH#ZTm4+6Y z$yTO<$F^_LHdts0=C`--r)miqFxoxCv~ARLcr?#?(RQ+%WoNsCtz6}oHT!1cz1(5W zT+pR^q>Dw*8=l5^Gwj(fv*uIq<|<6@QJ^6Y3m~h@=U1g&%LT`M3oL28@~g+>SDbRQSgCOfl{=mYv%?=<<-T)a_B9H_@w4G} za*LA09*|pj9LJzHMw!jXFWvm$eJO;tiIyQ&D8KB62c#!azeg?5mnzhDNE!~X)DVj# zBE!9z$N!p+-c6r@M{5-)m_U8mDkiNlKN876H)2`au_$8nB~?`{ZfOGQB7NDJG0GJu z(}gt23>@JJ%UI8&z}NKkSQlsL?A^2qqdRcJvyiclOyNc{4TllJ%ZRaV&ehpaTm{Z` zFZ9{k8kGq(b`WuT2!*~1a+)t`tF&at4kfzq$n))hH&TPTgqW8&WY%!3ZL$W3?aJn+ zW^L!~GA+b<_#wj45m8PmSj8hb=wLGRA(omGz&ZSz9D##tdI_^=te44~%mb{NrtJu- zz^R@Ob-Ezc3n7b6CP(_AdrK=-D7T*8RP2?6#-a9iGgx<2Yj*$-wcP`3qLIC(j zj(L+BA~^ek#{nKZ2B62ZiWnSMw|UgavYUf1l$H({94K5X^t!q7mmunC^KvWK*8yextd)&7nNzG{zEl4><-$ zc&$>lX{Bi9^2D0pQa!mH^byR!gD=?1`U*p@tf&UH9uQ7-}fo8vu+6oJ6ow zi?DvR(^EI1pk8M1{PZR0!`O}$u^=Y$)wMk(HqY^0S?fljR4LMYL6`kK_t_qD0*0jh zmNa9%!lGw^X+lKC1jO`p12b%1EAq-7R!hAW*>@o{JGAODk0mf;iTor2_u_9$ z!%6QJ>#En84cQp~7^koQA34o>T;&8)k`RX_kvV_r*qi~4Z2R4X2y2U48u>S1fx1WcB>UO~oE5$<+zY4vc1Cevk%^g^} z$LYK2lkmt6-oba*9V*l7oicL>x^*^Vihpnbjy0*DUc)Apr`J5c=0JHB_~71Oy{vWW zMU82y{NqV>tKyO4^~G0UNU(y_jSWjKe>3J@!LYMk zrlL(dlDxSe+|wdA5ekHRS>$zNAn*E2j0MetC1Xy%kk5o)E;MFp9e!)LbfX54QZGG9MDNx$0U|cwV{O5d}|qE#b+B zQ6Tjr`;f}3-{`vDF<1HM8vL;mmEX!M|Bl>A^Se>5lD|hrsw(N&la?1os!C{u(p&{W z9iw+H&y7^Y9v;&ZdL1D75WS@S-X^4=>o>ZB?!Zg_j9wD+yT_>Sl85W%y=ZdIGdllD zwUsDZhr6KPY$l&?pFkV>t8vpC$>rUWYp&WLE%M(e9Id&eBIB+*w7fc~*|iH5*SZP+@mgjs5X$RADj~YPot1jsC^>gG4p;Y19;VR)=`x~YBe;(yh|8Z1V^r8Tc z0k+sB07f@_z9mc{FebO4W#JB9!fE2sJS^bWmDM((o2#THp`w!C6(LVgt*DSsqR{Jg zyyWwtB=4u8u~yIptzV4uiO!HX4AE-$kK6Fn9>5iohOM70oK*j{+6( zoybU4)EyZ9?d8iO;hNK+9Q=Co)W*E$nUShsTk#Ww^Tg`MB5$K<2c}9PPK>z=tsmgFl+HRma>j@Nziqv+A8ncU5-lPca%df#2OB41;wzQ-iit>BAH>^-TEqbCJiD#h_qsT#mkN-SJG$R|OM cpYmRl7!@xC`Q9OF`u-4KDc(^b delta 61 zcmV-D0K)%_Y}qid`2v$h1B#O#1d;{#Tqg=gli>v~pcvf&j3lqyCngET&8@61%m4xT6j1;G delta 64 zcmX>rcv5gf3lqyvZZ4OJ-Y%2RFgY?F+|0);!pJyjvoeb|qo_ZZfPZpPKw?pGW?s5; UeqLH;x{%W3WLBlkovbd*0H5j;-~a#s diff --git a/DiscoveryEngine/metadata/V1Beta/DocumentService.php b/DiscoveryEngine/metadata/V1Beta/DocumentService.php index 7d01db368b55..5121cf7b9c32 100644 --- a/DiscoveryEngine/metadata/V1Beta/DocumentService.php +++ b/DiscoveryEngine/metadata/V1Beta/DocumentService.php @@ -23,10 +23,11 @@ public static function initOnce() { \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\PurgeConfig::initOnce(); \GPBMetadata\Google\Longrunning\Operations::initOnce(); \GPBMetadata\Google\Protobuf\GPBEmpty::initOnce(); + \GPBMetadata\Google\Protobuf\FieldMask::initOnce(); $pool->internalAddGeneratedFile( ' -˜ -:google/cloud/discoveryengine/v1beta/document_service.proto#google.cloud.discoveryengine.v1betagoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto2google/cloud/discoveryengine/v1beta/document.proto7google/cloud/discoveryengine/v1beta/import_config.proto6google/cloud/discoveryengine/v1beta/purge_config.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto"S +ƒ +:google/cloud/discoveryengine/v1beta/document_service.proto#google.cloud.discoveryengine.v1betagoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto2google/cloud/discoveryengine/v1beta/document.proto7google/cloud/discoveryengine/v1beta/import_config.proto6google/cloud/discoveryengine/v1beta/purge_config.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"S GetDocumentRequest= name ( B/àAúA) \'discoveryengine.googleapis.com/Document"| @@ -43,18 +44,19 @@ public static function initOnce() { parent ( B-àAúA\' %discoveryengine.googleapis.com/BranchD document ( 2-.google.cloud.discoveryengine.v1beta.DocumentBàA - document_id ( BàA"t + document_id ( BàA"¥ UpdateDocumentRequestD document ( 2-.google.cloud.discoveryengine.v1beta.DocumentBàA - allow_missing ("V + allow_missing (/ + update_mask ( 2.google.protobuf.FieldMask"V DeleteDocumentRequest= name ( B/àAúA) -\'discoveryengine.googleapis.com/Document2„ +\'discoveryengine.googleapis.com/Document2› DocumentService¬ GetDocument7.google.cloud.discoveryengine.v1beta.GetDocumentRequest-.google.cloud.discoveryengine.v1beta.Document"´ÚAname‚Ó䓦I/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}ZYW/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}¿ ListDocuments9.google.cloud.discoveryengine.v1beta.ListDocumentsRequest:.google.cloud.discoveryengine.v1beta.ListDocumentsResponse"¶ÚAparent‚Ó䓦I/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documentsZYW/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documentsÝ -CreateDocument:.google.cloud.discoveryengine.v1beta.CreateDocumentRequest-.google.cloud.discoveryengine.v1beta.Document"ßÚAparent,document,document_id‚Ó䓺"I/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:documentZc"W/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:documentÑ -UpdateDocument:.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest-.google.cloud.discoveryengine.v1beta.Document"Ó‚Óä“Ì2R/v1beta/{document.name=projects/*/locations/*/dataStores/*/branches/*/documents/*}:documentZl2`/v1beta/{document.name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}:document› +CreateDocument:.google.cloud.discoveryengine.v1beta.CreateDocumentRequest-.google.cloud.discoveryengine.v1beta.Document"ßÚAparent,document,document_id‚Ó䓺"I/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:documentZc"W/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:documentè +UpdateDocument:.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest-.google.cloud.discoveryengine.v1beta.Document"êÚAdocument,update_mask‚Óä“Ì2R/v1beta/{document.name=projects/*/locations/*/dataStores/*/branches/*/documents/*}:documentZl2`/v1beta/{document.name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}:document› DeleteDocument:.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest.google.protobuf.Empty"´ÚAname‚Ó䓦*I/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}ZY*W/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}® ImportDocuments;.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.google.longrunning.Operation"¾ÊAz ;google.cloud.discoveryengine.v1beta.ImportDocumentsResponse;google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata‚Ó䓺"P/v1beta/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:import:*Zc"^/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:import:*¨ diff --git a/DiscoveryEngine/metadata/V1Beta/EngineService.php b/DiscoveryEngine/metadata/V1Beta/EngineService.php index 46d5ec53d2c8..a04ee3bda23d 100644 --- a/DiscoveryEngine/metadata/V1Beta/EngineService.php +++ b/DiscoveryEngine/metadata/V1Beta/EngineService.php @@ -25,7 +25,7 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); $pool->internalAddGeneratedFile( ' -œ +„ 8google/cloud/discoveryengine/v1beta/engine_service.proto#google.cloud.discoveryengine.v1betagoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto0google/cloud/discoveryengine/v1beta/engine.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"² CreateEngineRequestA parent ( B1àAúA+ @@ -56,8 +56,20 @@ public static function initOnce() { next_page_token ( "ˆ UpdateEngineRequest@ engine ( 2+.google.cloud.discoveryengine.v1beta.EngineBàA/ - update_mask ( 2.google.protobuf.FieldMask2£ - + update_mask ( 2.google.protobuf.FieldMask"Q +PauseEngineRequest; +name ( B-àAúA\' +%discoveryengine.googleapis.com/Engine"R +ResumeEngineRequest; +name ( B-àAúA\' +%discoveryengine.googleapis.com/Engine"P +TuneEngineRequest; +name ( B-àAúA\' +%discoveryengine.googleapis.com/Engine"S +TuneEngineMetadata= +engine ( B-àAúA\' +%discoveryengine.googleapis.com/Engine" +TuneEngineResponse2§ EngineServiceº CreateEngine8.google.cloud.discoveryengine.v1beta.CreateEngineRequest.google.longrunning.Operation"ÐÊAf *google.cloud.discoveryengine.v1beta.Engine8google.cloud.discoveryengine.v1beta.CreateEngineMetadataÚAparent,engine,engine_id‚Óä“G"=/v1beta/{parent=projects/*/locations/*/collections/*}/engines:engineŠ @@ -65,7 +77,12 @@ public static function initOnce() { google.protobuf.Empty8google.cloud.discoveryengine.v1beta.DeleteEngineMetadataÚAname‚Óä“?*=/v1beta/{name=projects/*/locations/*/collections/*/engines/*}à UpdateEngine8.google.cloud.discoveryengine.v1beta.UpdateEngineRequest+.google.cloud.discoveryengine.v1beta.Engine"iÚAengine,update_mask‚Óä“N2D/v1beta/{engine.name=projects/*/locations/*/collections/*/engines/*}:engine½ GetEngine5.google.cloud.discoveryengine.v1beta.GetEngineRequest+.google.cloud.discoveryengine.v1beta.Engine"LÚAname‚Óä“?=/v1beta/{name=projects/*/locations/*/collections/*/engines/*}Ð - ListEngines7.google.cloud.discoveryengine.v1beta.ListEnginesRequest8.google.cloud.discoveryengine.v1beta.ListEnginesResponse"NÚAparent‚Óä“?=/v1beta/{parent=projects/*/locations/*/collections/*}/enginesRÊAdiscoveryengine.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB™ + ListEngines7.google.cloud.discoveryengine.v1beta.ListEnginesRequest8.google.cloud.discoveryengine.v1beta.ListEnginesResponse"NÚAparent‚Óä“?=/v1beta/{parent=projects/*/locations/*/collections/*}/enginesÊ + PauseEngine7.google.cloud.discoveryengine.v1beta.PauseEngineRequest+.google.cloud.discoveryengine.v1beta.Engine"UÚAname‚Óä“H"C/v1beta/{name=projects/*/locations/*/collections/*/engines/*}:pause:*Í + ResumeEngine8.google.cloud.discoveryengine.v1beta.ResumeEngineRequest+.google.cloud.discoveryengine.v1beta.Engine"VÚAname‚Óä“I"D/v1beta/{name=projects/*/locations/*/collections/*/engines/*}:resume:*ä + +TuneEngine6.google.cloud.discoveryengine.v1beta.TuneEngineRequest.google.longrunning.Operation"ÊA( +TuneEngineResponseTuneEngineMetadataÚAname‚Óä“G"B/v1beta/{name=projects/*/locations/*/collections/*/engines/*}:tune:*RÊAdiscoveryengine.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB™ \'com.google.cloud.discoveryengine.v1betaBEngineServiceProtoPZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb¢DISCOVERYENGINEª#Google.Cloud.DiscoveryEngine.V1BetaÊ#Google\\Cloud\\DiscoveryEngine\\V1betaê&Google::Cloud::DiscoveryEngine::V1betabproto3' , true); diff --git a/DiscoveryEngine/metadata/V1Beta/GroundedGenerationService.php b/DiscoveryEngine/metadata/V1Beta/GroundedGenerationService.php new file mode 100644 index 0000000000000000000000000000000000000000..6d119eb82287c10b48185b79a743ca8d9a03fcfd GIT binary patch literal 2514 zcmb_e&2Jk;6vtcAl4%IhLQCpHJ2(|_E4rqs1k#3p{1rD9#A#A0fmT|rXP@n%o0(;I zHlb9xaN^E^I}#WE4o*FmJL-WGe*!1o?yT2woK$XAU%Z-m@AuyOy^ndHeGv{rvO+r` zAo3LWwD*{*As|`X{$@OyANo)we{cwRE=d4F|g@C%0U1% z7Rbb}`8;Ow0HVhr23$bx;C2s`R~tk!5kC0tK-=R|xG_WroPm{DBt&@o5QiQE+SzG* zg-X7sJg1X^JIxf_X-$GV4{tY6Zk-SocyUZSxsg03w6Uj6kSB!VFHCv?XEaux!oTZ0 zcDdk+djbCu{Ol7Z!68YMoBWHI~3Xwi%ODKqh z7dS15S;Rvnqa75r?E$EQ`1GWDBR8AE@jk6;A8mWe$qlNa1ddy$Gy;`GVmMlYwj3we>v?Bt6I#nA=A z#o%-=vOM1Uoab4q`+kw6O>BW`L2F9#D*1DPv|mf@n=2Z|%38=e(L$DPq4N8=EidHQ zYiSyE=ajD18Jse=6!M=rz+o%F^ZIt`b_$# zyK6O5r1BA&%RbD@WF7|``X0(S^L$Qw{vNpi!p~0AtjyglVcnQ!HsATatKbKP`AO4- zi7ZNqV?F&mPg8(zo~ZP#m=*HuXSGZ5ilLzG$3?ChV(J;Q2^_KbG6#8`UIcsi1D@^xgqk7zju7m{?_`PcYR!`XI*XWJ(LZCeZW f&S$&Noz>!H`A9$S$F_kpH-Su2zt~6Qh>-sQ^o3m^ literal 0 HcmV?d00001 diff --git a/DiscoveryEngine/metadata/V1Beta/Grounding.php b/DiscoveryEngine/metadata/V1Beta/Grounding.php new file mode 100644 index 000000000000..0416d35cca2c --- /dev/null +++ b/DiscoveryEngine/metadata/V1Beta/Grounding.php @@ -0,0 +1,44 @@ +internalAddGeneratedFile( + ' +‹ +3google/cloud/discoveryengine/v1beta/grounding.proto#google.cloud.discoveryengine.v1betagoogle/api/resource.proto"­ + GroundingFact + fact_text ( V + +attributes ( 2B.google.cloud.discoveryengine.v1beta.GroundingFact.AttributesEntry1 +AttributesEntry +key (  +value ( :8"à + FactChunk + +chunk_text (  +source ( [ +source_metadata ( 2B.google.cloud.discoveryengine.v1beta.FactChunk.SourceMetadataEntry5 +SourceMetadataEntry +key (  +value ( :8B• +\'com.google.cloud.discoveryengine.v1betaBGroundingProtoPZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb¢DISCOVERYENGINEª#Google.Cloud.DiscoveryEngine.V1BetaÊ#Google\\Cloud\\DiscoveryEngine\\V1betaê&Google::Cloud::DiscoveryEngine::V1betabproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/DiscoveryEngine/metadata/V1Beta/ImportConfig.php b/DiscoveryEngine/metadata/V1Beta/ImportConfig.php index 8992f95b4f48713f955cfcdc705e85189ea5d22e..2c042f6305f52e9a7a8c7b712b784260950199a2 100644 GIT binary patch delta 1648 zcmbVN&yU+g6t3g^eBMo5cMB#hQVFD8bs>vZh#!>@B&o9mZJi}at5!W&UT2au>v*!Z zgS5RY964JYK!Q7!kPzYA6F2T~t;9djGbi4R?QGnw5aMRP`R2{{eecbiuj=2w`*T+; zb!_5{?wI~j_)NGNek?x8eDl^X*{X2m+Jw@HL$+rg4d}sqygg<}V~WtlrQAR`{aS$a z!OV1B;tlBBvxuSqAo_D+1%^FRg=@lQNl`(vT|Y2gi?CpZ1zY0NW`?bd%)mS_eZC@| ztz3p8#vLBco`qk5i^Sz|wr|fkpwti490H299}7@v*%Q94Hw$d)`pQdCJ|ZVZ#M?Ee zB&IZk;@F(pj!k^zBW_ANt?DY^Qp_%PnhI$`Fl_# zu0=<-JK=iEJ0G(A^;CW>Mku?G4Nhi6W%|oIA28$_DdZ4Wl_3-?ey*=(IpsD3x+!3q zVD%3H%IOd~QaYZSj*XN(ZpKQ05(0MdJFF#6S6%1TtsOz7b7*^mfO;f8=_71g3>iL)MfSJ0 z@KXNWti$Vv#B_o~%k)SingQm__8S(RZZFd)FGFQw`MBSlV4E8w+l#Jt?eJUF)pqE7 zG&pw7>3X58|2G%H*Yd9tcKJ(KuL2#99cqr$JO+xj02SLF;p+aK!|DWDnN3w#$Lr?c zB*RG(Ud`WFko<3=@Fctmk5%OoNC6E@$FS(!jV6#-`?a+A6BOaRU?_BW9mmQ1+ngM}suMOB}z01+CXpGZxW3kS*q~;U7B*el7e-+Ill>J3{wC9w$B| z(DgGa*Pk;9cj!=Ac2~^3g1H+x-d2mJQdW3-8>IORjU)UqPzyX^HSU#0@?JDL$;-0% IYwd^JKdSxT&;S4c delta 61 zcmV-D0K)&BHi0FuNduFG1GNOT911s+Aq6CnZxfSs1mUxI1xx|6C=J5{0jZPh5UK+r T?*+525fTBDR22KOfEAqulTH=I diff --git a/DiscoveryEngine/metadata/V1Beta/RankService.php b/DiscoveryEngine/metadata/V1Beta/RankService.php new file mode 100644 index 000000000000..0e94f1895854 --- /dev/null +++ b/DiscoveryEngine/metadata/V1Beta/RankService.php @@ -0,0 +1,49 @@ +internalAddGeneratedFile( + ' +™ +6google/cloud/discoveryengine/v1beta/rank_service.proto#google.cloud.discoveryengine.v1betagoogle/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"J + RankingRecord + +id (  +title (  +content (  +score ("ý + RankRequestL +ranking_config ( B4àAúA. +,discoveryengine.googleapis.com/RankingConfig +model (  +top_n ( +query ( H +records ( 22.google.cloud.discoveryengine.v1beta.RankingRecordBàA) +!ignore_record_details_in_response ("S + RankResponseC +records ( 22.google.cloud.discoveryengine.v1beta.RankingRecord2¡ + RankService½ +Rank0.google.cloud.discoveryengine.v1beta.RankRequest1.google.cloud.discoveryengine.v1beta.RankResponse"P‚Óä“J"E/v1beta/{ranking_config=projects/*/locations/*/rankingConfigs/*}:rank:*RÊAdiscoveryengine.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformB— +\'com.google.cloud.discoveryengine.v1betaBRankServiceProtoPZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb¢DISCOVERYENGINEª#Google.Cloud.DiscoveryEngine.V1BetaÊ#Google\\Cloud\\DiscoveryEngine\\V1betaê&Google::Cloud::DiscoveryEngine::V1betabproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/DiscoveryEngine/metadata/V1Beta/SearchService.php b/DiscoveryEngine/metadata/V1Beta/SearchService.php index 11efea4f2914b72d1b0c57b47a945b54b0b80e89..43c3aa5e5c73e54815d772b15cc98356adbeee8f 100644 GIT binary patch delta 899 zcmaKq&rcIU6vv&}O5357Wdys{(lo?_9&92eMq@B3?V=morMBCHr*UbAve537{b3{_ z>A^_6Xb5}oV7z)2vR7~FQDclI{tF}=4PKpXX{ca4&b;q@=6&DyeJ|{ncHar`K=${9 zTL6B(i-x6X7MsY=_jD=~%2q><+CHROISCRjyV=IFm;cr(MpVw4!Qq zrMy_oY09D+a8F_p8YwEOoU4c+`I8U$flI9o`ANs$k97fj8ueG>9{@P?v*If-jW42e zu1$$e+q&r(by8n(%{5z!@CYLQr-?ZT_ar|w`3s~dnrc$UmAX}5Aq~3ZHi=;_GfB({ z-g@NPP9lu&QdaHN3qe`oRsZ+Y3jywq`db&iK)4OPT52tcS9w^$N4@2w$6-}?SXXxv z5%0~kn9t?|NstLwByaL~hR%2#g@e3#>1ZE$ULCzjiP7M9247c8g8uu|4^X_1{?Qmt qqw~x%nue*jh~8*e)V9fbFsmcp6dI$J#Vpe16%Ov@9QC);AB8^$Kp6%A delta 98 zcmV-o0GvzZx;0|JQ(vnL(S0s(51_aAGs2qDn{vnC_M E0}I_FqyPW_ diff --git a/DiscoveryEngine/metadata/V1Beta/SearchTuningService.php b/DiscoveryEngine/metadata/V1Beta/SearchTuningService.php index 79f1c215054d2e8c0cb7656ffaca80ae25a3fd17..2bcf5b08ec26512aa9d9c780ae1f76d5cb2a0b7f 100644 GIT binary patch delta 123 zcmca5_FR0!D`uvR{F~n}^D{GTW19SzZKbeKG#7hrYDrOMay8r+H delta 27 jcmaDZeoJh_D`uu8e4F1e^D{H8WSsn$ZRKWTjxEdpoze<~ diff --git a/DiscoveryEngine/metadata/V1Beta/Session.php b/DiscoveryEngine/metadata/V1Beta/Session.php new file mode 100644 index 0000000000000000000000000000000000000000..b0dc47751ba478158c3c30743ee65d1796300414 GIT binary patch literal 2042 zcmbtV-E!MR6mFb2ZBCdp)eMZuO_!uJZl{&TE;lFyuw%ve0^7AsXJ9nrk)^e>plF45 z6=*wt33vl;nBh@+!v!zEbsvE%&T1v6Bq=z9Z?syU^PQjX(>b4f7N5khN7^)^i6?15 zCeMjHp(IYY_p7jx{yAt_SptL9*1+)gBE5_zH9qQXyDEP2vLQ`??VxoD}nsXoZV zDmXSJRh^@4UrO?j$Rwq2MkgepGEJg`EN=xcU!2@48rO)Kd(3DUH0g8_m@} z8)c&bWyLM6l<;n=UN@J>$IS7}q4G4|gRNB1WE=~c27Jtd%BsRQK8Lc>fvBvJ)#_%w zb}i@;dKymvFu6pIRZ*2PqHflA3Yel|b3vo3Xw|5}EgA*dWqm1^ojI&!@jiy~_bE<+ ztU;UghefD=BgcHIJPaGwy-55(ldO>&&4+(A+sIE-2V^wg7*RT>Rakd zVZF>xb1URNjvXH1U2&XSYM>2qDp0&t=dn;P^I{OxxezwQ!TCHqeDr|_@!-xa>*Cc1-|3S!KIsDO1E2`;Zg6IGx*x+wmV(t zx6)oa+fin=qs&&ZqnvEnnR-XPDy-amm7VW0ZRg@LQ(N(M>Ar@u?F`ShF96!MHk_;@ gYmz_NUku7edRe@&Th#1f{uO&Av((dn4s(FN0de!TMgRZ+ literal 0 HcmV?d00001 diff --git a/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/answer_query.php b/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/answer_query.php new file mode 100644 index 000000000000..ce938eeda564 --- /dev/null +++ b/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/answer_query.php @@ -0,0 +1,84 @@ +setServingConfig($formattedServingConfig) + ->setQuery($query); + + // Call the API and handle any network failures. + try { + /** @var AnswerQueryResponse $response */ + $response = $conversationalSearchServiceClient->answerQuery($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedServingConfig = ConversationalSearchServiceClient::servingConfigName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[SERVING_CONFIG]' + ); + + answer_query_sample($formattedServingConfig); +} +// [END discoveryengine_v1beta_generated_ConversationalSearchService_AnswerQuery_sync] diff --git a/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/create_session.php b/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/create_session.php new file mode 100644 index 000000000000..0eb3125239c4 --- /dev/null +++ b/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/create_session.php @@ -0,0 +1,81 @@ +setParent($formattedParent) + ->setSession($session); + + // Call the API and handle any network failures. + try { + /** @var Session $response */ + $response = $conversationalSearchServiceClient->createSession($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ConversationalSearchServiceClient::dataStoreName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]' + ); + + create_session_sample($formattedParent); +} +// [END discoveryengine_v1beta_generated_ConversationalSearchService_CreateSession_sync] diff --git a/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/delete_session.php b/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/delete_session.php new file mode 100644 index 000000000000..38f3969abc7b --- /dev/null +++ b/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/delete_session.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $conversationalSearchServiceClient->deleteSession($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 = ConversationalSearchServiceClient::sessionName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[SESSION]' + ); + + delete_session_sample($formattedName); +} +// [END discoveryengine_v1beta_generated_ConversationalSearchService_DeleteSession_sync] diff --git a/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/get_answer.php b/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/get_answer.php new file mode 100644 index 000000000000..cf7159effb6d --- /dev/null +++ b/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/get_answer.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Answer $response */ + $response = $conversationalSearchServiceClient->getAnswer($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ConversationalSearchServiceClient::answerName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[SESSION]', + '[ANSWER]' + ); + + get_answer_sample($formattedName); +} +// [END discoveryengine_v1beta_generated_ConversationalSearchService_GetAnswer_sync] diff --git a/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/get_session.php b/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/get_session.php new file mode 100644 index 000000000000..3f717d581fe2 --- /dev/null +++ b/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/get_session.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Session $response */ + $response = $conversationalSearchServiceClient->getSession($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ConversationalSearchServiceClient::sessionName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[SESSION]' + ); + + get_session_sample($formattedName); +} +// [END discoveryengine_v1beta_generated_ConversationalSearchService_GetSession_sync] diff --git a/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/list_sessions.php b/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/list_sessions.php new file mode 100644 index 000000000000..8a8e0bb48448 --- /dev/null +++ b/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/list_sessions.php @@ -0,0 +1,82 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $conversationalSearchServiceClient->listSessions($request); + + /** @var Session $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ConversationalSearchServiceClient::dataStoreName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]' + ); + + list_sessions_sample($formattedParent); +} +// [END discoveryengine_v1beta_generated_ConversationalSearchService_ListSessions_sync] diff --git a/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/update_session.php b/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/update_session.php new file mode 100644 index 000000000000..cf96f29b51cb --- /dev/null +++ b/DiscoveryEngine/samples/V1beta/ConversationalSearchServiceClient/update_session.php @@ -0,0 +1,63 @@ +setSession($session); + + // Call the API and handle any network failures. + try { + /** @var Session $response */ + $response = $conversationalSearchServiceClient->updateSession($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END discoveryengine_v1beta_generated_ConversationalSearchService_UpdateSession_sync] diff --git a/DiscoveryEngine/samples/V1beta/EngineServiceClient/pause_engine.php b/DiscoveryEngine/samples/V1beta/EngineServiceClient/pause_engine.php new file mode 100644 index 000000000000..6ea78a9f33dc --- /dev/null +++ b/DiscoveryEngine/samples/V1beta/EngineServiceClient/pause_engine.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Engine $response */ + $response = $engineServiceClient->pauseEngine($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = EngineServiceClient::engineName( + '[PROJECT]', + '[LOCATION]', + '[COLLECTION]', + '[ENGINE]' + ); + + pause_engine_sample($formattedName); +} +// [END discoveryengine_v1beta_generated_EngineService_PauseEngine_sync] diff --git a/DiscoveryEngine/samples/V1beta/EngineServiceClient/resume_engine.php b/DiscoveryEngine/samples/V1beta/EngineServiceClient/resume_engine.php new file mode 100644 index 000000000000..aa239b170ca9 --- /dev/null +++ b/DiscoveryEngine/samples/V1beta/EngineServiceClient/resume_engine.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Engine $response */ + $response = $engineServiceClient->resumeEngine($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = EngineServiceClient::engineName( + '[PROJECT]', + '[LOCATION]', + '[COLLECTION]', + '[ENGINE]' + ); + + resume_engine_sample($formattedName); +} +// [END discoveryengine_v1beta_generated_EngineService_ResumeEngine_sync] diff --git a/DiscoveryEngine/samples/V1beta/EngineServiceClient/tune_engine.php b/DiscoveryEngine/samples/V1beta/EngineServiceClient/tune_engine.php new file mode 100644 index 000000000000..ade8159cd5b0 --- /dev/null +++ b/DiscoveryEngine/samples/V1beta/EngineServiceClient/tune_engine.php @@ -0,0 +1,92 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $engineServiceClient->tuneEngine($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var TuneEngineResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = EngineServiceClient::engineName( + '[PROJECT]', + '[LOCATION]', + '[COLLECTION]', + '[ENGINE]' + ); + + tune_engine_sample($formattedName); +} +// [END discoveryengine_v1beta_generated_EngineService_TuneEngine_sync] diff --git a/DiscoveryEngine/samples/V1beta/GroundedGenerationServiceClient/check_grounding.php b/DiscoveryEngine/samples/V1beta/GroundedGenerationServiceClient/check_grounding.php new file mode 100644 index 000000000000..e23166454ab4 --- /dev/null +++ b/DiscoveryEngine/samples/V1beta/GroundedGenerationServiceClient/check_grounding.php @@ -0,0 +1,76 @@ +setGroundingConfig($formattedGroundingConfig); + + // Call the API and handle any network failures. + try { + /** @var CheckGroundingResponse $response */ + $response = $groundedGenerationServiceClient->checkGrounding($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedGroundingConfig = GroundedGenerationServiceClient::groundingConfigName( + '[PROJECT]', + '[LOCATION]', + '[GROUNDING_CONFIG]' + ); + + check_grounding_sample($formattedGroundingConfig); +} +// [END discoveryengine_v1beta_generated_GroundedGenerationService_CheckGrounding_sync] diff --git a/DiscoveryEngine/samples/V1beta/RankServiceClient/rank.php b/DiscoveryEngine/samples/V1beta/RankServiceClient/rank.php new file mode 100644 index 000000000000..93541e70b6b8 --- /dev/null +++ b/DiscoveryEngine/samples/V1beta/RankServiceClient/rank.php @@ -0,0 +1,79 @@ +setRankingConfig($formattedRankingConfig) + ->setRecords($records); + + // Call the API and handle any network failures. + try { + /** @var RankResponse $response */ + $response = $rankServiceClient->rank($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedRankingConfig = RankServiceClient::rankingConfigName( + '[PROJECT]', + '[LOCATION]', + '[RANKING_CONFIG]' + ); + + rank_sample($formattedRankingConfig); +} +// [END discoveryengine_v1beta_generated_RankService_Rank_sync] diff --git a/DiscoveryEngine/src/V1beta/Answer.php b/DiscoveryEngine/src/V1beta/Answer.php new file mode 100644 index 000000000000..23bdd8e6585f --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Answer.php @@ -0,0 +1,445 @@ +google.cloud.discoveryengine.v1beta.Answer + */ +class Answer extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Fully qualified name + * `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * The state of the answer generation. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer.State state = 2; + */ + protected $state = 0; + /** + * The textual answer. + * + * Generated from protobuf field string answer_text = 3; + */ + protected $answer_text = ''; + /** + * Citations. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + */ + private $citations; + /** + * References. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + */ + private $references; + /** + * Suggested related questions. + * + * Generated from protobuf field repeated string related_questions = 6; + */ + private $related_questions; + /** + * Answer generation steps. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; + */ + private $steps; + /** + * Query understanding information. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; + */ + protected $query_understanding_info = null; + /** + * Additional answer-skipped reasons. This provides the reason for ignored + * cases. If nothing is skipped, this field is not set. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + */ + private $answer_skipped_reasons; + /** + * Output only. Answer creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Answer completed timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $complete_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. Fully qualified name + * `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` + * @type int $state + * The state of the answer generation. + * @type string $answer_text + * The textual answer. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\Answer\Citation>|\Google\Protobuf\Internal\RepeatedField $citations + * Citations. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\Answer\Reference>|\Google\Protobuf\Internal\RepeatedField $references + * References. + * @type array|\Google\Protobuf\Internal\RepeatedField $related_questions + * Suggested related questions. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\Answer\Step>|\Google\Protobuf\Internal\RepeatedField $steps + * Answer generation steps. + * @type \Google\Cloud\DiscoveryEngine\V1beta\Answer\QueryUnderstandingInfo $query_understanding_info + * Query understanding information. + * @type array|\Google\Protobuf\Internal\RepeatedField $answer_skipped_reasons + * Additional answer-skipped reasons. This provides the reason for ignored + * cases. If nothing is skipped, this field is not set. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Answer creation timestamp. + * @type \Google\Protobuf\Timestamp $complete_time + * Output only. Answer completed timestamp. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Answer::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Fully qualified name + * `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. Fully qualified name + * `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The state of the answer generation. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer.State state = 2; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of the answer generation. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer.State state = 2; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1beta\Answer\State::class); + $this->state = $var; + + return $this; + } + + /** + * The textual answer. + * + * Generated from protobuf field string answer_text = 3; + * @return string + */ + public function getAnswerText() + { + return $this->answer_text; + } + + /** + * The textual answer. + * + * Generated from protobuf field string answer_text = 3; + * @param string $var + * @return $this + */ + public function setAnswerText($var) + { + GPBUtil::checkString($var, True); + $this->answer_text = $var; + + return $this; + } + + /** + * Citations. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCitations() + { + return $this->citations; + } + + /** + * Citations. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.Citation citations = 4; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\Answer\Citation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCitations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\Answer\Citation::class); + $this->citations = $arr; + + return $this; + } + + /** + * References. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReferences() + { + return $this->references; + } + + /** + * References. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.Reference references = 5; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\Answer\Reference>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReferences($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\Answer\Reference::class); + $this->references = $arr; + + return $this; + } + + /** + * Suggested related questions. + * + * Generated from protobuf field repeated string related_questions = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRelatedQuestions() + { + return $this->related_questions; + } + + /** + * Suggested related questions. + * + * Generated from protobuf field repeated string related_questions = 6; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRelatedQuestions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->related_questions = $arr; + + return $this; + } + + /** + * Answer generation steps. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSteps() + { + return $this->steps; + } + + /** + * Answer generation steps. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.Step steps = 7; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\Answer\Step>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSteps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\Answer\Step::class); + $this->steps = $arr; + + return $this; + } + + /** + * Query understanding information. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Answer\QueryUnderstandingInfo|null + */ + public function getQueryUnderstandingInfo() + { + return $this->query_understanding_info; + } + + public function hasQueryUnderstandingInfo() + { + return isset($this->query_understanding_info); + } + + public function clearQueryUnderstandingInfo() + { + unset($this->query_understanding_info); + } + + /** + * Query understanding information. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo query_understanding_info = 10; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Answer\QueryUnderstandingInfo $var + * @return $this + */ + public function setQueryUnderstandingInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Answer\QueryUnderstandingInfo::class); + $this->query_understanding_info = $var; + + return $this; + } + + /** + * Additional answer-skipped reasons. This provides the reason for ignored + * cases. If nothing is skipped, this field is not set. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAnswerSkippedReasons() + { + return $this->answer_skipped_reasons; + } + + /** + * Additional answer-skipped reasons. This provides the reason for ignored + * cases. If nothing is skipped, this field is not set. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason answer_skipped_reasons = 11; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAnswerSkippedReasons($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\DiscoveryEngine\V1beta\Answer\AnswerSkippedReason::class); + $this->answer_skipped_reasons = $arr; + + return $this; + } + + /** + * Output only. Answer creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Answer creation timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Answer completed timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCompleteTime() + { + return $this->complete_time; + } + + public function hasCompleteTime() + { + return isset($this->complete_time); + } + + public function clearCompleteTime() + { + unset($this->complete_time); + } + + /** + * Output only. Answer completed timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCompleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->complete_time = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/Answer/AnswerSkippedReason.php b/DiscoveryEngine/src/V1beta/Answer/AnswerSkippedReason.php new file mode 100644 index 000000000000..58c569cf4d74 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Answer/AnswerSkippedReason.php @@ -0,0 +1,79 @@ +google.cloud.discoveryengine.v1beta.Answer.AnswerSkippedReason + */ +class AnswerSkippedReason +{ + /** + * Default value. The answer skipped reason is not specified. + * + * Generated from protobuf enum ANSWER_SKIPPED_REASON_UNSPECIFIED = 0; + */ + const ANSWER_SKIPPED_REASON_UNSPECIFIED = 0; + /** + * The adversarial query ignored case. + * + * Generated from protobuf enum ADVERSARIAL_QUERY_IGNORED = 1; + */ + const ADVERSARIAL_QUERY_IGNORED = 1; + /** + * The non-answer seeking query ignored case. + * + * Generated from protobuf enum NON_ANSWER_SEEKING_QUERY_IGNORED = 2; + */ + const NON_ANSWER_SEEKING_QUERY_IGNORED = 2; + /** + * The out-of-domain query ignored case. + * Google skips the answer if there are no high-relevance search results. + * + * Generated from protobuf enum OUT_OF_DOMAIN_QUERY_IGNORED = 3; + */ + const OUT_OF_DOMAIN_QUERY_IGNORED = 3; + /** + * The potential policy violation case. + * Google skips the answer if there is a potential policy violation + * detected. This includes content that may be violent or toxic. + * + * Generated from protobuf enum POTENTIAL_POLICY_VIOLATION = 4; + */ + const POTENTIAL_POLICY_VIOLATION = 4; + + private static $valueToName = [ + self::ANSWER_SKIPPED_REASON_UNSPECIFIED => 'ANSWER_SKIPPED_REASON_UNSPECIFIED', + self::ADVERSARIAL_QUERY_IGNORED => 'ADVERSARIAL_QUERY_IGNORED', + self::NON_ANSWER_SEEKING_QUERY_IGNORED => 'NON_ANSWER_SEEKING_QUERY_IGNORED', + self::OUT_OF_DOMAIN_QUERY_IGNORED => 'OUT_OF_DOMAIN_QUERY_IGNORED', + self::POTENTIAL_POLICY_VIOLATION => 'POTENTIAL_POLICY_VIOLATION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/DiscoveryEngine/src/V1beta/Answer/Citation.php b/DiscoveryEngine/src/V1beta/Answer/Citation.php new file mode 100644 index 000000000000..2676cd04886f --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Answer/Citation.php @@ -0,0 +1,140 @@ +google.cloud.discoveryengine.v1beta.Answer.Citation + */ +class Citation extends \Google\Protobuf\Internal\Message +{ + /** + * Index indicates the start of the segment, measured in bytes (UTF-8 + * unicode). + * + * Generated from protobuf field int64 start_index = 1; + */ + protected $start_index = 0; + /** + * End of the attributed segment, exclusive. + * + * Generated from protobuf field int64 end_index = 2; + */ + protected $end_index = 0; + /** + * Citation sources for the attributed segment. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 3; + */ + private $sources; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $start_index + * Index indicates the start of the segment, measured in bytes (UTF-8 + * unicode). + * @type int|string $end_index + * End of the attributed segment, exclusive. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\Answer\CitationSource>|\Google\Protobuf\Internal\RepeatedField $sources + * Citation sources for the attributed segment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Answer::initOnce(); + parent::__construct($data); + } + + /** + * Index indicates the start of the segment, measured in bytes (UTF-8 + * unicode). + * + * Generated from protobuf field int64 start_index = 1; + * @return int|string + */ + public function getStartIndex() + { + return $this->start_index; + } + + /** + * Index indicates the start of the segment, measured in bytes (UTF-8 + * unicode). + * + * Generated from protobuf field int64 start_index = 1; + * @param int|string $var + * @return $this + */ + public function setStartIndex($var) + { + GPBUtil::checkInt64($var); + $this->start_index = $var; + + return $this; + } + + /** + * End of the attributed segment, exclusive. + * + * Generated from protobuf field int64 end_index = 2; + * @return int|string + */ + public function getEndIndex() + { + return $this->end_index; + } + + /** + * End of the attributed segment, exclusive. + * + * Generated from protobuf field int64 end_index = 2; + * @param int|string $var + * @return $this + */ + public function setEndIndex($var) + { + GPBUtil::checkInt64($var); + $this->end_index = $var; + + return $this; + } + + /** + * Citation sources for the attributed segment. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSources() + { + return $this->sources; + } + + /** + * Citation sources for the attributed segment. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.CitationSource sources = 3; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\Answer\CitationSource>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\Answer\CitationSource::class); + $this->sources = $arr; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/Answer/CitationSource.php b/DiscoveryEngine/src/V1beta/Answer/CitationSource.php new file mode 100644 index 000000000000..99a59561888f --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Answer/CitationSource.php @@ -0,0 +1,68 @@ +google.cloud.discoveryengine.v1beta.Answer.CitationSource + */ +class CitationSource extends \Google\Protobuf\Internal\Message +{ + /** + * ID of the citation source. + * + * Generated from protobuf field string reference_id = 1; + */ + protected $reference_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $reference_id + * ID of the citation source. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Answer::initOnce(); + parent::__construct($data); + } + + /** + * ID of the citation source. + * + * Generated from protobuf field string reference_id = 1; + * @return string + */ + public function getReferenceId() + { + return $this->reference_id; + } + + /** + * ID of the citation source. + * + * Generated from protobuf field string reference_id = 1; + * @param string $var + * @return $this + */ + public function setReferenceId($var) + { + GPBUtil::checkString($var, True); + $this->reference_id = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/Answer/QueryUnderstandingInfo.php b/DiscoveryEngine/src/V1beta/Answer/QueryUnderstandingInfo.php new file mode 100644 index 000000000000..1cf3dd822820 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Answer/QueryUnderstandingInfo.php @@ -0,0 +1,68 @@ +google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo + */ +class QueryUnderstandingInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Query classification information. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + */ + private $query_classification_info; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\Answer\QueryUnderstandingInfo\QueryClassificationInfo>|\Google\Protobuf\Internal\RepeatedField $query_classification_info + * Query classification information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Answer::initOnce(); + parent::__construct($data); + } + + /** + * Query classification information. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getQueryClassificationInfo() + { + return $this->query_classification_info; + } + + /** + * Query classification information. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo query_classification_info = 1; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\Answer\QueryUnderstandingInfo\QueryClassificationInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setQueryClassificationInfo($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\Answer\QueryUnderstandingInfo\QueryClassificationInfo::class); + $this->query_classification_info = $arr; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/Answer/QueryUnderstandingInfo/QueryClassificationInfo.php b/DiscoveryEngine/src/V1beta/Answer/QueryUnderstandingInfo/QueryClassificationInfo.php new file mode 100644 index 000000000000..6e73b999ea33 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Answer/QueryUnderstandingInfo/QueryClassificationInfo.php @@ -0,0 +1,102 @@ +google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo + */ +class QueryClassificationInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Query classification type. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type type = 1; + */ + protected $type = 0; + /** + * Classification output. + * + * Generated from protobuf field bool positive = 2; + */ + protected $positive = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Query classification type. + * @type bool $positive + * Classification output. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Answer::initOnce(); + parent::__construct($data); + } + + /** + * Query classification type. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Query classification type. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1beta\Answer\QueryUnderstandingInfo\QueryClassificationInfo\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Classification output. + * + * Generated from protobuf field bool positive = 2; + * @return bool + */ + public function getPositive() + { + return $this->positive; + } + + /** + * Classification output. + * + * Generated from protobuf field bool positive = 2; + * @param bool $var + * @return $this + */ + public function setPositive($var) + { + GPBUtil::checkBool($var); + $this->positive = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/Answer/QueryUnderstandingInfo/QueryClassificationInfo/Type.php b/DiscoveryEngine/src/V1beta/Answer/QueryUnderstandingInfo/QueryClassificationInfo/Type.php new file mode 100644 index 000000000000..8022cb124bbf --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Answer/QueryUnderstandingInfo/QueryClassificationInfo/Type.php @@ -0,0 +1,62 @@ +google.cloud.discoveryengine.v1beta.Answer.QueryUnderstandingInfo.QueryClassificationInfo.Type + */ +class Type +{ + /** + * Unspecified query classification type. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Adversarial query classification type. + * + * Generated from protobuf enum ADVERSARIAL_QUERY = 1; + */ + const ADVERSARIAL_QUERY = 1; + /** + * Non-answer-seeking query classification type. + * + * Generated from protobuf enum NON_ANSWER_SEEKING_QUERY = 2; + */ + const NON_ANSWER_SEEKING_QUERY = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::ADVERSARIAL_QUERY => 'ADVERSARIAL_QUERY', + self::NON_ANSWER_SEEKING_QUERY => 'NON_ANSWER_SEEKING_QUERY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/DiscoveryEngine/src/V1beta/Answer/Reference.php b/DiscoveryEngine/src/V1beta/Answer/Reference.php new file mode 100644 index 000000000000..e406de7c7b17 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Answer/Reference.php @@ -0,0 +1,109 @@ +google.cloud.discoveryengine.v1beta.Answer.Reference + */ +class Reference extends \Google\Protobuf\Internal\Message +{ + protected $content; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DiscoveryEngine\V1beta\Answer\Reference\UnstructuredDocumentInfo $unstructured_document_info + * Unstructured document information. + * @type \Google\Cloud\DiscoveryEngine\V1beta\Answer\Reference\ChunkInfo $chunk_info + * Chunk information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Answer::initOnce(); + parent::__construct($data); + } + + /** + * Unstructured document information. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Answer\Reference\UnstructuredDocumentInfo|null + */ + public function getUnstructuredDocumentInfo() + { + return $this->readOneof(1); + } + + public function hasUnstructuredDocumentInfo() + { + return $this->hasOneof(1); + } + + /** + * Unstructured document information. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo unstructured_document_info = 1; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Answer\Reference\UnstructuredDocumentInfo $var + * @return $this + */ + public function setUnstructuredDocumentInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Answer\Reference\UnstructuredDocumentInfo::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Chunk information. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Answer\Reference\ChunkInfo|null + */ + public function getChunkInfo() + { + return $this->readOneof(2); + } + + public function hasChunkInfo() + { + return $this->hasOneof(2); + } + + /** + * Chunk information. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo chunk_info = 2; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Answer\Reference\ChunkInfo $var + * @return $this + */ + public function setChunkInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Answer\Reference\ChunkInfo::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getContent() + { + return $this->whichOneof("content"); + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/Answer/Reference/ChunkInfo.php b/DiscoveryEngine/src/V1beta/Answer/Reference/ChunkInfo.php new file mode 100644 index 000000000000..b0b83c69282d --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Answer/Reference/ChunkInfo.php @@ -0,0 +1,190 @@ +google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo + */ +class ChunkInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Chunk resource name. + * + * Generated from protobuf field string chunk = 1 [(.google.api.resource_reference) = { + */ + protected $chunk = ''; + /** + * Chunk textual content. + * + * Generated from protobuf field string content = 2; + */ + protected $content = ''; + /** + * Relevance score. + * + * Generated from protobuf field optional float relevance_score = 3; + */ + protected $relevance_score = null; + /** + * Document metadata. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; + */ + protected $document_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $chunk + * Chunk resource name. + * @type string $content + * Chunk textual content. + * @type float $relevance_score + * Relevance score. + * @type \Google\Cloud\DiscoveryEngine\V1beta\Answer\Reference\ChunkInfo\DocumentMetadata $document_metadata + * Document metadata. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Answer::initOnce(); + parent::__construct($data); + } + + /** + * Chunk resource name. + * + * Generated from protobuf field string chunk = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getChunk() + { + return $this->chunk; + } + + /** + * Chunk resource name. + * + * Generated from protobuf field string chunk = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setChunk($var) + { + GPBUtil::checkString($var, True); + $this->chunk = $var; + + return $this; + } + + /** + * Chunk textual content. + * + * Generated from protobuf field string content = 2; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Chunk textual content. + * + * Generated from protobuf field string content = 2; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, True); + $this->content = $var; + + return $this; + } + + /** + * Relevance score. + * + * Generated from protobuf field optional float relevance_score = 3; + * @return float + */ + public function getRelevanceScore() + { + return isset($this->relevance_score) ? $this->relevance_score : 0.0; + } + + public function hasRelevanceScore() + { + return isset($this->relevance_score); + } + + public function clearRelevanceScore() + { + unset($this->relevance_score); + } + + /** + * Relevance score. + * + * Generated from protobuf field optional float relevance_score = 3; + * @param float $var + * @return $this + */ + public function setRelevanceScore($var) + { + GPBUtil::checkFloat($var); + $this->relevance_score = $var; + + return $this; + } + + /** + * Document metadata. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Answer\Reference\ChunkInfo\DocumentMetadata|null + */ + public function getDocumentMetadata() + { + return $this->document_metadata; + } + + public function hasDocumentMetadata() + { + return isset($this->document_metadata); + } + + public function clearDocumentMetadata() + { + unset($this->document_metadata); + } + + /** + * Document metadata. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata document_metadata = 4; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Answer\Reference\ChunkInfo\DocumentMetadata $var + * @return $this + */ + public function setDocumentMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Answer\Reference\ChunkInfo\DocumentMetadata::class); + $this->document_metadata = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/Answer/Reference/ChunkInfo/DocumentMetadata.php b/DiscoveryEngine/src/V1beta/Answer/Reference/ChunkInfo/DocumentMetadata.php new file mode 100644 index 000000000000..006d9fbc795d --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Answer/Reference/ChunkInfo/DocumentMetadata.php @@ -0,0 +1,170 @@ +google.cloud.discoveryengine.v1beta.Answer.Reference.ChunkInfo.DocumentMetadata + */ +class DocumentMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Document resource name. + * + * Generated from protobuf field string document = 1 [(.google.api.resource_reference) = { + */ + protected $document = ''; + /** + * URI for the document. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * Title. + * + * Generated from protobuf field string title = 3; + */ + protected $title = ''; + /** + * Page identifier. + * + * Generated from protobuf field string page_identifier = 4; + */ + protected $page_identifier = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $document + * Document resource name. + * @type string $uri + * URI for the document. + * @type string $title + * Title. + * @type string $page_identifier + * Page identifier. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Answer::initOnce(); + parent::__construct($data); + } + + /** + * Document resource name. + * + * Generated from protobuf field string document = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getDocument() + { + return $this->document; + } + + /** + * Document resource name. + * + * Generated from protobuf field string document = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkString($var, True); + $this->document = $var; + + return $this; + } + + /** + * URI for the document. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI for the document. + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Title. + * + * Generated from protobuf field string title = 3; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Title. + * + * Generated from protobuf field string title = 3; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * Page identifier. + * + * Generated from protobuf field string page_identifier = 4; + * @return string + */ + public function getPageIdentifier() + { + return $this->page_identifier; + } + + /** + * Page identifier. + * + * Generated from protobuf field string page_identifier = 4; + * @param string $var + * @return $this + */ + public function setPageIdentifier($var) + { + GPBUtil::checkString($var, True); + $this->page_identifier = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/Answer/Reference/UnstructuredDocumentInfo.php b/DiscoveryEngine/src/V1beta/Answer/Reference/UnstructuredDocumentInfo.php new file mode 100644 index 000000000000..649c7fb6cc3d --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Answer/Reference/UnstructuredDocumentInfo.php @@ -0,0 +1,170 @@ +google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo + */ +class UnstructuredDocumentInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Document resource name. + * + * Generated from protobuf field string document = 1 [(.google.api.resource_reference) = { + */ + protected $document = ''; + /** + * URI for the document. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * Title. + * + * Generated from protobuf field string title = 3; + */ + protected $title = ''; + /** + * List of cited chunk contents derived from document content. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + */ + private $chunk_contents; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $document + * Document resource name. + * @type string $uri + * URI for the document. + * @type string $title + * Title. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\Answer\Reference\UnstructuredDocumentInfo\ChunkContent>|\Google\Protobuf\Internal\RepeatedField $chunk_contents + * List of cited chunk contents derived from document content. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Answer::initOnce(); + parent::__construct($data); + } + + /** + * Document resource name. + * + * Generated from protobuf field string document = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getDocument() + { + return $this->document; + } + + /** + * Document resource name. + * + * Generated from protobuf field string document = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkString($var, True); + $this->document = $var; + + return $this; + } + + /** + * URI for the document. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI for the document. + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Title. + * + * Generated from protobuf field string title = 3; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Title. + * + * Generated from protobuf field string title = 3; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * List of cited chunk contents derived from document content. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChunkContents() + { + return $this->chunk_contents; + } + + /** + * List of cited chunk contents derived from document content. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent chunk_contents = 4; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\Answer\Reference\UnstructuredDocumentInfo\ChunkContent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChunkContents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\Answer\Reference\UnstructuredDocumentInfo\ChunkContent::class); + $this->chunk_contents = $arr; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/Answer/Reference/UnstructuredDocumentInfo/ChunkContent.php b/DiscoveryEngine/src/V1beta/Answer/Reference/UnstructuredDocumentInfo/ChunkContent.php new file mode 100644 index 000000000000..9b96f40b6b64 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Answer/Reference/UnstructuredDocumentInfo/ChunkContent.php @@ -0,0 +1,102 @@ +google.cloud.discoveryengine.v1beta.Answer.Reference.UnstructuredDocumentInfo.ChunkContent + */ +class ChunkContent extends \Google\Protobuf\Internal\Message +{ + /** + * Chunk textual content. + * + * Generated from protobuf field string content = 1; + */ + protected $content = ''; + /** + * Page identifier. + * + * Generated from protobuf field string page_identifier = 2; + */ + protected $page_identifier = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $content + * Chunk textual content. + * @type string $page_identifier + * Page identifier. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Answer::initOnce(); + parent::__construct($data); + } + + /** + * Chunk textual content. + * + * Generated from protobuf field string content = 1; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Chunk textual content. + * + * Generated from protobuf field string content = 1; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, True); + $this->content = $var; + + return $this; + } + + /** + * Page identifier. + * + * Generated from protobuf field string page_identifier = 2; + * @return string + */ + public function getPageIdentifier() + { + return $this->page_identifier; + } + + /** + * Page identifier. + * + * Generated from protobuf field string page_identifier = 2; + * @param string $var + * @return $this + */ + public function setPageIdentifier($var) + { + GPBUtil::checkString($var, True); + $this->page_identifier = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/Answer/State.php b/DiscoveryEngine/src/V1beta/Answer/State.php new file mode 100644 index 000000000000..25c262e5e560 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Answer/State.php @@ -0,0 +1,69 @@ +google.cloud.discoveryengine.v1beta.Answer.State + */ +class State +{ + /** + * Unknown. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Answer generation is currently in progress. + * + * Generated from protobuf enum IN_PROGRESS = 1; + */ + const IN_PROGRESS = 1; + /** + * Answer generation currently failed. + * + * Generated from protobuf enum FAILED = 2; + */ + const FAILED = 2; + /** + * Answer generation has succeeded. + * + * Generated from protobuf enum SUCCEEDED = 3; + */ + const SUCCEEDED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::IN_PROGRESS => 'IN_PROGRESS', + self::FAILED => 'FAILED', + self::SUCCEEDED => 'SUCCEEDED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/DiscoveryEngine/src/V1beta/Answer/Step.php b/DiscoveryEngine/src/V1beta/Answer/Step.php new file mode 100644 index 000000000000..8a7068f29edc --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Answer/Step.php @@ -0,0 +1,170 @@ +google.cloud.discoveryengine.v1beta.Answer.Step + */ +class Step extends \Google\Protobuf\Internal\Message +{ + /** + * The state of the step. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer.Step.State state = 1; + */ + protected $state = 0; + /** + * The description of the step. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * The thought of the step. + * + * Generated from protobuf field string thought = 3; + */ + protected $thought = ''; + /** + * Actions. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + */ + private $actions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * The state of the step. + * @type string $description + * The description of the step. + * @type string $thought + * The thought of the step. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\Answer\Step\Action>|\Google\Protobuf\Internal\RepeatedField $actions + * Actions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Answer::initOnce(); + parent::__construct($data); + } + + /** + * The state of the step. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer.Step.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of the step. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer.Step.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1beta\Answer\Step\State::class); + $this->state = $var; + + return $this; + } + + /** + * The description of the step. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * The description of the step. + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The thought of the step. + * + * Generated from protobuf field string thought = 3; + * @return string + */ + public function getThought() + { + return $this->thought; + } + + /** + * The thought of the step. + * + * Generated from protobuf field string thought = 3; + * @param string $var + * @return $this + */ + public function setThought($var) + { + GPBUtil::checkString($var, True); + $this->thought = $var; + + return $this; + } + + /** + * Actions. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getActions() + { + return $this->actions; + } + + /** + * Actions. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action actions = 4; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\Answer\Step\Action>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setActions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\Answer\Step\Action::class); + $this->actions = $arr; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/Answer/Step/Action.php b/DiscoveryEngine/src/V1beta/Answer/Step/Action.php new file mode 100644 index 000000000000..d290b5902ac9 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Answer/Step/Action.php @@ -0,0 +1,120 @@ +google.cloud.discoveryengine.v1beta.Answer.Step.Action + */ +class Action extends \Google\Protobuf\Internal\Message +{ + /** + * Observation. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; + */ + protected $observation = null; + protected $action; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DiscoveryEngine\V1beta\Answer\Step\Action\SearchAction $search_action + * Search action. + * @type \Google\Cloud\DiscoveryEngine\V1beta\Answer\Step\Action\Observation $observation + * Observation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Answer::initOnce(); + parent::__construct($data); + } + + /** + * Search action. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Answer\Step\Action\SearchAction|null + */ + public function getSearchAction() + { + return $this->readOneof(2); + } + + public function hasSearchAction() + { + return $this->hasOneof(2); + } + + /** + * Search action. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction search_action = 2; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Answer\Step\Action\SearchAction $var + * @return $this + */ + public function setSearchAction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Answer\Step\Action\SearchAction::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Observation. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Answer\Step\Action\Observation|null + */ + public function getObservation() + { + return $this->observation; + } + + public function hasObservation() + { + return isset($this->observation); + } + + public function clearObservation() + { + unset($this->observation); + } + + /** + * Observation. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation observation = 3; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Answer\Step\Action\Observation $var + * @return $this + */ + public function setObservation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Answer\Step\Action\Observation::class); + $this->observation = $var; + + return $this; + } + + /** + * @return string + */ + public function getAction() + { + return $this->whichOneof("action"); + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/Answer/Step/Action/Observation.php b/DiscoveryEngine/src/V1beta/Answer/Step/Action/Observation.php new file mode 100644 index 000000000000..00ad3e62ad11 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Answer/Step/Action/Observation.php @@ -0,0 +1,72 @@ +google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation + */ +class Observation extends \Google\Protobuf\Internal\Message +{ + /** + * Search results observed by the search action, it can be snippets info + * or chunk info, depending on the citation type set by the user. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + */ + private $search_results; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\Answer\Step\Action\Observation\SearchResult>|\Google\Protobuf\Internal\RepeatedField $search_results + * Search results observed by the search action, it can be snippets info + * or chunk info, depending on the citation type set by the user. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Answer::initOnce(); + parent::__construct($data); + } + + /** + * Search results observed by the search action, it can be snippets info + * or chunk info, depending on the citation type set by the user. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSearchResults() + { + return $this->search_results; + } + + /** + * Search results observed by the search action, it can be snippets info + * or chunk info, depending on the citation type set by the user. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult search_results = 2; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\Answer\Step\Action\Observation\SearchResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSearchResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\Answer\Step\Action\Observation\SearchResult::class); + $this->search_results = $arr; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/Answer/Step/Action/Observation/SearchResult.php b/DiscoveryEngine/src/V1beta/Answer/Step/Action/Observation/SearchResult.php new file mode 100644 index 000000000000..937d2b3cb138 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Answer/Step/Action/Observation/SearchResult.php @@ -0,0 +1,210 @@ +google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult + */ +class SearchResult extends \Google\Protobuf\Internal\Message +{ + /** + * Document resource name. + * + * Generated from protobuf field string document = 1; + */ + protected $document = ''; + /** + * URI for the document. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * Title. + * + * Generated from protobuf field string title = 3; + */ + protected $title = ''; + /** + * If citation_type is DOCUMENT_LEVEL_CITATION, populate document + * level snippets. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + */ + private $snippet_info; + /** + * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, + * populate chunk info. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + */ + private $chunk_info; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $document + * Document resource name. + * @type string $uri + * URI for the document. + * @type string $title + * Title. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\Answer\Step\Action\Observation\SearchResult\SnippetInfo>|\Google\Protobuf\Internal\RepeatedField $snippet_info + * If citation_type is DOCUMENT_LEVEL_CITATION, populate document + * level snippets. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\Answer\Step\Action\Observation\SearchResult\ChunkInfo>|\Google\Protobuf\Internal\RepeatedField $chunk_info + * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, + * populate chunk info. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Answer::initOnce(); + parent::__construct($data); + } + + /** + * Document resource name. + * + * Generated from protobuf field string document = 1; + * @return string + */ + public function getDocument() + { + return $this->document; + } + + /** + * Document resource name. + * + * Generated from protobuf field string document = 1; + * @param string $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkString($var, True); + $this->document = $var; + + return $this; + } + + /** + * URI for the document. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI for the document. + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Title. + * + * Generated from protobuf field string title = 3; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Title. + * + * Generated from protobuf field string title = 3; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * If citation_type is DOCUMENT_LEVEL_CITATION, populate document + * level snippets. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSnippetInfo() + { + return $this->snippet_info; + } + + /** + * If citation_type is DOCUMENT_LEVEL_CITATION, populate document + * level snippets. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo snippet_info = 4; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\Answer\Step\Action\Observation\SearchResult\SnippetInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSnippetInfo($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\Answer\Step\Action\Observation\SearchResult\SnippetInfo::class); + $this->snippet_info = $arr; + + return $this; + } + + /** + * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, + * populate chunk info. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChunkInfo() + { + return $this->chunk_info; + } + + /** + * If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, + * populate chunk info. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo chunk_info = 5; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\Answer\Step\Action\Observation\SearchResult\ChunkInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChunkInfo($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\Answer\Step\Action\Observation\SearchResult\ChunkInfo::class); + $this->chunk_info = $arr; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/Answer/Step/Action/Observation/SearchResult/ChunkInfo.php b/DiscoveryEngine/src/V1beta/Answer/Step/Action/Observation/SearchResult/ChunkInfo.php new file mode 100644 index 000000000000..e444a3a683c7 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Answer/Step/Action/Observation/SearchResult/ChunkInfo.php @@ -0,0 +1,146 @@ +google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.ChunkInfo + */ +class ChunkInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Chunk resource name. + * + * Generated from protobuf field string chunk = 1; + */ + protected $chunk = ''; + /** + * Chunk textual content. + * + * Generated from protobuf field string content = 2; + */ + protected $content = ''; + /** + * Relevance score. + * + * Generated from protobuf field optional float relevance_score = 3; + */ + protected $relevance_score = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $chunk + * Chunk resource name. + * @type string $content + * Chunk textual content. + * @type float $relevance_score + * Relevance score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Answer::initOnce(); + parent::__construct($data); + } + + /** + * Chunk resource name. + * + * Generated from protobuf field string chunk = 1; + * @return string + */ + public function getChunk() + { + return $this->chunk; + } + + /** + * Chunk resource name. + * + * Generated from protobuf field string chunk = 1; + * @param string $var + * @return $this + */ + public function setChunk($var) + { + GPBUtil::checkString($var, True); + $this->chunk = $var; + + return $this; + } + + /** + * Chunk textual content. + * + * Generated from protobuf field string content = 2; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Chunk textual content. + * + * Generated from protobuf field string content = 2; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, True); + $this->content = $var; + + return $this; + } + + /** + * Relevance score. + * + * Generated from protobuf field optional float relevance_score = 3; + * @return float + */ + public function getRelevanceScore() + { + return isset($this->relevance_score) ? $this->relevance_score : 0.0; + } + + public function hasRelevanceScore() + { + return isset($this->relevance_score); + } + + public function clearRelevanceScore() + { + unset($this->relevance_score); + } + + /** + * Relevance score. + * + * Generated from protobuf field optional float relevance_score = 3; + * @param float $var + * @return $this + */ + public function setRelevanceScore($var) + { + GPBUtil::checkFloat($var); + $this->relevance_score = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/Answer/Step/Action/Observation/SearchResult/SnippetInfo.php b/DiscoveryEngine/src/V1beta/Answer/Step/Action/Observation/SearchResult/SnippetInfo.php new file mode 100644 index 000000000000..d88f6ac0868f --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Answer/Step/Action/Observation/SearchResult/SnippetInfo.php @@ -0,0 +1,102 @@ +google.cloud.discoveryengine.v1beta.Answer.Step.Action.Observation.SearchResult.SnippetInfo + */ +class SnippetInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Snippet content. + * + * Generated from protobuf field string snippet = 1; + */ + protected $snippet = ''; + /** + * Status of the snippet defined by the search team. + * + * Generated from protobuf field string snippet_status = 2; + */ + protected $snippet_status = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $snippet + * Snippet content. + * @type string $snippet_status + * Status of the snippet defined by the search team. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Answer::initOnce(); + parent::__construct($data); + } + + /** + * Snippet content. + * + * Generated from protobuf field string snippet = 1; + * @return string + */ + public function getSnippet() + { + return $this->snippet; + } + + /** + * Snippet content. + * + * Generated from protobuf field string snippet = 1; + * @param string $var + * @return $this + */ + public function setSnippet($var) + { + GPBUtil::checkString($var, True); + $this->snippet = $var; + + return $this; + } + + /** + * Status of the snippet defined by the search team. + * + * Generated from protobuf field string snippet_status = 2; + * @return string + */ + public function getSnippetStatus() + { + return $this->snippet_status; + } + + /** + * Status of the snippet defined by the search team. + * + * Generated from protobuf field string snippet_status = 2; + * @param string $var + * @return $this + */ + public function setSnippetStatus($var) + { + GPBUtil::checkString($var, True); + $this->snippet_status = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/Answer/Step/Action/SearchAction.php b/DiscoveryEngine/src/V1beta/Answer/Step/Action/SearchAction.php new file mode 100644 index 000000000000..3b357f781ff0 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Answer/Step/Action/SearchAction.php @@ -0,0 +1,68 @@ +google.cloud.discoveryengine.v1beta.Answer.Step.Action.SearchAction + */ +class SearchAction extends \Google\Protobuf\Internal\Message +{ + /** + * The query to search. + * + * Generated from protobuf field string query = 1; + */ + protected $query = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $query + * The query to search. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Answer::initOnce(); + parent::__construct($data); + } + + /** + * The query to search. + * + * Generated from protobuf field string query = 1; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * The query to search. + * + * Generated from protobuf field string query = 1; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/Answer/Step/State.php b/DiscoveryEngine/src/V1beta/Answer/Step/State.php new file mode 100644 index 000000000000..990aab236dee --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Answer/Step/State.php @@ -0,0 +1,69 @@ +google.cloud.discoveryengine.v1beta.Answer.Step.State + */ +class State +{ + /** + * Unknown. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Step is currently in progress. + * + * Generated from protobuf enum IN_PROGRESS = 1; + */ + const IN_PROGRESS = 1; + /** + * Step currently failed. + * + * Generated from protobuf enum FAILED = 2; + */ + const FAILED = 2; + /** + * Step has succeeded. + * + * Generated from protobuf enum SUCCEEDED = 3; + */ + const SUCCEEDED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::IN_PROGRESS => 'IN_PROGRESS', + self::FAILED => 'FAILED', + self::SUCCEEDED => 'SUCCEEDED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/DiscoveryEngine/src/V1beta/AnswerQueryRequest.php b/DiscoveryEngine/src/V1beta/AnswerQueryRequest.php new file mode 100644 index 000000000000..fe1906cf535e --- /dev/null +++ b/DiscoveryEngine/src/V1beta/AnswerQueryRequest.php @@ -0,0 +1,519 @@ +google.cloud.discoveryengine.v1beta.AnswerQueryRequest + */ +class AnswerQueryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Search serving config, such as + * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, + * or + * `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. + * This field is used to identify the serving configuration name, set + * of models used to make the search. + * + * Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $serving_config = ''; + /** + * Required. Current user query. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Query query = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query = null; + /** + * The session resource name. Not required. + * When session field is not set, the API is in sessionless mode. + * We support auto session mode: users can use the wildcard symbol “-†as + * session id. A new id will be automatically generated and assigned. + * + * Generated from protobuf field string session = 3 [(.google.api.resource_reference) = { + */ + protected $session = ''; + /** + * Model specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec safety_spec = 4; + */ + protected $safety_spec = null; + /** + * Related questions specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec related_questions_spec = 5; + */ + protected $related_questions_spec = null; + /** + * Answer generation specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec answer_generation_spec = 7; + */ + protected $answer_generation_spec = null; + /** + * Search specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec search_spec = 8; + */ + protected $search_spec = null; + /** + * Query understanding specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec query_understanding_spec = 9; + */ + protected $query_understanding_spec = null; + /** + * Asynchronous mode control. + * If enabled, the response will be returned with answer/session resource + * name without final answer. The API users need to do the polling to get + * the latest status of answer/session by calling + * [ConversationalSearchService.GetAnswer][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetAnswer] + * or + * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession] + * method. + * + * Generated from protobuf field bool asynchronous_mode = 10; + */ + protected $asynchronous_mode = false; + /** + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * This field should NOT have a fixed value such as `unknown_visitor`. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string user_pseudo_id = 12; + */ + protected $user_pseudo_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $serving_config + * Required. The resource name of the Search serving config, such as + * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, + * or + * `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. + * This field is used to identify the serving configuration name, set + * of models used to make the search. + * @type \Google\Cloud\DiscoveryEngine\V1beta\Query $query + * Required. Current user query. + * @type string $session + * The session resource name. Not required. + * When session field is not set, the API is in sessionless mode. + * We support auto session mode: users can use the wildcard symbol “-†as + * session id. A new id will be automatically generated and assigned. + * @type \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SafetySpec $safety_spec + * Model specification. + * @type \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\RelatedQuestionsSpec $related_questions_spec + * Related questions specification. + * @type \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\AnswerGenerationSpec $answer_generation_spec + * Answer generation specification. + * @type \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec $search_spec + * Search specification. + * @type \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\QueryUnderstandingSpec $query_understanding_spec + * Query understanding specification. + * @type bool $asynchronous_mode + * Asynchronous mode control. + * If enabled, the response will be returned with answer/session resource + * name without final answer. The API users need to do the polling to get + * the latest status of answer/session by calling + * [ConversationalSearchService.GetAnswer][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetAnswer] + * or + * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession] + * method. + * @type string $user_pseudo_id + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * This field should NOT have a fixed value such as `unknown_visitor`. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Search serving config, such as + * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, + * or + * `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. + * This field is used to identify the serving configuration name, set + * of models used to make the search. + * + * Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getServingConfig() + { + return $this->serving_config; + } + + /** + * Required. The resource name of the Search serving config, such as + * `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, + * or + * `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. + * This field is used to identify the serving configuration name, set + * of models used to make the search. + * + * Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setServingConfig($var) + { + GPBUtil::checkString($var, True); + $this->serving_config = $var; + + return $this; + } + + /** + * Required. Current user query. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Query query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Query|null + */ + public function getQuery() + { + return $this->query; + } + + public function hasQuery() + { + return isset($this->query); + } + + public function clearQuery() + { + unset($this->query); + } + + /** + * Required. Current user query. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Query query = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Query $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Query::class); + $this->query = $var; + + return $this; + } + + /** + * The session resource name. Not required. + * When session field is not set, the API is in sessionless mode. + * We support auto session mode: users can use the wildcard symbol “-†as + * session id. A new id will be automatically generated and assigned. + * + * Generated from protobuf field string session = 3 [(.google.api.resource_reference) = { + * @return string + */ + public function getSession() + { + return $this->session; + } + + /** + * The session resource name. Not required. + * When session field is not set, the API is in sessionless mode. + * We support auto session mode: users can use the wildcard symbol “-†as + * session id. A new id will be automatically generated and assigned. + * + * Generated from protobuf field string session = 3 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSession($var) + { + GPBUtil::checkString($var, True); + $this->session = $var; + + return $this; + } + + /** + * Model specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec safety_spec = 4; + * @return \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SafetySpec|null + */ + public function getSafetySpec() + { + return $this->safety_spec; + } + + public function hasSafetySpec() + { + return isset($this->safety_spec); + } + + public function clearSafetySpec() + { + unset($this->safety_spec); + } + + /** + * Model specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec safety_spec = 4; + * @param \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SafetySpec $var + * @return $this + */ + public function setSafetySpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SafetySpec::class); + $this->safety_spec = $var; + + return $this; + } + + /** + * Related questions specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec related_questions_spec = 5; + * @return \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\RelatedQuestionsSpec|null + */ + public function getRelatedQuestionsSpec() + { + return $this->related_questions_spec; + } + + public function hasRelatedQuestionsSpec() + { + return isset($this->related_questions_spec); + } + + public function clearRelatedQuestionsSpec() + { + unset($this->related_questions_spec); + } + + /** + * Related questions specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec related_questions_spec = 5; + * @param \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\RelatedQuestionsSpec $var + * @return $this + */ + public function setRelatedQuestionsSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\RelatedQuestionsSpec::class); + $this->related_questions_spec = $var; + + return $this; + } + + /** + * Answer generation specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec answer_generation_spec = 7; + * @return \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\AnswerGenerationSpec|null + */ + public function getAnswerGenerationSpec() + { + return $this->answer_generation_spec; + } + + public function hasAnswerGenerationSpec() + { + return isset($this->answer_generation_spec); + } + + public function clearAnswerGenerationSpec() + { + unset($this->answer_generation_spec); + } + + /** + * Answer generation specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec answer_generation_spec = 7; + * @param \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\AnswerGenerationSpec $var + * @return $this + */ + public function setAnswerGenerationSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\AnswerGenerationSpec::class); + $this->answer_generation_spec = $var; + + return $this; + } + + /** + * Search specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec search_spec = 8; + * @return \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec|null + */ + public function getSearchSpec() + { + return $this->search_spec; + } + + public function hasSearchSpec() + { + return isset($this->search_spec); + } + + public function clearSearchSpec() + { + unset($this->search_spec); + } + + /** + * Search specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec search_spec = 8; + * @param \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec $var + * @return $this + */ + public function setSearchSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec::class); + $this->search_spec = $var; + + return $this; + } + + /** + * Query understanding specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec query_understanding_spec = 9; + * @return \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\QueryUnderstandingSpec|null + */ + public function getQueryUnderstandingSpec() + { + return $this->query_understanding_spec; + } + + public function hasQueryUnderstandingSpec() + { + return isset($this->query_understanding_spec); + } + + public function clearQueryUnderstandingSpec() + { + unset($this->query_understanding_spec); + } + + /** + * Query understanding specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec query_understanding_spec = 9; + * @param \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\QueryUnderstandingSpec $var + * @return $this + */ + public function setQueryUnderstandingSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\QueryUnderstandingSpec::class); + $this->query_understanding_spec = $var; + + return $this; + } + + /** + * Asynchronous mode control. + * If enabled, the response will be returned with answer/session resource + * name without final answer. The API users need to do the polling to get + * the latest status of answer/session by calling + * [ConversationalSearchService.GetAnswer][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetAnswer] + * or + * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession] + * method. + * + * Generated from protobuf field bool asynchronous_mode = 10; + * @return bool + */ + public function getAsynchronousMode() + { + return $this->asynchronous_mode; + } + + /** + * Asynchronous mode control. + * If enabled, the response will be returned with answer/session resource + * name without final answer. The API users need to do the polling to get + * the latest status of answer/session by calling + * [ConversationalSearchService.GetAnswer][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetAnswer] + * or + * [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession] + * method. + * + * Generated from protobuf field bool asynchronous_mode = 10; + * @param bool $var + * @return $this + */ + public function setAsynchronousMode($var) + { + GPBUtil::checkBool($var); + $this->asynchronous_mode = $var; + + return $this; + } + + /** + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * This field should NOT have a fixed value such as `unknown_visitor`. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string user_pseudo_id = 12; + * @return string + */ + public function getUserPseudoId() + { + return $this->user_pseudo_id; + } + + /** + * A unique identifier for tracking visitors. For example, this could be + * implemented with an HTTP cookie, which should be able to uniquely identify + * a visitor on a single device. This unique identifier should not change if + * the visitor logs in or out of the website. + * This field should NOT have a fixed value such as `unknown_visitor`. + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * Generated from protobuf field string user_pseudo_id = 12; + * @param string $var + * @return $this + */ + public function setUserPseudoId($var) + { + GPBUtil::checkString($var, True); + $this->user_pseudo_id = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/AnswerQueryRequest/AnswerGenerationSpec.php b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/AnswerGenerationSpec.php new file mode 100644 index 000000000000..1a18bc0799e5 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/AnswerGenerationSpec.php @@ -0,0 +1,326 @@ +google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec + */ +class AnswerGenerationSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Answer generation model specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; + */ + protected $model_spec = null; + /** + * Answer generation prompt specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; + */ + protected $prompt_spec = null; + /** + * Specifies whether to include citation metadata in the answer. The default + * value is `false`. + * + * Generated from protobuf field bool include_citations = 3; + */ + protected $include_citations = false; + /** + * Language code for Answer. Use language tags defined by + * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). + * Note: This is an experimental feature. + * + * Generated from protobuf field string answer_language_code = 4; + */ + protected $answer_language_code = ''; + /** + * Specifies whether to filter out adversarial queries. The default value + * is `false`. + * Google employs search-query classification to detect adversarial + * queries. No answer is returned if the search query is classified as an + * adversarial query. For example, a user might ask a question regarding + * negative comments about the company or submit a query designed to + * generate unsafe, policy-violating output. If this field is set to + * `true`, we skip generating answers for adversarial queries and return + * fallback messages instead. + * + * Generated from protobuf field bool ignore_adversarial_query = 5; + */ + protected $ignore_adversarial_query = false; + /** + * Specifies whether to filter out queries that are not answer-seeking. + * The default value is `false`. + * Google employs search-query classification to detect answer-seeking + * queries. No answer is returned if the search query is classified as a + * non-answer seeking query. If this field is set to `true`, we skip + * generating answers for non-answer seeking queries and return + * fallback messages instead. + * + * Generated from protobuf field bool ignore_non_answer_seeking_query = 6; + */ + protected $ignore_non_answer_seeking_query = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\AnswerGenerationSpec\ModelSpec $model_spec + * Answer generation model specification. + * @type \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\AnswerGenerationSpec\PromptSpec $prompt_spec + * Answer generation prompt specification. + * @type bool $include_citations + * Specifies whether to include citation metadata in the answer. The default + * value is `false`. + * @type string $answer_language_code + * Language code for Answer. Use language tags defined by + * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). + * Note: This is an experimental feature. + * @type bool $ignore_adversarial_query + * Specifies whether to filter out adversarial queries. The default value + * is `false`. + * Google employs search-query classification to detect adversarial + * queries. No answer is returned if the search query is classified as an + * adversarial query. For example, a user might ask a question regarding + * negative comments about the company or submit a query designed to + * generate unsafe, policy-violating output. If this field is set to + * `true`, we skip generating answers for adversarial queries and return + * fallback messages instead. + * @type bool $ignore_non_answer_seeking_query + * Specifies whether to filter out queries that are not answer-seeking. + * The default value is `false`. + * Google employs search-query classification to detect answer-seeking + * queries. No answer is returned if the search query is classified as a + * non-answer seeking query. If this field is set to `true`, we skip + * generating answers for non-answer seeking queries and return + * fallback messages instead. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Answer generation model specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; + * @return \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\AnswerGenerationSpec\ModelSpec|null + */ + public function getModelSpec() + { + return $this->model_spec; + } + + public function hasModelSpec() + { + return isset($this->model_spec); + } + + public function clearModelSpec() + { + unset($this->model_spec); + } + + /** + * Answer generation model specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec model_spec = 1; + * @param \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\AnswerGenerationSpec\ModelSpec $var + * @return $this + */ + public function setModelSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\AnswerGenerationSpec\ModelSpec::class); + $this->model_spec = $var; + + return $this; + } + + /** + * Answer generation prompt specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; + * @return \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\AnswerGenerationSpec\PromptSpec|null + */ + public function getPromptSpec() + { + return $this->prompt_spec; + } + + public function hasPromptSpec() + { + return isset($this->prompt_spec); + } + + public function clearPromptSpec() + { + unset($this->prompt_spec); + } + + /** + * Answer generation prompt specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec prompt_spec = 2; + * @param \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\AnswerGenerationSpec\PromptSpec $var + * @return $this + */ + public function setPromptSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\AnswerGenerationSpec\PromptSpec::class); + $this->prompt_spec = $var; + + return $this; + } + + /** + * Specifies whether to include citation metadata in the answer. The default + * value is `false`. + * + * Generated from protobuf field bool include_citations = 3; + * @return bool + */ + public function getIncludeCitations() + { + return $this->include_citations; + } + + /** + * Specifies whether to include citation metadata in the answer. The default + * value is `false`. + * + * Generated from protobuf field bool include_citations = 3; + * @param bool $var + * @return $this + */ + public function setIncludeCitations($var) + { + GPBUtil::checkBool($var); + $this->include_citations = $var; + + return $this; + } + + /** + * Language code for Answer. Use language tags defined by + * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). + * Note: This is an experimental feature. + * + * Generated from protobuf field string answer_language_code = 4; + * @return string + */ + public function getAnswerLanguageCode() + { + return $this->answer_language_code; + } + + /** + * Language code for Answer. Use language tags defined by + * [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). + * Note: This is an experimental feature. + * + * Generated from protobuf field string answer_language_code = 4; + * @param string $var + * @return $this + */ + public function setAnswerLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->answer_language_code = $var; + + return $this; + } + + /** + * Specifies whether to filter out adversarial queries. The default value + * is `false`. + * Google employs search-query classification to detect adversarial + * queries. No answer is returned if the search query is classified as an + * adversarial query. For example, a user might ask a question regarding + * negative comments about the company or submit a query designed to + * generate unsafe, policy-violating output. If this field is set to + * `true`, we skip generating answers for adversarial queries and return + * fallback messages instead. + * + * Generated from protobuf field bool ignore_adversarial_query = 5; + * @return bool + */ + public function getIgnoreAdversarialQuery() + { + return $this->ignore_adversarial_query; + } + + /** + * Specifies whether to filter out adversarial queries. The default value + * is `false`. + * Google employs search-query classification to detect adversarial + * queries. No answer is returned if the search query is classified as an + * adversarial query. For example, a user might ask a question regarding + * negative comments about the company or submit a query designed to + * generate unsafe, policy-violating output. If this field is set to + * `true`, we skip generating answers for adversarial queries and return + * fallback messages instead. + * + * Generated from protobuf field bool ignore_adversarial_query = 5; + * @param bool $var + * @return $this + */ + public function setIgnoreAdversarialQuery($var) + { + GPBUtil::checkBool($var); + $this->ignore_adversarial_query = $var; + + return $this; + } + + /** + * Specifies whether to filter out queries that are not answer-seeking. + * The default value is `false`. + * Google employs search-query classification to detect answer-seeking + * queries. No answer is returned if the search query is classified as a + * non-answer seeking query. If this field is set to `true`, we skip + * generating answers for non-answer seeking queries and return + * fallback messages instead. + * + * Generated from protobuf field bool ignore_non_answer_seeking_query = 6; + * @return bool + */ + public function getIgnoreNonAnswerSeekingQuery() + { + return $this->ignore_non_answer_seeking_query; + } + + /** + * Specifies whether to filter out queries that are not answer-seeking. + * The default value is `false`. + * Google employs search-query classification to detect answer-seeking + * queries. No answer is returned if the search query is classified as a + * non-answer seeking query. If this field is set to `true`, we skip + * generating answers for non-answer seeking queries and return + * fallback messages instead. + * + * Generated from protobuf field bool ignore_non_answer_seeking_query = 6; + * @param bool $var + * @return $this + */ + public function setIgnoreNonAnswerSeekingQuery($var) + { + GPBUtil::checkBool($var); + $this->ignore_non_answer_seeking_query = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/AnswerQueryRequest/AnswerGenerationSpec/ModelSpec.php b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/AnswerGenerationSpec/ModelSpec.php new file mode 100644 index 000000000000..56008049e834 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/AnswerGenerationSpec/ModelSpec.php @@ -0,0 +1,72 @@ +google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.ModelSpec + */ +class ModelSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Model version. If not set, it will use the default stable model. + * Allowed values are: stable, preview. + * + * Generated from protobuf field string model_version = 1; + */ + protected $model_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $model_version + * Model version. If not set, it will use the default stable model. + * Allowed values are: stable, preview. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Model version. If not set, it will use the default stable model. + * Allowed values are: stable, preview. + * + * Generated from protobuf field string model_version = 1; + * @return string + */ + public function getModelVersion() + { + return $this->model_version; + } + + /** + * Model version. If not set, it will use the default stable model. + * Allowed values are: stable, preview. + * + * Generated from protobuf field string model_version = 1; + * @param string $var + * @return $this + */ + public function setModelVersion($var) + { + GPBUtil::checkString($var, True); + $this->model_version = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/AnswerQueryRequest/AnswerGenerationSpec/PromptSpec.php b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/AnswerGenerationSpec/PromptSpec.php new file mode 100644 index 000000000000..ddfdbaf835b8 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/AnswerGenerationSpec/PromptSpec.php @@ -0,0 +1,68 @@ +google.cloud.discoveryengine.v1beta.AnswerQueryRequest.AnswerGenerationSpec.PromptSpec + */ +class PromptSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Customized preamble. + * + * Generated from protobuf field string preamble = 1; + */ + protected $preamble = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $preamble + * Customized preamble. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Customized preamble. + * + * Generated from protobuf field string preamble = 1; + * @return string + */ + public function getPreamble() + { + return $this->preamble; + } + + /** + * Customized preamble. + * + * Generated from protobuf field string preamble = 1; + * @param string $var + * @return $this + */ + public function setPreamble($var) + { + GPBUtil::checkString($var, True); + $this->preamble = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/AnswerQueryRequest/QueryUnderstandingSpec.php b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/QueryUnderstandingSpec.php new file mode 100644 index 000000000000..c5c9a99c7ba8 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/QueryUnderstandingSpec.php @@ -0,0 +1,122 @@ +google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec + */ +class QueryUnderstandingSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Query classification specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; + */ + protected $query_classification_spec = null; + /** + * Query rephraser specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; + */ + protected $query_rephraser_spec = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\QueryUnderstandingSpec\QueryClassificationSpec $query_classification_spec + * Query classification specification. + * @type \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\QueryUnderstandingSpec\QueryRephraserSpec $query_rephraser_spec + * Query rephraser specification. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Query classification specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; + * @return \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\QueryUnderstandingSpec\QueryClassificationSpec|null + */ + public function getQueryClassificationSpec() + { + return $this->query_classification_spec; + } + + public function hasQueryClassificationSpec() + { + return isset($this->query_classification_spec); + } + + public function clearQueryClassificationSpec() + { + unset($this->query_classification_spec); + } + + /** + * Query classification specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec query_classification_spec = 1; + * @param \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\QueryUnderstandingSpec\QueryClassificationSpec $var + * @return $this + */ + public function setQueryClassificationSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\QueryUnderstandingSpec\QueryClassificationSpec::class); + $this->query_classification_spec = $var; + + return $this; + } + + /** + * Query rephraser specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; + * @return \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\QueryUnderstandingSpec\QueryRephraserSpec|null + */ + public function getQueryRephraserSpec() + { + return $this->query_rephraser_spec; + } + + public function hasQueryRephraserSpec() + { + return isset($this->query_rephraser_spec); + } + + public function clearQueryRephraserSpec() + { + unset($this->query_rephraser_spec); + } + + /** + * Query rephraser specification. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec query_rephraser_spec = 2; + * @param \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\QueryUnderstandingSpec\QueryRephraserSpec $var + * @return $this + */ + public function setQueryRephraserSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\QueryUnderstandingSpec\QueryRephraserSpec::class); + $this->query_rephraser_spec = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/AnswerQueryRequest/QueryUnderstandingSpec/QueryClassificationSpec.php b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/QueryUnderstandingSpec/QueryClassificationSpec.php new file mode 100644 index 000000000000..50d46f67e863 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/QueryUnderstandingSpec/QueryClassificationSpec.php @@ -0,0 +1,68 @@ +google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec + */ +class QueryClassificationSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Enabled query classification types. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + */ + private $types; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $types + * Enabled query classification types. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Enabled query classification types. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTypes() + { + return $this->types; + } + + /** + * Enabled query classification types. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type types = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\QueryUnderstandingSpec\QueryClassificationSpec\Type::class); + $this->types = $arr; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/AnswerQueryRequest/QueryUnderstandingSpec/QueryClassificationSpec/Type.php b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/QueryUnderstandingSpec/QueryClassificationSpec/Type.php new file mode 100644 index 000000000000..977da217fdb0 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/QueryUnderstandingSpec/QueryClassificationSpec/Type.php @@ -0,0 +1,62 @@ +google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryClassificationSpec.Type + */ +class Type +{ + /** + * Unspecified query classification type. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Adversarial query classification type. + * + * Generated from protobuf enum ADVERSARIAL_QUERY = 1; + */ + const ADVERSARIAL_QUERY = 1; + /** + * Non-answer-seeking query classification type. + * + * Generated from protobuf enum NON_ANSWER_SEEKING_QUERY = 2; + */ + const NON_ANSWER_SEEKING_QUERY = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::ADVERSARIAL_QUERY => 'ADVERSARIAL_QUERY', + self::NON_ANSWER_SEEKING_QUERY => 'NON_ANSWER_SEEKING_QUERY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/DiscoveryEngine/src/V1beta/AnswerQueryRequest/QueryUnderstandingSpec/QueryRephraserSpec.php b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/QueryUnderstandingSpec/QueryRephraserSpec.php new file mode 100644 index 000000000000..1913fdd4765e --- /dev/null +++ b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/QueryUnderstandingSpec/QueryRephraserSpec.php @@ -0,0 +1,110 @@ +google.cloud.discoveryengine.v1beta.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec + */ +class QueryRephraserSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Disable query rephraser. + * + * Generated from protobuf field bool disable = 1; + */ + protected $disable = false; + /** + * Max rephrase steps. + * The max number is 10 steps. + * If not set or set to < 1, it will be set to 1 by default. + * + * Generated from protobuf field int32 max_rephrase_steps = 2; + */ + protected $max_rephrase_steps = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $disable + * Disable query rephraser. + * @type int $max_rephrase_steps + * Max rephrase steps. + * The max number is 10 steps. + * If not set or set to < 1, it will be set to 1 by default. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Disable query rephraser. + * + * Generated from protobuf field bool disable = 1; + * @return bool + */ + public function getDisable() + { + return $this->disable; + } + + /** + * Disable query rephraser. + * + * Generated from protobuf field bool disable = 1; + * @param bool $var + * @return $this + */ + public function setDisable($var) + { + GPBUtil::checkBool($var); + $this->disable = $var; + + return $this; + } + + /** + * Max rephrase steps. + * The max number is 10 steps. + * If not set or set to < 1, it will be set to 1 by default. + * + * Generated from protobuf field int32 max_rephrase_steps = 2; + * @return int + */ + public function getMaxRephraseSteps() + { + return $this->max_rephrase_steps; + } + + /** + * Max rephrase steps. + * The max number is 10 steps. + * If not set or set to < 1, it will be set to 1 by default. + * + * Generated from protobuf field int32 max_rephrase_steps = 2; + * @param int $var + * @return $this + */ + public function setMaxRephraseSteps($var) + { + GPBUtil::checkInt32($var); + $this->max_rephrase_steps = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/AnswerQueryRequest/RelatedQuestionsSpec.php b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/RelatedQuestionsSpec.php new file mode 100644 index 000000000000..e1b372048f3e --- /dev/null +++ b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/RelatedQuestionsSpec.php @@ -0,0 +1,68 @@ +google.cloud.discoveryengine.v1beta.AnswerQueryRequest.RelatedQuestionsSpec + */ +class RelatedQuestionsSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Enable related questions feature if true. + * + * Generated from protobuf field bool enable = 1; + */ + protected $enable = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable + * Enable related questions feature if true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Enable related questions feature if true. + * + * Generated from protobuf field bool enable = 1; + * @return bool + */ + public function getEnable() + { + return $this->enable; + } + + /** + * Enable related questions feature if true. + * + * Generated from protobuf field bool enable = 1; + * @param bool $var + * @return $this + */ + public function setEnable($var) + { + GPBUtil::checkBool($var); + $this->enable = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SafetySpec.php b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SafetySpec.php new file mode 100644 index 000000000000..cc1fbc1ff777 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SafetySpec.php @@ -0,0 +1,72 @@ +google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SafetySpec + */ +class SafetySpec extends \Google\Protobuf\Internal\Message +{ + /** + * Enable the safety filtering on the answer response. It is false by + * default. + * + * Generated from protobuf field bool enable = 1; + */ + protected $enable = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable + * Enable the safety filtering on the answer response. It is false by + * default. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Enable the safety filtering on the answer response. It is false by + * default. + * + * Generated from protobuf field bool enable = 1; + * @return bool + */ + public function getEnable() + { + return $this->enable; + } + + /** + * Enable the safety filtering on the answer response. It is false by + * default. + * + * Generated from protobuf field bool enable = 1; + * @param bool $var + * @return $this + */ + public function setEnable($var) + { + GPBUtil::checkBool($var); + $this->enable = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec.php b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec.php new file mode 100644 index 000000000000..535d0dc29096 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec.php @@ -0,0 +1,109 @@ +google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec + */ +class SearchSpec extends \Google\Protobuf\Internal\Message +{ + protected $input; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchParams $search_params + * Search parameters. + * @type \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchResultList $search_result_list + * Search result list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Search parameters. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * @return \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchParams|null + */ + public function getSearchParams() + { + return $this->readOneof(1); + } + + public function hasSearchParams() + { + return $this->hasOneof(1); + } + + /** + * Search parameters. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams search_params = 1; + * @param \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchParams $var + * @return $this + */ + public function setSearchParams($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchParams::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Search result list. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * @return \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchResultList|null + */ + public function getSearchResultList() + { + return $this->readOneof(2); + } + + public function hasSearchResultList() + { + return $this->hasOneof(2); + } + + /** + * Search result list. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList search_result_list = 2; + * @param \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchResultList $var + * @return $this + */ + public function setSearchResultList($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchResultList::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getInput() + { + return $this->whichOneof("input"); + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchParams.php b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchParams.php new file mode 100644 index 000000000000..b77dfa282013 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchParams.php @@ -0,0 +1,268 @@ +google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchParams + */ +class SearchParams extends \Google\Protobuf\Internal\Message +{ + /** + * Number of search results to return. + * The default value is 10. + * + * Generated from protobuf field int32 max_return_results = 1; + */ + protected $max_return_results = 0; + /** + * The filter syntax consists of an expression language for constructing + * a predicate from one or more fields of the documents being filtered. + * Filter expression is case-sensitive. This will be used to filter + * search results which may affect the Answer response. + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * Filtering in Vertex AI Search is done by mapping the LHS filter key + * to a key property defined in the Vertex AI Search backend -- this + * mapping is defined by the customer in their schema. For example a + * media customers might have a field 'name' in their schema. In this + * case the filter would look like this: filter --> name:'ANY("king + * kong")' + * For more information about filtering including syntax and filter + * operators, see + * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * Boost specification to boost certain documents in search results which + * may affect the answer query response. For more information on boosting, + * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost) + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; + */ + protected $boost_spec = null; + /** + * The order in which documents are returned. Documents can be ordered + * by a field in an + * [Document][google.cloud.discoveryengine.v1beta.Document] object. Leave + * it unset if ordered by relevance. `order_by` expression is + * case-sensitive. For more information on ordering, see + * [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * + * Generated from protobuf field string order_by = 4; + */ + protected $order_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $max_return_results + * Number of search results to return. + * The default value is 10. + * @type string $filter + * The filter syntax consists of an expression language for constructing + * a predicate from one or more fields of the documents being filtered. + * Filter expression is case-sensitive. This will be used to filter + * search results which may affect the Answer response. + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * Filtering in Vertex AI Search is done by mapping the LHS filter key + * to a key property defined in the Vertex AI Search backend -- this + * mapping is defined by the customer in their schema. For example a + * media customers might have a field 'name' in their schema. In this + * case the filter would look like this: filter --> name:'ANY("king + * kong")' + * For more information about filtering including syntax and filter + * operators, see + * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec $boost_spec + * Boost specification to boost certain documents in search results which + * may affect the answer query response. For more information on boosting, + * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost) + * @type string $order_by + * The order in which documents are returned. Documents can be ordered + * by a field in an + * [Document][google.cloud.discoveryengine.v1beta.Document] object. Leave + * it unset if ordered by relevance. `order_by` expression is + * case-sensitive. For more information on ordering, see + * [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Number of search results to return. + * The default value is 10. + * + * Generated from protobuf field int32 max_return_results = 1; + * @return int + */ + public function getMaxReturnResults() + { + return $this->max_return_results; + } + + /** + * Number of search results to return. + * The default value is 10. + * + * Generated from protobuf field int32 max_return_results = 1; + * @param int $var + * @return $this + */ + public function setMaxReturnResults($var) + { + GPBUtil::checkInt32($var); + $this->max_return_results = $var; + + return $this; + } + + /** + * The filter syntax consists of an expression language for constructing + * a predicate from one or more fields of the documents being filtered. + * Filter expression is case-sensitive. This will be used to filter + * search results which may affect the Answer response. + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * Filtering in Vertex AI Search is done by mapping the LHS filter key + * to a key property defined in the Vertex AI Search backend -- this + * mapping is defined by the customer in their schema. For example a + * media customers might have a field 'name' in their schema. In this + * case the filter would look like this: filter --> name:'ANY("king + * kong")' + * For more information about filtering including syntax and filter + * operators, see + * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter syntax consists of an expression language for constructing + * a predicate from one or more fields of the documents being filtered. + * Filter expression is case-sensitive. This will be used to filter + * search results which may affect the Answer response. + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * Filtering in Vertex AI Search is done by mapping the LHS filter key + * to a key property defined in the Vertex AI Search backend -- this + * mapping is defined by the customer in their schema. For example a + * media customers might have a field 'name' in their schema. In this + * case the filter would look like this: filter --> name:'ANY("king + * kong")' + * For more information about filtering including syntax and filter + * operators, see + * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Boost specification to boost certain documents in search results which + * may affect the answer query response. For more information on boosting, + * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost) + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; + * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec|null + */ + public function getBoostSpec() + { + return $this->boost_spec; + } + + public function hasBoostSpec() + { + return isset($this->boost_spec); + } + + public function clearBoostSpec() + { + unset($this->boost_spec); + } + + /** + * Boost specification to boost certain documents in search results which + * may affect the answer query response. For more information on boosting, + * see [Boosting](https://cloud.google.com/retail/docs/boosting#boost) + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec boost_spec = 3; + * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec $var + * @return $this + */ + public function setBoostSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec::class); + $this->boost_spec = $var; + + return $this; + } + + /** + * The order in which documents are returned. Documents can be ordered + * by a field in an + * [Document][google.cloud.discoveryengine.v1beta.Document] object. Leave + * it unset if ordered by relevance. `order_by` expression is + * case-sensitive. For more information on ordering, see + * [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * + * Generated from protobuf field string order_by = 4; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * The order in which documents are returned. Documents can be ordered + * by a field in an + * [Document][google.cloud.discoveryengine.v1beta.Document] object. Leave + * it unset if ordered by relevance. `order_by` expression is + * case-sensitive. For more information on ordering, see + * [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) + * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + * + * Generated from protobuf field string order_by = 4; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList.php b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList.php new file mode 100644 index 000000000000..cb0d760ffefb --- /dev/null +++ b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList.php @@ -0,0 +1,68 @@ +google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList + */ +class SearchResultList extends \Google\Protobuf\Internal\Message +{ + /** + * Search results. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + */ + private $search_results; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchResultList\SearchResult>|\Google\Protobuf\Internal\RepeatedField $search_results + * Search results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Search results. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSearchResults() + { + return $this->search_results; + } + + /** + * Search results. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult search_results = 1; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchResultList\SearchResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSearchResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchResultList\SearchResult::class); + $this->search_results = $arr; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList/SearchResult.php b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList/SearchResult.php new file mode 100644 index 000000000000..3960d5cb1dea --- /dev/null +++ b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList/SearchResult.php @@ -0,0 +1,109 @@ +google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult + */ +class SearchResult extends \Google\Protobuf\Internal\Message +{ + protected $content; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchResultList\SearchResult\UnstructuredDocumentInfo $unstructured_document_info + * Unstructured document information. + * @type \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchResultList\SearchResult\ChunkInfo $chunk_info + * Chunk information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Unstructured document information. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; + * @return \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchResultList\SearchResult\UnstructuredDocumentInfo|null + */ + public function getUnstructuredDocumentInfo() + { + return $this->readOneof(1); + } + + public function hasUnstructuredDocumentInfo() + { + return $this->hasOneof(1); + } + + /** + * Unstructured document information. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo unstructured_document_info = 1; + * @param \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchResultList\SearchResult\UnstructuredDocumentInfo $var + * @return $this + */ + public function setUnstructuredDocumentInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchResultList\SearchResult\UnstructuredDocumentInfo::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Chunk information. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; + * @return \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchResultList\SearchResult\ChunkInfo|null + */ + public function getChunkInfo() + { + return $this->readOneof(2); + } + + public function hasChunkInfo() + { + return $this->hasOneof(2); + } + + /** + * Chunk information. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo chunk_info = 2; + * @param \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchResultList\SearchResult\ChunkInfo $var + * @return $this + */ + public function setChunkInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchResultList\SearchResult\ChunkInfo::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getContent() + { + return $this->whichOneof("content"); + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList/SearchResult/ChunkInfo.php b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList/SearchResult/ChunkInfo.php new file mode 100644 index 000000000000..92785972a72a --- /dev/null +++ b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList/SearchResult/ChunkInfo.php @@ -0,0 +1,102 @@ +google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.ChunkInfo + */ +class ChunkInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Chunk resource name. + * + * Generated from protobuf field string chunk = 1 [(.google.api.resource_reference) = { + */ + protected $chunk = ''; + /** + * Chunk textual content. + * + * Generated from protobuf field string content = 2; + */ + protected $content = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $chunk + * Chunk resource name. + * @type string $content + * Chunk textual content. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Chunk resource name. + * + * Generated from protobuf field string chunk = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getChunk() + { + return $this->chunk; + } + + /** + * Chunk resource name. + * + * Generated from protobuf field string chunk = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setChunk($var) + { + GPBUtil::checkString($var, True); + $this->chunk = $var; + + return $this; + } + + /** + * Chunk textual content. + * + * Generated from protobuf field string content = 2; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Chunk textual content. + * + * Generated from protobuf field string content = 2; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, True); + $this->content = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList/SearchResult/UnstructuredDocumentInfo.php b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList/SearchResult/UnstructuredDocumentInfo.php new file mode 100644 index 000000000000..a147536febfe --- /dev/null +++ b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList/SearchResult/UnstructuredDocumentInfo.php @@ -0,0 +1,238 @@ +google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo + */ +class UnstructuredDocumentInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Document resource name. + * + * Generated from protobuf field string document = 1 [(.google.api.resource_reference) = { + */ + protected $document = ''; + /** + * URI for the document. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + /** + * Title. + * + * Generated from protobuf field string title = 3; + */ + protected $title = ''; + /** + * List of document contexts. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + */ + private $document_contexts; + /** + * List of extractive segments. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + */ + private $extractive_segments; + /** + * List of extractive answers. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6; + */ + private $extractive_answers; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $document + * Document resource name. + * @type string $uri + * URI for the document. + * @type string $title + * Title. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchResultList\SearchResult\UnstructuredDocumentInfo\DocumentContext>|\Google\Protobuf\Internal\RepeatedField $document_contexts + * List of document contexts. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchResultList\SearchResult\UnstructuredDocumentInfo\ExtractiveSegment>|\Google\Protobuf\Internal\RepeatedField $extractive_segments + * List of extractive segments. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchResultList\SearchResult\UnstructuredDocumentInfo\ExtractiveAnswer>|\Google\Protobuf\Internal\RepeatedField $extractive_answers + * List of extractive answers. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Document resource name. + * + * Generated from protobuf field string document = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getDocument() + { + return $this->document; + } + + /** + * Document resource name. + * + * Generated from protobuf field string document = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkString($var, True); + $this->document = $var; + + return $this; + } + + /** + * URI for the document. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * URI for the document. + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * Title. + * + * Generated from protobuf field string title = 3; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Title. + * + * Generated from protobuf field string title = 3; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * List of document contexts. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDocumentContexts() + { + return $this->document_contexts; + } + + /** + * List of document contexts. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext document_contexts = 4; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchResultList\SearchResult\UnstructuredDocumentInfo\DocumentContext>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDocumentContexts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchResultList\SearchResult\UnstructuredDocumentInfo\DocumentContext::class); + $this->document_contexts = $arr; + + return $this; + } + + /** + * List of extractive segments. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExtractiveSegments() + { + return $this->extractive_segments; + } + + /** + * List of extractive segments. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment extractive_segments = 5; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchResultList\SearchResult\UnstructuredDocumentInfo\ExtractiveSegment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExtractiveSegments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchResultList\SearchResult\UnstructuredDocumentInfo\ExtractiveSegment::class); + $this->extractive_segments = $arr; + + return $this; + } + + /** + * List of extractive answers. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExtractiveAnswers() + { + return $this->extractive_answers; + } + + /** + * List of extractive answers. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer extractive_answers = 6; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchResultList\SearchResult\UnstructuredDocumentInfo\ExtractiveAnswer>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExtractiveAnswers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest\SearchSpec\SearchResultList\SearchResult\UnstructuredDocumentInfo\ExtractiveAnswer::class); + $this->extractive_answers = $arr; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList/SearchResult/UnstructuredDocumentInfo/DocumentContext.php b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList/SearchResult/UnstructuredDocumentInfo/DocumentContext.php new file mode 100644 index 000000000000..e55d7e920e26 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList/SearchResult/UnstructuredDocumentInfo/DocumentContext.php @@ -0,0 +1,102 @@ +google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.DocumentContext + */ +class DocumentContext extends \Google\Protobuf\Internal\Message +{ + /** + * Page identifier. + * + * Generated from protobuf field string page_identifier = 1; + */ + protected $page_identifier = ''; + /** + * Document content. + * + * Generated from protobuf field string content = 2; + */ + protected $content = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $page_identifier + * Page identifier. + * @type string $content + * Document content. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Page identifier. + * + * Generated from protobuf field string page_identifier = 1; + * @return string + */ + public function getPageIdentifier() + { + return $this->page_identifier; + } + + /** + * Page identifier. + * + * Generated from protobuf field string page_identifier = 1; + * @param string $var + * @return $this + */ + public function setPageIdentifier($var) + { + GPBUtil::checkString($var, True); + $this->page_identifier = $var; + + return $this; + } + + /** + * Document content. + * + * Generated from protobuf field string content = 2; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Document content. + * + * Generated from protobuf field string content = 2; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, True); + $this->content = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList/SearchResult/UnstructuredDocumentInfo/ExtractiveAnswer.php b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList/SearchResult/UnstructuredDocumentInfo/ExtractiveAnswer.php new file mode 100644 index 000000000000..7e07d2813f95 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList/SearchResult/UnstructuredDocumentInfo/ExtractiveAnswer.php @@ -0,0 +1,103 @@ +google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveAnswer + */ +class ExtractiveAnswer extends \Google\Protobuf\Internal\Message +{ + /** + * Page identifier. + * + * Generated from protobuf field string page_identifier = 1; + */ + protected $page_identifier = ''; + /** + * Extractive answer content. + * + * Generated from protobuf field string content = 2; + */ + protected $content = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $page_identifier + * Page identifier. + * @type string $content + * Extractive answer content. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Page identifier. + * + * Generated from protobuf field string page_identifier = 1; + * @return string + */ + public function getPageIdentifier() + { + return $this->page_identifier; + } + + /** + * Page identifier. + * + * Generated from protobuf field string page_identifier = 1; + * @param string $var + * @return $this + */ + public function setPageIdentifier($var) + { + GPBUtil::checkString($var, True); + $this->page_identifier = $var; + + return $this; + } + + /** + * Extractive answer content. + * + * Generated from protobuf field string content = 2; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Extractive answer content. + * + * Generated from protobuf field string content = 2; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, True); + $this->content = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList/SearchResult/UnstructuredDocumentInfo/ExtractiveSegment.php b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList/SearchResult/UnstructuredDocumentInfo/ExtractiveSegment.php new file mode 100644 index 000000000000..9a3bd0a2f94c --- /dev/null +++ b/DiscoveryEngine/src/V1beta/AnswerQueryRequest/SearchSpec/SearchResultList/SearchResult/UnstructuredDocumentInfo/ExtractiveSegment.php @@ -0,0 +1,103 @@ +google.cloud.discoveryengine.v1beta.AnswerQueryRequest.SearchSpec.SearchResultList.SearchResult.UnstructuredDocumentInfo.ExtractiveSegment + */ +class ExtractiveSegment extends \Google\Protobuf\Internal\Message +{ + /** + * Page identifier. + * + * Generated from protobuf field string page_identifier = 1; + */ + protected $page_identifier = ''; + /** + * Extractive segment content. + * + * Generated from protobuf field string content = 2; + */ + protected $content = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $page_identifier + * Page identifier. + * @type string $content + * Extractive segment content. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Page identifier. + * + * Generated from protobuf field string page_identifier = 1; + * @return string + */ + public function getPageIdentifier() + { + return $this->page_identifier; + } + + /** + * Page identifier. + * + * Generated from protobuf field string page_identifier = 1; + * @param string $var + * @return $this + */ + public function setPageIdentifier($var) + { + GPBUtil::checkString($var, True); + $this->page_identifier = $var; + + return $this; + } + + /** + * Extractive segment content. + * + * Generated from protobuf field string content = 2; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Extractive segment content. + * + * Generated from protobuf field string content = 2; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, True); + $this->content = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/AnswerQueryResponse.php b/DiscoveryEngine/src/V1beta/AnswerQueryResponse.php new file mode 100644 index 000000000000..5cf9da1982b3 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/AnswerQueryResponse.php @@ -0,0 +1,155 @@ +google.cloud.discoveryengine.v1beta.AnswerQueryResponse + */ +class AnswerQueryResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Answer resource object. + * If [AnswerQueryRequest.StepSpec.max_step_count][] is greater than 1, + * use [Answer.name][google.cloud.discoveryengine.v1beta.Answer.name] to fetch + * answer information using + * [ConversationalSearchService.GetAnswer][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetAnswer] + * API. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer answer = 1; + */ + protected $answer = null; + /** + * Session resource object. + * It will be only available when session field is set and valid in the + * [AnswerQueryRequest][google.cloud.discoveryengine.v1beta.AnswerQueryRequest] + * request. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Session session = 2; + */ + protected $session = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DiscoveryEngine\V1beta\Answer $answer + * Answer resource object. + * If [AnswerQueryRequest.StepSpec.max_step_count][] is greater than 1, + * use [Answer.name][google.cloud.discoveryengine.v1beta.Answer.name] to fetch + * answer information using + * [ConversationalSearchService.GetAnswer][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetAnswer] + * API. + * @type \Google\Cloud\DiscoveryEngine\V1beta\Session $session + * Session resource object. + * It will be only available when session field is set and valid in the + * [AnswerQueryRequest][google.cloud.discoveryengine.v1beta.AnswerQueryRequest] + * request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Answer resource object. + * If [AnswerQueryRequest.StepSpec.max_step_count][] is greater than 1, + * use [Answer.name][google.cloud.discoveryengine.v1beta.Answer.name] to fetch + * answer information using + * [ConversationalSearchService.GetAnswer][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetAnswer] + * API. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer answer = 1; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Answer|null + */ + public function getAnswer() + { + return $this->answer; + } + + public function hasAnswer() + { + return isset($this->answer); + } + + public function clearAnswer() + { + unset($this->answer); + } + + /** + * Answer resource object. + * If [AnswerQueryRequest.StepSpec.max_step_count][] is greater than 1, + * use [Answer.name][google.cloud.discoveryengine.v1beta.Answer.name] to fetch + * answer information using + * [ConversationalSearchService.GetAnswer][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetAnswer] + * API. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Answer answer = 1; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Answer $var + * @return $this + */ + public function setAnswer($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Answer::class); + $this->answer = $var; + + return $this; + } + + /** + * Session resource object. + * It will be only available when session field is set and valid in the + * [AnswerQueryRequest][google.cloud.discoveryengine.v1beta.AnswerQueryRequest] + * request. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Session session = 2; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Session|null + */ + public function getSession() + { + return $this->session; + } + + public function hasSession() + { + return isset($this->session); + } + + public function clearSession() + { + unset($this->session); + } + + /** + * Session resource object. + * It will be only available when session field is set and valid in the + * [AnswerQueryRequest][google.cloud.discoveryengine.v1beta.AnswerQueryRequest] + * request. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Session session = 2; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Session $var + * @return $this + */ + public function setSession($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Session::class); + $this->session = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/BigQuerySource.php b/DiscoveryEngine/src/V1beta/BigQuerySource.php index 990afcce1752..ed038c804544 100644 --- a/DiscoveryEngine/src/V1beta/BigQuerySource.php +++ b/DiscoveryEngine/src/V1beta/BigQuerySource.php @@ -60,7 +60,7 @@ class BigQuerySource extends \Google\Protobuf\Internal\Message * [Document.struct_data][google.cloud.discoveryengine.v1beta.Document.struct_data]. * * `custom`: One custom data per row in arbitrary format that conforms to * the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the - * data store. This can only be used by Gen App Builder. + * data store. This can only be used by the GENERIC Data Store vertical. * * Generated from protobuf field string data_schema = 6; */ @@ -104,7 +104,7 @@ class BigQuerySource extends \Google\Protobuf\Internal\Message * [Document.struct_data][google.cloud.discoveryengine.v1beta.Document.struct_data]. * * `custom`: One custom data per row in arbitrary format that conforms to * the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the - * data store. This can only be used by Gen App Builder. + * data store. This can only be used by the GENERIC Data Store vertical. * } */ public function __construct($data = NULL) { @@ -274,7 +274,7 @@ public function setGcsStagingDir($var) * [Document.struct_data][google.cloud.discoveryengine.v1beta.Document.struct_data]. * * `custom`: One custom data per row in arbitrary format that conforms to * the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the - * data store. This can only be used by Gen App Builder. + * data store. This can only be used by the GENERIC Data Store vertical. * * Generated from protobuf field string data_schema = 6; * @return string @@ -299,7 +299,7 @@ public function getDataSchema() * [Document.struct_data][google.cloud.discoveryengine.v1beta.Document.struct_data]. * * `custom`: One custom data per row in arbitrary format that conforms to * the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the - * data store. This can only be used by Gen App Builder. + * data store. This can only be used by the GENERIC Data Store vertical. * * Generated from protobuf field string data_schema = 6; * @param string $var diff --git a/DiscoveryEngine/src/V1beta/BigtableOptions.php b/DiscoveryEngine/src/V1beta/BigtableOptions.php new file mode 100644 index 000000000000..e3bc7370f616 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/BigtableOptions.php @@ -0,0 +1,114 @@ +google.cloud.discoveryengine.v1beta.BigtableOptions + */ +class BigtableOptions extends \Google\Protobuf\Internal\Message +{ + /** + * The field name used for saving row key value in the document. The name has + * to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. + * + * Generated from protobuf field string key_field_name = 1; + */ + protected $key_field_name = ''; + /** + * The mapping from family names to an object that contains column families + * level information for the given column family. If a family is not present + * in this map it will be ignored. + * + * Generated from protobuf field map families = 2; + */ + private $families; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key_field_name + * The field name used for saving row key value in the document. The name has + * to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. + * @type array|\Google\Protobuf\Internal\MapField $families + * The mapping from family names to an object that contains column families + * level information for the given column family. If a family is not present + * in this map it will be ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * The field name used for saving row key value in the document. The name has + * to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. + * + * Generated from protobuf field string key_field_name = 1; + * @return string + */ + public function getKeyFieldName() + { + return $this->key_field_name; + } + + /** + * The field name used for saving row key value in the document. The name has + * to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. + * + * Generated from protobuf field string key_field_name = 1; + * @param string $var + * @return $this + */ + public function setKeyFieldName($var) + { + GPBUtil::checkString($var, True); + $this->key_field_name = $var; + + return $this; + } + + /** + * The mapping from family names to an object that contains column families + * level information for the given column family. If a family is not present + * in this map it will be ignored. + * + * Generated from protobuf field map families = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getFamilies() + { + return $this->families; + } + + /** + * The mapping from family names to an object that contains column families + * level information for the given column family. If a family is not present + * in this map it will be ignored. + * + * Generated from protobuf field map families = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setFamilies($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\BigtableOptions\BigtableColumnFamily::class); + $this->families = $arr; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/BigtableOptions/BigtableColumn.php b/DiscoveryEngine/src/V1beta/BigtableOptions/BigtableColumn.php new file mode 100644 index 000000000000..1a7f7cc4b39e --- /dev/null +++ b/DiscoveryEngine/src/V1beta/BigtableOptions/BigtableColumn.php @@ -0,0 +1,218 @@ +google.cloud.discoveryengine.v1beta.BigtableOptions.BigtableColumn + */ +class BigtableColumn extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Qualifier of the column. If it cannot be decoded with utf-8, + * use a base-64 encoded string instead. + * + * Generated from protobuf field bytes qualifier = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $qualifier = ''; + /** + * The field name to use for this column in the document. The name has to + * match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. + * If not set, it is parsed from the qualifier bytes with best effort. + * However, due to different naming patterns, field name collisions could + * happen, where parsing behavior is undefined. + * + * Generated from protobuf field string field_name = 2; + */ + protected $field_name = ''; + /** + * The encoding mode of the values when the type is not `STRING`. + * Acceptable encoding values are: + * * `TEXT`: indicates values are alphanumeric text strings. + * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` + * family of functions. This can be overridden for a specific column + * by listing that column in `columns` and specifying an encoding for it. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.BigtableOptions.Encoding encoding = 3; + */ + protected $encoding = 0; + /** + * The type of values in this column family. + * The values are expected to be encoded using `HBase Bytes.toBytes` + * function when the encoding value is set to `BINARY`. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.BigtableOptions.Type type = 4; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $qualifier + * Required. Qualifier of the column. If it cannot be decoded with utf-8, + * use a base-64 encoded string instead. + * @type string $field_name + * The field name to use for this column in the document. The name has to + * match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. + * If not set, it is parsed from the qualifier bytes with best effort. + * However, due to different naming patterns, field name collisions could + * happen, where parsing behavior is undefined. + * @type int $encoding + * The encoding mode of the values when the type is not `STRING`. + * Acceptable encoding values are: + * * `TEXT`: indicates values are alphanumeric text strings. + * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` + * family of functions. This can be overridden for a specific column + * by listing that column in `columns` and specifying an encoding for it. + * @type int $type + * The type of values in this column family. + * The values are expected to be encoded using `HBase Bytes.toBytes` + * function when the encoding value is set to `BINARY`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. Qualifier of the column. If it cannot be decoded with utf-8, + * use a base-64 encoded string instead. + * + * Generated from protobuf field bytes qualifier = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getQualifier() + { + return $this->qualifier; + } + + /** + * Required. Qualifier of the column. If it cannot be decoded with utf-8, + * use a base-64 encoded string instead. + * + * Generated from protobuf field bytes qualifier = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setQualifier($var) + { + GPBUtil::checkString($var, False); + $this->qualifier = $var; + + return $this; + } + + /** + * The field name to use for this column in the document. The name has to + * match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. + * If not set, it is parsed from the qualifier bytes with best effort. + * However, due to different naming patterns, field name collisions could + * happen, where parsing behavior is undefined. + * + * Generated from protobuf field string field_name = 2; + * @return string + */ + public function getFieldName() + { + return $this->field_name; + } + + /** + * The field name to use for this column in the document. The name has to + * match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. + * If not set, it is parsed from the qualifier bytes with best effort. + * However, due to different naming patterns, field name collisions could + * happen, where parsing behavior is undefined. + * + * Generated from protobuf field string field_name = 2; + * @param string $var + * @return $this + */ + public function setFieldName($var) + { + GPBUtil::checkString($var, True); + $this->field_name = $var; + + return $this; + } + + /** + * The encoding mode of the values when the type is not `STRING`. + * Acceptable encoding values are: + * * `TEXT`: indicates values are alphanumeric text strings. + * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` + * family of functions. This can be overridden for a specific column + * by listing that column in `columns` and specifying an encoding for it. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.BigtableOptions.Encoding encoding = 3; + * @return int + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * The encoding mode of the values when the type is not `STRING`. + * Acceptable encoding values are: + * * `TEXT`: indicates values are alphanumeric text strings. + * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` + * family of functions. This can be overridden for a specific column + * by listing that column in `columns` and specifying an encoding for it. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.BigtableOptions.Encoding encoding = 3; + * @param int $var + * @return $this + */ + public function setEncoding($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1beta\BigtableOptions\Encoding::class); + $this->encoding = $var; + + return $this; + } + + /** + * The type of values in this column family. + * The values are expected to be encoded using `HBase Bytes.toBytes` + * function when the encoding value is set to `BINARY`. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.BigtableOptions.Type type = 4; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of values in this column family. + * The values are expected to be encoded using `HBase Bytes.toBytes` + * function when the encoding value is set to `BINARY`. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.BigtableOptions.Type type = 4; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1beta\BigtableOptions\Type::class); + $this->type = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/BigtableOptions/BigtableColumnFamily.php b/DiscoveryEngine/src/V1beta/BigtableOptions/BigtableColumnFamily.php new file mode 100644 index 000000000000..34bf8e2f491c --- /dev/null +++ b/DiscoveryEngine/src/V1beta/BigtableOptions/BigtableColumnFamily.php @@ -0,0 +1,218 @@ +google.cloud.discoveryengine.v1beta.BigtableOptions.BigtableColumnFamily + */ +class BigtableColumnFamily extends \Google\Protobuf\Internal\Message +{ + /** + * The field name to use for this column family in the document. The + * name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set, + * it is parsed from the family name with best effort. However, due to + * different naming patterns, field name collisions could happen, where + * parsing behavior is undefined. + * + * Generated from protobuf field string field_name = 1; + */ + protected $field_name = ''; + /** + * The encoding mode of the values when the type is not STRING. + * Acceptable encoding values are: + * * `TEXT`: indicates values are alphanumeric text strings. + * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` + * family of functions. This can be overridden for a specific column + * by listing that column in `columns` and specifying an encoding for it. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.BigtableOptions.Encoding encoding = 2; + */ + protected $encoding = 0; + /** + * The type of values in this column family. + * The values are expected to be encoded using `HBase Bytes.toBytes` + * function when the encoding value is set to `BINARY`. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.BigtableOptions.Type type = 3; + */ + protected $type = 0; + /** + * The list of objects that contains column level information for each + * column. If a column is not present in this list it will be ignored. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.BigtableOptions.BigtableColumn columns = 4; + */ + private $columns; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field_name + * The field name to use for this column family in the document. The + * name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set, + * it is parsed from the family name with best effort. However, due to + * different naming patterns, field name collisions could happen, where + * parsing behavior is undefined. + * @type int $encoding + * The encoding mode of the values when the type is not STRING. + * Acceptable encoding values are: + * * `TEXT`: indicates values are alphanumeric text strings. + * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` + * family of functions. This can be overridden for a specific column + * by listing that column in `columns` and specifying an encoding for it. + * @type int $type + * The type of values in this column family. + * The values are expected to be encoded using `HBase Bytes.toBytes` + * function when the encoding value is set to `BINARY`. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\BigtableOptions\BigtableColumn>|\Google\Protobuf\Internal\RepeatedField $columns + * The list of objects that contains column level information for each + * column. If a column is not present in this list it will be ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * The field name to use for this column family in the document. The + * name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set, + * it is parsed from the family name with best effort. However, due to + * different naming patterns, field name collisions could happen, where + * parsing behavior is undefined. + * + * Generated from protobuf field string field_name = 1; + * @return string + */ + public function getFieldName() + { + return $this->field_name; + } + + /** + * The field name to use for this column family in the document. The + * name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set, + * it is parsed from the family name with best effort. However, due to + * different naming patterns, field name collisions could happen, where + * parsing behavior is undefined. + * + * Generated from protobuf field string field_name = 1; + * @param string $var + * @return $this + */ + public function setFieldName($var) + { + GPBUtil::checkString($var, True); + $this->field_name = $var; + + return $this; + } + + /** + * The encoding mode of the values when the type is not STRING. + * Acceptable encoding values are: + * * `TEXT`: indicates values are alphanumeric text strings. + * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` + * family of functions. This can be overridden for a specific column + * by listing that column in `columns` and specifying an encoding for it. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.BigtableOptions.Encoding encoding = 2; + * @return int + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * The encoding mode of the values when the type is not STRING. + * Acceptable encoding values are: + * * `TEXT`: indicates values are alphanumeric text strings. + * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` + * family of functions. This can be overridden for a specific column + * by listing that column in `columns` and specifying an encoding for it. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.BigtableOptions.Encoding encoding = 2; + * @param int $var + * @return $this + */ + public function setEncoding($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1beta\BigtableOptions\Encoding::class); + $this->encoding = $var; + + return $this; + } + + /** + * The type of values in this column family. + * The values are expected to be encoded using `HBase Bytes.toBytes` + * function when the encoding value is set to `BINARY`. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.BigtableOptions.Type type = 3; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of values in this column family. + * The values are expected to be encoded using `HBase Bytes.toBytes` + * function when the encoding value is set to `BINARY`. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.BigtableOptions.Type type = 3; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1beta\BigtableOptions\Type::class); + $this->type = $var; + + return $this; + } + + /** + * The list of objects that contains column level information for each + * column. If a column is not present in this list it will be ignored. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.BigtableOptions.BigtableColumn columns = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getColumns() + { + return $this->columns; + } + + /** + * The list of objects that contains column level information for each + * column. If a column is not present in this list it will be ignored. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.BigtableOptions.BigtableColumn columns = 4; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\BigtableOptions\BigtableColumn>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setColumns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\BigtableOptions\BigtableColumn::class); + $this->columns = $arr; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/BigtableOptions/Encoding.php b/DiscoveryEngine/src/V1beta/BigtableOptions/Encoding.php new file mode 100644 index 000000000000..c5261569b734 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/BigtableOptions/Encoding.php @@ -0,0 +1,62 @@ +google.cloud.discoveryengine.v1beta.BigtableOptions.Encoding + */ +class Encoding +{ + /** + * The encoding is unspecified. + * + * Generated from protobuf enum ENCODING_UNSPECIFIED = 0; + */ + const ENCODING_UNSPECIFIED = 0; + /** + * Text encoding. + * + * Generated from protobuf enum TEXT = 1; + */ + const TEXT = 1; + /** + * Binary encoding. + * + * Generated from protobuf enum BINARY = 2; + */ + const BINARY = 2; + + private static $valueToName = [ + self::ENCODING_UNSPECIFIED => 'ENCODING_UNSPECIFIED', + self::TEXT => 'TEXT', + self::BINARY => 'BINARY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/DiscoveryEngine/src/V1beta/BigtableOptions/Type.php b/DiscoveryEngine/src/V1beta/BigtableOptions/Type.php new file mode 100644 index 000000000000..a8cec4fbf08d --- /dev/null +++ b/DiscoveryEngine/src/V1beta/BigtableOptions/Type.php @@ -0,0 +1,101 @@ +google.cloud.discoveryengine.v1beta.BigtableOptions.Type + */ +class Type +{ + /** + * The type is unspecified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * String type. + * + * Generated from protobuf enum STRING = 1; + */ + const STRING = 1; + /** + * Numerical type. + * + * Generated from protobuf enum NUMBER = 2; + */ + const NUMBER = 2; + /** + * Integer type. + * + * Generated from protobuf enum INTEGER = 3; + */ + const INTEGER = 3; + /** + * Variable length integer type. + * + * Generated from protobuf enum VAR_INTEGER = 4; + */ + const VAR_INTEGER = 4; + /** + * BigDecimal type. + * + * Generated from protobuf enum BIG_NUMERIC = 5; + */ + const BIG_NUMERIC = 5; + /** + * Boolean type. + * + * Generated from protobuf enum BOOLEAN = 6; + */ + const BOOLEAN = 6; + /** + * JSON type. + * + * Generated from protobuf enum JSON = 7; + */ + const JSON = 7; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::STRING => 'STRING', + self::NUMBER => 'NUMBER', + self::INTEGER => 'INTEGER', + self::VAR_INTEGER => 'VAR_INTEGER', + self::BIG_NUMERIC => 'BIG_NUMERIC', + self::BOOLEAN => 'BOOLEAN', + self::JSON => 'JSON', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/DiscoveryEngine/src/V1beta/BigtableSource.php b/DiscoveryEngine/src/V1beta/BigtableSource.php new file mode 100644 index 000000000000..ba24ea203b56 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/BigtableSource.php @@ -0,0 +1,191 @@ +google.cloud.discoveryengine.v1beta.BigtableSource + */ +class BigtableSource extends \Google\Protobuf\Internal\Message +{ + /** + * The project ID that the Bigtable source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * + * Generated from protobuf field string project_id = 1; + */ + protected $project_id = ''; + /** + * Required. The instance ID of the Cloud Bigtable that needs to be imported. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance_id = ''; + /** + * Required. The table ID of the Cloud Bigtable that needs to be imported. + * + * Generated from protobuf field string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $table_id = ''; + /** + * Required. Bigtable options that contains information needed when parsing + * data into typed structures. For example, column type annotations. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.BigtableOptions bigtable_options = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bigtable_options = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * The project ID that the Bigtable source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * @type string $instance_id + * Required. The instance ID of the Cloud Bigtable that needs to be imported. + * @type string $table_id + * Required. The table ID of the Cloud Bigtable that needs to be imported. + * @type \Google\Cloud\DiscoveryEngine\V1beta\BigtableOptions $bigtable_options + * Required. Bigtable options that contains information needed when parsing + * data into typed structures. For example, column type annotations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * The project ID that the Bigtable source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * + * Generated from protobuf field string project_id = 1; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * The project ID that the Bigtable source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * + * Generated from protobuf field string project_id = 1; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * Required. The instance ID of the Cloud Bigtable that needs to be imported. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstanceId() + { + return $this->instance_id; + } + + /** + * Required. The instance ID of the Cloud Bigtable that needs to be imported. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->instance_id = $var; + + return $this; + } + + /** + * Required. The table ID of the Cloud Bigtable that needs to be imported. + * + * Generated from protobuf field string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTableId() + { + return $this->table_id; + } + + /** + * Required. The table ID of the Cloud Bigtable that needs to be imported. + * + * Generated from protobuf field string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTableId($var) + { + GPBUtil::checkString($var, True); + $this->table_id = $var; + + return $this; + } + + /** + * Required. Bigtable options that contains information needed when parsing + * data into typed structures. For example, column type annotations. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.BigtableOptions bigtable_options = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DiscoveryEngine\V1beta\BigtableOptions|null + */ + public function getBigtableOptions() + { + return $this->bigtable_options; + } + + public function hasBigtableOptions() + { + return isset($this->bigtable_options); + } + + public function clearBigtableOptions() + { + unset($this->bigtable_options); + } + + /** + * Required. Bigtable options that contains information needed when parsing + * data into typed structures. For example, column type annotations. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.BigtableOptions bigtable_options = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DiscoveryEngine\V1beta\BigtableOptions $var + * @return $this + */ + public function setBigtableOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\BigtableOptions::class); + $this->bigtable_options = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/CheckGroundingRequest.php b/DiscoveryEngine/src/V1beta/CheckGroundingRequest.php new file mode 100644 index 000000000000..0356839a0351 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/CheckGroundingRequest.php @@ -0,0 +1,189 @@ +google.cloud.discoveryengine.v1beta.CheckGroundingRequest + */ +class CheckGroundingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the grounding config, such as + * `projects/*/locations/global/groundingConfigs/default_grounding_config`. + * + * Generated from protobuf field string grounding_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $grounding_config = ''; + /** + * Answer candidate to check. + * + * Generated from protobuf field string answer_candidate = 2; + */ + protected $answer_candidate = ''; + /** + * List of facts for the grounding check. + * We support up to 200 facts. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.GroundingFact facts = 3; + */ + private $facts; + /** + * Configuration of the grounding check. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.CheckGroundingSpec grounding_spec = 4; + */ + protected $grounding_spec = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $grounding_config + * Required. The resource name of the grounding config, such as + * `projects/*/locations/global/groundingConfigs/default_grounding_config`. + * @type string $answer_candidate + * Answer candidate to check. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\GroundingFact>|\Google\Protobuf\Internal\RepeatedField $facts + * List of facts for the grounding check. + * We support up to 200 facts. + * @type \Google\Cloud\DiscoveryEngine\V1beta\CheckGroundingSpec $grounding_spec + * Configuration of the grounding check. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\GroundedGenerationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the grounding config, such as + * `projects/*/locations/global/groundingConfigs/default_grounding_config`. + * + * Generated from protobuf field string grounding_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getGroundingConfig() + { + return $this->grounding_config; + } + + /** + * Required. The resource name of the grounding config, such as + * `projects/*/locations/global/groundingConfigs/default_grounding_config`. + * + * Generated from protobuf field string grounding_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setGroundingConfig($var) + { + GPBUtil::checkString($var, True); + $this->grounding_config = $var; + + return $this; + } + + /** + * Answer candidate to check. + * + * Generated from protobuf field string answer_candidate = 2; + * @return string + */ + public function getAnswerCandidate() + { + return $this->answer_candidate; + } + + /** + * Answer candidate to check. + * + * Generated from protobuf field string answer_candidate = 2; + * @param string $var + * @return $this + */ + public function setAnswerCandidate($var) + { + GPBUtil::checkString($var, True); + $this->answer_candidate = $var; + + return $this; + } + + /** + * List of facts for the grounding check. + * We support up to 200 facts. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.GroundingFact facts = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getFacts() + { + return $this->facts; + } + + /** + * List of facts for the grounding check. + * We support up to 200 facts. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.GroundingFact facts = 3; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\GroundingFact>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setFacts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\GroundingFact::class); + $this->facts = $arr; + + return $this; + } + + /** + * Configuration of the grounding check. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.CheckGroundingSpec grounding_spec = 4; + * @return \Google\Cloud\DiscoveryEngine\V1beta\CheckGroundingSpec|null + */ + public function getGroundingSpec() + { + return $this->grounding_spec; + } + + public function hasGroundingSpec() + { + return isset($this->grounding_spec); + } + + public function clearGroundingSpec() + { + unset($this->grounding_spec); + } + + /** + * Configuration of the grounding check. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.CheckGroundingSpec grounding_spec = 4; + * @param \Google\Cloud\DiscoveryEngine\V1beta\CheckGroundingSpec $var + * @return $this + */ + public function setGroundingSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\CheckGroundingSpec::class); + $this->grounding_spec = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/CheckGroundingResponse.php b/DiscoveryEngine/src/V1beta/CheckGroundingResponse.php new file mode 100644 index 000000000000..8f17afc4cbc3 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/CheckGroundingResponse.php @@ -0,0 +1,159 @@ +google.cloud.discoveryengine.v1beta.CheckGroundingResponse + */ +class CheckGroundingResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The support score for the input answer candidate. + * Higher the score, higher is the fraction of claims that are supported by + * the provided facts. This is always set when a response is returned. + * + * Generated from protobuf field optional float support_score = 1; + */ + protected $support_score = null; + /** + * List of facts cited across all claims in the answer candidate. + * These are derived from the facts supplied in the request. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.FactChunk cited_chunks = 3; + */ + private $cited_chunks; + /** + * Claim texts and citation info across all claims in the answer candidate. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim claims = 4; + */ + private $claims; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $support_score + * The support score for the input answer candidate. + * Higher the score, higher is the fraction of claims that are supported by + * the provided facts. This is always set when a response is returned. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\FactChunk>|\Google\Protobuf\Internal\RepeatedField $cited_chunks + * List of facts cited across all claims in the answer candidate. + * These are derived from the facts supplied in the request. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\CheckGroundingResponse\Claim>|\Google\Protobuf\Internal\RepeatedField $claims + * Claim texts and citation info across all claims in the answer candidate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\GroundedGenerationService::initOnce(); + parent::__construct($data); + } + + /** + * The support score for the input answer candidate. + * Higher the score, higher is the fraction of claims that are supported by + * the provided facts. This is always set when a response is returned. + * + * Generated from protobuf field optional float support_score = 1; + * @return float + */ + public function getSupportScore() + { + return isset($this->support_score) ? $this->support_score : 0.0; + } + + public function hasSupportScore() + { + return isset($this->support_score); + } + + public function clearSupportScore() + { + unset($this->support_score); + } + + /** + * The support score for the input answer candidate. + * Higher the score, higher is the fraction of claims that are supported by + * the provided facts. This is always set when a response is returned. + * + * Generated from protobuf field optional float support_score = 1; + * @param float $var + * @return $this + */ + public function setSupportScore($var) + { + GPBUtil::checkFloat($var); + $this->support_score = $var; + + return $this; + } + + /** + * List of facts cited across all claims in the answer candidate. + * These are derived from the facts supplied in the request. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.FactChunk cited_chunks = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCitedChunks() + { + return $this->cited_chunks; + } + + /** + * List of facts cited across all claims in the answer candidate. + * These are derived from the facts supplied in the request. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.FactChunk cited_chunks = 3; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\FactChunk>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCitedChunks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\FactChunk::class); + $this->cited_chunks = $arr; + + return $this; + } + + /** + * Claim texts and citation info across all claims in the answer candidate. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim claims = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getClaims() + { + return $this->claims; + } + + /** + * Claim texts and citation info across all claims in the answer candidate. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim claims = 4; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\CheckGroundingResponse\Claim>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setClaims($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\CheckGroundingResponse\Claim::class); + $this->claims = $arr; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/CheckGroundingResponse/Claim.php b/DiscoveryEngine/src/V1beta/CheckGroundingResponse/Claim.php new file mode 100644 index 000000000000..1fdd0edfc232 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/CheckGroundingResponse/Claim.php @@ -0,0 +1,218 @@ +google.cloud.discoveryengine.v1beta.CheckGroundingResponse.Claim + */ +class Claim extends \Google\Protobuf\Internal\Message +{ + /** + * Position indicating the start of the claim in the answer candidate, + * measured in bytes. + * + * Generated from protobuf field optional int32 start_pos = 1; + */ + protected $start_pos = null; + /** + * Position indicating the end of the claim in the answer candidate, + * exclusive. + * + * Generated from protobuf field optional int32 end_pos = 2; + */ + protected $end_pos = null; + /** + * Text for the claim in the answer candidate. Always provided regardless of + * whether citations or anti-citations are found. + * + * Generated from protobuf field string claim_text = 3; + */ + protected $claim_text = ''; + /** + * A list of indices (into 'cited_chunks') specifying the citations + * associated with the claim. For instance [1,3,4] means that + * cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited + * supporting for the claim. A citation to a fact indicates that the claim + * is supported by the fact. + * + * Generated from protobuf field repeated int32 citation_indices = 4; + */ + private $citation_indices; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $start_pos + * Position indicating the start of the claim in the answer candidate, + * measured in bytes. + * @type int $end_pos + * Position indicating the end of the claim in the answer candidate, + * exclusive. + * @type string $claim_text + * Text for the claim in the answer candidate. Always provided regardless of + * whether citations or anti-citations are found. + * @type array|\Google\Protobuf\Internal\RepeatedField $citation_indices + * A list of indices (into 'cited_chunks') specifying the citations + * associated with the claim. For instance [1,3,4] means that + * cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited + * supporting for the claim. A citation to a fact indicates that the claim + * is supported by the fact. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\GroundedGenerationService::initOnce(); + parent::__construct($data); + } + + /** + * Position indicating the start of the claim in the answer candidate, + * measured in bytes. + * + * Generated from protobuf field optional int32 start_pos = 1; + * @return int + */ + public function getStartPos() + { + return isset($this->start_pos) ? $this->start_pos : 0; + } + + public function hasStartPos() + { + return isset($this->start_pos); + } + + public function clearStartPos() + { + unset($this->start_pos); + } + + /** + * Position indicating the start of the claim in the answer candidate, + * measured in bytes. + * + * Generated from protobuf field optional int32 start_pos = 1; + * @param int $var + * @return $this + */ + public function setStartPos($var) + { + GPBUtil::checkInt32($var); + $this->start_pos = $var; + + return $this; + } + + /** + * Position indicating the end of the claim in the answer candidate, + * exclusive. + * + * Generated from protobuf field optional int32 end_pos = 2; + * @return int + */ + public function getEndPos() + { + return isset($this->end_pos) ? $this->end_pos : 0; + } + + public function hasEndPos() + { + return isset($this->end_pos); + } + + public function clearEndPos() + { + unset($this->end_pos); + } + + /** + * Position indicating the end of the claim in the answer candidate, + * exclusive. + * + * Generated from protobuf field optional int32 end_pos = 2; + * @param int $var + * @return $this + */ + public function setEndPos($var) + { + GPBUtil::checkInt32($var); + $this->end_pos = $var; + + return $this; + } + + /** + * Text for the claim in the answer candidate. Always provided regardless of + * whether citations or anti-citations are found. + * + * Generated from protobuf field string claim_text = 3; + * @return string + */ + public function getClaimText() + { + return $this->claim_text; + } + + /** + * Text for the claim in the answer candidate. Always provided regardless of + * whether citations or anti-citations are found. + * + * Generated from protobuf field string claim_text = 3; + * @param string $var + * @return $this + */ + public function setClaimText($var) + { + GPBUtil::checkString($var, True); + $this->claim_text = $var; + + return $this; + } + + /** + * A list of indices (into 'cited_chunks') specifying the citations + * associated with the claim. For instance [1,3,4] means that + * cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited + * supporting for the claim. A citation to a fact indicates that the claim + * is supported by the fact. + * + * Generated from protobuf field repeated int32 citation_indices = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCitationIndices() + { + return $this->citation_indices; + } + + /** + * A list of indices (into 'cited_chunks') specifying the citations + * associated with the claim. For instance [1,3,4] means that + * cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited + * supporting for the claim. A citation to a fact indicates that the claim + * is supported by the fact. + * + * Generated from protobuf field repeated int32 citation_indices = 4; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCitationIndices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->citation_indices = $arr; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/CheckGroundingSpec.php b/DiscoveryEngine/src/V1beta/CheckGroundingSpec.php new file mode 100644 index 000000000000..a48ff06be71e --- /dev/null +++ b/DiscoveryEngine/src/V1beta/CheckGroundingSpec.php @@ -0,0 +1,93 @@ +google.cloud.discoveryengine.v1beta.CheckGroundingSpec + */ +class CheckGroundingSpec extends \Google\Protobuf\Internal\Message +{ + /** + * The threshold (in [0,1]) used for determining whether a fact must be + * cited for a claim in the answer candidate. Choosing a higher threshold + * will lead to fewer but very strong citations, while choosing a lower + * threshold may lead to more but somewhat weaker citations. If unset, the + * threshold will default to 0.6. + * + * Generated from protobuf field optional double citation_threshold = 1; + */ + protected $citation_threshold = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $citation_threshold + * The threshold (in [0,1]) used for determining whether a fact must be + * cited for a claim in the answer candidate. Choosing a higher threshold + * will lead to fewer but very strong citations, while choosing a lower + * threshold may lead to more but somewhat weaker citations. If unset, the + * threshold will default to 0.6. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\GroundedGenerationService::initOnce(); + parent::__construct($data); + } + + /** + * The threshold (in [0,1]) used for determining whether a fact must be + * cited for a claim in the answer candidate. Choosing a higher threshold + * will lead to fewer but very strong citations, while choosing a lower + * threshold may lead to more but somewhat weaker citations. If unset, the + * threshold will default to 0.6. + * + * Generated from protobuf field optional double citation_threshold = 1; + * @return float + */ + public function getCitationThreshold() + { + return isset($this->citation_threshold) ? $this->citation_threshold : 0.0; + } + + public function hasCitationThreshold() + { + return isset($this->citation_threshold); + } + + public function clearCitationThreshold() + { + unset($this->citation_threshold); + } + + /** + * The threshold (in [0,1]) used for determining whether a fact must be + * cited for a claim in the answer candidate. Choosing a higher threshold + * will lead to fewer but very strong citations, while choosing a lower + * threshold may lead to more but somewhat weaker citations. If unset, the + * threshold will default to 0.6. + * + * Generated from protobuf field optional double citation_threshold = 1; + * @param float $var + * @return $this + */ + public function setCitationThreshold($var) + { + GPBUtil::checkDouble($var); + $this->citation_threshold = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/Client/ConversationalSearchServiceClient.php b/DiscoveryEngine/src/V1beta/Client/ConversationalSearchServiceClient.php index 84769b9299d9..c3a30ba183d6 100644 --- a/DiscoveryEngine/src/V1beta/Client/ConversationalSearchServiceClient.php +++ b/DiscoveryEngine/src/V1beta/Client/ConversationalSearchServiceClient.php @@ -35,14 +35,24 @@ use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; use Google\Auth\FetchAuthTokenInterface; +use Google\Cloud\DiscoveryEngine\V1beta\Answer; +use Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest; +use Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryResponse; use Google\Cloud\DiscoveryEngine\V1beta\Conversation; use Google\Cloud\DiscoveryEngine\V1beta\ConverseConversationRequest; use Google\Cloud\DiscoveryEngine\V1beta\ConverseConversationResponse; use Google\Cloud\DiscoveryEngine\V1beta\CreateConversationRequest; +use Google\Cloud\DiscoveryEngine\V1beta\CreateSessionRequest; use Google\Cloud\DiscoveryEngine\V1beta\DeleteConversationRequest; +use Google\Cloud\DiscoveryEngine\V1beta\DeleteSessionRequest; +use Google\Cloud\DiscoveryEngine\V1beta\GetAnswerRequest; use Google\Cloud\DiscoveryEngine\V1beta\GetConversationRequest; +use Google\Cloud\DiscoveryEngine\V1beta\GetSessionRequest; use Google\Cloud\DiscoveryEngine\V1beta\ListConversationsRequest; +use Google\Cloud\DiscoveryEngine\V1beta\ListSessionsRequest; +use Google\Cloud\DiscoveryEngine\V1beta\Session; use Google\Cloud\DiscoveryEngine\V1beta\UpdateConversationRequest; +use Google\Cloud\DiscoveryEngine\V1beta\UpdateSessionRequest; use GuzzleHttp\Promise\PromiseInterface; /** @@ -58,12 +68,19 @@ * * @experimental * + * @method PromiseInterface answerQueryAsync(AnswerQueryRequest $request, array $optionalArgs = []) * @method PromiseInterface converseConversationAsync(ConverseConversationRequest $request, array $optionalArgs = []) * @method PromiseInterface createConversationAsync(CreateConversationRequest $request, array $optionalArgs = []) + * @method PromiseInterface createSessionAsync(CreateSessionRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteConversationAsync(DeleteConversationRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSessionAsync(DeleteSessionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAnswerAsync(GetAnswerRequest $request, array $optionalArgs = []) * @method PromiseInterface getConversationAsync(GetConversationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSessionAsync(GetSessionRequest $request, array $optionalArgs = []) * @method PromiseInterface listConversationsAsync(ListConversationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSessionsAsync(ListSessionsRequest $request, array $optionalArgs = []) * @method PromiseInterface updateConversationAsync(UpdateConversationRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSessionAsync(UpdateSessionRequest $request, array $optionalArgs = []) */ final class ConversationalSearchServiceClient { @@ -112,6 +129,69 @@ private static function getClientDefaults() ]; } + /** + * Formats a string containing the fully-qualified path to represent a answer + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $session + * @param string $answer + * + * @return string The formatted answer resource. + * + * @experimental + */ + public static function answerName( + string $project, + string $location, + string $dataStore, + string $session, + string $answer + ): string { + return self::getPathTemplate('answer')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'session' => $session, + 'answer' => $answer, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a chunk + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $branch + * @param string $document + * @param string $chunk + * + * @return string The formatted chunk resource. + * + * @experimental + */ + public static function chunkName( + string $project, + string $location, + string $dataStore, + string $branch, + string $document, + string $chunk + ): string { + return self::getPathTemplate('chunk')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'branch' => $branch, + 'document' => $document, + 'chunk' => $chunk, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a conversation * resource. @@ -250,6 +330,42 @@ public static function projectLocationCollectionDataStoreBranchDocumentName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store_branch_document_chunk resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * @param string $branch + * @param string $document + * @param string $chunk + * + * @return string The formatted project_location_collection_data_store_branch_document_chunk resource. + * + * @experimental + */ + public static function projectLocationCollectionDataStoreBranchDocumentChunkName( + string $project, + string $location, + string $collection, + string $dataStore, + string $branch, + string $document, + string $chunk + ): string { + return self::getPathTemplate('projectLocationCollectionDataStoreBranchDocumentChunk')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + 'branch' => $branch, + 'document' => $document, + 'chunk' => $chunk, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * project_location_collection_data_store_conversation resource. @@ -310,6 +426,69 @@ public static function projectLocationCollectionDataStoreServingConfigName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store_session resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * @param string $session + * + * @return string The formatted project_location_collection_data_store_session resource. + * + * @experimental + */ + public static function projectLocationCollectionDataStoreSessionName( + string $project, + string $location, + string $collection, + string $dataStore, + string $session + ): string { + return self::getPathTemplate('projectLocationCollectionDataStoreSession')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + 'session' => $session, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store_session_answer resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * @param string $session + * @param string $answer + * + * @return string The formatted project_location_collection_data_store_session_answer resource. + * + * @experimental + */ + public static function projectLocationCollectionDataStoreSessionAnswerName( + string $project, + string $location, + string $collection, + string $dataStore, + string $session, + string $answer + ): string { + return self::getPathTemplate('projectLocationCollectionDataStoreSessionAnswer')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + 'session' => $session, + 'answer' => $answer, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * project_location_collection_engine_conversation resource. @@ -370,6 +549,69 @@ public static function projectLocationCollectionEngineServingConfigName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_engine_session resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $engine + * @param string $session + * + * @return string The formatted project_location_collection_engine_session resource. + * + * @experimental + */ + public static function projectLocationCollectionEngineSessionName( + string $project, + string $location, + string $collection, + string $engine, + string $session + ): string { + return self::getPathTemplate('projectLocationCollectionEngineSession')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'engine' => $engine, + 'session' => $session, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_engine_session_answer resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $engine + * @param string $session + * @param string $answer + * + * @return string The formatted project_location_collection_engine_session_answer resource. + * + * @experimental + */ + public static function projectLocationCollectionEngineSessionAnswerName( + string $project, + string $location, + string $collection, + string $engine, + string $session, + string $answer + ): string { + return self::getPathTemplate('projectLocationCollectionEngineSessionAnswer')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'engine' => $engine, + 'session' => $session, + 'answer' => $answer, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * project_location_data_store resource. @@ -421,6 +663,39 @@ public static function projectLocationDataStoreBranchDocumentName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store_branch_document_chunk resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $branch + * @param string $document + * @param string $chunk + * + * @return string The formatted project_location_data_store_branch_document_chunk resource. + * + * @experimental + */ + public static function projectLocationDataStoreBranchDocumentChunkName( + string $project, + string $location, + string $dataStore, + string $branch, + string $document, + string $chunk + ): string { + return self::getPathTemplate('projectLocationDataStoreBranchDocumentChunk')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'branch' => $branch, + 'document' => $document, + 'chunk' => $chunk, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * project_location_data_store_conversation resource. @@ -475,6 +750,63 @@ public static function projectLocationDataStoreServingConfigName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store_session resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $session + * + * @return string The formatted project_location_data_store_session resource. + * + * @experimental + */ + public static function projectLocationDataStoreSessionName( + string $project, + string $location, + string $dataStore, + string $session + ): string { + return self::getPathTemplate('projectLocationDataStoreSession')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'session' => $session, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store_session_answer resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $session + * @param string $answer + * + * @return string The formatted project_location_data_store_session_answer resource. + * + * @experimental + */ + public static function projectLocationDataStoreSessionAnswerName( + string $project, + string $location, + string $dataStore, + string $session, + string $answer + ): string { + return self::getPathTemplate('projectLocationDataStoreSessionAnswer')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'session' => $session, + 'answer' => $answer, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * serving_config resource. @@ -502,24 +834,58 @@ public static function servingConfigName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a session + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $session + * + * @return string The formatted session resource. + * + * @experimental + */ + public static function sessionName(string $project, string $location, string $dataStore, string $session): string + { + return self::getPathTemplate('session')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'session' => $session, + ]); + } + /** * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: * Template: Pattern + * - answer: projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer} + * - chunk: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk} * - conversation: projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation} * - dataStore: projects/{project}/locations/{location}/dataStores/{data_store} * - document: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} * - projectLocationCollectionDataStore: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store} * - projectLocationCollectionDataStoreBranchDocument: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document} + * - projectLocationCollectionDataStoreBranchDocumentChunk: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk} * - projectLocationCollectionDataStoreConversation: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation} * - projectLocationCollectionDataStoreServingConfig: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config} + * - projectLocationCollectionDataStoreSession: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session} + * - projectLocationCollectionDataStoreSessionAnswer: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}/answers/{answer} * - projectLocationCollectionEngineConversation: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/conversations/{conversation} * - projectLocationCollectionEngineServingConfig: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config} + * - projectLocationCollectionEngineSession: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session} + * - projectLocationCollectionEngineSessionAnswer: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/answers/{answer} * - projectLocationDataStore: projects/{project}/locations/{location}/dataStores/{data_store} * - projectLocationDataStoreBranchDocument: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} + * - projectLocationDataStoreBranchDocumentChunk: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk} * - projectLocationDataStoreConversation: projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation} * - projectLocationDataStoreServingConfig: projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config} + * - projectLocationDataStoreSession: projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session} + * - projectLocationDataStoreSessionAnswer: projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer} * - servingConfig: projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config} + * - session: projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session} * * 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 @@ -614,6 +980,35 @@ public function __call($method, $args) return call_user_func_array([$this, 'startAsyncCall'], $args); } + /** + * Answer query method. + * + * The async variant is + * {@see ConversationalSearchServiceClient::answerQueryAsync()} . + * + * @example samples/V1beta/ConversationalSearchServiceClient/answer_query.php + * + * @param AnswerQueryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AnswerQueryResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function answerQuery(AnswerQueryRequest $request, array $callOptions = []): AnswerQueryResponse + { + return $this->startApiCall('AnswerQuery', $request, $callOptions)->wait(); + } + /** * Converses a conversation. * @@ -677,6 +1072,38 @@ public function createConversation(CreateConversationRequest $request, array $ca return $this->startApiCall('CreateConversation', $request, $callOptions)->wait(); } + /** + * Creates a Session. + * + * If the [Session][google.cloud.discoveryengine.v1beta.Session] to create + * already exists, an ALREADY_EXISTS error is returned. + * + * The async variant is + * {@see ConversationalSearchServiceClient::createSessionAsync()} . + * + * @example samples/V1beta/ConversationalSearchServiceClient/create_session.php + * + * @param CreateSessionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Session + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function createSession(CreateSessionRequest $request, array $callOptions = []): Session + { + return $this->startApiCall('CreateSession', $request, $callOptions)->wait(); + } + /** * Deletes a Conversation. * @@ -707,6 +1134,65 @@ public function deleteConversation(DeleteConversationRequest $request, array $ca $this->startApiCall('DeleteConversation', $request, $callOptions)->wait(); } + /** + * Deletes a Session. + * + * If the [Session][google.cloud.discoveryengine.v1beta.Session] to delete + * does not exist, a NOT_FOUND error is returned. + * + * The async variant is + * {@see ConversationalSearchServiceClient::deleteSessionAsync()} . + * + * @example samples/V1beta/ConversationalSearchServiceClient/delete_session.php + * + * @param DeleteSessionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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. + * + * @experimental + */ + public function deleteSession(DeleteSessionRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteSession', $request, $callOptions)->wait(); + } + + /** + * Gets a Answer. + * + * The async variant is {@see ConversationalSearchServiceClient::getAnswerAsync()} + * . + * + * @example samples/V1beta/ConversationalSearchServiceClient/get_answer.php + * + * @param GetAnswerRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Answer + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function getAnswer(GetAnswerRequest $request, array $callOptions = []): Answer + { + return $this->startApiCall('GetAnswer', $request, $callOptions)->wait(); + } + /** * Gets a Conversation. * @@ -736,6 +1222,35 @@ public function getConversation(GetConversationRequest $request, array $callOpti return $this->startApiCall('GetConversation', $request, $callOptions)->wait(); } + /** + * Gets a Session. + * + * The async variant is {@see ConversationalSearchServiceClient::getSessionAsync()} + * . + * + * @example samples/V1beta/ConversationalSearchServiceClient/get_session.php + * + * @param GetSessionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Session + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function getSession(GetSessionRequest $request, array $callOptions = []): Session + { + return $this->startApiCall('GetSession', $request, $callOptions)->wait(); + } + /** * Lists all Conversations by their parent * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. @@ -766,6 +1281,36 @@ public function listConversations(ListConversationsRequest $request, array $call return $this->startApiCall('ListConversations', $request, $callOptions); } + /** + * Lists all Sessions by their parent + * [DataStore][google.cloud.discoveryengine.v1beta.DataStore]. + * + * The async variant is + * {@see ConversationalSearchServiceClient::listSessionsAsync()} . + * + * @example samples/V1beta/ConversationalSearchServiceClient/list_sessions.php + * + * @param ListSessionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function listSessions(ListSessionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSessions', $request, $callOptions); + } + /** * Updates a Conversation. * @@ -799,4 +1344,37 @@ public function updateConversation(UpdateConversationRequest $request, array $ca { return $this->startApiCall('UpdateConversation', $request, $callOptions)->wait(); } + + /** + * Updates a Session. + * + * [Session][google.cloud.discoveryengine.v1beta.Session] action type cannot + * be changed. If the [Session][google.cloud.discoveryengine.v1beta.Session] + * to update does not exist, a NOT_FOUND error is returned. + * + * The async variant is + * {@see ConversationalSearchServiceClient::updateSessionAsync()} . + * + * @example samples/V1beta/ConversationalSearchServiceClient/update_session.php + * + * @param UpdateSessionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Session + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function updateSession(UpdateSessionRequest $request, array $callOptions = []): Session + { + return $this->startApiCall('UpdateSession', $request, $callOptions)->wait(); + } } diff --git a/DiscoveryEngine/src/V1beta/Client/DocumentServiceClient.php b/DiscoveryEngine/src/V1beta/Client/DocumentServiceClient.php index 28e6dd7b2d38..e403e742c8a8 100644 --- a/DiscoveryEngine/src/V1beta/Client/DocumentServiceClient.php +++ b/DiscoveryEngine/src/V1beta/Client/DocumentServiceClient.php @@ -207,6 +207,29 @@ public static function documentName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a fhir_store + * resource. + * + * @param string $project + * @param string $location + * @param string $dataset + * @param string $fhirStore + * + * @return string The formatted fhir_store resource. + * + * @experimental + */ + public static function fhirStoreName(string $project, string $location, string $dataset, string $fhirStore): string + { + return self::getPathTemplate('fhirStore')->render([ + 'project' => $project, + 'location' => $location, + 'dataset' => $dataset, + 'fhir_store' => $fhirStore, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * project_location_collection_data_store_branch resource. @@ -333,6 +356,7 @@ public static function projectLocationDataStoreBranchDocumentName( * Template: Pattern * - branch: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch} * - document: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} + * - fhirStore: projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store} * - projectLocationCollectionDataStoreBranch: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch} * - projectLocationCollectionDataStoreBranchDocument: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document} * - projectLocationDataStoreBranch: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch} diff --git a/DiscoveryEngine/src/V1beta/Client/EngineServiceClient.php b/DiscoveryEngine/src/V1beta/Client/EngineServiceClient.php index a56f1cb4d8c3..e79ca683dc05 100644 --- a/DiscoveryEngine/src/V1beta/Client/EngineServiceClient.php +++ b/DiscoveryEngine/src/V1beta/Client/EngineServiceClient.php @@ -42,6 +42,9 @@ use Google\Cloud\DiscoveryEngine\V1beta\Engine; use Google\Cloud\DiscoveryEngine\V1beta\GetEngineRequest; use Google\Cloud\DiscoveryEngine\V1beta\ListEnginesRequest; +use Google\Cloud\DiscoveryEngine\V1beta\PauseEngineRequest; +use Google\Cloud\DiscoveryEngine\V1beta\ResumeEngineRequest; +use Google\Cloud\DiscoveryEngine\V1beta\TuneEngineRequest; use Google\Cloud\DiscoveryEngine\V1beta\UpdateEngineRequest; use Google\LongRunning\Operation; use GuzzleHttp\Promise\PromiseInterface; @@ -64,6 +67,9 @@ * @method PromiseInterface deleteEngineAsync(DeleteEngineRequest $request, array $optionalArgs = []) * @method PromiseInterface getEngineAsync(GetEngineRequest $request, array $optionalArgs = []) * @method PromiseInterface listEnginesAsync(ListEnginesRequest $request, array $optionalArgs = []) + * @method PromiseInterface pauseEngineAsync(PauseEngineRequest $request, array $optionalArgs = []) + * @method PromiseInterface resumeEngineAsync(ResumeEngineRequest $request, array $optionalArgs = []) + * @method PromiseInterface tuneEngineAsync(TuneEngineRequest $request, array $optionalArgs = []) * @method PromiseInterface updateEngineAsync(UpdateEngineRequest $request, array $optionalArgs = []) */ final class EngineServiceClient @@ -407,6 +413,96 @@ public function listEngines(ListEnginesRequest $request, array $callOptions = [] return $this->startApiCall('ListEngines', $request, $callOptions); } + /** + * Pauses the training of an existing engine. Only applicable if + * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is + * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + * + * The async variant is {@see EngineServiceClient::pauseEngineAsync()} . + * + * @example samples/V1beta/EngineServiceClient/pause_engine.php + * + * @param PauseEngineRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Engine + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function pauseEngine(PauseEngineRequest $request, array $callOptions = []): Engine + { + return $this->startApiCall('PauseEngine', $request, $callOptions)->wait(); + } + + /** + * Resumes the training of an existing engine. Only applicable if + * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is + * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + * + * The async variant is {@see EngineServiceClient::resumeEngineAsync()} . + * + * @example samples/V1beta/EngineServiceClient/resume_engine.php + * + * @param ResumeEngineRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Engine + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function resumeEngine(ResumeEngineRequest $request, array $callOptions = []): Engine + { + return $this->startApiCall('ResumeEngine', $request, $callOptions)->wait(); + } + + /** + * Tunes an existing engine. Only applicable if + * [SolutionType][google.cloud.discoveryengine.v1beta.SolutionType] is + * [SOLUTION_TYPE_RECOMMENDATION][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_RECOMMENDATION]. + * + * The async variant is {@see EngineServiceClient::tuneEngineAsync()} . + * + * @example samples/V1beta/EngineServiceClient/tune_engine.php + * + * @param TuneEngineRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function tuneEngine(TuneEngineRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('TuneEngine', $request, $callOptions)->wait(); + } + /** * Updates an [Engine][google.cloud.discoveryengine.v1beta.Engine] * diff --git a/DiscoveryEngine/src/V1beta/Client/GroundedGenerationServiceClient.php b/DiscoveryEngine/src/V1beta/Client/GroundedGenerationServiceClient.php new file mode 100644 index 000000000000..f2fda5b5f11a --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Client/GroundedGenerationServiceClient.php @@ -0,0 +1,251 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/grounded_generation_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/grounded_generation_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/grounded_generation_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => + __DIR__ . '/../resources/grounded_generation_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * grounding_config resource. + * + * @param string $project + * @param string $location + * @param string $groundingConfig + * + * @return string The formatted grounding_config resource. + * + * @experimental + */ + public static function groundingConfigName(string $project, string $location, string $groundingConfig): string + { + return self::getPathTemplate('groundingConfig')->render([ + 'project' => $project, + 'location' => $location, + 'grounding_config' => $groundingConfig, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - groundingConfig: projects/{project}/locations/{location}/groundingConfigs/{grounding_config} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * + * @experimental + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'discoveryengine.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** 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); + } + + /** + * Performs a grounding check. + * + * The async variant is + * {@see GroundedGenerationServiceClient::checkGroundingAsync()} . + * + * @example samples/V1beta/GroundedGenerationServiceClient/check_grounding.php + * + * @param CheckGroundingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CheckGroundingResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function checkGrounding(CheckGroundingRequest $request, array $callOptions = []): CheckGroundingResponse + { + return $this->startApiCall('CheckGrounding', $request, $callOptions)->wait(); + } +} diff --git a/DiscoveryEngine/src/V1beta/Client/RankServiceClient.php b/DiscoveryEngine/src/V1beta/Client/RankServiceClient.php new file mode 100644 index 000000000000..83ac8cad10c8 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Client/RankServiceClient.php @@ -0,0 +1,249 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/rank_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/rank_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/rank_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/rank_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * ranking_config resource. + * + * @param string $project + * @param string $location + * @param string $rankingConfig + * + * @return string The formatted ranking_config resource. + * + * @experimental + */ + public static function rankingConfigName(string $project, string $location, string $rankingConfig): string + { + return self::getPathTemplate('rankingConfig')->render([ + 'project' => $project, + 'location' => $location, + 'ranking_config' => $rankingConfig, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - rankingConfig: projects/{project}/locations/{location}/rankingConfigs/{ranking_config} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * + * @experimental + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'discoveryengine.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** 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); + } + + /** + * Ranks a list of text records based on the given input query. + * + * The async variant is {@see RankServiceClient::rankAsync()} . + * + * @example samples/V1beta/RankServiceClient/rank.php + * + * @param RankRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return RankResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function rank(RankRequest $request, array $callOptions = []): RankResponse + { + return $this->startApiCall('Rank', $request, $callOptions)->wait(); + } +} diff --git a/DiscoveryEngine/src/V1beta/CloudSqlSource.php b/DiscoveryEngine/src/V1beta/CloudSqlSource.php new file mode 100644 index 000000000000..a5203de7d89e --- /dev/null +++ b/DiscoveryEngine/src/V1beta/CloudSqlSource.php @@ -0,0 +1,281 @@ +google.cloud.discoveryengine.v1beta.CloudSqlSource + */ +class CloudSqlSource extends \Google\Protobuf\Internal\Message +{ + /** + * The project ID that the Cloud SQL source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * + * Generated from protobuf field string project_id = 1; + */ + protected $project_id = ''; + /** + * Required. The Cloud SQL instance to copy the data from with a length limit + * of 256 characters. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance_id = ''; + /** + * Required. The Cloud SQL database to copy the data from with a length limit + * of 256 characters. + * + * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database_id = ''; + /** + * Required. The Cloud SQL table to copy the data from with a length limit of + * 256 characters. + * + * Generated from protobuf field string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $table_id = ''; + /** + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * Cloud SQL export to a specific Cloud Storage directory. + * Ensure that the Cloud SQL service account has the necessary Cloud + * Storage Admin permissions to access the specified Cloud Storage directory. + * + * Generated from protobuf field string gcs_staging_dir = 5; + */ + protected $gcs_staging_dir = ''; + /** + * Option for serverless export. Enabling this option will incur additional + * cost. More info can be found + * [here](https://cloud.google.com/sql/pricing#serverless). + * + * Generated from protobuf field bool offload = 6; + */ + protected $offload = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * The project ID that the Cloud SQL source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * @type string $instance_id + * Required. The Cloud SQL instance to copy the data from with a length limit + * of 256 characters. + * @type string $database_id + * Required. The Cloud SQL database to copy the data from with a length limit + * of 256 characters. + * @type string $table_id + * Required. The Cloud SQL table to copy the data from with a length limit of + * 256 characters. + * @type string $gcs_staging_dir + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * Cloud SQL export to a specific Cloud Storage directory. + * Ensure that the Cloud SQL service account has the necessary Cloud + * Storage Admin permissions to access the specified Cloud Storage directory. + * @type bool $offload + * Option for serverless export. Enabling this option will incur additional + * cost. More info can be found + * [here](https://cloud.google.com/sql/pricing#serverless). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * The project ID that the Cloud SQL source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * + * Generated from protobuf field string project_id = 1; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * The project ID that the Cloud SQL source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * + * Generated from protobuf field string project_id = 1; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * Required. The Cloud SQL instance to copy the data from with a length limit + * of 256 characters. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstanceId() + { + return $this->instance_id; + } + + /** + * Required. The Cloud SQL instance to copy the data from with a length limit + * of 256 characters. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->instance_id = $var; + + return $this; + } + + /** + * Required. The Cloud SQL database to copy the data from with a length limit + * of 256 characters. + * + * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabaseId() + { + return $this->database_id; + } + + /** + * Required. The Cloud SQL database to copy the data from with a length limit + * of 256 characters. + * + * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabaseId($var) + { + GPBUtil::checkString($var, True); + $this->database_id = $var; + + return $this; + } + + /** + * Required. The Cloud SQL table to copy the data from with a length limit of + * 256 characters. + * + * Generated from protobuf field string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTableId() + { + return $this->table_id; + } + + /** + * Required. The Cloud SQL table to copy the data from with a length limit of + * 256 characters. + * + * Generated from protobuf field string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTableId($var) + { + GPBUtil::checkString($var, True); + $this->table_id = $var; + + return $this; + } + + /** + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * Cloud SQL export to a specific Cloud Storage directory. + * Ensure that the Cloud SQL service account has the necessary Cloud + * Storage Admin permissions to access the specified Cloud Storage directory. + * + * Generated from protobuf field string gcs_staging_dir = 5; + * @return string + */ + public function getGcsStagingDir() + { + return $this->gcs_staging_dir; + } + + /** + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * Cloud SQL export to a specific Cloud Storage directory. + * Ensure that the Cloud SQL service account has the necessary Cloud + * Storage Admin permissions to access the specified Cloud Storage directory. + * + * Generated from protobuf field string gcs_staging_dir = 5; + * @param string $var + * @return $this + */ + public function setGcsStagingDir($var) + { + GPBUtil::checkString($var, True); + $this->gcs_staging_dir = $var; + + return $this; + } + + /** + * Option for serverless export. Enabling this option will incur additional + * cost. More info can be found + * [here](https://cloud.google.com/sql/pricing#serverless). + * + * Generated from protobuf field bool offload = 6; + * @return bool + */ + public function getOffload() + { + return $this->offload; + } + + /** + * Option for serverless export. Enabling this option will incur additional + * cost. More info can be found + * [here](https://cloud.google.com/sql/pricing#serverless). + * + * Generated from protobuf field bool offload = 6; + * @param bool $var + * @return $this + */ + public function setOffload($var) + { + GPBUtil::checkBool($var); + $this->offload = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/CreateSessionRequest.php b/DiscoveryEngine/src/V1beta/CreateSessionRequest.php new file mode 100644 index 000000000000..d6d99f2988a3 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/CreateSessionRequest.php @@ -0,0 +1,132 @@ +google.cloud.discoveryengine.v1beta.CreateSessionRequest + */ +class CreateSessionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Full resource name of parent data store. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The session to create. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Session session = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $session = null; + + /** + * @param string $parent Required. Full resource name of parent data store. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * Please see {@see ConversationalSearchServiceClient::dataStoreName()} for help formatting this field. + * @param \Google\Cloud\DiscoveryEngine\V1beta\Session $session Required. The session to create. + * + * @return \Google\Cloud\DiscoveryEngine\V1beta\CreateSessionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\DiscoveryEngine\V1beta\Session $session): self + { + return (new self()) + ->setParent($parent) + ->setSession($session); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Full resource name of parent data store. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * @type \Google\Cloud\DiscoveryEngine\V1beta\Session $session + * Required. The session to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Full resource name of parent data store. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Full resource name of parent data store. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The session to create. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Session session = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Session|null + */ + public function getSession() + { + return $this->session; + } + + public function hasSession() + { + return isset($this->session); + } + + public function clearSession() + { + unset($this->session); + } + + /** + * Required. The session to create. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Session session = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Session $var + * @return $this + */ + public function setSession($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Session::class); + $this->session = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/DeleteSessionRequest.php b/DiscoveryEngine/src/V1beta/DeleteSessionRequest.php new file mode 100644 index 000000000000..315a19dc188b --- /dev/null +++ b/DiscoveryEngine/src/V1beta/DeleteSessionRequest.php @@ -0,0 +1,86 @@ +google.cloud.discoveryengine.v1beta.DeleteSessionRequest + */ +class DeleteSessionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Session to delete. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the Session to delete. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` + * Please see {@see ConversationalSearchServiceClient::sessionName()} for help formatting this field. + * + * @return \Google\Cloud\DiscoveryEngine\V1beta\DeleteSessionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the Session to delete. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Session to delete. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the Session to delete. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/DocumentProcessingConfig/ParsingConfig/OcrParsingConfig.php b/DiscoveryEngine/src/V1beta/DocumentProcessingConfig/ParsingConfig/OcrParsingConfig.php index 40c97899c5f6..ce893caca4f0 100644 --- a/DiscoveryEngine/src/V1beta/DocumentProcessingConfig/ParsingConfig/OcrParsingConfig.php +++ b/DiscoveryEngine/src/V1beta/DocumentProcessingConfig/ParsingConfig/OcrParsingConfig.php @@ -16,12 +16,11 @@ class OcrParsingConfig extends \Google\Protobuf\Internal\Message { /** - * Apply additional enhanced OCR processing to a list of document - * elements. - * Supported values: - * * `table`: advanced table parsing model. + * [DEPRECATED] This field is deprecated. To use the additional enhanced + * document elements processing, please switch to `layout_parsing_config`. * - * Generated from protobuf field repeated string enhanced_document_elements = 1; + * Generated from protobuf field repeated string enhanced_document_elements = 1 [deprecated = true]; + * @deprecated */ private $enhanced_document_elements; /** @@ -39,10 +38,8 @@ class OcrParsingConfig extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type array|\Google\Protobuf\Internal\RepeatedField $enhanced_document_elements - * Apply additional enhanced OCR processing to a list of document - * elements. - * Supported values: - * * `table`: advanced table parsing model. + * [DEPRECATED] This field is deprecated. To use the additional enhanced + * document elements processing, please switch to `layout_parsing_config`. * @type bool $use_native_text * If true, will use native text instead of OCR text on pages containing * native text. @@ -54,31 +51,31 @@ public function __construct($data = NULL) { } /** - * Apply additional enhanced OCR processing to a list of document - * elements. - * Supported values: - * * `table`: advanced table parsing model. + * [DEPRECATED] This field is deprecated. To use the additional enhanced + * document elements processing, please switch to `layout_parsing_config`. * - * Generated from protobuf field repeated string enhanced_document_elements = 1; + * Generated from protobuf field repeated string enhanced_document_elements = 1 [deprecated = true]; * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated */ public function getEnhancedDocumentElements() { + @trigger_error('enhanced_document_elements is deprecated.', E_USER_DEPRECATED); return $this->enhanced_document_elements; } /** - * Apply additional enhanced OCR processing to a list of document - * elements. - * Supported values: - * * `table`: advanced table parsing model. + * [DEPRECATED] This field is deprecated. To use the additional enhanced + * document elements processing, please switch to `layout_parsing_config`. * - * Generated from protobuf field repeated string enhanced_document_elements = 1; + * Generated from protobuf field repeated string enhanced_document_elements = 1 [deprecated = true]; * @param array|\Google\Protobuf\Internal\RepeatedField $var * @return $this + * @deprecated */ public function setEnhancedDocumentElements($var) { + @trigger_error('enhanced_document_elements is deprecated.', E_USER_DEPRECATED); $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->enhanced_document_elements = $arr; diff --git a/DiscoveryEngine/src/V1beta/Engine/ChatEngineConfig.php b/DiscoveryEngine/src/V1beta/Engine/ChatEngineConfig.php index c7be7047e3bf..04b474d92632 100644 --- a/DiscoveryEngine/src/V1beta/Engine/ChatEngineConfig.php +++ b/DiscoveryEngine/src/V1beta/Engine/ChatEngineConfig.php @@ -39,7 +39,7 @@ class ChatEngineConfig extends \Google\Protobuf\Internal\Message * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine] * or * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines] - * API after engine creation. Please use + * API after engine creation. Use * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.dialogflow_agent] * for actual agent association after Engine is created. * @@ -73,7 +73,7 @@ class ChatEngineConfig extends \Google\Protobuf\Internal\Message * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine] * or * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines] - * API after engine creation. Please use + * API after engine creation. Use * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.dialogflow_agent] * for actual agent association after Engine is created. * } @@ -144,7 +144,7 @@ public function setAgentCreationConfig($var) * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine] * or * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines] - * API after engine creation. Please use + * API after engine creation. Use * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.dialogflow_agent] * for actual agent association after Engine is created. * @@ -167,7 +167,7 @@ public function getDialogflowAgentToLink() * [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine] * or * [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines] - * API after engine creation. Please use + * API after engine creation. Use * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.dialogflow_agent] * for actual agent association after Engine is created. * diff --git a/DiscoveryEngine/src/V1beta/Engine/SearchEngineConfig.php b/DiscoveryEngine/src/V1beta/Engine/SearchEngineConfig.php index 0738303b75c5..acf592daa0b9 100644 --- a/DiscoveryEngine/src/V1beta/Engine/SearchEngineConfig.php +++ b/DiscoveryEngine/src/V1beta/Engine/SearchEngineConfig.php @@ -18,7 +18,7 @@ class SearchEngineConfig extends \Google\Protobuf\Internal\Message /** * The search feature tier of this engine. * Different tiers might have different - * pricing. To learn more, please check the pricing documentation. + * pricing. To learn more, check the pricing documentation. * Defaults to * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_STANDARD] * if not specified. @@ -42,7 +42,7 @@ class SearchEngineConfig extends \Google\Protobuf\Internal\Message * @type int $search_tier * The search feature tier of this engine. * Different tiers might have different - * pricing. To learn more, please check the pricing documentation. + * pricing. To learn more, check the pricing documentation. * Defaults to * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_STANDARD] * if not specified. @@ -58,7 +58,7 @@ public function __construct($data = NULL) { /** * The search feature tier of this engine. * Different tiers might have different - * pricing. To learn more, please check the pricing documentation. + * pricing. To learn more, check the pricing documentation. * Defaults to * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_STANDARD] * if not specified. @@ -74,7 +74,7 @@ public function getSearchTier() /** * The search feature tier of this engine. * Different tiers might have different - * pricing. To learn more, please check the pricing documentation. + * pricing. To learn more, check the pricing documentation. * Defaults to * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_STANDARD] * if not specified. diff --git a/DiscoveryEngine/src/V1beta/FactChunk.php b/DiscoveryEngine/src/V1beta/FactChunk.php new file mode 100644 index 000000000000..e3f5d819aea5 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/FactChunk.php @@ -0,0 +1,147 @@ +google.cloud.discoveryengine.v1beta.FactChunk + */ +class FactChunk extends \Google\Protobuf\Internal\Message +{ + /** + * Text content of the fact chunk. Can be at most 10K characters long. + * + * Generated from protobuf field string chunk_text = 1; + */ + protected $chunk_text = ''; + /** + * Source from which this fact chunk was retrieved. If it was retrieved + * from the GroundingFacts provided in the request then this field will + * contain the index of the specific fact from which this chunk was + * retrieved. + * + * Generated from protobuf field string source = 2; + */ + protected $source = ''; + /** + * More fine-grained information for the source reference. + * + * Generated from protobuf field map source_metadata = 3; + */ + private $source_metadata; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $chunk_text + * Text content of the fact chunk. Can be at most 10K characters long. + * @type string $source + * Source from which this fact chunk was retrieved. If it was retrieved + * from the GroundingFacts provided in the request then this field will + * contain the index of the specific fact from which this chunk was + * retrieved. + * @type array|\Google\Protobuf\Internal\MapField $source_metadata + * More fine-grained information for the source reference. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Grounding::initOnce(); + parent::__construct($data); + } + + /** + * Text content of the fact chunk. Can be at most 10K characters long. + * + * Generated from protobuf field string chunk_text = 1; + * @return string + */ + public function getChunkText() + { + return $this->chunk_text; + } + + /** + * Text content of the fact chunk. Can be at most 10K characters long. + * + * Generated from protobuf field string chunk_text = 1; + * @param string $var + * @return $this + */ + public function setChunkText($var) + { + GPBUtil::checkString($var, True); + $this->chunk_text = $var; + + return $this; + } + + /** + * Source from which this fact chunk was retrieved. If it was retrieved + * from the GroundingFacts provided in the request then this field will + * contain the index of the specific fact from which this chunk was + * retrieved. + * + * Generated from protobuf field string source = 2; + * @return string + */ + public function getSource() + { + return $this->source; + } + + /** + * Source from which this fact chunk was retrieved. If it was retrieved + * from the GroundingFacts provided in the request then this field will + * contain the index of the specific fact from which this chunk was + * retrieved. + * + * Generated from protobuf field string source = 2; + * @param string $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkString($var, True); + $this->source = $var; + + return $this; + } + + /** + * More fine-grained information for the source reference. + * + * Generated from protobuf field map source_metadata = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getSourceMetadata() + { + return $this->source_metadata; + } + + /** + * More fine-grained information for the source reference. + * + * Generated from protobuf field map source_metadata = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setSourceMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->source_metadata = $arr; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/FhirStoreSource.php b/DiscoveryEngine/src/V1beta/FhirStoreSource.php new file mode 100644 index 000000000000..d47d1b53f433 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/FhirStoreSource.php @@ -0,0 +1,117 @@ +google.cloud.discoveryengine.v1beta.FhirStoreSource + */ +class FhirStoreSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full resource name of the FHIR store to import data from, in + * the format of + * `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`. + * + * Generated from protobuf field string fhir_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $fhir_store = ''; + /** + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * FhirStore export to a specific Cloud Storage directory. + * + * Generated from protobuf field string gcs_staging_dir = 2; + */ + protected $gcs_staging_dir = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $fhir_store + * Required. The full resource name of the FHIR store to import data from, in + * the format of + * `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`. + * @type string $gcs_staging_dir + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * FhirStore export to a specific Cloud Storage directory. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full resource name of the FHIR store to import data from, in + * the format of + * `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`. + * + * Generated from protobuf field string fhir_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getFhirStore() + { + return $this->fhir_store; + } + + /** + * Required. The full resource name of the FHIR store to import data from, in + * the format of + * `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`. + * + * Generated from protobuf field string fhir_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setFhirStore($var) + { + GPBUtil::checkString($var, True); + $this->fhir_store = $var; + + return $this; + } + + /** + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * FhirStore export to a specific Cloud Storage directory. + * + * Generated from protobuf field string gcs_staging_dir = 2; + * @return string + */ + public function getGcsStagingDir() + { + return $this->gcs_staging_dir; + } + + /** + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * FhirStore export to a specific Cloud Storage directory. + * + * Generated from protobuf field string gcs_staging_dir = 2; + * @param string $var + * @return $this + */ + public function setGcsStagingDir($var) + { + GPBUtil::checkString($var, True); + $this->gcs_staging_dir = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/FirestoreSource.php b/DiscoveryEngine/src/V1beta/FirestoreSource.php new file mode 100644 index 000000000000..11818fe19a66 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/FirestoreSource.php @@ -0,0 +1,201 @@ +google.cloud.discoveryengine.v1beta.FirestoreSource + */ +class FirestoreSource extends \Google\Protobuf\Internal\Message +{ + /** + * The project ID that the Cloud SQL source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * + * Generated from protobuf field string project_id = 1; + */ + protected $project_id = ''; + /** + * Required. The Firestore database to copy the data from with a length limit + * of 256 characters. + * + * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database_id = ''; + /** + * Required. The Firestore collection to copy the data from with a length + * limit of 1,500 characters. + * + * Generated from protobuf field string collection_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $collection_id = ''; + /** + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * Firestore export to a specific Cloud Storage directory. + * Ensure that the Firestore service account has the necessary Cloud + * Storage Admin permissions to access the specified Cloud Storage directory. + * + * Generated from protobuf field string gcs_staging_dir = 4; + */ + protected $gcs_staging_dir = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * The project ID that the Cloud SQL source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * @type string $database_id + * Required. The Firestore database to copy the data from with a length limit + * of 256 characters. + * @type string $collection_id + * Required. The Firestore collection to copy the data from with a length + * limit of 1,500 characters. + * @type string $gcs_staging_dir + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * Firestore export to a specific Cloud Storage directory. + * Ensure that the Firestore service account has the necessary Cloud + * Storage Admin permissions to access the specified Cloud Storage directory. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * The project ID that the Cloud SQL source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * + * Generated from protobuf field string project_id = 1; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * The project ID that the Cloud SQL source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * + * Generated from protobuf field string project_id = 1; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * Required. The Firestore database to copy the data from with a length limit + * of 256 characters. + * + * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabaseId() + { + return $this->database_id; + } + + /** + * Required. The Firestore database to copy the data from with a length limit + * of 256 characters. + * + * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabaseId($var) + { + GPBUtil::checkString($var, True); + $this->database_id = $var; + + return $this; + } + + /** + * Required. The Firestore collection to copy the data from with a length + * limit of 1,500 characters. + * + * Generated from protobuf field string collection_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCollectionId() + { + return $this->collection_id; + } + + /** + * Required. The Firestore collection to copy the data from with a length + * limit of 1,500 characters. + * + * Generated from protobuf field string collection_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCollectionId($var) + { + GPBUtil::checkString($var, True); + $this->collection_id = $var; + + return $this; + } + + /** + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * Firestore export to a specific Cloud Storage directory. + * Ensure that the Firestore service account has the necessary Cloud + * Storage Admin permissions to access the specified Cloud Storage directory. + * + * Generated from protobuf field string gcs_staging_dir = 4; + * @return string + */ + public function getGcsStagingDir() + { + return $this->gcs_staging_dir; + } + + /** + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * Firestore export to a specific Cloud Storage directory. + * Ensure that the Firestore service account has the necessary Cloud + * Storage Admin permissions to access the specified Cloud Storage directory. + * + * Generated from protobuf field string gcs_staging_dir = 4; + * @param string $var + * @return $this + */ + public function setGcsStagingDir($var) + { + GPBUtil::checkString($var, True); + $this->gcs_staging_dir = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/GcsSource.php b/DiscoveryEngine/src/V1beta/GcsSource.php index 45a1309018d7..496120307c45 100644 --- a/DiscoveryEngine/src/V1beta/GcsSource.php +++ b/DiscoveryEngine/src/V1beta/GcsSource.php @@ -40,11 +40,11 @@ class GcsSource extends \Google\Protobuf\Internal\Message * bits of SHA256(URI) encoded as a hex string. * * `custom`: One custom data JSON per row in arbitrary format that conforms * to the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of - * the data store. This can only be used by Gen App Builder. + * the data store. This can only be used by the GENERIC Data Store vertical. * * `csv`: A CSV file with header conforming to the defined * [Schema][google.cloud.discoveryengine.v1beta.Schema] of the * data store. Each entry after the header is imported as a Document. - * This can only be used by Gen App Builder. + * This can only be used by the GENERIC Data Store vertical. * Supported values for user even imports: * * `user_event` (default): One JSON * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per line. @@ -80,11 +80,11 @@ class GcsSource extends \Google\Protobuf\Internal\Message * bits of SHA256(URI) encoded as a hex string. * * `custom`: One custom data JSON per row in arbitrary format that conforms * to the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of - * the data store. This can only be used by Gen App Builder. + * the data store. This can only be used by the GENERIC Data Store vertical. * * `csv`: A CSV file with header conforming to the defined * [Schema][google.cloud.discoveryengine.v1beta.Schema] of the * data store. Each entry after the header is imported as a Document. - * This can only be used by Gen App Builder. + * This can only be used by the GENERIC Data Store vertical. * Supported values for user even imports: * * `user_event` (default): One JSON * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per line. @@ -146,11 +146,11 @@ public function setInputUris($var) * bits of SHA256(URI) encoded as a hex string. * * `custom`: One custom data JSON per row in arbitrary format that conforms * to the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of - * the data store. This can only be used by Gen App Builder. + * the data store. This can only be used by the GENERIC Data Store vertical. * * `csv`: A CSV file with header conforming to the defined * [Schema][google.cloud.discoveryengine.v1beta.Schema] of the * data store. Each entry after the header is imported as a Document. - * This can only be used by Gen App Builder. + * This can only be used by the GENERIC Data Store vertical. * Supported values for user even imports: * * `user_event` (default): One JSON * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per line. @@ -176,11 +176,11 @@ public function getDataSchema() * bits of SHA256(URI) encoded as a hex string. * * `custom`: One custom data JSON per row in arbitrary format that conforms * to the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of - * the data store. This can only be used by Gen App Builder. + * the data store. This can only be used by the GENERIC Data Store vertical. * * `csv`: A CSV file with header conforming to the defined * [Schema][google.cloud.discoveryengine.v1beta.Schema] of the * data store. Each entry after the header is imported as a Document. - * This can only be used by Gen App Builder. + * This can only be used by the GENERIC Data Store vertical. * Supported values for user even imports: * * `user_event` (default): One JSON * [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per line. diff --git a/DiscoveryEngine/src/V1beta/GetAnswerRequest.php b/DiscoveryEngine/src/V1beta/GetAnswerRequest.php new file mode 100644 index 000000000000..72778d646975 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/GetAnswerRequest.php @@ -0,0 +1,86 @@ +google.cloud.discoveryengine.v1beta.GetAnswerRequest + */ +class GetAnswerRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Answer to get. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the Answer to get. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}` + * Please see {@see ConversationalSearchServiceClient::answerName()} for help formatting this field. + * + * @return \Google\Cloud\DiscoveryEngine\V1beta\GetAnswerRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the Answer to get. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Answer to get. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the Answer to get. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/GetSessionRequest.php b/DiscoveryEngine/src/V1beta/GetSessionRequest.php new file mode 100644 index 000000000000..642c98d54d76 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/GetSessionRequest.php @@ -0,0 +1,86 @@ +google.cloud.discoveryengine.v1beta.GetSessionRequest + */ +class GetSessionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Session to get. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the Session to get. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` + * Please see {@see ConversationalSearchServiceClient::sessionName()} for help formatting this field. + * + * @return \Google\Cloud\DiscoveryEngine\V1beta\GetSessionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the Session to get. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Session to get. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the Session to get. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/GroundingFact.php b/DiscoveryEngine/src/V1beta/GroundingFact.php new file mode 100644 index 000000000000..983220db7b25 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/GroundingFact.php @@ -0,0 +1,109 @@ +google.cloud.discoveryengine.v1beta.GroundingFact + */ +class GroundingFact extends \Google\Protobuf\Internal\Message +{ + /** + * Text content of the fact. Can be at most 10K characters long. + * + * Generated from protobuf field string fact_text = 1; + */ + protected $fact_text = ''; + /** + * Attributes associated with the fact. + * Common attributes include `source` (indicating where the fact was sourced + * from), `author` (indicating the author of the fact), and so on. + * + * Generated from protobuf field map attributes = 2; + */ + private $attributes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $fact_text + * Text content of the fact. Can be at most 10K characters long. + * @type array|\Google\Protobuf\Internal\MapField $attributes + * Attributes associated with the fact. + * Common attributes include `source` (indicating where the fact was sourced + * from), `author` (indicating the author of the fact), and so on. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Grounding::initOnce(); + parent::__construct($data); + } + + /** + * Text content of the fact. Can be at most 10K characters long. + * + * Generated from protobuf field string fact_text = 1; + * @return string + */ + public function getFactText() + { + return $this->fact_text; + } + + /** + * Text content of the fact. Can be at most 10K characters long. + * + * Generated from protobuf field string fact_text = 1; + * @param string $var + * @return $this + */ + public function setFactText($var) + { + GPBUtil::checkString($var, True); + $this->fact_text = $var; + + return $this; + } + + /** + * Attributes associated with the fact. + * Common attributes include `source` (indicating where the fact was sourced + * from), `author` (indicating the author of the fact), and so on. + * + * Generated from protobuf field map attributes = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * Attributes associated with the fact. + * Common attributes include `source` (indicating where the fact was sourced + * from), `author` (indicating the author of the fact), and so on. + * + * Generated from protobuf field map attributes = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAttributes($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->attributes = $arr; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/ImportDocumentsMetadata.php b/DiscoveryEngine/src/V1beta/ImportDocumentsMetadata.php index feabb561b010..cab3099e5b6f 100644 --- a/DiscoveryEngine/src/V1beta/ImportDocumentsMetadata.php +++ b/DiscoveryEngine/src/V1beta/ImportDocumentsMetadata.php @@ -41,6 +41,12 @@ class ImportDocumentsMetadata extends \Google\Protobuf\Internal\Message * Generated from protobuf field int64 failure_count = 4; */ protected $failure_count = 0; + /** + * Total count of entries that were processed. + * + * Generated from protobuf field int64 total_count = 5; + */ + protected $total_count = 0; /** * Constructor. @@ -57,6 +63,8 @@ class ImportDocumentsMetadata extends \Google\Protobuf\Internal\Message * Count of entries that were processed successfully. * @type int|string $failure_count * Count of entries that encountered errors while processing. + * @type int|string $total_count + * Total count of entries that were processed. * } */ public function __construct($data = NULL) { @@ -190,5 +198,31 @@ public function setFailureCount($var) return $this; } + /** + * Total count of entries that were processed. + * + * Generated from protobuf field int64 total_count = 5; + * @return int|string + */ + public function getTotalCount() + { + return $this->total_count; + } + + /** + * Total count of entries that were processed. + * + * Generated from protobuf field int64 total_count = 5; + * @param int|string $var + * @return $this + */ + public function setTotalCount($var) + { + GPBUtil::checkInt64($var); + $this->total_count = $var; + + return $this; + } + } diff --git a/DiscoveryEngine/src/V1beta/ImportDocumentsRequest.php b/DiscoveryEngine/src/V1beta/ImportDocumentsRequest.php index 053193a657b1..26ed16f7e1ee 100644 --- a/DiscoveryEngine/src/V1beta/ImportDocumentsRequest.php +++ b/DiscoveryEngine/src/V1beta/ImportDocumentsRequest.php @@ -37,6 +37,13 @@ class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6; */ protected $reconciliation_mode = 0; + /** + * Indicates which fields in the provided imported documents to update. If + * not set, the default is to update all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 7; + */ + protected $update_mask = null; /** * Whether to automatically generate IDs for the documents if absent. * If set to `true`, @@ -49,44 +56,50 @@ class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message * have to be specified using * [id_field][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.id_field], * otherwise, documents without IDs fail to be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and - * when + * Supported data sources: + * * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource]. * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] - * or + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource]. * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] - * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource]. + * * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource]. + * * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource]. + * * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource]. * * Generated from protobuf field bool auto_generate_ids = 8; */ protected $auto_generate_ids = false; /** - * The field in the Cloud Storage and BigQuery sources that indicates the - * unique IDs of the documents. + * The field indicates the ID field or column to be used as unique IDs of + * the documents. * For [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] it is the * key of the JSON field. For instance, `my_id` for JSON `{"my_id": - * "some_uuid"}`. For - * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource] it is - * the column name of the BigQuery table where the unique ids are stored. - * The values of the JSON field or the BigQuery column are used as the + * "some_uuid"}`. For others, it may be the column name of the table where the + * unique ids are stored. + * The values of the JSON field or the table column are used as the * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s. The JSON - * field or the BigQuery column must be of string type, and the values must be + * field or the table column must be of string type, and the values must be * set as valid strings conform to * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. * Otherwise, documents without valid IDs fail to be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and - * when - * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] - * or - * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] - * is `custom`. And only set this field when + * Only set this field when * [auto_generate_ids][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.auto_generate_ids] * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. * If it is unset, a default value `_id` is used when importing from the * allowed data sources. + * Supported data sources: + * * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource]. + * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource]. + * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource]. + * * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource]. + * * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource]. + * * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource]. * * Generated from protobuf field string id_field = 9; */ @@ -105,6 +118,16 @@ class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message * Cloud Storage location for the input content. * @type \Google\Cloud\DiscoveryEngine\V1beta\BigQuerySource $bigquery_source * BigQuery input source. + * @type \Google\Cloud\DiscoveryEngine\V1beta\FhirStoreSource $fhir_store_source + * FhirStore input source. + * @type \Google\Cloud\DiscoveryEngine\V1beta\SpannerSource $spanner_source + * Spanner input source. + * @type \Google\Cloud\DiscoveryEngine\V1beta\CloudSqlSource $cloud_sql_source + * Cloud SQL input source. + * @type \Google\Cloud\DiscoveryEngine\V1beta\FirestoreSource $firestore_source + * Firestore input source. + * @type \Google\Cloud\DiscoveryEngine\V1beta\BigtableSource $bigtable_source + * Cloud Bigtable input source. * @type string $parent * Required. The parent branch resource name, such as * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. @@ -115,6 +138,9 @@ class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message * The mode of reconciliation between existing documents and the documents to * be imported. Defaults to * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL]. + * @type \Google\Protobuf\FieldMask $update_mask + * Indicates which fields in the provided imported documents to update. If + * not set, the default is to update all fields. * @type bool $auto_generate_ids * Whether to automatically generate IDs for the documents if absent. * If set to `true`, @@ -127,40 +153,46 @@ class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message * have to be specified using * [id_field][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.id_field], * otherwise, documents without IDs fail to be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and - * when + * Supported data sources: + * * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource]. * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] - * or + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource]. * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] - * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource]. + * * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource]. + * * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource]. + * * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource]. * @type string $id_field - * The field in the Cloud Storage and BigQuery sources that indicates the - * unique IDs of the documents. + * The field indicates the ID field or column to be used as unique IDs of + * the documents. * For [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] it is the * key of the JSON field. For instance, `my_id` for JSON `{"my_id": - * "some_uuid"}`. For - * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource] it is - * the column name of the BigQuery table where the unique ids are stored. - * The values of the JSON field or the BigQuery column are used as the + * "some_uuid"}`. For others, it may be the column name of the table where the + * unique ids are stored. + * The values of the JSON field or the table column are used as the * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s. The JSON - * field or the BigQuery column must be of string type, and the values must be + * field or the table column must be of string type, and the values must be * set as valid strings conform to * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. * Otherwise, documents without valid IDs fail to be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and - * when - * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] - * or - * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] - * is `custom`. And only set this field when + * Only set this field when * [auto_generate_ids][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.auto_generate_ids] * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. * If it is unset, a default value `_id` is used when importing from the * allowed data sources. + * Supported data sources: + * * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource]. + * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource]. + * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource]. + * * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource]. + * * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource]. + * * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource]. * } */ public function __construct($data = NULL) { @@ -261,6 +293,161 @@ public function setBigquerySource($var) return $this; } + /** + * FhirStore input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.FhirStoreSource fhir_store_source = 10; + * @return \Google\Cloud\DiscoveryEngine\V1beta\FhirStoreSource|null + */ + public function getFhirStoreSource() + { + return $this->readOneof(10); + } + + public function hasFhirStoreSource() + { + return $this->hasOneof(10); + } + + /** + * FhirStore input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.FhirStoreSource fhir_store_source = 10; + * @param \Google\Cloud\DiscoveryEngine\V1beta\FhirStoreSource $var + * @return $this + */ + public function setFhirStoreSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\FhirStoreSource::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Spanner input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SpannerSource spanner_source = 11; + * @return \Google\Cloud\DiscoveryEngine\V1beta\SpannerSource|null + */ + public function getSpannerSource() + { + return $this->readOneof(11); + } + + public function hasSpannerSource() + { + return $this->hasOneof(11); + } + + /** + * Spanner input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SpannerSource spanner_source = 11; + * @param \Google\Cloud\DiscoveryEngine\V1beta\SpannerSource $var + * @return $this + */ + public function setSpannerSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SpannerSource::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Cloud SQL input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.CloudSqlSource cloud_sql_source = 12; + * @return \Google\Cloud\DiscoveryEngine\V1beta\CloudSqlSource|null + */ + public function getCloudSqlSource() + { + return $this->readOneof(12); + } + + public function hasCloudSqlSource() + { + return $this->hasOneof(12); + } + + /** + * Cloud SQL input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.CloudSqlSource cloud_sql_source = 12; + * @param \Google\Cloud\DiscoveryEngine\V1beta\CloudSqlSource $var + * @return $this + */ + public function setCloudSqlSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\CloudSqlSource::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Firestore input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.FirestoreSource firestore_source = 13; + * @return \Google\Cloud\DiscoveryEngine\V1beta\FirestoreSource|null + */ + public function getFirestoreSource() + { + return $this->readOneof(13); + } + + public function hasFirestoreSource() + { + return $this->hasOneof(13); + } + + /** + * Firestore input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.FirestoreSource firestore_source = 13; + * @param \Google\Cloud\DiscoveryEngine\V1beta\FirestoreSource $var + * @return $this + */ + public function setFirestoreSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\FirestoreSource::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * Cloud Bigtable input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.BigtableSource bigtable_source = 15; + * @return \Google\Cloud\DiscoveryEngine\V1beta\BigtableSource|null + */ + public function getBigtableSource() + { + return $this->readOneof(15); + } + + public function hasBigtableSource() + { + return $this->hasOneof(15); + } + + /** + * Cloud Bigtable input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.BigtableSource bigtable_source = 15; + * @param \Google\Cloud\DiscoveryEngine\V1beta\BigtableSource $var + * @return $this + */ + public function setBigtableSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\BigtableSource::class); + $this->writeOneof(15, $var); + + return $this; + } + /** * Required. The parent branch resource name, such as * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. @@ -357,6 +544,44 @@ public function setReconciliationMode($var) return $this; } + /** + * Indicates which fields in the provided imported documents to update. If + * not set, the default is to update all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 7; + * @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); + } + + /** + * Indicates which fields in the provided imported documents to update. If + * not set, the default is to update all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 7; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + /** * Whether to automatically generate IDs for the documents if absent. * If set to `true`, @@ -369,14 +594,17 @@ public function setReconciliationMode($var) * have to be specified using * [id_field][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.id_field], * otherwise, documents without IDs fail to be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and - * when + * Supported data sources: + * * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource]. * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] - * or + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource]. * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] - * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource]. + * * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource]. + * * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource]. + * * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource]. * * Generated from protobuf field bool auto_generate_ids = 8; * @return bool @@ -398,14 +626,17 @@ public function getAutoGenerateIds() * have to be specified using * [id_field][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.id_field], * otherwise, documents without IDs fail to be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and - * when + * Supported data sources: + * * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource]. * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] - * or + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource]. * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] - * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource]. + * * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource]. + * * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource]. + * * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource]. * * Generated from protobuf field bool auto_generate_ids = 8; * @param bool $var @@ -420,31 +651,34 @@ public function setAutoGenerateIds($var) } /** - * The field in the Cloud Storage and BigQuery sources that indicates the - * unique IDs of the documents. + * The field indicates the ID field or column to be used as unique IDs of + * the documents. * For [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] it is the * key of the JSON field. For instance, `my_id` for JSON `{"my_id": - * "some_uuid"}`. For - * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource] it is - * the column name of the BigQuery table where the unique ids are stored. - * The values of the JSON field or the BigQuery column are used as the + * "some_uuid"}`. For others, it may be the column name of the table where the + * unique ids are stored. + * The values of the JSON field or the table column are used as the * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s. The JSON - * field or the BigQuery column must be of string type, and the values must be + * field or the table column must be of string type, and the values must be * set as valid strings conform to * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. * Otherwise, documents without valid IDs fail to be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and - * when - * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] - * or - * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] - * is `custom`. And only set this field when + * Only set this field when * [auto_generate_ids][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.auto_generate_ids] * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. * If it is unset, a default value `_id` is used when importing from the * allowed data sources. + * Supported data sources: + * * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource]. + * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource]. + * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource]. + * * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource]. + * * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource]. + * * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource]. * * Generated from protobuf field string id_field = 9; * @return string @@ -455,31 +689,34 @@ public function getIdField() } /** - * The field in the Cloud Storage and BigQuery sources that indicates the - * unique IDs of the documents. + * The field indicates the ID field or column to be used as unique IDs of + * the documents. * For [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] it is the * key of the JSON field. For instance, `my_id` for JSON `{"my_id": - * "some_uuid"}`. For - * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource] it is - * the column name of the BigQuery table where the unique ids are stored. - * The values of the JSON field or the BigQuery column are used as the + * "some_uuid"}`. For others, it may be the column name of the table where the + * unique ids are stored. + * The values of the JSON field or the table column are used as the * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s. The JSON - * field or the BigQuery column must be of string type, and the values must be + * field or the table column must be of string type, and the values must be * set as valid strings conform to * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. * Otherwise, documents without valid IDs fail to be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource], and - * when - * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] - * or - * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] - * is `custom`. And only set this field when + * Only set this field when * [auto_generate_ids][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.auto_generate_ids] * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. * If it is unset, a default value `_id` is used when importing from the * allowed data sources. + * Supported data sources: + * * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource]. + * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema] + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource]. + * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema] + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource]. + * * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource]. + * * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource]. + * * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource]. * * Generated from protobuf field string id_field = 9; * @param string $var diff --git a/DiscoveryEngine/src/V1beta/IndustryVertical.php b/DiscoveryEngine/src/V1beta/IndustryVertical.php index 1f820f162bcc..9951b8aa6495 100644 --- a/DiscoveryEngine/src/V1beta/IndustryVertical.php +++ b/DiscoveryEngine/src/V1beta/IndustryVertical.php @@ -33,11 +33,18 @@ class IndustryVertical * Generated from protobuf enum MEDIA = 2; */ const MEDIA = 2; + /** + * The healthcare FHIR vertical. + * + * Generated from protobuf enum HEALTHCARE_FHIR = 7; + */ + const HEALTHCARE_FHIR = 7; private static $valueToName = [ self::INDUSTRY_VERTICAL_UNSPECIFIED => 'INDUSTRY_VERTICAL_UNSPECIFIED', self::GENERIC => 'GENERIC', self::MEDIA => 'MEDIA', + self::HEALTHCARE_FHIR => 'HEALTHCARE_FHIR', ]; public static function name($value) diff --git a/DiscoveryEngine/src/V1beta/ListSessionsRequest.php b/DiscoveryEngine/src/V1beta/ListSessionsRequest.php new file mode 100644 index 000000000000..e49ae92cc3c1 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/ListSessionsRequest.php @@ -0,0 +1,274 @@ +google.cloud.discoveryengine.v1beta.ListSessionsRequest + */ +class ListSessionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The data store resource name. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of results to return. If unspecified, defaults + * to 50. Max allowed value is 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListSessions` call. + * Provide this to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A filter to apply on the list results. The supported features are: + * user_pseudo_id, state. + * Example: + * "user_pseudo_id = some_id" + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * A comma-separated list of fields to order by, sorted in ascending order. + * Use "desc" after a field name for descending. + * Supported fields: + * * `update_time` + * * `create_time` + * * `session_name` + * Example: + * "update_time desc" + * "create_time" + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The data store resource name. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * Please see {@see ConversationalSearchServiceClient::dataStoreName()} for help formatting this field. + * + * @return \Google\Cloud\DiscoveryEngine\V1beta\ListSessionsRequest + * + * @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 data store resource name. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * @type int $page_size + * Maximum number of results to return. If unspecified, defaults + * to 50. Max allowed value is 1000. + * @type string $page_token + * A page token, received from a previous `ListSessions` call. + * Provide this to retrieve the subsequent page. + * @type string $filter + * A filter to apply on the list results. The supported features are: + * user_pseudo_id, state. + * Example: + * "user_pseudo_id = some_id" + * @type string $order_by + * A comma-separated list of fields to order by, sorted in ascending order. + * Use "desc" after a field name for descending. + * Supported fields: + * * `update_time` + * * `create_time` + * * `session_name` + * Example: + * "update_time desc" + * "create_time" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The data store resource name. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The data store resource name. Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Maximum number of results to return. If unspecified, defaults + * to 50. Max allowed value is 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of results to return. If unspecified, defaults + * to 50. Max allowed value is 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ListSessions` call. + * Provide this to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListSessions` call. + * Provide this to retrieve the subsequent page. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * A filter to apply on the list results. The supported features are: + * user_pseudo_id, state. + * Example: + * "user_pseudo_id = some_id" + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A filter to apply on the list results. The supported features are: + * user_pseudo_id, state. + * Example: + * "user_pseudo_id = some_id" + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * A comma-separated list of fields to order by, sorted in ascending order. + * Use "desc" after a field name for descending. + * Supported fields: + * * `update_time` + * * `create_time` + * * `session_name` + * Example: + * "update_time desc" + * "create_time" + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * A comma-separated list of fields to order by, sorted in ascending order. + * Use "desc" after a field name for descending. + * Supported fields: + * * `update_time` + * * `create_time` + * * `session_name` + * Example: + * "update_time desc" + * "create_time" + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/ListSessionsResponse.php b/DiscoveryEngine/src/V1beta/ListSessionsResponse.php new file mode 100644 index 000000000000..5c07ab53a304 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/ListSessionsResponse.php @@ -0,0 +1,101 @@ +google.cloud.discoveryengine.v1beta.ListSessionsResponse + */ +class ListSessionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * All the Sessions for a given data store. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Session sessions = 1; + */ + private $sessions; + /** + * Pagination token, if not returned indicates the last page. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\Session>|\Google\Protobuf\Internal\RepeatedField $sessions + * All the Sessions for a given data store. + * @type string $next_page_token + * Pagination token, if not returned indicates the last page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * All the Sessions for a given data store. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Session sessions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSessions() + { + return $this->sessions; + } + + /** + * All the Sessions for a given data store. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Session sessions = 1; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\Session>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSessions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\Session::class); + $this->sessions = $arr; + + return $this; + } + + /** + * Pagination token, if not returned indicates the last page. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Pagination token, if not returned indicates the last page. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/PageInfo.php b/DiscoveryEngine/src/V1beta/PageInfo.php index 8d5046740830..55ea185cd019 100644 --- a/DiscoveryEngine/src/V1beta/PageInfo.php +++ b/DiscoveryEngine/src/V1beta/PageInfo.php @@ -31,7 +31,7 @@ class PageInfo extends \Google\Protobuf\Internal\Message /** * The most specific category associated with a category page. * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: @@ -79,7 +79,7 @@ class PageInfo extends \Google\Protobuf\Internal\Message * @type string $page_category * The most specific category associated with a category page. * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: @@ -146,7 +146,7 @@ public function setPageviewId($var) /** * The most specific category associated with a category page. * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: @@ -165,7 +165,7 @@ public function getPageCategory() /** * The most specific category associated with a category page. * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: diff --git a/DiscoveryEngine/src/V1beta/PauseEngineRequest.php b/DiscoveryEngine/src/V1beta/PauseEngineRequest.php new file mode 100644 index 000000000000..632db7bb93e8 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/PauseEngineRequest.php @@ -0,0 +1,91 @@ +google.cloud.discoveryengine.v1beta.PauseEngineRequest + */ +class PauseEngineRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the engine to pause. + * Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}` + * + * 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 engine to pause. + * Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}` + * Please see {@see EngineServiceClient::engineName()} for help formatting this field. + * + * @return \Google\Cloud\DiscoveryEngine\V1beta\PauseEngineRequest + * + * @experimental + */ + public static function 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 engine to pause. + * Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\EngineService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the engine to pause. + * Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the engine to pause. + * Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/Query.php b/DiscoveryEngine/src/V1beta/Query.php new file mode 100644 index 000000000000..37b6957a963b --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Query.php @@ -0,0 +1,109 @@ +google.cloud.discoveryengine.v1beta.Query + */ +class Query extends \Google\Protobuf\Internal\Message +{ + /** + * Unique Id for the query. + * + * Generated from protobuf field string query_id = 1; + */ + protected $query_id = ''; + protected $content; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * Plain text. + * @type string $query_id + * Unique Id for the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Session::initOnce(); + parent::__construct($data); + } + + /** + * Plain text. + * + * Generated from protobuf field string text = 2; + * @return string + */ + public function getText() + { + return $this->readOneof(2); + } + + public function hasText() + { + return $this->hasOneof(2); + } + + /** + * Plain text. + * + * Generated from protobuf field string text = 2; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Unique Id for the query. + * + * Generated from protobuf field string query_id = 1; + * @return string + */ + public function getQueryId() + { + return $this->query_id; + } + + /** + * Unique Id for the query. + * + * Generated from protobuf field string query_id = 1; + * @param string $var + * @return $this + */ + public function setQueryId($var) + { + GPBUtil::checkString($var, True); + $this->query_id = $var; + + return $this; + } + + /** + * @return string + */ + public function getContent() + { + return $this->whichOneof("content"); + } + +} + diff --git a/DiscoveryEngine/src/V1beta/RankRequest.php b/DiscoveryEngine/src/V1beta/RankRequest.php new file mode 100644 index 000000000000..2cc6bb409339 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/RankRequest.php @@ -0,0 +1,263 @@ +google.cloud.discoveryengine.v1beta.RankRequest + */ +class RankRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the rank service config, such as + * `projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config`. + * + * Generated from protobuf field string ranking_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $ranking_config = ''; + /** + * The identifier of the model to use. It is one of: + * * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input + * token size 512. + * It is set to `semantic-ranker-512@latest` by default if unspecified. + * + * Generated from protobuf field string model = 2; + */ + protected $model = ''; + /** + * The number of results to return. If this is unset or no bigger than zero, + * returns all results. + * + * Generated from protobuf field int32 top_n = 3; + */ + protected $top_n = 0; + /** + * The query to use. + * + * Generated from protobuf field string query = 4; + */ + protected $query = ''; + /** + * Required. A list of records to rank. At most 200 records to rank. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + private $records; + /** + * If true, the response will contain only record ID and score. By default, it + * is false, the response will contain record details. + * + * Generated from protobuf field bool ignore_record_details_in_response = 6; + */ + protected $ignore_record_details_in_response = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $ranking_config + * Required. The resource name of the rank service config, such as + * `projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config`. + * @type string $model + * The identifier of the model to use. It is one of: + * * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input + * token size 512. + * It is set to `semantic-ranker-512@latest` by default if unspecified. + * @type int $top_n + * The number of results to return. If this is unset or no bigger than zero, + * returns all results. + * @type string $query + * The query to use. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\RankingRecord>|\Google\Protobuf\Internal\RepeatedField $records + * Required. A list of records to rank. At most 200 records to rank. + * @type bool $ignore_record_details_in_response + * If true, the response will contain only record ID and score. By default, it + * is false, the response will contain record details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\RankService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the rank service config, such as + * `projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config`. + * + * Generated from protobuf field string ranking_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getRankingConfig() + { + return $this->ranking_config; + } + + /** + * Required. The resource name of the rank service config, such as + * `projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config`. + * + * Generated from protobuf field string ranking_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRankingConfig($var) + { + GPBUtil::checkString($var, True); + $this->ranking_config = $var; + + return $this; + } + + /** + * The identifier of the model to use. It is one of: + * * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input + * token size 512. + * It is set to `semantic-ranker-512@latest` by default if unspecified. + * + * Generated from protobuf field string model = 2; + * @return string + */ + public function getModel() + { + return $this->model; + } + + /** + * The identifier of the model to use. It is one of: + * * `semantic-ranker-512@latest`: Semantic ranking model with maxiumn input + * token size 512. + * It is set to `semantic-ranker-512@latest` by default if unspecified. + * + * Generated from protobuf field string model = 2; + * @param string $var + * @return $this + */ + public function setModel($var) + { + GPBUtil::checkString($var, True); + $this->model = $var; + + return $this; + } + + /** + * The number of results to return. If this is unset or no bigger than zero, + * returns all results. + * + * Generated from protobuf field int32 top_n = 3; + * @return int + */ + public function getTopN() + { + return $this->top_n; + } + + /** + * The number of results to return. If this is unset or no bigger than zero, + * returns all results. + * + * Generated from protobuf field int32 top_n = 3; + * @param int $var + * @return $this + */ + public function setTopN($var) + { + GPBUtil::checkInt32($var); + $this->top_n = $var; + + return $this; + } + + /** + * The query to use. + * + * Generated from protobuf field string query = 4; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * The query to use. + * + * Generated from protobuf field string query = 4; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * Required. A list of records to rank. At most 200 records to rank. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRecords() + { + return $this->records; + } + + /** + * Required. A list of records to rank. At most 200 records to rank. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.RankingRecord records = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\RankingRecord>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRecords($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\RankingRecord::class); + $this->records = $arr; + + return $this; + } + + /** + * If true, the response will contain only record ID and score. By default, it + * is false, the response will contain record details. + * + * Generated from protobuf field bool ignore_record_details_in_response = 6; + * @return bool + */ + public function getIgnoreRecordDetailsInResponse() + { + return $this->ignore_record_details_in_response; + } + + /** + * If true, the response will contain only record ID and score. By default, it + * is false, the response will contain record details. + * + * Generated from protobuf field bool ignore_record_details_in_response = 6; + * @param bool $var + * @return $this + */ + public function setIgnoreRecordDetailsInResponse($var) + { + GPBUtil::checkBool($var); + $this->ignore_record_details_in_response = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/RankResponse.php b/DiscoveryEngine/src/V1beta/RankResponse.php new file mode 100644 index 000000000000..2196e035e3cf --- /dev/null +++ b/DiscoveryEngine/src/V1beta/RankResponse.php @@ -0,0 +1,69 @@ +google.cloud.discoveryengine.v1beta.RankResponse + */ +class RankResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of records sorted by descending score. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.RankingRecord records = 5; + */ + private $records; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\RankingRecord>|\Google\Protobuf\Internal\RepeatedField $records + * A list of records sorted by descending score. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\RankService::initOnce(); + parent::__construct($data); + } + + /** + * A list of records sorted by descending score. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.RankingRecord records = 5; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRecords() + { + return $this->records; + } + + /** + * A list of records sorted by descending score. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.RankingRecord records = 5; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\RankingRecord>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRecords($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\RankingRecord::class); + $this->records = $arr; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/RankingRecord.php b/DiscoveryEngine/src/V1beta/RankingRecord.php new file mode 100644 index 000000000000..95b2efc399e9 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/RankingRecord.php @@ -0,0 +1,203 @@ +google.cloud.discoveryengine.v1beta.RankingRecord + */ +class RankingRecord extends \Google\Protobuf\Internal\Message +{ + /** + * The unique ID to represent the record. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * The title of the record. Empty by default. + * At least one of + * [title][google.cloud.discoveryengine.v1beta.RankingRecord.title] or + * [content][google.cloud.discoveryengine.v1beta.RankingRecord.content] should + * be set otherwise an INVALID_ARGUMENT error is thrown. + * + * Generated from protobuf field string title = 2; + */ + protected $title = ''; + /** + * The content of the record. Empty by default. + * At least one of + * [title][google.cloud.discoveryengine.v1beta.RankingRecord.title] or + * [content][google.cloud.discoveryengine.v1beta.RankingRecord.content] should + * be set otherwise an INVALID_ARGUMENT error is thrown. + * + * Generated from protobuf field string content = 3; + */ + protected $content = ''; + /** + * The score of this record based on the given query and selected model. + * + * Generated from protobuf field float score = 4; + */ + protected $score = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * The unique ID to represent the record. + * @type string $title + * The title of the record. Empty by default. + * At least one of + * [title][google.cloud.discoveryengine.v1beta.RankingRecord.title] or + * [content][google.cloud.discoveryengine.v1beta.RankingRecord.content] should + * be set otherwise an INVALID_ARGUMENT error is thrown. + * @type string $content + * The content of the record. Empty by default. + * At least one of + * [title][google.cloud.discoveryengine.v1beta.RankingRecord.title] or + * [content][google.cloud.discoveryengine.v1beta.RankingRecord.content] should + * be set otherwise an INVALID_ARGUMENT error is thrown. + * @type float $score + * The score of this record based on the given query and selected model. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\RankService::initOnce(); + parent::__construct($data); + } + + /** + * The unique ID to represent the record. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * The unique ID to represent the record. + * + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The title of the record. Empty by default. + * At least one of + * [title][google.cloud.discoveryengine.v1beta.RankingRecord.title] or + * [content][google.cloud.discoveryengine.v1beta.RankingRecord.content] should + * be set otherwise an INVALID_ARGUMENT error is thrown. + * + * Generated from protobuf field string title = 2; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * The title of the record. Empty by default. + * At least one of + * [title][google.cloud.discoveryengine.v1beta.RankingRecord.title] or + * [content][google.cloud.discoveryengine.v1beta.RankingRecord.content] should + * be set otherwise an INVALID_ARGUMENT error is thrown. + * + * Generated from protobuf field string title = 2; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * The content of the record. Empty by default. + * At least one of + * [title][google.cloud.discoveryengine.v1beta.RankingRecord.title] or + * [content][google.cloud.discoveryengine.v1beta.RankingRecord.content] should + * be set otherwise an INVALID_ARGUMENT error is thrown. + * + * Generated from protobuf field string content = 3; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * The content of the record. Empty by default. + * At least one of + * [title][google.cloud.discoveryengine.v1beta.RankingRecord.title] or + * [content][google.cloud.discoveryengine.v1beta.RankingRecord.content] should + * be set otherwise an INVALID_ARGUMENT error is thrown. + * + * Generated from protobuf field string content = 3; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, True); + $this->content = $var; + + return $this; + } + + /** + * The score of this record based on the given query and selected model. + * + * Generated from protobuf field float score = 4; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * The score of this record based on the given query and selected model. + * + * Generated from protobuf field float score = 4; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/ResumeEngineRequest.php b/DiscoveryEngine/src/V1beta/ResumeEngineRequest.php new file mode 100644 index 000000000000..acd5a70c940b --- /dev/null +++ b/DiscoveryEngine/src/V1beta/ResumeEngineRequest.php @@ -0,0 +1,91 @@ +google.cloud.discoveryengine.v1beta.ResumeEngineRequest + */ +class ResumeEngineRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the engine to resume. + * Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}` + * + * 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 engine to resume. + * Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}` + * Please see {@see EngineServiceClient::engineName()} for help formatting this field. + * + * @return \Google\Cloud\DiscoveryEngine\V1beta\ResumeEngineRequest + * + * @experimental + */ + public static function 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 engine to resume. + * Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\EngineService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the engine to resume. + * Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the engine to resume. + * Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/SearchRequest.php b/DiscoveryEngine/src/V1beta/SearchRequest.php index e0146c003669..b2f9b1b1acc3 100644 --- a/DiscoveryEngine/src/V1beta/SearchRequest.php +++ b/DiscoveryEngine/src/V1beta/SearchRequest.php @@ -51,9 +51,12 @@ class SearchRequest extends \Google\Protobuf\Internal\Message protected $image_query = null; /** * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s - * to return. If unspecified, defaults to a reasonable value. The maximum - * allowed value is 100. Values above 100 are coerced to 100. - * If this field is negative, an `INVALID_ARGUMENT` is returned. + * to return. The maximum allowed value depends on the data type. Values above + * the maximum value are coerced to the maximum value. + * * Websites with basic indexing: Default `10`, Maximum `25`. + * * Websites with advanced indexing: Default `25`, Maximum `50`. + * * Other: Default `50`, Maximum `100`. + * If this field is negative, an `INVALID_ARGUMENT` is returned. * * Generated from protobuf field int32 page_size = 4; */ @@ -218,7 +221,8 @@ class SearchRequest extends \Google\Protobuf\Internal\Message * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]. * If * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path] - * is not provided, it will use [ServingConfig.EmbeddingConfig.field_path][]. + * is not provided, it will use + * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config]. * * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; */ @@ -299,9 +303,12 @@ class SearchRequest extends \Google\Protobuf\Internal\Message * Raw image query. * @type int $page_size * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s - * to return. If unspecified, defaults to a reasonable value. The maximum - * allowed value is 100. Values above 100 are coerced to 100. - * If this field is negative, an `INVALID_ARGUMENT` is returned. + * to return. The maximum allowed value depends on the data type. Values above + * the maximum value are coerced to the maximum value. + * * Websites with basic indexing: Default `10`, Maximum `25`. + * * Websites with advanced indexing: Default `25`, Maximum `50`. + * * Other: Default `50`, Maximum `100`. + * If this field is negative, an `INVALID_ARGUMENT` is returned. * @type string $page_token * A page token received from a previous * [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search] @@ -406,7 +413,8 @@ class SearchRequest extends \Google\Protobuf\Internal\Message * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]. * If * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path] - * is not provided, it will use [ServingConfig.EmbeddingConfig.field_path][]. + * is not provided, it will use + * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config]. * @type string $ranking_expression * The ranking expression controls the customized ranking on retrieval * documents. This overrides @@ -585,9 +593,12 @@ public function setImageQuery($var) /** * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s - * to return. If unspecified, defaults to a reasonable value. The maximum - * allowed value is 100. Values above 100 are coerced to 100. - * If this field is negative, an `INVALID_ARGUMENT` is returned. + * to return. The maximum allowed value depends on the data type. Values above + * the maximum value are coerced to the maximum value. + * * Websites with basic indexing: Default `10`, Maximum `25`. + * * Websites with advanced indexing: Default `25`, Maximum `50`. + * * Other: Default `50`, Maximum `100`. + * If this field is negative, an `INVALID_ARGUMENT` is returned. * * Generated from protobuf field int32 page_size = 4; * @return int @@ -599,9 +610,12 @@ public function getPageSize() /** * Maximum number of [Document][google.cloud.discoveryengine.v1beta.Document]s - * to return. If unspecified, defaults to a reasonable value. The maximum - * allowed value is 100. Values above 100 are coerced to 100. - * If this field is negative, an `INVALID_ARGUMENT` is returned. + * to return. The maximum allowed value depends on the data type. Values above + * the maximum value are coerced to the maximum value. + * * Websites with basic indexing: Default `10`, Maximum `25`. + * * Websites with advanced indexing: Default `25`, Maximum `50`. + * * Other: Default `50`, Maximum `100`. + * If this field is negative, an `INVALID_ARGUMENT` is returned. * * Generated from protobuf field int32 page_size = 4; * @param int $var @@ -1173,7 +1187,8 @@ public function setContentSearchSpec($var) * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]. * If * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path] - * is not provided, it will use [ServingConfig.EmbeddingConfig.field_path][]. + * is not provided, it will use + * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config]. * * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\EmbeddingSpec|null @@ -1201,7 +1216,8 @@ public function clearEmbeddingSpec() * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]. * If * [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path] - * is not provided, it will use [ServingConfig.EmbeddingConfig.field_path][]. + * is not provided, it will use + * [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1beta.ServingConfig.embedding_config]. * * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec embedding_spec = 23; * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\EmbeddingSpec $var diff --git a/DiscoveryEngine/src/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec.php b/DiscoveryEngine/src/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec.php index 77e7574a705c..7b78da1808ba 100644 --- a/DiscoveryEngine/src/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec.php +++ b/DiscoveryEngine/src/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec.php @@ -31,22 +31,31 @@ class ConditionBoostSpec extends \Google\Protobuf\Internal\Message /** * Strength of the condition boost, which should be in [-1, 1]. Negative * boost means demotion. Default is 0.0. - * Setting to 1.0 gives the document a big promotion. However, it does not - * necessarily mean that the boosted document will be the top result at - * all times, nor that other documents will be excluded. Results could - * still be shown even when none of them matches the condition. And - * results that are significantly more relevant to the search query can - * still trump your heavily favored but irrelevant documents. + * Setting to 1.0 gives the document a big promotion. However, it does + * not necessarily mean that the boosted document will be the top result + * at all times, nor that other documents will be excluded. Results + * could still be shown even when none of them matches the condition. + * And results that are significantly more relevant to the search query + * can still trump your heavily favored but irrelevant documents. * Setting to -1.0 gives the document a big demotion. However, results * that are deeply relevant might still be shown. The document will have - * an upstream battle to get a fairly high ranking, but it is not blocked - * out completely. + * an upstream battle to get a fairly high ranking, but it is not + * blocked out completely. * Setting to 0.0 means no boost applied. The boosting condition is - * ignored. + * ignored. Only one of the (condition, boost) combination or the + * boost_control_spec below are set. If both are set then the global boost + * is ignored and the more fine-grained boost_control_spec is applied. * * Generated from protobuf field float boost = 2; */ protected $boost = 0.0; + /** + * Complex specification for custom ranking based on customer defined + * attribute value. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3; + */ + protected $boost_control_spec = null; /** * Constructor. @@ -66,18 +75,23 @@ class ConditionBoostSpec extends \Google\Protobuf\Internal\Message * @type float $boost * Strength of the condition boost, which should be in [-1, 1]. Negative * boost means demotion. Default is 0.0. - * Setting to 1.0 gives the document a big promotion. However, it does not - * necessarily mean that the boosted document will be the top result at - * all times, nor that other documents will be excluded. Results could - * still be shown even when none of them matches the condition. And - * results that are significantly more relevant to the search query can - * still trump your heavily favored but irrelevant documents. + * Setting to 1.0 gives the document a big promotion. However, it does + * not necessarily mean that the boosted document will be the top result + * at all times, nor that other documents will be excluded. Results + * could still be shown even when none of them matches the condition. + * And results that are significantly more relevant to the search query + * can still trump your heavily favored but irrelevant documents. * Setting to -1.0 gives the document a big demotion. However, results * that are deeply relevant might still be shown. The document will have - * an upstream battle to get a fairly high ranking, but it is not blocked - * out completely. + * an upstream battle to get a fairly high ranking, but it is not + * blocked out completely. * Setting to 0.0 means no boost applied. The boosting condition is - * ignored. + * ignored. Only one of the (condition, boost) combination or the + * boost_control_spec below are set. If both are set then the global boost + * is ignored and the more fine-grained boost_control_spec is applied. + * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec\ConditionBoostSpec\BoostControlSpec $boost_control_spec + * Complex specification for custom ranking based on customer defined + * attribute value. * } */ public function __construct($data = NULL) { @@ -128,18 +142,20 @@ public function setCondition($var) /** * Strength of the condition boost, which should be in [-1, 1]. Negative * boost means demotion. Default is 0.0. - * Setting to 1.0 gives the document a big promotion. However, it does not - * necessarily mean that the boosted document will be the top result at - * all times, nor that other documents will be excluded. Results could - * still be shown even when none of them matches the condition. And - * results that are significantly more relevant to the search query can - * still trump your heavily favored but irrelevant documents. + * Setting to 1.0 gives the document a big promotion. However, it does + * not necessarily mean that the boosted document will be the top result + * at all times, nor that other documents will be excluded. Results + * could still be shown even when none of them matches the condition. + * And results that are significantly more relevant to the search query + * can still trump your heavily favored but irrelevant documents. * Setting to -1.0 gives the document a big demotion. However, results * that are deeply relevant might still be shown. The document will have - * an upstream battle to get a fairly high ranking, but it is not blocked - * out completely. + * an upstream battle to get a fairly high ranking, but it is not + * blocked out completely. * Setting to 0.0 means no boost applied. The boosting condition is - * ignored. + * ignored. Only one of the (condition, boost) combination or the + * boost_control_spec below are set. If both are set then the global boost + * is ignored and the more fine-grained boost_control_spec is applied. * * Generated from protobuf field float boost = 2; * @return float @@ -152,18 +168,20 @@ public function getBoost() /** * Strength of the condition boost, which should be in [-1, 1]. Negative * boost means demotion. Default is 0.0. - * Setting to 1.0 gives the document a big promotion. However, it does not - * necessarily mean that the boosted document will be the top result at - * all times, nor that other documents will be excluded. Results could - * still be shown even when none of them matches the condition. And - * results that are significantly more relevant to the search query can - * still trump your heavily favored but irrelevant documents. + * Setting to 1.0 gives the document a big promotion. However, it does + * not necessarily mean that the boosted document will be the top result + * at all times, nor that other documents will be excluded. Results + * could still be shown even when none of them matches the condition. + * And results that are significantly more relevant to the search query + * can still trump your heavily favored but irrelevant documents. * Setting to -1.0 gives the document a big demotion. However, results * that are deeply relevant might still be shown. The document will have - * an upstream battle to get a fairly high ranking, but it is not blocked - * out completely. + * an upstream battle to get a fairly high ranking, but it is not + * blocked out completely. * Setting to 0.0 means no boost applied. The boosting condition is - * ignored. + * ignored. Only one of the (condition, boost) combination or the + * boost_control_spec below are set. If both are set then the global boost + * is ignored and the more fine-grained boost_control_spec is applied. * * Generated from protobuf field float boost = 2; * @param float $var @@ -177,6 +195,44 @@ public function setBoost($var) return $this; } + /** + * Complex specification for custom ranking based on customer defined + * attribute value. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3; + * @return \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec\ConditionBoostSpec\BoostControlSpec|null + */ + public function getBoostControlSpec() + { + return $this->boost_control_spec; + } + + public function hasBoostControlSpec() + { + return isset($this->boost_control_spec); + } + + public function clearBoostControlSpec() + { + unset($this->boost_control_spec); + } + + /** + * Complex specification for custom ranking based on customer defined + * attribute value. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec boost_control_spec = 3; + * @param \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec\ConditionBoostSpec\BoostControlSpec $var + * @return $this + */ + public function setBoostControlSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec\ConditionBoostSpec\BoostControlSpec::class); + $this->boost_control_spec = $var; + + return $this; + } + } diff --git a/DiscoveryEngine/src/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec/BoostControlSpec.php b/DiscoveryEngine/src/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec/BoostControlSpec.php new file mode 100644 index 000000000000..2ebfe64c65e9 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec/BoostControlSpec.php @@ -0,0 +1,204 @@ +google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec + */ +class BoostControlSpec extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the field whose value will be used to determine the + * boost amount. + * + * Generated from protobuf field string field_name = 1; + */ + protected $field_name = ''; + /** + * The attribute type to be used to determine the boost amount. The + * attribute value can be derived from the field value of the specified + * field_name. In the case of numerical it is straightforward i.e. + * attribute_value = numerical_field_value. In the case of freshness + * however, attribute_value = (time.now() - datetime_field_value). + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType attribute_type = 2; + */ + protected $attribute_type = 0; + /** + * The interpolation type to be applied to connect the control points + * listed below. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType interpolation_type = 3; + */ + protected $interpolation_type = 0; + /** + * The control points used to define the curve. The monotonic function + * (defined through the interpolation_type above) passes through the + * control points listed here. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + */ + private $control_points; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field_name + * The name of the field whose value will be used to determine the + * boost amount. + * @type int $attribute_type + * The attribute type to be used to determine the boost amount. The + * attribute value can be derived from the field value of the specified + * field_name. In the case of numerical it is straightforward i.e. + * attribute_value = numerical_field_value. In the case of freshness + * however, attribute_value = (time.now() - datetime_field_value). + * @type int $interpolation_type + * The interpolation type to be applied to connect the control points + * listed below. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec\ConditionBoostSpec\BoostControlSpec\ControlPoint>|\Google\Protobuf\Internal\RepeatedField $control_points + * The control points used to define the curve. The monotonic function + * (defined through the interpolation_type above) passes through the + * control points listed here. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * The name of the field whose value will be used to determine the + * boost amount. + * + * Generated from protobuf field string field_name = 1; + * @return string + */ + public function getFieldName() + { + return $this->field_name; + } + + /** + * The name of the field whose value will be used to determine the + * boost amount. + * + * Generated from protobuf field string field_name = 1; + * @param string $var + * @return $this + */ + public function setFieldName($var) + { + GPBUtil::checkString($var, True); + $this->field_name = $var; + + return $this; + } + + /** + * The attribute type to be used to determine the boost amount. The + * attribute value can be derived from the field value of the specified + * field_name. In the case of numerical it is straightforward i.e. + * attribute_value = numerical_field_value. In the case of freshness + * however, attribute_value = (time.now() - datetime_field_value). + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType attribute_type = 2; + * @return int + */ + public function getAttributeType() + { + return $this->attribute_type; + } + + /** + * The attribute type to be used to determine the boost amount. The + * attribute value can be derived from the field value of the specified + * field_name. In the case of numerical it is straightforward i.e. + * attribute_value = numerical_field_value. In the case of freshness + * however, attribute_value = (time.now() - datetime_field_value). + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType attribute_type = 2; + * @param int $var + * @return $this + */ + public function setAttributeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec\ConditionBoostSpec\BoostControlSpec\AttributeType::class); + $this->attribute_type = $var; + + return $this; + } + + /** + * The interpolation type to be applied to connect the control points + * listed below. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType interpolation_type = 3; + * @return int + */ + public function getInterpolationType() + { + return $this->interpolation_type; + } + + /** + * The interpolation type to be applied to connect the control points + * listed below. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType interpolation_type = 3; + * @param int $var + * @return $this + */ + public function setInterpolationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec\ConditionBoostSpec\BoostControlSpec\InterpolationType::class); + $this->interpolation_type = $var; + + return $this; + } + + /** + * The control points used to define the curve. The monotonic function + * (defined through the interpolation_type above) passes through the + * control points listed here. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getControlPoints() + { + return $this->control_points; + } + + /** + * The control points used to define the curve. The monotonic function + * (defined through the interpolation_type above) passes through the + * control points listed here. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint control_points = 4; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec\ConditionBoostSpec\BoostControlSpec\ControlPoint>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setControlPoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\BoostSpec\ConditionBoostSpec\BoostControlSpec\ControlPoint::class); + $this->control_points = $arr; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec/BoostControlSpec/AttributeType.php b/DiscoveryEngine/src/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec/BoostControlSpec/AttributeType.php new file mode 100644 index 000000000000..c42c8cf684b8 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec/BoostControlSpec/AttributeType.php @@ -0,0 +1,71 @@ +google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType + */ +class AttributeType +{ + /** + * Unspecified AttributeType. + * + * Generated from protobuf enum ATTRIBUTE_TYPE_UNSPECIFIED = 0; + */ + const ATTRIBUTE_TYPE_UNSPECIFIED = 0; + /** + * The value of the numerical field will be used to dynamically update + * the boost amount. In this case, the attribute_value (the x value) + * of the control point will be the actual value of the numerical + * field for which the boost_amount is specified. + * + * Generated from protobuf enum NUMERICAL = 1; + */ + const NUMERICAL = 1; + /** + * For the freshness use case the attribute value will be the duration + * between the current time and the date in the datetime field + * specified. The value must be formatted as an XSD `dayTimeDuration` + * value (a restricted subset of an ISO 8601 duration value). The + * pattern for this is: `[nD][T[nH][nM][nS]]`. + * E.g. `5D`, `3DT12H30M`, `T24H`. + * + * Generated from protobuf enum FRESHNESS = 2; + */ + const FRESHNESS = 2; + + private static $valueToName = [ + self::ATTRIBUTE_TYPE_UNSPECIFIED => 'ATTRIBUTE_TYPE_UNSPECIFIED', + self::NUMERICAL => 'NUMERICAL', + self::FRESHNESS => 'FRESHNESS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/DiscoveryEngine/src/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec/BoostControlSpec/ControlPoint.php b/DiscoveryEngine/src/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec/BoostControlSpec/ControlPoint.php new file mode 100644 index 000000000000..53a44c2cc7e6 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec/BoostControlSpec/ControlPoint.php @@ -0,0 +1,128 @@ +google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint + */ +class ControlPoint extends \Google\Protobuf\Internal\Message +{ + /** + * Can be one of: + * 1. The numerical field value. + * 2. The duration spec for freshness: + * The value must be formatted as an XSD `dayTimeDuration` value (a + * restricted subset of an ISO 8601 duration value). The pattern for + * this is: `[nD][T[nH][nM][nS]]`. + * + * Generated from protobuf field string attribute_value = 1; + */ + protected $attribute_value = ''; + /** + * The value between -1 to 1 by which to boost the score if the + * attribute_value evaluates to the value specified above. + * + * Generated from protobuf field float boost_amount = 2; + */ + protected $boost_amount = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $attribute_value + * Can be one of: + * 1. The numerical field value. + * 2. The duration spec for freshness: + * The value must be formatted as an XSD `dayTimeDuration` value (a + * restricted subset of an ISO 8601 duration value). The pattern for + * this is: `[nD][T[nH][nM][nS]]`. + * @type float $boost_amount + * The value between -1 to 1 by which to boost the score if the + * attribute_value evaluates to the value specified above. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * Can be one of: + * 1. The numerical field value. + * 2. The duration spec for freshness: + * The value must be formatted as an XSD `dayTimeDuration` value (a + * restricted subset of an ISO 8601 duration value). The pattern for + * this is: `[nD][T[nH][nM][nS]]`. + * + * Generated from protobuf field string attribute_value = 1; + * @return string + */ + public function getAttributeValue() + { + return $this->attribute_value; + } + + /** + * Can be one of: + * 1. The numerical field value. + * 2. The duration spec for freshness: + * The value must be formatted as an XSD `dayTimeDuration` value (a + * restricted subset of an ISO 8601 duration value). The pattern for + * this is: `[nD][T[nH][nM][nS]]`. + * + * Generated from protobuf field string attribute_value = 1; + * @param string $var + * @return $this + */ + public function setAttributeValue($var) + { + GPBUtil::checkString($var, True); + $this->attribute_value = $var; + + return $this; + } + + /** + * The value between -1 to 1 by which to boost the score if the + * attribute_value evaluates to the value specified above. + * + * Generated from protobuf field float boost_amount = 2; + * @return float + */ + public function getBoostAmount() + { + return $this->boost_amount; + } + + /** + * The value between -1 to 1 by which to boost the score if the + * attribute_value evaluates to the value specified above. + * + * Generated from protobuf field float boost_amount = 2; + * @param float $var + * @return $this + */ + public function setBoostAmount($var) + { + GPBUtil::checkFloat($var); + $this->boost_amount = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec/BoostControlSpec/InterpolationType.php b/DiscoveryEngine/src/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec/BoostControlSpec/InterpolationType.php new file mode 100644 index 000000000000..65646ec1786f --- /dev/null +++ b/DiscoveryEngine/src/V1beta/SearchRequest/BoostSpec/ConditionBoostSpec/BoostControlSpec/InterpolationType.php @@ -0,0 +1,57 @@ +google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType + */ +class InterpolationType +{ + /** + * Interpolation type is unspecified. In this case, it defaults to + * Linear. + * + * Generated from protobuf enum INTERPOLATION_TYPE_UNSPECIFIED = 0; + */ + const INTERPOLATION_TYPE_UNSPECIFIED = 0; + /** + * Piecewise linear interpolation will be applied. + * + * Generated from protobuf enum LINEAR = 1; + */ + const LINEAR = 1; + + private static $valueToName = [ + self::INTERPOLATION_TYPE_UNSPECIFIED => 'INTERPOLATION_TYPE_UNSPECIFIED', + self::LINEAR => 'LINEAR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec/ExtractiveContentSpec.php b/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec/ExtractiveContentSpec.php index b6c566a45f50..423d1797839b 100644 --- a/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec/ExtractiveContentSpec.php +++ b/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec/ExtractiveContentSpec.php @@ -53,9 +53,9 @@ class ExtractiveContentSpec extends \Google\Protobuf\Internal\Message protected $max_extractive_segment_count = 0; /** * Specifies whether to return the confidence score from the extractive - * segments in each search result. The default value is `false`. - * Note: this is a priavte preview feature and only works for allowlisted - * users, please reach out to Cloud Support team if you want to use it. + * segments in each search result. This feature is available only for new + * or allowlisted data stores. To allowlist your data store, + * contact your Customer Engineer. The default value is `false`. * * Generated from protobuf field bool return_extractive_segment_score = 3; */ @@ -112,9 +112,9 @@ class ExtractiveContentSpec extends \Google\Protobuf\Internal\Message * return the `max_extractive_segment_count`. * @type bool $return_extractive_segment_score * Specifies whether to return the confidence score from the extractive - * segments in each search result. The default value is `false`. - * Note: this is a priavte preview feature and only works for allowlisted - * users, please reach out to Cloud Support team if you want to use it. + * segments in each search result. This feature is available only for new + * or allowlisted data stores. To allowlist your data store, + * contact your Customer Engineer. The default value is `false`. * @type int $num_previous_segments * Specifies whether to also include the adjacent from each selected * segments. @@ -230,9 +230,9 @@ public function setMaxExtractiveSegmentCount($var) /** * Specifies whether to return the confidence score from the extractive - * segments in each search result. The default value is `false`. - * Note: this is a priavte preview feature and only works for allowlisted - * users, please reach out to Cloud Support team if you want to use it. + * segments in each search result. This feature is available only for new + * or allowlisted data stores. To allowlist your data store, + * contact your Customer Engineer. The default value is `false`. * * Generated from protobuf field bool return_extractive_segment_score = 3; * @return bool @@ -244,9 +244,9 @@ public function getReturnExtractiveSegmentScore() /** * Specifies whether to return the confidence score from the extractive - * segments in each search result. The default value is `false`. - * Note: this is a priavte preview feature and only works for allowlisted - * users, please reach out to Cloud Support team if you want to use it. + * segments in each search result. This feature is available only for new + * or allowlisted data stores. To allowlist your data store, + * contact your Customer Engineer. The default value is `false`. * * Generated from protobuf field bool return_extractive_segment_score = 3; * @param bool $var diff --git a/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec/SummarySpec.php b/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec/SummarySpec.php index c609f69d7e11..dab93e47d9a9 100644 --- a/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec/SummarySpec.php +++ b/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec/SummarySpec.php @@ -94,6 +94,17 @@ class SummarySpec extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; */ protected $model_spec = null; + /** + * If true, answer will be generated from most relevant chunks from top + * search results. This feature will improve summary quality. + * Note that with this feature enabled, not all top search results + * will be referenced and included in the reference list, so the citation + * source index only points to the search results listed in the reference + * list. + * + * Generated from protobuf field bool use_semantic_chunks = 8; + */ + protected $use_semantic_chunks = false; /** * Constructor. @@ -151,6 +162,13 @@ class SummarySpec extends \Google\Protobuf\Internal\Message * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchRequest\ContentSearchSpec\SummarySpec\ModelSpec $model_spec * If specified, the spec will be used to modify the model specification * provided to the LLM. + * @type bool $use_semantic_chunks + * If true, answer will be generated from most relevant chunks from top + * search results. This feature will improve summary quality. + * Note that with this feature enabled, not all top search results + * will be referenced and included in the reference list, so the citation + * source index only points to the search results listed in the reference + * list. * } */ public function __construct($data = NULL) { @@ -432,6 +450,42 @@ public function setModelSpec($var) return $this; } + /** + * If true, answer will be generated from most relevant chunks from top + * search results. This feature will improve summary quality. + * Note that with this feature enabled, not all top search results + * will be referenced and included in the reference list, so the citation + * source index only points to the search results listed in the reference + * list. + * + * Generated from protobuf field bool use_semantic_chunks = 8; + * @return bool + */ + public function getUseSemanticChunks() + { + return $this->use_semantic_chunks; + } + + /** + * If true, answer will be generated from most relevant chunks from top + * search results. This feature will improve summary quality. + * Note that with this feature enabled, not all top search results + * will be referenced and included in the reference list, so the citation + * source index only points to the search results listed in the reference + * list. + * + * Generated from protobuf field bool use_semantic_chunks = 8; + * @param bool $var + * @return $this + */ + public function setUseSemanticChunks($var) + { + GPBUtil::checkBool($var); + $this->use_semantic_chunks = $var; + + return $this; + } + } diff --git a/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec/SummarySpec/ModelSpec.php b/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec/SummarySpec/ModelSpec.php index fb0482167574..8086d8ef5ff9 100644 --- a/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec/SummarySpec/ModelSpec.php +++ b/DiscoveryEngine/src/V1beta/SearchRequest/ContentSearchSpec/SummarySpec/ModelSpec.php @@ -19,11 +19,13 @@ class ModelSpec extends \Google\Protobuf\Internal\Message * The model version used to generate the summary. * Supported values are: * * `stable`: string. Default value when no value is specified. Uses a - * generally available, fine-tuned version of the text-bison@001 - * model. - * * `preview`: string. (Public preview) Uses a fine-tuned version of - * the text-bison@002 model. This model works only for summaries in - * English. + * generally available, fine-tuned model. For more information, see + * [Answer generation model versions and + * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + * * `preview`: string. (Public preview) Uses a preview model. For more + * information, see + * [Answer generation model versions and + * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * * Generated from protobuf field string version = 1; */ @@ -39,11 +41,13 @@ class ModelSpec extends \Google\Protobuf\Internal\Message * The model version used to generate the summary. * Supported values are: * * `stable`: string. Default value when no value is specified. Uses a - * generally available, fine-tuned version of the text-bison@001 - * model. - * * `preview`: string. (Public preview) Uses a fine-tuned version of - * the text-bison@002 model. This model works only for summaries in - * English. + * generally available, fine-tuned model. For more information, see + * [Answer generation model versions and + * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + * * `preview`: string. (Public preview) Uses a preview model. For more + * information, see + * [Answer generation model versions and + * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * } */ public function __construct($data = NULL) { @@ -55,11 +59,13 @@ public function __construct($data = NULL) { * The model version used to generate the summary. * Supported values are: * * `stable`: string. Default value when no value is specified. Uses a - * generally available, fine-tuned version of the text-bison@001 - * model. - * * `preview`: string. (Public preview) Uses a fine-tuned version of - * the text-bison@002 model. This model works only for summaries in - * English. + * generally available, fine-tuned model. For more information, see + * [Answer generation model versions and + * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + * * `preview`: string. (Public preview) Uses a preview model. For more + * information, see + * [Answer generation model versions and + * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * * Generated from protobuf field string version = 1; * @return string @@ -73,11 +79,13 @@ public function getVersion() * The model version used to generate the summary. * Supported values are: * * `stable`: string. Default value when no value is specified. Uses a - * generally available, fine-tuned version of the text-bison@001 - * model. - * * `preview`: string. (Public preview) Uses a fine-tuned version of - * the text-bison@002 model. This model works only for summaries in - * English. + * generally available, fine-tuned model. For more information, see + * [Answer generation model versions and + * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + * * `preview`: string. (Public preview) Uses a preview model. For more + * information, see + * [Answer generation model versions and + * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * * Generated from protobuf field string version = 1; * @param string $var diff --git a/DiscoveryEngine/src/V1beta/SearchResponse.php b/DiscoveryEngine/src/V1beta/SearchResponse.php index 1aaf5691a5a6..1e67a1346e68 100644 --- a/DiscoveryEngine/src/V1beta/SearchResponse.php +++ b/DiscoveryEngine/src/V1beta/SearchResponse.php @@ -98,6 +98,13 @@ class SearchResponse extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated string applied_controls = 10; */ private $applied_controls; + /** + * Debug information specifically related to forward geocoding issues arising + * from Geolocation Search. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + */ + private $geo_search_debug_info; /** * Query expansion information for the returned results. * @@ -152,6 +159,9 @@ class SearchResponse extends \Google\Protobuf\Internal\Message * is set. * @type array|\Google\Protobuf\Internal\RepeatedField $applied_controls * Controls applied as part of the Control service. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\GeoSearchDebugInfo>|\Google\Protobuf\Internal\RepeatedField $geo_search_debug_info + * Debug information specifically related to forward geocoding issues arising + * from Geolocation Search. * @type \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\QueryExpansionInfo $query_expansion_info * Query expansion information for the returned results. * } @@ -483,6 +493,34 @@ public function setAppliedControls($var) return $this; } + /** + * Debug information specifically related to forward geocoding issues arising + * from Geolocation Search. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getGeoSearchDebugInfo() + { + return $this->geo_search_debug_info; + } + + /** + * Debug information specifically related to forward geocoding issues arising + * from Geolocation Search. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.GeoSearchDebugInfo geo_search_debug_info = 16; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\GeoSearchDebugInfo>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setGeoSearchDebugInfo($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\GeoSearchDebugInfo::class); + $this->geo_search_debug_info = $arr; + + return $this; + } + /** * Query expansion information for the returned results. * diff --git a/DiscoveryEngine/src/V1beta/SearchResponse/GeoSearchDebugInfo.php b/DiscoveryEngine/src/V1beta/SearchResponse/GeoSearchDebugInfo.php new file mode 100644 index 000000000000..bff5ce1f4139 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/SearchResponse/GeoSearchDebugInfo.php @@ -0,0 +1,103 @@ +google.cloud.discoveryengine.v1beta.SearchResponse.GeoSearchDebugInfo + */ +class GeoSearchDebugInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The address from which forward geocoding ingestion produced issues. + * + * Generated from protobuf field string original_address_query = 1; + */ + protected $original_address_query = ''; + /** + * The error produced. + * + * Generated from protobuf field string error_message = 2; + */ + protected $error_message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $original_address_query + * The address from which forward geocoding ingestion produced issues. + * @type string $error_message + * The error produced. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * The address from which forward geocoding ingestion produced issues. + * + * Generated from protobuf field string original_address_query = 1; + * @return string + */ + public function getOriginalAddressQuery() + { + return $this->original_address_query; + } + + /** + * The address from which forward geocoding ingestion produced issues. + * + * Generated from protobuf field string original_address_query = 1; + * @param string $var + * @return $this + */ + public function setOriginalAddressQuery($var) + { + GPBUtil::checkString($var, True); + $this->original_address_query = $var; + + return $this; + } + + /** + * The error produced. + * + * Generated from protobuf field string error_message = 2; + * @return string + */ + public function getErrorMessage() + { + return $this->error_message; + } + + /** + * The error produced. + * + * Generated from protobuf field string error_message = 2; + * @param string $var + * @return $this + */ + public function setErrorMessage($var) + { + GPBUtil::checkString($var, True); + $this->error_message = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/SearchResponse/Summary/Reference.php b/DiscoveryEngine/src/V1beta/SearchResponse/Summary/Reference.php index f48493de6dd8..82513278b95a 100644 --- a/DiscoveryEngine/src/V1beta/SearchResponse/Summary/Reference.php +++ b/DiscoveryEngine/src/V1beta/SearchResponse/Summary/Reference.php @@ -37,6 +37,12 @@ class Reference extends \Google\Protobuf\Internal\Message * Generated from protobuf field string uri = 3; */ protected $uri = ''; + /** + * List of cited chunk contents derived from document content. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + */ + private $chunk_contents; /** * Constructor. @@ -54,6 +60,8 @@ class Reference extends \Google\Protobuf\Internal\Message * `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. * @type string $uri * Cloud Storage or HTTP uri for the document. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Summary\Reference\ChunkContent>|\Google\Protobuf\Internal\RepeatedField $chunk_contents + * List of cited chunk contents derived from document content. * } */ public function __construct($data = NULL) { @@ -147,6 +155,32 @@ public function setUri($var) return $this; } + /** + * List of cited chunk contents derived from document content. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChunkContents() + { + return $this->chunk_contents; + } + + /** + * List of cited chunk contents derived from document content. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Summary\Reference\ChunkContent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChunkContents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\SearchResponse\Summary\Reference\ChunkContent::class); + $this->chunk_contents = $arr; + + return $this; + } + } diff --git a/DiscoveryEngine/src/V1beta/SearchResponse/Summary/Reference/ChunkContent.php b/DiscoveryEngine/src/V1beta/SearchResponse/Summary/Reference/ChunkContent.php new file mode 100644 index 000000000000..0a3d9f11f8cf --- /dev/null +++ b/DiscoveryEngine/src/V1beta/SearchResponse/Summary/Reference/ChunkContent.php @@ -0,0 +1,102 @@ +google.cloud.discoveryengine.v1beta.SearchResponse.Summary.Reference.ChunkContent + */ +class ChunkContent extends \Google\Protobuf\Internal\Message +{ + /** + * Chunk textual content. + * + * Generated from protobuf field string content = 1; + */ + protected $content = ''; + /** + * Page identifier. + * + * Generated from protobuf field string page_identifier = 2; + */ + protected $page_identifier = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $content + * Chunk textual content. + * @type string $page_identifier + * Page identifier. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * Chunk textual content. + * + * Generated from protobuf field string content = 1; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Chunk textual content. + * + * Generated from protobuf field string content = 1; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, True); + $this->content = $var; + + return $this; + } + + /** + * Page identifier. + * + * Generated from protobuf field string page_identifier = 2; + * @return string + */ + public function getPageIdentifier() + { + return $this->page_identifier; + } + + /** + * Page identifier. + * + * Generated from protobuf field string page_identifier = 2; + * @param string $var + * @return $this + */ + public function setPageIdentifier($var) + { + GPBUtil::checkString($var, True); + $this->page_identifier = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/SearchTier.php b/DiscoveryEngine/src/V1beta/SearchTier.php index 6ba5ab1b225d..dc68add23ef7 100644 --- a/DiscoveryEngine/src/V1beta/SearchTier.php +++ b/DiscoveryEngine/src/V1beta/SearchTier.php @@ -8,7 +8,7 @@ /** * Tiers of search features. Different tiers might have different - * pricing. To learn more, please check the pricing documentation. + * pricing. To learn more, check the pricing documentation. * * Protobuf type google.cloud.discoveryengine.v1beta.SearchTier */ diff --git a/DiscoveryEngine/src/V1beta/Session.php b/DiscoveryEngine/src/V1beta/Session.php new file mode 100644 index 000000000000..df40eb9f8f52 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Session.php @@ -0,0 +1,261 @@ +google.cloud.discoveryengine.v1beta.Session + */ +class Session extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Fully qualified name + * `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * The state of the session. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Session.State state = 2; + */ + protected $state = 0; + /** + * A unique identifier for tracking users. + * + * Generated from protobuf field string user_pseudo_id = 3; + */ + protected $user_pseudo_id = ''; + /** + * Turns. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Session.Turn turns = 4; + */ + private $turns; + /** + * Output only. The time the session started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. The time the session finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. Fully qualified name + * `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*` + * @type int $state + * The state of the session. + * @type string $user_pseudo_id + * A unique identifier for tracking users. + * @type array<\Google\Cloud\DiscoveryEngine\V1beta\Session\Turn>|\Google\Protobuf\Internal\RepeatedField $turns + * Turns. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. The time the session started. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the session finished. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Session::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Fully qualified name + * `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. Fully qualified name + * `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The state of the session. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Session.State state = 2; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of the session. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Session.State state = 2; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1beta\Session\State::class); + $this->state = $var; + + return $this; + } + + /** + * A unique identifier for tracking users. + * + * Generated from protobuf field string user_pseudo_id = 3; + * @return string + */ + public function getUserPseudoId() + { + return $this->user_pseudo_id; + } + + /** + * A unique identifier for tracking users. + * + * Generated from protobuf field string user_pseudo_id = 3; + * @param string $var + * @return $this + */ + public function setUserPseudoId($var) + { + GPBUtil::checkString($var, True); + $this->user_pseudo_id = $var; + + return $this; + } + + /** + * Turns. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Session.Turn turns = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTurns() + { + return $this->turns; + } + + /** + * Turns. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1beta.Session.Turn turns = 4; + * @param array<\Google\Cloud\DiscoveryEngine\V1beta\Session\Turn>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTurns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1beta\Session\Turn::class); + $this->turns = $arr; + + return $this; + } + + /** + * Output only. The time the session started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Output only. The time the session started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. The time the session finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.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 session finished. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.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; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/Session/State.php b/DiscoveryEngine/src/V1beta/Session/State.php new file mode 100644 index 000000000000..bcb0078a0141 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Session/State.php @@ -0,0 +1,55 @@ +google.cloud.discoveryengine.v1beta.Session.State + */ +class State +{ + /** + * State is unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The session is currently open. + * + * Generated from protobuf enum IN_PROGRESS = 1; + */ + const IN_PROGRESS = 1; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::IN_PROGRESS => 'IN_PROGRESS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/DiscoveryEngine/src/V1beta/Session/Turn.php b/DiscoveryEngine/src/V1beta/Session/Turn.php new file mode 100644 index 000000000000..7cbb8b7cc0e3 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/Session/Turn.php @@ -0,0 +1,113 @@ +google.cloud.discoveryengine.v1beta.Session.Turn + */ +class Turn extends \Google\Protobuf\Internal\Message +{ + /** + * The user query. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Query query = 1; + */ + protected $query = null; + /** + * The resource name of the answer to the user query. + * + * Generated from protobuf field string answer = 2 [(.google.api.resource_reference) = { + */ + protected $answer = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DiscoveryEngine\V1beta\Query $query + * The user query. + * @type string $answer + * The resource name of the answer to the user query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\Session::initOnce(); + parent::__construct($data); + } + + /** + * The user query. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Query query = 1; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Query|null + */ + public function getQuery() + { + return $this->query; + } + + public function hasQuery() + { + return isset($this->query); + } + + public function clearQuery() + { + unset($this->query); + } + + /** + * The user query. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Query query = 1; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Query $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Query::class); + $this->query = $var; + + return $this; + } + + /** + * The resource name of the answer to the user query. + * + * Generated from protobuf field string answer = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getAnswer() + { + return $this->answer; + } + + /** + * The resource name of the answer to the user query. + * + * Generated from protobuf field string answer = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAnswer($var) + { + GPBUtil::checkString($var, True); + $this->answer = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1beta/SolutionType.php b/DiscoveryEngine/src/V1beta/SolutionType.php index 3907c2b3e837..50df25c6a337 100644 --- a/DiscoveryEngine/src/V1beta/SolutionType.php +++ b/DiscoveryEngine/src/V1beta/SolutionType.php @@ -37,12 +37,21 @@ class SolutionType * Generated from protobuf enum SOLUTION_TYPE_CHAT = 3; */ const SOLUTION_TYPE_CHAT = 3; + /** + * Used for use cases related to the Generative Chat agent. + * It's used for Generative chat engine only, the associated data stores + * must enrolled with `SOLUTION_TYPE_CHAT` solution. + * + * Generated from protobuf enum SOLUTION_TYPE_GENERATIVE_CHAT = 4; + */ + const SOLUTION_TYPE_GENERATIVE_CHAT = 4; private static $valueToName = [ self::SOLUTION_TYPE_UNSPECIFIED => 'SOLUTION_TYPE_UNSPECIFIED', self::SOLUTION_TYPE_RECOMMENDATION => 'SOLUTION_TYPE_RECOMMENDATION', self::SOLUTION_TYPE_SEARCH => 'SOLUTION_TYPE_SEARCH', self::SOLUTION_TYPE_CHAT => 'SOLUTION_TYPE_CHAT', + self::SOLUTION_TYPE_GENERATIVE_CHAT => 'SOLUTION_TYPE_GENERATIVE_CHAT', ]; public static function name($value) diff --git a/DiscoveryEngine/src/V1beta/SpannerSource.php b/DiscoveryEngine/src/V1beta/SpannerSource.php new file mode 100644 index 000000000000..d8bad5a54ec4 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/SpannerSource.php @@ -0,0 +1,219 @@ +google.cloud.discoveryengine.v1beta.SpannerSource + */ +class SpannerSource extends \Google\Protobuf\Internal\Message +{ + /** + * The project ID that the Spanner source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * + * Generated from protobuf field string project_id = 1; + */ + protected $project_id = ''; + /** + * Required. The instance ID of the source Spanner table. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance_id = ''; + /** + * Required. The database ID of the source Spanner table. + * + * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database_id = ''; + /** + * Required. The table name of the Spanner database that needs to be imported. + * + * Generated from protobuf field string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $table_id = ''; + /** + * Whether to apply data boost on Spanner export. Enabling this option will + * incur additional cost. More info can be found + * [here](https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas). + * + * Generated from protobuf field bool enable_data_boost = 5; + */ + protected $enable_data_boost = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * The project ID that the Spanner source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * @type string $instance_id + * Required. The instance ID of the source Spanner table. + * @type string $database_id + * Required. The database ID of the source Spanner table. + * @type string $table_id + * Required. The table name of the Spanner database that needs to be imported. + * @type bool $enable_data_boost + * Whether to apply data boost on Spanner export. Enabling this option will + * incur additional cost. More info can be found + * [here](https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * The project ID that the Spanner source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * + * Generated from protobuf field string project_id = 1; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * The project ID that the Spanner source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * + * Generated from protobuf field string project_id = 1; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * Required. The instance ID of the source Spanner table. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstanceId() + { + return $this->instance_id; + } + + /** + * Required. The instance ID of the source Spanner table. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->instance_id = $var; + + return $this; + } + + /** + * Required. The database ID of the source Spanner table. + * + * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabaseId() + { + return $this->database_id; + } + + /** + * Required. The database ID of the source Spanner table. + * + * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabaseId($var) + { + GPBUtil::checkString($var, True); + $this->database_id = $var; + + return $this; + } + + /** + * Required. The table name of the Spanner database that needs to be imported. + * + * Generated from protobuf field string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTableId() + { + return $this->table_id; + } + + /** + * Required. The table name of the Spanner database that needs to be imported. + * + * Generated from protobuf field string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTableId($var) + { + GPBUtil::checkString($var, True); + $this->table_id = $var; + + return $this; + } + + /** + * Whether to apply data boost on Spanner export. Enabling this option will + * incur additional cost. More info can be found + * [here](https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas). + * + * Generated from protobuf field bool enable_data_boost = 5; + * @return bool + */ + public function getEnableDataBoost() + { + return $this->enable_data_boost; + } + + /** + * Whether to apply data boost on Spanner export. Enabling this option will + * incur additional cost. More info can be found + * [here](https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas). + * + * Generated from protobuf field bool enable_data_boost = 5; + * @param bool $var + * @return $this + */ + public function setEnableDataBoost($var) + { + GPBUtil::checkBool($var); + $this->enable_data_boost = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/TrainCustomModelResponse.php b/DiscoveryEngine/src/V1beta/TrainCustomModelResponse.php index b90522d67aaf..fa87d6899ca2 100644 --- a/DiscoveryEngine/src/V1beta/TrainCustomModelResponse.php +++ b/DiscoveryEngine/src/V1beta/TrainCustomModelResponse.php @@ -33,12 +33,21 @@ class TrainCustomModelResponse extends \Google\Protobuf\Internal\Message * The trained model status. Possible values are: * * **bad-data**: The training data quality is bad. * * **no-improvement**: Tuning didn't improve performance. Won't deploy. - * * **in-progress**: Model training is in progress. + * * **in-progress**: Model training job creation is in progress. + * * **training**: Model is actively training. + * * **evaluating**: The model is evaluating trained metrics. + * * **indexing**: The model trained metrics are indexing. * * **ready**: The model is ready for serving. * * Generated from protobuf field string model_status = 3; */ protected $model_status = ''; + /** + * The metrics of the trained model. + * + * Generated from protobuf field map metrics = 4; + */ + private $metrics; /** * Constructor. @@ -54,8 +63,13 @@ class TrainCustomModelResponse extends \Google\Protobuf\Internal\Message * The trained model status. Possible values are: * * **bad-data**: The training data quality is bad. * * **no-improvement**: Tuning didn't improve performance. Won't deploy. - * * **in-progress**: Model training is in progress. + * * **in-progress**: Model training job creation is in progress. + * * **training**: Model is actively training. + * * **evaluating**: The model is evaluating trained metrics. + * * **indexing**: The model trained metrics are indexing. * * **ready**: The model is ready for serving. + * @type array|\Google\Protobuf\Internal\MapField $metrics + * The metrics of the trained model. * } */ public function __construct($data = NULL) { @@ -129,7 +143,10 @@ public function setErrorConfig($var) * The trained model status. Possible values are: * * **bad-data**: The training data quality is bad. * * **no-improvement**: Tuning didn't improve performance. Won't deploy. - * * **in-progress**: Model training is in progress. + * * **in-progress**: Model training job creation is in progress. + * * **training**: Model is actively training. + * * **evaluating**: The model is evaluating trained metrics. + * * **indexing**: The model trained metrics are indexing. * * **ready**: The model is ready for serving. * * Generated from protobuf field string model_status = 3; @@ -144,7 +161,10 @@ public function getModelStatus() * The trained model status. Possible values are: * * **bad-data**: The training data quality is bad. * * **no-improvement**: Tuning didn't improve performance. Won't deploy. - * * **in-progress**: Model training is in progress. + * * **in-progress**: Model training job creation is in progress. + * * **training**: Model is actively training. + * * **evaluating**: The model is evaluating trained metrics. + * * **indexing**: The model trained metrics are indexing. * * **ready**: The model is ready for serving. * * Generated from protobuf field string model_status = 3; @@ -159,5 +179,31 @@ public function setModelStatus($var) return $this; } + /** + * The metrics of the trained model. + * + * Generated from protobuf field map metrics = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetrics() + { + return $this->metrics; + } + + /** + * The metrics of the trained model. + * + * Generated from protobuf field map metrics = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMetrics($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::DOUBLE); + $this->metrics = $arr; + + return $this; + } + } diff --git a/DiscoveryEngine/src/V1beta/TuneEngineMetadata.php b/DiscoveryEngine/src/V1beta/TuneEngineMetadata.php new file mode 100644 index 000000000000..e504a603ee5d --- /dev/null +++ b/DiscoveryEngine/src/V1beta/TuneEngineMetadata.php @@ -0,0 +1,75 @@ +google.cloud.discoveryengine.v1beta.TuneEngineMetadata + */ +class TuneEngineMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the engine that this tune applies to. + * Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}` + * + * Generated from protobuf field string engine = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $engine = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $engine + * Required. The resource name of the engine that this tune applies to. + * Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\EngineService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the engine that this tune applies to. + * Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}` + * + * Generated from protobuf field string engine = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getEngine() + { + return $this->engine; + } + + /** + * Required. The resource name of the engine that this tune applies to. + * Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}` + * + * Generated from protobuf field string engine = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEngine($var) + { + GPBUtil::checkString($var, True); + $this->engine = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/TuneEngineRequest.php b/DiscoveryEngine/src/V1beta/TuneEngineRequest.php new file mode 100644 index 000000000000..66274a85d98b --- /dev/null +++ b/DiscoveryEngine/src/V1beta/TuneEngineRequest.php @@ -0,0 +1,92 @@ +google.cloud.discoveryengine.v1beta.TuneEngineRequest + */ +class TuneEngineRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the engine to tune. + * Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the engine to tune. + * Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}` + * Please see {@see EngineServiceClient::engineName()} for help formatting this field. + * + * @return \Google\Cloud\DiscoveryEngine\V1beta\TuneEngineRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the engine to tune. + * Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\EngineService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the engine to tune. + * Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the engine to tune. + * Format: + * `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/TuneEngineResponse.php b/DiscoveryEngine/src/V1beta/TuneEngineResponse.php new file mode 100644 index 000000000000..ac69fba402a3 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/TuneEngineResponse.php @@ -0,0 +1,33 @@ +google.cloud.discoveryengine.v1beta.TuneEngineResponse + */ +class TuneEngineResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\EngineService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/DiscoveryEngine/src/V1beta/UpdateDocumentRequest.php b/DiscoveryEngine/src/V1beta/UpdateDocumentRequest.php index 7911356efc97..2e3d2735260d 100644 --- a/DiscoveryEngine/src/V1beta/UpdateDocumentRequest.php +++ b/DiscoveryEngine/src/V1beta/UpdateDocumentRequest.php @@ -39,6 +39,38 @@ class UpdateDocumentRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field bool allow_missing = 2; */ protected $allow_missing = false; + /** + * Indicates which fields in the provided imported 'document' to update. If + * not set, will by default update all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\DiscoveryEngine\V1beta\Document $document Required. The document to update/create. + * + * If the caller does not have permission to update the + * [Document][google.cloud.discoveryengine.v1beta.Document], regardless of + * whether or not it exists, a `PERMISSION_DENIED` error is returned. + * + * If the [Document][google.cloud.discoveryengine.v1beta.Document] to update + * does not exist and + * [allow_missing][google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.allow_missing] + * is not set, a `NOT_FOUND` error is returned. + * @param \Google\Protobuf\FieldMask $updateMask Indicates which fields in the provided imported 'document' to update. If + * not set, will by default update all fields. + * + * @return \Google\Cloud\DiscoveryEngine\V1beta\UpdateDocumentRequest + * + * @experimental + */ + public static function build(\Google\Cloud\DiscoveryEngine\V1beta\Document $document, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setDocument($document) + ->setUpdateMask($updateMask); + } /** * Constructor. @@ -60,6 +92,9 @@ class UpdateDocumentRequest extends \Google\Protobuf\Internal\Message * [Document][google.cloud.discoveryengine.v1beta.Document] is not found, a * new [Document][google.cloud.discoveryengine.v1beta.Document] will be * created. + * @type \Google\Protobuf\FieldMask $update_mask + * Indicates which fields in the provided imported 'document' to update. If + * not set, will by default update all fields. * } */ public function __construct($data = NULL) { @@ -149,5 +184,43 @@ public function setAllowMissing($var) return $this; } + /** + * Indicates which fields in the provided imported 'document' to update. If + * not set, will by default update all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Indicates which fields in the provided imported 'document' to update. If + * not set, will by default update all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + } diff --git a/DiscoveryEngine/src/V1beta/UpdateSessionRequest.php b/DiscoveryEngine/src/V1beta/UpdateSessionRequest.php new file mode 100644 index 000000000000..a179501aae78 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/UpdateSessionRequest.php @@ -0,0 +1,158 @@ +google.cloud.discoveryengine.v1beta.UpdateSessionRequest + */ +class UpdateSessionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Session to update. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Session session = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $session = null; + /** + * Indicates which fields in the provided + * [Session][google.cloud.discoveryengine.v1beta.Session] to update. The + * following are NOT supported: + * * [Session.name][google.cloud.discoveryengine.v1beta.Session.name] + * If not set or empty, all supported fields are updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\DiscoveryEngine\V1beta\Session $session Required. The Session to update. + * @param \Google\Protobuf\FieldMask $updateMask Indicates which fields in the provided + * [Session][google.cloud.discoveryengine.v1beta.Session] to update. The + * following are NOT supported: + * + * * [Session.name][google.cloud.discoveryengine.v1beta.Session.name] + * + * If not set or empty, all supported fields are updated. + * + * @return \Google\Cloud\DiscoveryEngine\V1beta\UpdateSessionRequest + * + * @experimental + */ + public static function build(\Google\Cloud\DiscoveryEngine\V1beta\Session $session, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSession($session) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\DiscoveryEngine\V1beta\Session $session + * Required. The Session to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Indicates which fields in the provided + * [Session][google.cloud.discoveryengine.v1beta.Session] to update. The + * following are NOT supported: + * * [Session.name][google.cloud.discoveryengine.v1beta.Session.name] + * If not set or empty, all supported fields are updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ConversationalSearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Session to update. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Session session = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DiscoveryEngine\V1beta\Session|null + */ + public function getSession() + { + return $this->session; + } + + public function hasSession() + { + return isset($this->session); + } + + public function clearSession() + { + unset($this->session); + } + + /** + * Required. The Session to update. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1beta.Session session = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DiscoveryEngine\V1beta\Session $var + * @return $this + */ + public function setSession($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\Session::class); + $this->session = $var; + + return $this; + } + + /** + * Indicates which fields in the provided + * [Session][google.cloud.discoveryengine.v1beta.Session] to update. The + * following are NOT supported: + * * [Session.name][google.cloud.discoveryengine.v1beta.Session.name] + * If not set or empty, all supported fields are updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Indicates which fields in the provided + * [Session][google.cloud.discoveryengine.v1beta.Session] to update. The + * following are NOT supported: + * * [Session.name][google.cloud.discoveryengine.v1beta.Session.name] + * If not set or empty, all supported fields are updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1beta/gapic_metadata.json b/DiscoveryEngine/src/V1beta/gapic_metadata.json index b07f27896df8..e094dec882e0 100644 --- a/DiscoveryEngine/src/V1beta/gapic_metadata.json +++ b/DiscoveryEngine/src/V1beta/gapic_metadata.json @@ -48,6 +48,11 @@ "grpc": { "libraryClient": "ConversationalSearchServiceGapicClient", "rpcs": { + "AnswerQuery": { + "methods": [ + "answerQuery" + ] + }, "ConverseConversation": { "methods": [ "converseConversation" @@ -58,25 +63,55 @@ "createConversation" ] }, + "CreateSession": { + "methods": [ + "createSession" + ] + }, "DeleteConversation": { "methods": [ "deleteConversation" ] }, + "DeleteSession": { + "methods": [ + "deleteSession" + ] + }, + "GetAnswer": { + "methods": [ + "getAnswer" + ] + }, "GetConversation": { "methods": [ "getConversation" ] }, + "GetSession": { + "methods": [ + "getSession" + ] + }, "ListConversations": { "methods": [ "listConversations" ] }, + "ListSessions": { + "methods": [ + "listSessions" + ] + }, "UpdateConversation": { "methods": [ "updateConversation" ] + }, + "UpdateSession": { + "methods": [ + "updateSession" + ] } } } @@ -185,6 +220,21 @@ "listEngines" ] }, + "PauseEngine": { + "methods": [ + "pauseEngine" + ] + }, + "ResumeEngine": { + "methods": [ + "resumeEngine" + ] + }, + "TuneEngine": { + "methods": [ + "tuneEngine" + ] + }, "UpdateEngine": { "methods": [ "updateEngine" @@ -194,6 +244,34 @@ } } }, + "GroundedGenerationService": { + "clients": { + "grpc": { + "libraryClient": "GroundedGenerationServiceGapicClient", + "rpcs": { + "CheckGrounding": { + "methods": [ + "checkGrounding" + ] + } + } + } + } + }, + "RankService": { + "clients": { + "grpc": { + "libraryClient": "RankServiceGapicClient", + "rpcs": { + "Rank": { + "methods": [ + "rank" + ] + } + } + } + } + }, "RecommendationService": { "clients": { "grpc": { diff --git a/DiscoveryEngine/src/V1beta/resources/conversational_search_service_client_config.json b/DiscoveryEngine/src/V1beta/resources/conversational_search_service_client_config.json index d445301cc989..f3ab901aa4dc 100644 --- a/DiscoveryEngine/src/V1beta/resources/conversational_search_service_client_config.json +++ b/DiscoveryEngine/src/V1beta/resources/conversational_search_service_client_config.json @@ -28,6 +28,11 @@ } }, "methods": { + "AnswerQuery": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, "ConverseConversation": { "timeout_millis": 30000, "retry_codes_name": "retry_policy_2_codes", @@ -38,25 +43,55 @@ "retry_codes_name": "retry_policy_2_codes", "retry_params_name": "retry_policy_2_params" }, + "CreateSession": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, "DeleteConversation": { "timeout_millis": 30000, "retry_codes_name": "retry_policy_2_codes", "retry_params_name": "retry_policy_2_params" }, + "DeleteSession": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "GetAnswer": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, "GetConversation": { "timeout_millis": 30000, "retry_codes_name": "retry_policy_2_codes", "retry_params_name": "retry_policy_2_params" }, + "GetSession": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, "ListConversations": { "timeout_millis": 30000, "retry_codes_name": "retry_policy_2_codes", "retry_params_name": "retry_policy_2_params" }, + "ListSessions": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, "UpdateConversation": { "timeout_millis": 30000, "retry_codes_name": "retry_policy_2_codes", "retry_params_name": "retry_policy_2_params" + }, + "UpdateSession": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" } } } diff --git a/DiscoveryEngine/src/V1beta/resources/conversational_search_service_descriptor_config.php b/DiscoveryEngine/src/V1beta/resources/conversational_search_service_descriptor_config.php index 1c0fb8b327e0..412cf19f4087 100644 --- a/DiscoveryEngine/src/V1beta/resources/conversational_search_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1beta/resources/conversational_search_service_descriptor_config.php @@ -3,6 +3,18 @@ return [ 'interfaces' => [ 'google.cloud.discoveryengine.v1beta.ConversationalSearchService' => [ + 'AnswerQuery' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryResponse', + 'headerParams' => [ + [ + 'keyName' => 'serving_config', + 'fieldAccessors' => [ + 'getServingConfig', + ], + ], + ], + ], 'ConverseConversation' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\ConverseConversationResponse', @@ -27,6 +39,18 @@ ], ], ], + 'CreateSession' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\Session', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], 'DeleteConversation' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Protobuf\GPBEmpty', @@ -39,6 +63,30 @@ ], ], ], + 'DeleteSession' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetAnswer' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\Answer', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], 'GetConversation' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\Conversation', @@ -51,6 +99,18 @@ ], ], ], + 'GetSession' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\Session', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], 'ListConversations' => [ 'pageStreaming' => [ 'requestPageTokenGetMethod' => 'getPageToken', @@ -71,6 +131,26 @@ ], ], ], + 'ListSessions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSessions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\ListSessionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], 'UpdateConversation' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\Conversation', @@ -84,21 +164,45 @@ ], ], ], + 'UpdateSession' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\Session', + 'headerParams' => [ + [ + 'keyName' => 'session.name', + 'fieldAccessors' => [ + 'getSession', + 'getName', + ], + ], + ], + ], 'templateMap' => [ + 'answer' => 'projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer}', + 'chunk' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}', 'conversation' => 'projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}', 'dataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', 'document' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', 'projectLocationCollectionDataStore' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}', 'projectLocationCollectionDataStoreBranchDocument' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}', + 'projectLocationCollectionDataStoreBranchDocumentChunk' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}', 'projectLocationCollectionDataStoreConversation' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}', 'projectLocationCollectionDataStoreServingConfig' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}', + 'projectLocationCollectionDataStoreSession' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}', + 'projectLocationCollectionDataStoreSessionAnswer' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}/answers/{answer}', 'projectLocationCollectionEngineConversation' => 'projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/conversations/{conversation}', 'projectLocationCollectionEngineServingConfig' => 'projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}', + 'projectLocationCollectionEngineSession' => 'projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}', + 'projectLocationCollectionEngineSessionAnswer' => 'projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/answers/{answer}', 'projectLocationDataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', 'projectLocationDataStoreBranchDocument' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', + 'projectLocationDataStoreBranchDocumentChunk' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}', 'projectLocationDataStoreConversation' => 'projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}', 'projectLocationDataStoreServingConfig' => 'projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}', + 'projectLocationDataStoreSession' => 'projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}', + 'projectLocationDataStoreSessionAnswer' => 'projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer}', 'servingConfig' => 'projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}', + 'session' => 'projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}', ], ], ], diff --git a/DiscoveryEngine/src/V1beta/resources/conversational_search_service_rest_client_config.php b/DiscoveryEngine/src/V1beta/resources/conversational_search_service_rest_client_config.php index dbc29a054796..68d54c88178c 100644 --- a/DiscoveryEngine/src/V1beta/resources/conversational_search_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1beta/resources/conversational_search_service_rest_client_config.php @@ -3,6 +3,30 @@ return [ 'interfaces' => [ 'google.cloud.discoveryengine.v1beta.ConversationalSearchService' => [ + 'AnswerQuery' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:answer', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:answer', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:answer', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'serving_config' => [ + 'getters' => [ + 'getServingConfig', + ], + ], + ], + ], 'ConverseConversation' => [ 'method' => 'post', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/conversations/*}:converse', @@ -51,6 +75,30 @@ ], ], ], + 'CreateSession' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/dataStores/*}/sessions', + 'body' => 'session', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/sessions', + 'body' => 'session', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/collections/*/engines/*}/sessions', + 'body' => 'session', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], 'DeleteConversation' => [ 'method' => 'delete', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/conversations/*}', @@ -72,6 +120,48 @@ ], ], ], + 'DeleteSession' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/sessions/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAnswer' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/sessions/*/answers/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*/answers/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/sessions/*/answers/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'GetConversation' => [ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/conversations/*}', @@ -93,6 +183,27 @@ ], ], ], + 'GetSession' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/sessions/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'ListConversations' => [ 'method' => 'get', 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/dataStores/*}/conversations', @@ -114,6 +225,27 @@ ], ], ], + 'ListSessions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/dataStores/*}/sessions', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/sessions', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*/collections/*/engines/*}/sessions', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], 'UpdateConversation' => [ 'method' => 'patch', 'uriTemplate' => '/v1beta/{conversation.name=projects/*/locations/*/dataStores/*/conversations/*}', @@ -139,6 +271,31 @@ ], ], ], + 'UpdateSession' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1beta/{session.name=projects/*/locations/*/dataStores/*/sessions/*}', + 'body' => 'session', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1beta/{session.name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}', + 'body' => 'session', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v1beta/{session.name=projects/*/locations/*/collections/*/engines/*/sessions/*}', + 'body' => 'session', + ], + ], + 'placeholders' => [ + 'session.name' => [ + 'getters' => [ + 'getSession', + 'getName', + ], + ], + ], + ], ], 'google.longrunning.Operations' => [ 'GetOperation' => [ diff --git a/DiscoveryEngine/src/V1beta/resources/document_service_descriptor_config.php b/DiscoveryEngine/src/V1beta/resources/document_service_descriptor_config.php index 743e3dc11bb5..3e12383407af 100644 --- a/DiscoveryEngine/src/V1beta/resources/document_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1beta/resources/document_service_descriptor_config.php @@ -113,6 +113,7 @@ 'templateMap' => [ 'branch' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}', 'document' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', + 'fhirStore' => 'projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}', 'projectLocationCollectionDataStoreBranch' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}', 'projectLocationCollectionDataStoreBranchDocument' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}', 'projectLocationDataStoreBranch' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}', diff --git a/DiscoveryEngine/src/V1beta/resources/engine_service_client_config.json b/DiscoveryEngine/src/V1beta/resources/engine_service_client_config.json index 77a977f91c28..720de138f1d8 100644 --- a/DiscoveryEngine/src/V1beta/resources/engine_service_client_config.json +++ b/DiscoveryEngine/src/V1beta/resources/engine_service_client_config.json @@ -36,6 +36,21 @@ "retry_codes_name": "no_retry_codes", "retry_params_name": "no_retry_params" }, + "PauseEngine": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ResumeEngine": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "TuneEngine": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, "UpdateEngine": { "timeout_millis": 60000, "retry_codes_name": "no_retry_codes", diff --git a/DiscoveryEngine/src/V1beta/resources/engine_service_descriptor_config.php b/DiscoveryEngine/src/V1beta/resources/engine_service_descriptor_config.php index 315e0d9484cf..8b663cad10fa 100644 --- a/DiscoveryEngine/src/V1beta/resources/engine_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1beta/resources/engine_service_descriptor_config.php @@ -41,6 +41,25 @@ ], ], ], + 'TuneEngine' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\DiscoveryEngine\V1beta\TuneEngineResponse', + 'metadataReturnType' => '\Google\Cloud\DiscoveryEngine\V1beta\TuneEngineMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], 'GetEngine' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\Engine', @@ -73,6 +92,30 @@ ], ], ], + 'PauseEngine' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\Engine', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ResumeEngine' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\Engine', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], 'UpdateEngine' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\Engine', diff --git a/DiscoveryEngine/src/V1beta/resources/engine_service_rest_client_config.php b/DiscoveryEngine/src/V1beta/resources/engine_service_rest_client_config.php index c7c31288cd2b..64262b3b19b5 100644 --- a/DiscoveryEngine/src/V1beta/resources/engine_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1beta/resources/engine_service_rest_client_config.php @@ -51,6 +51,42 @@ ], ], ], + 'PauseEngine' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}:pause', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ResumeEngine' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}:resume', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'TuneEngine' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}:tune', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'UpdateEngine' => [ 'method' => 'patch', 'uriTemplate' => '/v1beta/{engine.name=projects/*/locations/*/collections/*/engines/*}', diff --git a/DiscoveryEngine/src/V1beta/resources/grounded_generation_service_client_config.json b/DiscoveryEngine/src/V1beta/resources/grounded_generation_service_client_config.json new file mode 100644 index 000000000000..c74fdb4a41fc --- /dev/null +++ b/DiscoveryEngine/src/V1beta/resources/grounded_generation_service_client_config.json @@ -0,0 +1,39 @@ +{ + "interfaces": { + "google.cloud.discoveryengine.v1beta.GroundedGenerationService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 5000, + "initial_rpc_timeout_millis": 5000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 5000, + "total_timeout_millis": 5000 + } + }, + "methods": { + "CheckGrounding": { + "timeout_millis": 5000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/DiscoveryEngine/src/V1beta/resources/grounded_generation_service_descriptor_config.php b/DiscoveryEngine/src/V1beta/resources/grounded_generation_service_descriptor_config.php new file mode 100644 index 000000000000..49743f4bd724 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/resources/grounded_generation_service_descriptor_config.php @@ -0,0 +1,23 @@ + [ + 'google.cloud.discoveryengine.v1beta.GroundedGenerationService' => [ + 'CheckGrounding' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\CheckGroundingResponse', + 'headerParams' => [ + [ + 'keyName' => 'grounding_config', + 'fieldAccessors' => [ + 'getGroundingConfig', + ], + ], + ], + ], + 'templateMap' => [ + 'groundingConfig' => 'projects/{project}/locations/{location}/groundingConfigs/{grounding_config}', + ], + ], + ], +]; diff --git a/DiscoveryEngine/src/V1beta/resources/grounded_generation_service_rest_client_config.php b/DiscoveryEngine/src/V1beta/resources/grounded_generation_service_rest_client_config.php new file mode 100644 index 000000000000..865df46ca8c4 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/resources/grounded_generation_service_rest_client_config.php @@ -0,0 +1,153 @@ + [ + 'google.cloud.discoveryengine.v1beta.GroundedGenerationService' => [ + 'CheckGrounding' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{grounding_config=projects/*/locations/*/groundingConfigs/*}:check', + 'body' => '*', + 'placeholders' => [ + 'grounding_config' => [ + 'getters' => [ + 'getGroundingConfig', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/DiscoveryEngine/src/V1beta/resources/rank_service_client_config.json b/DiscoveryEngine/src/V1beta/resources/rank_service_client_config.json new file mode 100644 index 000000000000..b03e3d02c751 --- /dev/null +++ b/DiscoveryEngine/src/V1beta/resources/rank_service_client_config.json @@ -0,0 +1,39 @@ +{ + "interfaces": { + "google.cloud.discoveryengine.v1beta.RankService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_2_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + } + }, + "methods": { + "Rank": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + } + } + } + } +} diff --git a/DiscoveryEngine/src/V1beta/resources/rank_service_descriptor_config.php b/DiscoveryEngine/src/V1beta/resources/rank_service_descriptor_config.php new file mode 100644 index 000000000000..8d93108507ae --- /dev/null +++ b/DiscoveryEngine/src/V1beta/resources/rank_service_descriptor_config.php @@ -0,0 +1,23 @@ + [ + 'google.cloud.discoveryengine.v1beta.RankService' => [ + 'Rank' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1beta\RankResponse', + 'headerParams' => [ + [ + 'keyName' => 'ranking_config', + 'fieldAccessors' => [ + 'getRankingConfig', + ], + ], + ], + ], + 'templateMap' => [ + 'rankingConfig' => 'projects/{project}/locations/{location}/rankingConfigs/{ranking_config}', + ], + ], + ], +]; diff --git a/DiscoveryEngine/src/V1beta/resources/rank_service_rest_client_config.php b/DiscoveryEngine/src/V1beta/resources/rank_service_rest_client_config.php new file mode 100644 index 000000000000..519e7c81766c --- /dev/null +++ b/DiscoveryEngine/src/V1beta/resources/rank_service_rest_client_config.php @@ -0,0 +1,153 @@ + [ + 'google.cloud.discoveryengine.v1beta.RankService' => [ + 'Rank' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{ranking_config=projects/*/locations/*/rankingConfigs/*}:rank', + 'body' => '*', + 'placeholders' => [ + 'ranking_config' => [ + 'getters' => [ + 'getRankingConfig', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/collections/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/DiscoveryEngine/src/V1beta/resources/search_service_client_config.json b/DiscoveryEngine/src/V1beta/resources/search_service_client_config.json index f98ea3de4901..00649f3bbb4e 100644 --- a/DiscoveryEngine/src/V1beta/resources/search_service_client_config.json +++ b/DiscoveryEngine/src/V1beta/resources/search_service_client_config.json @@ -3,7 +3,7 @@ "google.cloud.discoveryengine.v1beta.SearchService": { "retry_codes": { "no_retry_codes": [], - "retry_policy_1_codes": [ + "retry_policy_2_codes": [ "UNAVAILABLE" ] }, @@ -17,21 +17,21 @@ "max_rpc_timeout_millis": 0, "total_timeout_millis": 0 }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, + "retry_policy_2_params": { + "initial_retry_delay_millis": 1000, "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 5000, - "initial_rpc_timeout_millis": 5000, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 30000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 5000, - "total_timeout_millis": 5000 + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 } }, "methods": { "Search": { - "timeout_millis": 5000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" } } } diff --git a/DiscoveryEngine/tests/Unit/V1beta/Client/ConversationalSearchServiceClientTest.php b/DiscoveryEngine/tests/Unit/V1beta/Client/ConversationalSearchServiceClientTest.php index fbcff7a76c38..d25fe7427d9f 100644 --- a/DiscoveryEngine/tests/Unit/V1beta/Client/ConversationalSearchServiceClientTest.php +++ b/DiscoveryEngine/tests/Unit/V1beta/Client/ConversationalSearchServiceClientTest.php @@ -26,17 +26,29 @@ use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; +use Google\Cloud\DiscoveryEngine\V1beta\Answer; +use Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryRequest; +use Google\Cloud\DiscoveryEngine\V1beta\AnswerQueryResponse; use Google\Cloud\DiscoveryEngine\V1beta\Client\ConversationalSearchServiceClient; use Google\Cloud\DiscoveryEngine\V1beta\Conversation; use Google\Cloud\DiscoveryEngine\V1beta\ConverseConversationRequest; use Google\Cloud\DiscoveryEngine\V1beta\ConverseConversationResponse; use Google\Cloud\DiscoveryEngine\V1beta\CreateConversationRequest; +use Google\Cloud\DiscoveryEngine\V1beta\CreateSessionRequest; use Google\Cloud\DiscoveryEngine\V1beta\DeleteConversationRequest; +use Google\Cloud\DiscoveryEngine\V1beta\DeleteSessionRequest; +use Google\Cloud\DiscoveryEngine\V1beta\GetAnswerRequest; use Google\Cloud\DiscoveryEngine\V1beta\GetConversationRequest; +use Google\Cloud\DiscoveryEngine\V1beta\GetSessionRequest; use Google\Cloud\DiscoveryEngine\V1beta\ListConversationsRequest; use Google\Cloud\DiscoveryEngine\V1beta\ListConversationsResponse; +use Google\Cloud\DiscoveryEngine\V1beta\ListSessionsRequest; +use Google\Cloud\DiscoveryEngine\V1beta\ListSessionsResponse; +use Google\Cloud\DiscoveryEngine\V1beta\Query; +use Google\Cloud\DiscoveryEngine\V1beta\Session; use Google\Cloud\DiscoveryEngine\V1beta\TextInput; use Google\Cloud\DiscoveryEngine\V1beta\UpdateConversationRequest; +use Google\Cloud\DiscoveryEngine\V1beta\UpdateSessionRequest; use Google\Protobuf\GPBEmpty; use Google\Rpc\Code; use stdClass; @@ -71,6 +83,86 @@ private function createClient(array $options = []) return new ConversationalSearchServiceClient($options); } + /** @test */ + public function answerQueryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new AnswerQueryResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedServingConfig = $gapicClient->servingConfigName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[SERVING_CONFIG]' + ); + $query = new Query(); + $request = (new AnswerQueryRequest())->setServingConfig($formattedServingConfig)->setQuery($query); + $response = $gapicClient->answerQuery($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.discoveryengine.v1beta.ConversationalSearchService/AnswerQuery', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getServingConfig(); + $this->assertProtobufEquals($formattedServingConfig, $actualValue); + $actualValue = $actualRequestObject->getQuery(); + $this->assertProtobufEquals($query, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function answerQueryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedServingConfig = $gapicClient->servingConfigName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[SERVING_CONFIG]' + ); + $query = new Query(); + $request = (new AnswerQueryRequest())->setServingConfig($formattedServingConfig)->setQuery($query); + try { + $gapicClient->answerQuery($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function converseConversationTest() { @@ -215,6 +307,80 @@ public function createConversationExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function createSessionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $userPseudoId = 'userPseudoId-1850666040'; + $expectedResponse = new Session(); + $expectedResponse->setName($name); + $expectedResponse->setUserPseudoId($userPseudoId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $session = new Session(); + $request = (new CreateSessionRequest())->setParent($formattedParent)->setSession($session); + $response = $gapicClient->createSession($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.discoveryengine.v1beta.ConversationalSearchService/CreateSession', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSession(); + $this->assertProtobufEquals($session, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSessionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $session = new Session(); + $request = (new CreateSessionRequest())->setParent($formattedParent)->setSession($session); + try { + $gapicClient->createSession($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function deleteConversationTest() { @@ -280,6 +446,141 @@ public function deleteConversationExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function deleteSessionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->sessionName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SESSION]'); + $request = (new DeleteSessionRequest())->setName($formattedName); + $gapicClient->deleteSession($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.discoveryengine.v1beta.ConversationalSearchService/DeleteSession', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSessionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->sessionName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SESSION]'); + $request = (new DeleteSessionRequest())->setName($formattedName); + try { + $gapicClient->deleteSession($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAnswerTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $answerText = 'answerText-311499506'; + $expectedResponse = new Answer(); + $expectedResponse->setName($name2); + $expectedResponse->setAnswerText($answerText); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->answerName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SESSION]', '[ANSWER]'); + $request = (new GetAnswerRequest())->setName($formattedName); + $response = $gapicClient->getAnswer($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.discoveryengine.v1beta.ConversationalSearchService/GetAnswer', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAnswerExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->answerName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SESSION]', '[ANSWER]'); + $request = (new GetAnswerRequest())->setName($formattedName); + try { + $gapicClient->getAnswer($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function getConversationTest() { @@ -350,6 +651,76 @@ public function getConversationExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function getSessionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $userPseudoId = 'userPseudoId-1850666040'; + $expectedResponse = new Session(); + $expectedResponse->setName($name2); + $expectedResponse->setUserPseudoId($userPseudoId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->sessionName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SESSION]'); + $request = (new GetSessionRequest())->setName($formattedName); + $response = $gapicClient->getSession($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.discoveryengine.v1beta.ConversationalSearchService/GetSession', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSessionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->sessionName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[SESSION]'); + $request = (new GetSessionRequest())->setName($formattedName); + try { + $gapicClient->getSession($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function listConversationsTest() { @@ -424,6 +795,80 @@ public function listConversationsExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function listSessionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $sessionsElement = new Session(); + $sessions = [$sessionsElement]; + $expectedResponse = new ListSessionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSessions($sessions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $request = (new ListSessionsRequest())->setParent($formattedParent); + $response = $gapicClient->listSessions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSessions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.discoveryengine.v1beta.ConversationalSearchService/ListSessions', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSessionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->dataStoreName('[PROJECT]', '[LOCATION]', '[DATA_STORE]'); + $request = (new ListSessionsRequest())->setParent($formattedParent); + try { + $gapicClient->listSessions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function updateConversationTest() { @@ -495,7 +940,7 @@ public function updateConversationExceptionTest() } /** @test */ - public function converseConversationAsyncTest() + public function updateSessionTest() { $transport = $this->createTransport(); $gapicClient = $this->createClient([ @@ -503,24 +948,99 @@ public function converseConversationAsyncTest() ]); $this->assertTrue($transport->isExhausted()); // Mock response - $expectedResponse = new ConverseConversationResponse(); + $name = 'name3373707'; + $userPseudoId = 'userPseudoId-1850666040'; + $expectedResponse = new Session(); + $expectedResponse->setName($name); + $expectedResponse->setUserPseudoId($userPseudoId); $transport->addResponse($expectedResponse); // Mock request - $formattedName = $gapicClient->conversationName('[PROJECT]', '[LOCATION]', '[DATA_STORE]', '[CONVERSATION]'); - $query = new TextInput(); - $request = (new ConverseConversationRequest())->setName($formattedName)->setQuery($query); - $response = $gapicClient->converseConversationAsync($request)->wait(); + $session = new Session(); + $request = (new UpdateSessionRequest())->setSession($session); + $response = $gapicClient->updateSession($request); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); $this->assertSame( - '/google.cloud.discoveryengine.v1beta.ConversationalSearchService/ConverseConversation', + '/google.cloud.discoveryengine.v1beta.ConversationalSearchService/UpdateSession', $actualFuncCall ); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getSession(); + $this->assertProtobufEquals($session, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSessionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $session = new Session(); + $request = (new UpdateSessionRequest())->setSession($session); + try { + $gapicClient->updateSession($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function answerQueryAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new AnswerQueryResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedServingConfig = $gapicClient->servingConfigName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[SERVING_CONFIG]' + ); + $query = new Query(); + $request = (new AnswerQueryRequest())->setServingConfig($formattedServingConfig)->setQuery($query); + $response = $gapicClient->answerQueryAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.discoveryengine.v1beta.ConversationalSearchService/AnswerQuery', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getServingConfig(); + $this->assertProtobufEquals($formattedServingConfig, $actualValue); $actualValue = $actualRequestObject->getQuery(); $this->assertProtobufEquals($query, $actualValue); $this->assertTrue($transport->isExhausted()); diff --git a/DiscoveryEngine/tests/Unit/V1beta/Client/EngineServiceClientTest.php b/DiscoveryEngine/tests/Unit/V1beta/Client/EngineServiceClientTest.php index aaa116ff8432..b7ac06033c55 100644 --- a/DiscoveryEngine/tests/Unit/V1beta/Client/EngineServiceClientTest.php +++ b/DiscoveryEngine/tests/Unit/V1beta/Client/EngineServiceClientTest.php @@ -34,7 +34,11 @@ use Google\Cloud\DiscoveryEngine\V1beta\GetEngineRequest; use Google\Cloud\DiscoveryEngine\V1beta\ListEnginesRequest; use Google\Cloud\DiscoveryEngine\V1beta\ListEnginesResponse; +use Google\Cloud\DiscoveryEngine\V1beta\PauseEngineRequest; +use Google\Cloud\DiscoveryEngine\V1beta\ResumeEngineRequest; use Google\Cloud\DiscoveryEngine\V1beta\SolutionType; +use Google\Cloud\DiscoveryEngine\V1beta\TuneEngineRequest; +use Google\Cloud\DiscoveryEngine\V1beta\TuneEngineResponse; use Google\Cloud\DiscoveryEngine\V1beta\UpdateEngineRequest; use Google\LongRunning\GetOperationRequest; use Google\LongRunning\Operation; @@ -481,6 +485,262 @@ public function listEnginesExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function pauseEngineTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Engine(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->engineName('[PROJECT]', '[LOCATION]', '[COLLECTION]', '[ENGINE]'); + $request = (new PauseEngineRequest())->setName($formattedName); + $response = $gapicClient->pauseEngine($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.EngineService/PauseEngine', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function pauseEngineExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->engineName('[PROJECT]', '[LOCATION]', '[COLLECTION]', '[ENGINE]'); + $request = (new PauseEngineRequest())->setName($formattedName); + try { + $gapicClient->pauseEngine($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resumeEngineTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Engine(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->engineName('[PROJECT]', '[LOCATION]', '[COLLECTION]', '[ENGINE]'); + $request = (new ResumeEngineRequest())->setName($formattedName); + $response = $gapicClient->resumeEngine($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.EngineService/ResumeEngine', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resumeEngineExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->engineName('[PROJECT]', '[LOCATION]', '[COLLECTION]', '[ENGINE]'); + $request = (new ResumeEngineRequest())->setName($formattedName); + try { + $gapicClient->resumeEngine($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function tuneEngineTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/tuneEngineTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new TuneEngineResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/tuneEngineTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->engineName('[PROJECT]', '[LOCATION]', '[COLLECTION]', '[ENGINE]'); + $request = (new TuneEngineRequest())->setName($formattedName); + $response = $gapicClient->tuneEngine($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.EngineService/TuneEngine', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/tuneEngineTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function tuneEngineExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/tuneEngineTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->engineName('[PROJECT]', '[LOCATION]', '[COLLECTION]', '[ENGINE]'); + $request = (new TuneEngineRequest())->setName($formattedName); + $response = $gapicClient->tuneEngine($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/tuneEngineTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + /** @test */ public function updateEngineTest() { diff --git a/DiscoveryEngine/tests/Unit/V1beta/Client/GroundedGenerationServiceClientTest.php b/DiscoveryEngine/tests/Unit/V1beta/Client/GroundedGenerationServiceClientTest.php new file mode 100644 index 000000000000..1b8a8bbd0a99 --- /dev/null +++ b/DiscoveryEngine/tests/Unit/V1beta/Client/GroundedGenerationServiceClientTest.php @@ -0,0 +1,163 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return GroundedGenerationServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new GroundedGenerationServiceClient($options); + } + + /** @test */ + public function checkGroundingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $supportScore = -13206883; + $expectedResponse = new CheckGroundingResponse(); + $expectedResponse->setSupportScore($supportScore); + $transport->addResponse($expectedResponse); + // Mock request + $formattedGroundingConfig = $gapicClient->groundingConfigName('[PROJECT]', '[LOCATION]', '[GROUNDING_CONFIG]'); + $request = (new CheckGroundingRequest())->setGroundingConfig($formattedGroundingConfig); + $response = $gapicClient->checkGrounding($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.discoveryengine.v1beta.GroundedGenerationService/CheckGrounding', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getGroundingConfig(); + $this->assertProtobufEquals($formattedGroundingConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function checkGroundingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedGroundingConfig = $gapicClient->groundingConfigName('[PROJECT]', '[LOCATION]', '[GROUNDING_CONFIG]'); + $request = (new CheckGroundingRequest())->setGroundingConfig($formattedGroundingConfig); + try { + $gapicClient->checkGrounding($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function checkGroundingAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $supportScore = -13206883; + $expectedResponse = new CheckGroundingResponse(); + $expectedResponse->setSupportScore($supportScore); + $transport->addResponse($expectedResponse); + // Mock request + $formattedGroundingConfig = $gapicClient->groundingConfigName('[PROJECT]', '[LOCATION]', '[GROUNDING_CONFIG]'); + $request = (new CheckGroundingRequest())->setGroundingConfig($formattedGroundingConfig); + $response = $gapicClient->checkGroundingAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.discoveryengine.v1beta.GroundedGenerationService/CheckGrounding', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getGroundingConfig(); + $this->assertProtobufEquals($formattedGroundingConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/DiscoveryEngine/tests/Unit/V1beta/Client/RankServiceClientTest.php b/DiscoveryEngine/tests/Unit/V1beta/Client/RankServiceClientTest.php new file mode 100644 index 000000000000..a822dd1865da --- /dev/null +++ b/DiscoveryEngine/tests/Unit/V1beta/Client/RankServiceClientTest.php @@ -0,0 +1,160 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return RankServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new RankServiceClient($options); + } + + /** @test */ + public function rankTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new RankResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedRankingConfig = $gapicClient->rankingConfigName('[PROJECT]', '[LOCATION]', '[RANKING_CONFIG]'); + $records = []; + $request = (new RankRequest())->setRankingConfig($formattedRankingConfig)->setRecords($records); + $response = $gapicClient->rank($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.RankService/Rank', $actualFuncCall); + $actualValue = $actualRequestObject->getRankingConfig(); + $this->assertProtobufEquals($formattedRankingConfig, $actualValue); + $actualValue = $actualRequestObject->getRecords(); + $this->assertProtobufEquals($records, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rankExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedRankingConfig = $gapicClient->rankingConfigName('[PROJECT]', '[LOCATION]', '[RANKING_CONFIG]'); + $records = []; + $request = (new RankRequest())->setRankingConfig($formattedRankingConfig)->setRecords($records); + try { + $gapicClient->rank($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rankAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new RankResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedRankingConfig = $gapicClient->rankingConfigName('[PROJECT]', '[LOCATION]', '[RANKING_CONFIG]'); + $records = []; + $request = (new RankRequest())->setRankingConfig($formattedRankingConfig)->setRecords($records); + $response = $gapicClient->rankAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1beta.RankService/Rank', $actualFuncCall); + $actualValue = $actualRequestObject->getRankingConfig(); + $this->assertProtobufEquals($formattedRankingConfig, $actualValue); + $actualValue = $actualRequestObject->getRecords(); + $this->assertProtobufEquals($records, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} From 4932980eca54d99baf0563c1058e64e2ccb5fa56 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 10 Apr 2024 14:09:20 -0700 Subject: [PATCH 20/86] feat: add click potential to Reports sub-API publication (#7208) PiperOrigin-RevId: 623133729 Source-Link: https://github.com/googleapis/googleapis/commit/66ae983af14945ea37ddace3bbd72fa2b6048cf8 Source-Link: https://github.com/googleapis/googleapis-gen/commit/edb7e580acdca6a396899d4d0ead8c3283153055 Copy-Tag: eyJwIjoiU2hvcHBpbmdNZXJjaGFudFJlcG9ydHMvLk93bEJvdC55YW1sIiwiaCI6ImVkYjdlNTgwYWNkY2E2YTM5Njg5OWQ0ZDBlYWQ4YzMyODMxNTMwNTUifQ== --- .../metadata/V1Beta/Reports.php | Bin 13376 -> 13613 bytes .../src/V1beta/ProductView.php | 90 ++++++++++++++++++ .../src/V1beta/ProductView/ClickPotential.php | 77 +++++++++++++++ .../src/V1beta/SearchRequest.php | 8 +- 4 files changed, 171 insertions(+), 4 deletions(-) create mode 100644 ShoppingMerchantReports/src/V1beta/ProductView/ClickPotential.php diff --git a/ShoppingMerchantReports/metadata/V1Beta/Reports.php b/ShoppingMerchantReports/metadata/V1Beta/Reports.php index 44206d765d805a46ba5afa7c44273eb1f77cf18f..86bab1070db3663d1c23168104e7c4e63139db7a 100644 GIT binary patch delta 235 zcmX?*u{LXiH#5`p0Y)J%E;e6R7tc^% i0VW|1E*1|@cMk#P&2xaJOFD^jiN<4d!Dban8EF8v_eBQ) delta 38 ucmZ3Rbs%GdH#5`f#Ld3U|GAj1iEj4ed&9hWk5Cfp<^qWh#?69KGSUDrEDi(! diff --git a/ShoppingMerchantReports/src/V1beta/ProductView.php b/ShoppingMerchantReports/src/V1beta/ProductView.php index 8ad4d783310d..40c7606b8e2d 100644 --- a/ShoppingMerchantReports/src/V1beta/ProductView.php +++ b/ShoppingMerchantReports/src/V1beta/ProductView.php @@ -214,6 +214,21 @@ class ProductView extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.shopping.merchant.reports.v1beta.ProductView.ItemIssue item_issues = 27; */ private $item_issues; + /** + * Estimated performance potential compared to highest performing products of + * the merchant. + * + * Generated from protobuf field .google.shopping.merchant.reports.v1beta.ProductView.ClickPotential click_potential = 29; + */ + protected $click_potential = 0; + /** + * Rank of the product based on its click potential. A product with + * `click_potential_rank` 1 has the highest click potential among the + * merchant's products that fulfill the search query conditions. + * + * Generated from protobuf field optional int64 click_potential_rank = 30; + */ + protected $click_potential_rank = null; /** * Constructor. @@ -300,6 +315,13 @@ class ProductView extends \Google\Protobuf\Internal\Message * **Only selected attributes of this field (for example, * `item_issues.severity.aggregated_severity`) can be used for filtering the * results.** + * @type int $click_potential + * Estimated performance potential compared to highest performing products of + * the merchant. + * @type int|string $click_potential_rank + * Rank of the product based on its click potential. A product with + * `click_potential_rank` 1 has the highest click potential among the + * merchant's products that fulfill the search query conditions. * } */ public function __construct($data = NULL) { @@ -1341,5 +1363,73 @@ public function setItemIssues($var) return $this; } + /** + * Estimated performance potential compared to highest performing products of + * the merchant. + * + * Generated from protobuf field .google.shopping.merchant.reports.v1beta.ProductView.ClickPotential click_potential = 29; + * @return int + */ + public function getClickPotential() + { + return $this->click_potential; + } + + /** + * Estimated performance potential compared to highest performing products of + * the merchant. + * + * Generated from protobuf field .google.shopping.merchant.reports.v1beta.ProductView.ClickPotential click_potential = 29; + * @param int $var + * @return $this + */ + public function setClickPotential($var) + { + GPBUtil::checkEnum($var, \Google\Shopping\Merchant\Reports\V1beta\ProductView\ClickPotential::class); + $this->click_potential = $var; + + return $this; + } + + /** + * Rank of the product based on its click potential. A product with + * `click_potential_rank` 1 has the highest click potential among the + * merchant's products that fulfill the search query conditions. + * + * Generated from protobuf field optional int64 click_potential_rank = 30; + * @return int|string + */ + public function getClickPotentialRank() + { + return isset($this->click_potential_rank) ? $this->click_potential_rank : 0; + } + + public function hasClickPotentialRank() + { + return isset($this->click_potential_rank); + } + + public function clearClickPotentialRank() + { + unset($this->click_potential_rank); + } + + /** + * Rank of the product based on its click potential. A product with + * `click_potential_rank` 1 has the highest click potential among the + * merchant's products that fulfill the search query conditions. + * + * Generated from protobuf field optional int64 click_potential_rank = 30; + * @param int|string $var + * @return $this + */ + public function setClickPotentialRank($var) + { + GPBUtil::checkInt64($var); + $this->click_potential_rank = $var; + + return $this; + } + } diff --git a/ShoppingMerchantReports/src/V1beta/ProductView/ClickPotential.php b/ShoppingMerchantReports/src/V1beta/ProductView/ClickPotential.php new file mode 100644 index 000000000000..03feea0173c3 --- /dev/null +++ b/ShoppingMerchantReports/src/V1beta/ProductView/ClickPotential.php @@ -0,0 +1,77 @@ +google.shopping.merchant.reports.v1beta.ProductView.ClickPotential + */ +class ClickPotential +{ + /** + * Unknown predicted clicks impact. + * + * Generated from protobuf enum CLICK_POTENTIAL_UNSPECIFIED = 0; + */ + const CLICK_POTENTIAL_UNSPECIFIED = 0; + /** + * Potential to receive a low number of clicks compared to the highest + * performing products of the merchant. + * + * Generated from protobuf enum LOW = 1; + */ + const LOW = 1; + /** + * Potential to receive a moderate number of clicks compared to the highest + * performing products of the merchant. + * + * Generated from protobuf enum MEDIUM = 2; + */ + const MEDIUM = 2; + /** + * Potential to receive a similar number of clicks as the highest performing + * products of the merchant. + * + * Generated from protobuf enum HIGH = 3; + */ + const HIGH = 3; + + private static $valueToName = [ + self::CLICK_POTENTIAL_UNSPECIFIED => 'CLICK_POTENTIAL_UNSPECIFIED', + self::LOW => 'LOW', + self::MEDIUM => 'MEDIUM', + self::HIGH => 'HIGH', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/ShoppingMerchantReports/src/V1beta/SearchRequest.php b/ShoppingMerchantReports/src/V1beta/SearchRequest.php index ee82051d5ced..1e7b41d74039 100644 --- a/ShoppingMerchantReports/src/V1beta/SearchRequest.php +++ b/ShoppingMerchantReports/src/V1beta/SearchRequest.php @@ -33,7 +33,7 @@ class SearchRequest extends \Google\Protobuf\Internal\Message protected $query = ''; /** * Optional. Number of `ReportRows` to retrieve in a single page. Defaults to - * the maximum of 1000. Values above 1000 are coerced to 1000. + * 1000. Values above 5000 are coerced to 5000. * * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -78,7 +78,7 @@ public static function build(string $parent): self * fields. * @type int $page_size * Optional. Number of `ReportRows` to retrieve in a single page. Defaults to - * the maximum of 1000. Values above 1000 are coerced to 1000. + * 1000. Values above 5000 are coerced to 5000. * @type string $page_token * Optional. Token of the page to retrieve. If not specified, the first page * of results is returned. In order to request the next page of results, the @@ -153,7 +153,7 @@ public function setQuery($var) /** * Optional. Number of `ReportRows` to retrieve in a single page. Defaults to - * the maximum of 1000. Values above 1000 are coerced to 1000. + * 1000. Values above 5000 are coerced to 5000. * * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -165,7 +165,7 @@ public function getPageSize() /** * Optional. Number of `ReportRows` to retrieve in a single page. Defaults to - * the maximum of 1000. Values above 1000 are coerced to 1000. + * 1000. Values above 5000 are coerced to 5000. * * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var From b053b154a6f843cecf8d9353ffe92337b4f7fffb Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 10 Apr 2024 14:09:43 -0700 Subject: [PATCH 21/86] docs: update comments on ServiceAccount email and scopes fields (#7209) PiperOrigin-RevId: 623205186 Source-Link: https://github.com/googleapis/googleapis/commit/bbcce1d481a148676634603794c6e697ae3b58c7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e8b31210e6ea77af6791243a69b720a297779581 Copy-Tag: eyJwIjoiQmF0Y2gvLk93bEJvdC55YW1sIiwiaCI6ImU4YjMxMjEwZTZlYTc3YWY2NzkxMjQzYTY5YjcyMGEyOTc3Nzk1ODEifQ== --- Batch/src/V1/AllocationPolicy.php | 44 ++++++++++++++++++++++++++++--- Batch/src/V1/ServiceAccount.php | 32 ++++++---------------- 2 files changed, 48 insertions(+), 28 deletions(-) diff --git a/Batch/src/V1/AllocationPolicy.php b/Batch/src/V1/AllocationPolicy.php index bea12d093875..175eaf63646d 100644 --- a/Batch/src/V1/AllocationPolicy.php +++ b/Batch/src/V1/AllocationPolicy.php @@ -30,7 +30,16 @@ class AllocationPolicy extends \Google\Protobuf\Internal\Message */ private $instances; /** - * Service account that VMs will run as. + * Defines the service account for Batch-created VMs. If omitted, the [default + * Compute Engine service + * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + * is used. Must match the service account specified in any used instance + * template configured in the Batch job. + * Includes the following fields: + * * email: The service account's email address. If not set, the default + * Compute Engine service account is used. + * * scopes: Additional OAuth scopes to grant the service account, beyond the + * default cloud-platform scope. (list of strings) * * Generated from protobuf field .google.cloud.batch.v1.ServiceAccount service_account = 9; */ @@ -84,7 +93,16 @@ class AllocationPolicy extends \Google\Protobuf\Internal\Message * Describe instances that can be created by this AllocationPolicy. * Only instances[0] is supported now. * @type \Google\Cloud\Batch\V1\ServiceAccount $service_account - * Service account that VMs will run as. + * Defines the service account for Batch-created VMs. If omitted, the [default + * Compute Engine service + * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + * is used. Must match the service account specified in any used instance + * template configured in the Batch job. + * Includes the following fields: + * * email: The service account's email address. If not set, the default + * Compute Engine service account is used. + * * scopes: Additional OAuth scopes to grant the service account, beyond the + * default cloud-platform scope. (list of strings) * @type array|\Google\Protobuf\Internal\MapField $labels * Labels applied to all VM instances and other resources * created by AllocationPolicy. @@ -177,7 +195,16 @@ public function setInstances($var) } /** - * Service account that VMs will run as. + * Defines the service account for Batch-created VMs. If omitted, the [default + * Compute Engine service + * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + * is used. Must match the service account specified in any used instance + * template configured in the Batch job. + * Includes the following fields: + * * email: The service account's email address. If not set, the default + * Compute Engine service account is used. + * * scopes: Additional OAuth scopes to grant the service account, beyond the + * default cloud-platform scope. (list of strings) * * Generated from protobuf field .google.cloud.batch.v1.ServiceAccount service_account = 9; * @return \Google\Cloud\Batch\V1\ServiceAccount|null @@ -198,7 +225,16 @@ public function clearServiceAccount() } /** - * Service account that VMs will run as. + * Defines the service account for Batch-created VMs. If omitted, the [default + * Compute Engine service + * account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) + * is used. Must match the service account specified in any used instance + * template configured in the Batch job. + * Includes the following fields: + * * email: The service account's email address. If not set, the default + * Compute Engine service account is used. + * * scopes: Additional OAuth scopes to grant the service account, beyond the + * default cloud-platform scope. (list of strings) * * Generated from protobuf field .google.cloud.batch.v1.ServiceAccount service_account = 9; * @param \Google\Cloud\Batch\V1\ServiceAccount $var diff --git a/Batch/src/V1/ServiceAccount.php b/Batch/src/V1/ServiceAccount.php index cf51ae2a6471..dc582279dc68 100644 --- a/Batch/src/V1/ServiceAccount.php +++ b/Batch/src/V1/ServiceAccount.php @@ -16,17 +16,13 @@ class ServiceAccount extends \Google\Protobuf\Internal\Message { /** - * Email address of the service account. If not specified, the default - * Compute Engine service account for the project will be used. If instance - * template is being used, the service account has to be specified in the - * instance template and it has to match the email field here. + * Email address of the service account. * * Generated from protobuf field string email = 1; */ private $email = ''; /** - * List of scopes to be enabled for this service account on the VM, in - * addition to the cloud-platform API scope that will be added by default. + * List of scopes to be enabled for this service account. * * Generated from protobuf field repeated string scopes = 2; */ @@ -39,13 +35,9 @@ class ServiceAccount extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $email - * Email address of the service account. If not specified, the default - * Compute Engine service account for the project will be used. If instance - * template is being used, the service account has to be specified in the - * instance template and it has to match the email field here. + * Email address of the service account. * @type array|\Google\Protobuf\Internal\RepeatedField $scopes - * List of scopes to be enabled for this service account on the VM, in - * addition to the cloud-platform API scope that will be added by default. + * List of scopes to be enabled for this service account. * } */ public function __construct($data = NULL) { @@ -54,10 +46,7 @@ public function __construct($data = NULL) { } /** - * Email address of the service account. If not specified, the default - * Compute Engine service account for the project will be used. If instance - * template is being used, the service account has to be specified in the - * instance template and it has to match the email field here. + * Email address of the service account. * * Generated from protobuf field string email = 1; * @return string @@ -68,10 +57,7 @@ public function getEmail() } /** - * Email address of the service account. If not specified, the default - * Compute Engine service account for the project will be used. If instance - * template is being used, the service account has to be specified in the - * instance template and it has to match the email field here. + * Email address of the service account. * * Generated from protobuf field string email = 1; * @param string $var @@ -86,8 +72,7 @@ public function setEmail($var) } /** - * List of scopes to be enabled for this service account on the VM, in - * addition to the cloud-platform API scope that will be added by default. + * List of scopes to be enabled for this service account. * * Generated from protobuf field repeated string scopes = 2; * @return \Google\Protobuf\Internal\RepeatedField @@ -98,8 +83,7 @@ public function getScopes() } /** - * List of scopes to be enabled for this service account on the VM, in - * addition to the cloud-platform API scope that will be added by default. + * List of scopes to be enabled for this service account. * * Generated from protobuf field repeated string scopes = 2; * @param array|\Google\Protobuf\Internal\RepeatedField $var From 2fe9eaf0aecc1da7c1ff5d42e4b4bd0030f3cc96 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Wed, 10 Apr 2024 17:03:02 -0600 Subject: [PATCH 22/86] feat: add new LongRunning client, rename LongRunning namespace (and add alias for BC) (#6675) --- Core/src/Testing/TestHelpers.php | 3 +- LongRunning/.OwlBot.yaml | 2 +- .../metadata/Longrunning/Operations.php | Bin 2587 -> 2587 bytes LongRunning/owlbot.py | 28 +- .../Gapic/OperationsGapicClient.php | 481 +---------------- .../ApiCore/LongRunning/OperationsClient.php | 35 +- .../operations_descriptor_config.php | 18 - .../LongRunning/CancelOperationRequest.php | 13 + .../LongRunning/Client/OperationsClient.php | 335 ++++++++++++ .../LongRunning/DeleteOperationRequest.php | 13 + .../Gapic/OperationsGapicClient.php | 483 ++++++++++++++++++ .../src/LongRunning/GetOperationRequest.php | 13 + .../src/LongRunning/ListOperationsRequest.php | 15 + .../src/LongRunning/OperationsClient.php | 36 ++ .../LongRunning/gapic_metadata.json | 0 .../resources/operations_client_config.json | 0 .../operations_descriptor_config.php | 68 +++ .../operations_rest_client_config.php | 0 .../Unit/Client/OperationsClientTest.php | 417 +++++++++++++++ .../tests/Unit/OperationsClientTest.php | 4 +- 20 files changed, 1417 insertions(+), 547 deletions(-) delete mode 100644 LongRunning/src/ApiCore/LongRunning/resources/operations_descriptor_config.php create mode 100644 LongRunning/src/LongRunning/Client/OperationsClient.php create mode 100644 LongRunning/src/LongRunning/Gapic/OperationsGapicClient.php create mode 100644 LongRunning/src/LongRunning/OperationsClient.php rename LongRunning/src/{ApiCore => }/LongRunning/gapic_metadata.json (100%) rename LongRunning/src/{ApiCore => }/LongRunning/resources/operations_client_config.json (100%) create mode 100644 LongRunning/src/LongRunning/resources/operations_descriptor_config.php rename LongRunning/src/{ApiCore => }/LongRunning/resources/operations_rest_client_config.php (100%) create mode 100644 LongRunning/tests/Unit/Client/OperationsClientTest.php diff --git a/Core/src/Testing/TestHelpers.php b/Core/src/Testing/TestHelpers.php index 2e832559bb34..e2050d6356ff 100644 --- a/Core/src/Testing/TestHelpers.php +++ b/Core/src/Testing/TestHelpers.php @@ -113,7 +113,8 @@ public static function snippetBootstrap() '/vendor/', '/dev/', new RegexFileFilter('/\w{0,}\/vendor\//'), - new RegexFileFilter('/\w{0,}\/V\d{1,}\w{0,}\//') + new RegexFileFilter('/\w{0,}\/V\d{1,}\w{0,}\//'), + 'LongRunning/', // LongRunning doesn't match the GAPIC regex, but should still be excluded ]); $coverage = new Coverage($scanner); $coverage->buildListToCover(); diff --git a/LongRunning/.OwlBot.yaml b/LongRunning/.OwlBot.yaml index f4f00e2f4ade..50fa62ef7164 100644 --- a/LongRunning/.OwlBot.yaml +++ b/LongRunning/.OwlBot.yaml @@ -1,6 +1,6 @@ deep-copy-regex: - source: /google/longrunning/.*-php/src/(.*) - dest: /owl-bot-staging/LongRunning/src/ApiCore/LongRunning/$1 + dest: /owl-bot-staging/LongRunning/src/LongRunning/$1 - source: /google/longrunning/.*-php/tests/(.*) dest: /owl-bot-staging/LongRunning/tests/$1 - source: /google/longrunning/.*-php/proto/src/(.*) diff --git a/LongRunning/metadata/Longrunning/Operations.php b/LongRunning/metadata/Longrunning/Operations.php index 1757fcc8c7844b18c510a75f2a97ffa5b1a5149a..2ed35d91878de9e1a9f899893fad9fbb1a18793b 100644 GIT binary patch delta 78 zcmbO&GFxQB4>rDAj@)^Pxv4s7nK>n?MU#K9$xc>gk72*%$O00cT+gmBc^P{Yj6aD( TVX`_0oIAOZLu>OUj!Z@XXa^g1 delta 107 zcmbO&GFxQB4>pdb%TFdVi3^ENp1>i(Uwg}uJ1;ReRVOVorzEv#vNC%NM1ho$1W`_n&EmR40j;P5U99l4in>TS}G6Db`x+Q-A diff --git a/LongRunning/owlbot.py b/LongRunning/owlbot.py index fc547a8a4251..4e10110256f7 100644 --- a/LongRunning/owlbot.py +++ b/LongRunning/owlbot.py @@ -41,31 +41,11 @@ version_string="longrunning", ) -# Fix namespace for LongRunning GAPIC (ApiCore) -# This is defined in longrunning_gapic.yaml, but not being used by -# gapic-generator-php +# Add an alias for the previous namespace s.replace( - "src/ApiCore/**/*.php", - r"^namespace Google\\LongRunning(.*);$", - r"namespace Google\\ApiCore\\LongRunning\1;") -s.replace( - "src/ApiCore/LongRunning/OperationsClient.php", - r"^use Google\\LongRunning\\Gapic\\OperationsGapicClient;$", - r"use Google\\ApiCore\\LongRunning\\Gapic\\OperationsGapicClient;") -s.replace( - "tests/**/*.php", - r"\\Google\\LongRunning\\OperationsClient", - r"\\Google\\ApiCore\\LongRunning\\OperationsClient") - -# remove class_alias code -s.replace( - "src/**/*.php", - r"^// Adding a class alias for backwards compatibility with the previous class name.$" - + "\n" - + r"^class_alias\(.*\);$" - + "\n", - '') - + "src/LongRunning/OperationsClient.php", + r"^}$\n", + r"}\n\nclass_alias('Google\\LongRunning\\OperationsClient', 'Google\\ApiCore\\LongRunning\\OperationsClient');\n") ### [START] protoc backwards compatibility fixes diff --git a/LongRunning/src/ApiCore/LongRunning/Gapic/OperationsGapicClient.php b/LongRunning/src/ApiCore/LongRunning/Gapic/OperationsGapicClient.php index b0b7f1356c5e..617c15470267 100644 --- a/LongRunning/src/ApiCore/LongRunning/Gapic/OperationsGapicClient.php +++ b/LongRunning/src/ApiCore/LongRunning/Gapic/OperationsGapicClient.php @@ -1,483 +1,16 @@ cancelOperation($name); - * } finally { - * $operationsClient->close(); - * } - * ``` - * - * @deprecated This class will be removed in the next major version update. - */ -class OperationsGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.longrunning.Operations'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - const SERVICE_ADDRESS = 'longrunning.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'longrunning.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = []; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => - self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => - __DIR__ . '/../resources/operations_client_config.json', - 'descriptorsConfigPath' => - __DIR__ . '/../resources/operations_descriptor_config.php', - 'gcpApiConfigPath' => - __DIR__ . '/../resources/operations_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => - __DIR__ . - '/../resources/operations_rest_client_config.php', - ], - ], - ]; - } - +if (false) { /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'longrunning.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException + * This class is deprecated. Use Google\LongRunning\OperationsClient instead. + * @deprecated */ - public function __construct(array $options = []) + class OperationsGapicClient extends + \Google\LongRunning\Client\OperationsClient { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Starts asynchronous cancellation on a long-running operation. The server - * makes a best effort to cancel the operation, but success is not - * guaranteed. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. Clients can use - * [Operations.GetOperation][google.longrunning.Operations.GetOperation] or - * other methods to check whether the cancellation succeeded or whether the - * operation completed despite cancellation. On successful cancellation, - * the operation is not deleted; instead, it becomes an operation with - * an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - * corresponding to `Code.CANCELLED`. - * - * Sample code: - * ``` - * $operationsClient = new OperationsClient(); - * try { - * $name = 'name'; - * $operationsClient->cancelOperation($name); - * } finally { - * $operationsClient->close(); - * } - * ``` - * - * @param string $name The name of the operation resource to be cancelled. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function cancelOperation($name, array $optionalArgs = []) - { - $request = new CancelOperationRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor( - $requestParamHeaders - ); - $optionalArgs['headers'] = isset($optionalArgs['headers']) - ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) - : $requestParams->getHeader(); - return $this->startCall( - 'CancelOperation', - GPBEmpty::class, - $optionalArgs, - $request - )->wait(); - } - - /** - * Deletes a long-running operation. This method indicates that the client is - * no longer interested in the operation result. It does not cancel the - * operation. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. - * - * Sample code: - * ``` - * $operationsClient = new OperationsClient(); - * try { - * $name = 'name'; - * $operationsClient->deleteOperation($name); - * } finally { - * $operationsClient->close(); - * } - * ``` - * - * @param string $name The name of the operation resource to be deleted. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException if the remote call fails - */ - public function deleteOperation($name, array $optionalArgs = []) - { - $request = new DeleteOperationRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor( - $requestParamHeaders - ); - $optionalArgs['headers'] = isset($optionalArgs['headers']) - ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) - : $requestParams->getHeader(); - return $this->startCall( - 'DeleteOperation', - GPBEmpty::class, - $optionalArgs, - $request - )->wait(); - } - - /** - * Gets the latest state of a long-running operation. Clients can use this - * method to poll the operation result at intervals as recommended by the API - * service. - * - * Sample code: - * ``` - * $operationsClient = new OperationsClient(); - * try { - * $name = 'name'; - * $response = $operationsClient->getOperation($name); - * } finally { - * $operationsClient->close(); - * } - * ``` - * - * @param string $name The name of the operation resource. - * @param array $optionalArgs { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\LongRunning\Operation - * - * @throws ApiException if the remote call fails - */ - public function getOperation($name, array $optionalArgs = []) - { - $request = new GetOperationRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor( - $requestParamHeaders - ); - $optionalArgs['headers'] = isset($optionalArgs['headers']) - ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) - : $requestParams->getHeader(); - return $this->startCall( - 'GetOperation', - Operation::class, - $optionalArgs, - $request - )->wait(); - } - - /** - * Lists operations that match the specified filter in the request. If the - * server doesn't support this method, it returns `UNIMPLEMENTED`. - * - * NOTE: the `name` binding allows API services to override the binding - * to use different resource name schemes, such as `users/*/operations`. To - * override the binding, API services can add a binding such as - * `"/v1/{name=users/*}/operations"` to their service configuration. - * For backwards compatibility, the default name includes the operations - * collection id, however overriding users must ensure the name binding - * is the parent resource, without the operations collection id. - * - * Sample code: - * ``` - * $operationsClient = new OperationsClient(); - * try { - * $name = 'name'; - * $filter = 'filter'; - * // Iterate over pages of elements - * $pagedResponse = $operationsClient->listOperations($name, $filter); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $operationsClient->listOperations($name, $filter); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $operationsClient->close(); - * } - * ``` - * - * @param string $name The name of the operation's parent resource. - * @param string $filter The standard list filter. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listOperations($name, $filter, array $optionalArgs = []) - { - $request = new ListOperationsRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setFilter($filter); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor( - $requestParamHeaders - ); - $optionalArgs['headers'] = isset($optionalArgs['headers']) - ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) - : $requestParams->getHeader(); - return $this->getPagedListResponse( - 'ListOperations', - $optionalArgs, - ListOperationsResponse::class, - $request - ); - } - - /** - * Waits until the specified long-running operation is done or reaches at most - * a specified timeout, returning the latest state. If the operation is - * already done, the latest state is immediately returned. If the timeout - * specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - * timeout is used. If the server does not support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. - * Note that this method is on a best-effort basis. It may return the latest - * state before the specified timeout (including immediately), meaning even an - * immediate response is no guarantee that the operation is done. - * - * Sample code: - * ``` - * $operationsClient = new OperationsClient(); - * try { - * $response = $operationsClient->waitOperation(); - * } finally { - * $operationsClient->close(); - * } - * ``` - * - * @param array $optionalArgs { - * Optional. - * - * @type string $name - * The name of the operation resource to wait on. - * @type Duration $timeout - * The maximum duration to wait before timing out. If left blank, the wait - * will be at most the time permitted by the underlying HTTP/RPC protocol. - * If RPC context deadline is also specified, the shorter one will be used. - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return \Google\LongRunning\Operation - * - * @throws ApiException if the remote call fails - */ - public function waitOperation(array $optionalArgs = []) - { - $request = new WaitOperationRequest(); - if (isset($optionalArgs['name'])) { - $request->setName($optionalArgs['name']); - } - - if (isset($optionalArgs['timeout'])) { - $request->setTimeout($optionalArgs['timeout']); - } - - return $this->startCall( - 'WaitOperation', - Operation::class, - $optionalArgs, - $request - )->wait(); } } +// Autoload the class and its alias +class_exists('\Google\LongRunning\Gapic\OperationsGapicClient'); diff --git a/LongRunning/src/ApiCore/LongRunning/OperationsClient.php b/LongRunning/src/ApiCore/LongRunning/OperationsClient.php index be3d8e56be5d..44310a55f51a 100644 --- a/LongRunning/src/ApiCore/LongRunning/OperationsClient.php +++ b/LongRunning/src/ApiCore/LongRunning/OperationsClient.php @@ -1,34 +1,15 @@ [ - 'google.longrunning.Operations' => [ - 'ListOperations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getOperations', - ], - ], - ], - ], -]; diff --git a/LongRunning/src/LongRunning/CancelOperationRequest.php b/LongRunning/src/LongRunning/CancelOperationRequest.php index 48b68f41d976..d596e8a8048a 100644 --- a/LongRunning/src/LongRunning/CancelOperationRequest.php +++ b/LongRunning/src/LongRunning/CancelOperationRequest.php @@ -22,6 +22,19 @@ class CancelOperationRequest extends \Google\Protobuf\Internal\Message */ private $name = ''; + /** + * @param string $name The name of the operation resource to be cancelled. + * + * @return \Google\LongRunning\CancelOperationRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + /** * Constructor. * diff --git a/LongRunning/src/LongRunning/Client/OperationsClient.php b/LongRunning/src/LongRunning/Client/OperationsClient.php new file mode 100644 index 000000000000..d3697fc93b40 --- /dev/null +++ b/LongRunning/src/LongRunning/Client/OperationsClient.php @@ -0,0 +1,335 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/operations_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/operations_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/operations_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/operations_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'longrunning.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** 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); + } + + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * [Operations.GetOperation][google.longrunning.Operations.GetOperation] or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. + * + * The async variant is {@see OperationsClient::cancelOperationAsync()} . + * + * @example samples/OperationsClient/cancel_operation.php + * + * @param CancelOperationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 cancelOperation(CancelOperationRequest $request, array $callOptions = []): void + { + $this->startApiCall('CancelOperation', $request, $callOptions)->wait(); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * The async variant is {@see OperationsClient::deleteOperationAsync()} . + * + * @example samples/OperationsClient/delete_operation.php + * + * @param DeleteOperationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteOperation(DeleteOperationRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteOperation', $request, $callOptions)->wait(); + } + + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * The async variant is {@see OperationsClient::getOperationAsync()} . + * + * @example samples/OperationsClient/get_operation.php + * + * @param GetOperationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function getOperation(GetOperationRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('GetOperation', $request, $callOptions)->wait(); + } + + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. + * + * NOTE: the `name` binding allows API services to override the binding + * to use different resource name schemes, such as `users/*/operations`. To + * override the binding, API services can add a binding such as + * `"/v1/{name=users/*}/operations"` to their service configuration. + * For backwards compatibility, the default name includes the operations + * collection id, however overriding users must ensure the name binding + * is the parent resource, without the operations collection id. + * + * The async variant is {@see OperationsClient::listOperationsAsync()} . + * + * @example samples/OperationsClient/list_operations.php + * + * @param ListOperationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listOperations(ListOperationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListOperations', $request, $callOptions); + } + + /** + * Waits until the specified long-running operation is done or reaches at most + * a specified timeout, returning the latest state. If the operation is + * already done, the latest state is immediately returned. If the timeout + * specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + * timeout is used. If the server does not support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * Note that this method is on a best-effort basis. It may return the latest + * state before the specified timeout (including immediately), meaning even an + * immediate response is no guarantee that the operation is done. + * + * The async variant is {@see OperationsClient::waitOperationAsync()} . + * + * @example samples/OperationsClient/wait_operation.php + * + * @param WaitOperationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function waitOperation(WaitOperationRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('WaitOperation', $request, $callOptions)->wait(); + } +} diff --git a/LongRunning/src/LongRunning/DeleteOperationRequest.php b/LongRunning/src/LongRunning/DeleteOperationRequest.php index 8fce867db98d..943a6498c743 100644 --- a/LongRunning/src/LongRunning/DeleteOperationRequest.php +++ b/LongRunning/src/LongRunning/DeleteOperationRequest.php @@ -22,6 +22,19 @@ class DeleteOperationRequest extends \Google\Protobuf\Internal\Message */ private $name = ''; + /** + * @param string $name The name of the operation resource to be deleted. + * + * @return \Google\LongRunning\DeleteOperationRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + /** * Constructor. * diff --git a/LongRunning/src/LongRunning/Gapic/OperationsGapicClient.php b/LongRunning/src/LongRunning/Gapic/OperationsGapicClient.php new file mode 100644 index 000000000000..c0de812aef7a --- /dev/null +++ b/LongRunning/src/LongRunning/Gapic/OperationsGapicClient.php @@ -0,0 +1,483 @@ +cancelOperation($name); + * } finally { + * $operationsClient->close(); + * } + * ``` + * + * @deprecated Please use the new service client {@see \Google\LongRunning\Client\OperationsClient}. + */ +class OperationsGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.longrunning.Operations'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'longrunning.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'longrunning.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = []; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => + self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => + __DIR__ . '/../resources/operations_client_config.json', + 'descriptorsConfigPath' => + __DIR__ . '/../resources/operations_descriptor_config.php', + 'gcpApiConfigPath' => + __DIR__ . '/../resources/operations_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => + __DIR__ . + '/../resources/operations_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'longrunning.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * [Operations.GetOperation][google.longrunning.Operations.GetOperation] or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + * corresponding to `Code.CANCELLED`. + * + * Sample code: + * ``` + * $operationsClient = new OperationsClient(); + * try { + * $name = 'name'; + * $operationsClient->cancelOperation($name); + * } finally { + * $operationsClient->close(); + * } + * ``` + * + * @param string $name The name of the operation resource to be cancelled. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function cancelOperation($name, array $optionalArgs = []) + { + $request = new CancelOperationRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'CancelOperation', + GPBEmpty::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * Sample code: + * ``` + * $operationsClient = new OperationsClient(); + * try { + * $name = 'name'; + * $operationsClient->deleteOperation($name); + * } finally { + * $operationsClient->close(); + * } + * ``` + * + * @param string $name The name of the operation resource to be deleted. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteOperation($name, array $optionalArgs = []) + { + $request = new DeleteOperationRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'DeleteOperation', + GPBEmpty::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * Sample code: + * ``` + * $operationsClient = new OperationsClient(); + * try { + * $name = 'name'; + * $response = $operationsClient->getOperation($name); + * } finally { + * $operationsClient->close(); + * } + * ``` + * + * @param string $name The name of the operation resource. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\LongRunning\Operation + * + * @throws ApiException if the remote call fails + */ + public function getOperation($name, array $optionalArgs = []) + { + $request = new GetOperationRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'GetOperation', + Operation::class, + $optionalArgs, + $request + )->wait(); + } + + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. + * + * NOTE: the `name` binding allows API services to override the binding + * to use different resource name schemes, such as `users/*/operations`. To + * override the binding, API services can add a binding such as + * `"/v1/{name=users/*}/operations"` to their service configuration. + * For backwards compatibility, the default name includes the operations + * collection id, however overriding users must ensure the name binding + * is the parent resource, without the operations collection id. + * + * Sample code: + * ``` + * $operationsClient = new OperationsClient(); + * try { + * $name = 'name'; + * $filter = 'filter'; + * // Iterate over pages of elements + * $pagedResponse = $operationsClient->listOperations($name, $filter); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $operationsClient->listOperations($name, $filter); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $operationsClient->close(); + * } + * ``` + * + * @param string $name The name of the operation's parent resource. + * @param string $filter The standard list filter. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listOperations($name, $filter, array $optionalArgs = []) + { + $request = new ListOperationsRequest(); + $requestParamHeaders = []; + $request->setName($name); + $request->setFilter($filter); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->getPagedListResponse( + 'ListOperations', + $optionalArgs, + ListOperationsResponse::class, + $request + ); + } + + /** + * Waits until the specified long-running operation is done or reaches at most + * a specified timeout, returning the latest state. If the operation is + * already done, the latest state is immediately returned. If the timeout + * specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + * timeout is used. If the server does not support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * Note that this method is on a best-effort basis. It may return the latest + * state before the specified timeout (including immediately), meaning even an + * immediate response is no guarantee that the operation is done. + * + * Sample code: + * ``` + * $operationsClient = new OperationsClient(); + * try { + * $response = $operationsClient->waitOperation(); + * } finally { + * $operationsClient->close(); + * } + * ``` + * + * @param array $optionalArgs { + * Optional. + * + * @type string $name + * The name of the operation resource to wait on. + * @type Duration $timeout + * The maximum duration to wait before timing out. If left blank, the wait + * will be at most the time permitted by the underlying HTTP/RPC protocol. + * If RPC context deadline is also specified, the shorter one will be used. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\LongRunning\Operation + * + * @throws ApiException if the remote call fails + */ + public function waitOperation(array $optionalArgs = []) + { + $request = new WaitOperationRequest(); + if (isset($optionalArgs['name'])) { + $request->setName($optionalArgs['name']); + } + + if (isset($optionalArgs['timeout'])) { + $request->setTimeout($optionalArgs['timeout']); + } + + return $this->startCall( + 'WaitOperation', + Operation::class, + $optionalArgs, + $request + )->wait(); + } +} diff --git a/LongRunning/src/LongRunning/GetOperationRequest.php b/LongRunning/src/LongRunning/GetOperationRequest.php index 061a192a4b37..d89d75cc6240 100644 --- a/LongRunning/src/LongRunning/GetOperationRequest.php +++ b/LongRunning/src/LongRunning/GetOperationRequest.php @@ -22,6 +22,19 @@ class GetOperationRequest extends \Google\Protobuf\Internal\Message */ private $name = ''; + /** + * @param string $name The name of the operation resource. + * + * @return \Google\LongRunning\GetOperationRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + /** * Constructor. * diff --git a/LongRunning/src/LongRunning/ListOperationsRequest.php b/LongRunning/src/LongRunning/ListOperationsRequest.php index 75b65eceaf90..3ad0bebe826d 100644 --- a/LongRunning/src/LongRunning/ListOperationsRequest.php +++ b/LongRunning/src/LongRunning/ListOperationsRequest.php @@ -40,6 +40,21 @@ class ListOperationsRequest extends \Google\Protobuf\Internal\Message */ private $page_token = ''; + /** + * @param string $name The name of the operation's parent resource. + * @param string $filter The standard list filter. + * + * @return \Google\LongRunning\ListOperationsRequest + * + * @experimental + */ + public static function build(string $name, string $filter): self + { + return (new self()) + ->setName($name) + ->setFilter($filter); + } + /** * Constructor. * diff --git a/LongRunning/src/LongRunning/OperationsClient.php b/LongRunning/src/LongRunning/OperationsClient.php new file mode 100644 index 000000000000..04e271747a37 --- /dev/null +++ b/LongRunning/src/LongRunning/OperationsClient.php @@ -0,0 +1,36 @@ + [ + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\LongRunning\Operation', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getOperations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\LongRunning\ListOperationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'WaitOperation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\LongRunning\Operation', + ], + ], + ], +]; diff --git a/LongRunning/src/ApiCore/LongRunning/resources/operations_rest_client_config.php b/LongRunning/src/LongRunning/resources/operations_rest_client_config.php similarity index 100% rename from LongRunning/src/ApiCore/LongRunning/resources/operations_rest_client_config.php rename to LongRunning/src/LongRunning/resources/operations_rest_client_config.php diff --git a/LongRunning/tests/Unit/Client/OperationsClientTest.php b/LongRunning/tests/Unit/Client/OperationsClientTest.php new file mode 100644 index 000000000000..9bfb9671abca --- /dev/null +++ b/LongRunning/tests/Unit/Client/OperationsClientTest.php @@ -0,0 +1,417 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return \Google\LongRunning\Client\OperationsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new \Google\LongRunning\Client\OperationsClient($options); + } + + /** @test */ + public function cancelOperationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $request = (new CancelOperationRequest()) + ->setName($name); + $gapicClient->cancelOperation($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/CancelOperation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function cancelOperationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new CancelOperationRequest()) + ->setName($name); + try { + $gapicClient->cancelOperation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteOperationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $request = (new DeleteOperationRequest()) + ->setName($name); + $gapicClient->deleteOperation($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/DeleteOperation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteOperationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new DeleteOperationRequest()) + ->setName($name); + try { + $gapicClient->deleteOperation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getOperationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $done = true; + $expectedResponse = new Operation(); + $expectedResponse->setName($name2); + $expectedResponse->setDone($done); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $request = (new GetOperationRequest()) + ->setName($name); + $response = $gapicClient->getOperation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getOperationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new GetOperationRequest()) + ->setName($name); + try { + $gapicClient->getOperation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOperationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $operationsElement = new Operation(); + $operations = [ + $operationsElement, + ]; + $expectedResponse = new ListOperationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setOperations($operations); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $filter = 'filter-1274492040'; + $request = (new ListOperationsRequest()) + ->setName($name) + ->setFilter($filter); + $response = $gapicClient->listOperations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getOperations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/ListOperations', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getFilter(); + $this->assertProtobufEquals($filter, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOperationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $filter = 'filter-1274492040'; + $request = (new ListOperationsRequest()) + ->setName($name) + ->setFilter($filter); + try { + $gapicClient->listOperations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function waitOperationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $done = true; + $expectedResponse = new Operation(); + $expectedResponse->setName($name2); + $expectedResponse->setDone($done); + $transport->addResponse($expectedResponse); + $request = new WaitOperationRequest(); + $response = $gapicClient->waitOperation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/WaitOperation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function waitOperationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new WaitOperationRequest(); + try { + $gapicClient->waitOperation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function cancelOperationAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $request = (new CancelOperationRequest()) + ->setName($name); + $gapicClient->cancelOperationAsync($request)->wait(); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/CancelOperation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/LongRunning/tests/Unit/OperationsClientTest.php b/LongRunning/tests/Unit/OperationsClientTest.php index 0da33f5bc555..828e560a19c1 100644 --- a/LongRunning/tests/Unit/OperationsClientTest.php +++ b/LongRunning/tests/Unit/OperationsClientTest.php @@ -51,13 +51,13 @@ private function createCredentials() return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); } - /** @return \Google\ApiCore\LongRunning\OperationsClient */ + /** @return \Google\LongRunning\OperationsClient */ private function createClient(array $options = []) { $options += [ 'credentials' => $this->createCredentials(), ]; - return new \Google\ApiCore\LongRunning\OperationsClient($options); + return new \Google\LongRunning\OperationsClient($options); } /** @test */ From 11a8069c4f1faa99c350ce690b077d3812f27566 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 11 Apr 2024 01:24:33 +0200 Subject: [PATCH 23/86] fix(deps): update dependency google/grafeas to ^0.10.0 (#7192) --- BinaryAuthorization/composer.json | 2 +- ContainerAnalysis/composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BinaryAuthorization/composer.json b/BinaryAuthorization/composer.json index 5e3b45c984a4..43da8ce5eec8 100644 --- a/BinaryAuthorization/composer.json +++ b/BinaryAuthorization/composer.json @@ -25,7 +25,7 @@ "require": { "php": "^8.0", "google/gax": "^1.30", - "google/grafeas": "^0.9.0" + "google/grafeas": "^0.10.0" }, "require-dev": { "phpunit/phpunit": "^9.0" diff --git a/ContainerAnalysis/composer.json b/ContainerAnalysis/composer.json index 674f132b47cb..3c360d28ca14 100644 --- a/ContainerAnalysis/composer.json +++ b/ContainerAnalysis/composer.json @@ -25,7 +25,7 @@ "require": { "php": "^8.0", "google/gax": "^1.30", - "google/grafeas": "^0.9.0" + "google/grafeas": "^0.10.0" }, "require-dev": { "phpunit/phpunit": "^9.0" From 54dc13de81cd98f335a0abf20998afcb1707abe4 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 11 Apr 2024 01:25:16 +0200 Subject: [PATCH 24/86] chore(deps): update dependency google/cloud-pubsub to v2 (#7158) --- Logging/composer.json | 2 +- Spanner/composer.json | 2 +- Storage/composer.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Logging/composer.json b/Logging/composer.json index a50da625ca1a..dd38cea71c3f 100644 --- a/Logging/composer.json +++ b/Logging/composer.json @@ -18,7 +18,7 @@ "fig/log-test": "^1.1", "google/cloud-storage": "^1.3", "google/cloud-bigquery": "^1.0", - "google/cloud-pubsub": "^1.0", + "google/cloud-pubsub": "^2.0", "opis/closure": "^3", "monolog/monolog": "^2.9|3.0" }, diff --git a/Spanner/composer.json b/Spanner/composer.json index 428e150b02bd..42ab1da8a32f 100644 --- a/Spanner/composer.json +++ b/Spanner/composer.json @@ -16,7 +16,7 @@ "phpdocumentor/reflection": "^5.3.3", "phpdocumentor/reflection-docblock": "^5.3", "erusev/parsedown": "^1.6", - "google/cloud-pubsub": "^1.0" + "google/cloud-pubsub": "^2.0" }, "suggest": { "ext-protobuf": "Provides a significant increase in throughput over the pure PHP protobuf implementation. See https://cloud.google.com/php/grpc for installation instructions.", diff --git a/Storage/composer.json b/Storage/composer.json index e64120f012fd..4c9900893a58 100644 --- a/Storage/composer.json +++ b/Storage/composer.json @@ -16,7 +16,7 @@ "phpdocumentor/reflection-docblock": "^5.3", "erusev/parsedown": "^1.6", "phpseclib/phpseclib": "^2.0||^3.0", - "google/cloud-pubsub": "^1.0" + "google/cloud-pubsub": "^2.0" }, "suggest": { "phpseclib/phpseclib": "May be used in place of OpenSSL for creating signed Cloud Storage URLs. Please require version ^2.", From d537750244c7783b4845bfcdd7d158d74b1a5852 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 12 Apr 2024 07:39:27 -0700 Subject: [PATCH 25/86] feat: fix inventories sub-API publication by adding correct child_type in the API proto (#7214) docs: A comment for field `store_code` in message `.google.shopping.merchant.inventories.v1beta.LocalInventory` is changed docs: A comment for field `region` in message `.google.shopping.merchant.inventories.v1beta.RegionalInventory` is changed PiperOrigin-RevId: 623809565 Source-Link: https://github.com/googleapis/googleapis/commit/5e42183e68f452455ade3e8bfb834a772ad9164f Source-Link: https://github.com/googleapis/googleapis-gen/commit/101a9141713fcff4d9e4109d6a0c730a49bc0514 Copy-Tag: eyJwIjoiU2hvcHBpbmdNZXJjaGFudEludmVudG9yaWVzLy5Pd2xCb3QueWFtbCIsImgiOiIxMDFhOTE0MTcxM2ZjZmY0ZDllNDEwOWQ2YTBjNzMwYTQ5YmMwNTE0In0= --- .../metadata/V1Beta/Localinventory.php | Bin 3410 -> 3584 bytes .../metadata/V1Beta/Regionalinventory.php | Bin 3301 -> 3402 bytes .../insert_local_inventory.php | 24 +++++----- .../list_local_inventories.php | 15 ++++--- .../insert_regional_inventory.php | 17 ++++--- .../list_regional_inventories.php | 13 +++--- .../Client/LocalInventoryServiceClient.php | 20 +++++++++ .../Client/RegionalInventoryServiceClient.php | 20 +++++++++ .../V1beta/InsertLocalInventoryRequest.php | 6 +-- .../V1beta/InsertRegionalInventoryRequest.php | 6 +-- .../V1beta/ListLocalInventoriesRequest.php | 7 +-- .../V1beta/ListRegionalInventoriesRequest.php | 7 +-- .../src/V1beta/LocalInventory.php | 42 ++++++++++-------- .../src/V1beta/RegionalInventory.php | 14 +++--- ...al_inventory_service_descriptor_config.php | 1 + ...al_inventory_service_descriptor_config.php | 1 + .../LocalInventoryServiceClientTest.php | 20 ++++----- .../RegionalInventoryServiceClientTest.php | 20 ++++----- 18 files changed, 145 insertions(+), 88 deletions(-) diff --git a/ShoppingMerchantInventories/metadata/V1Beta/Localinventory.php b/ShoppingMerchantInventories/metadata/V1Beta/Localinventory.php index ebb3f0f7041073c22beec9e24727055a061abf50..626bb7c826e27109bf7df97e6fc73be1c60d43be 100644 GIT binary patch delta 190 zcmca4)gZHB7Bka4kPf3*kifeE>u|05Pdf>>q zS%B4&iKU&9OM3D}PBFQ{($wM-AxAE@g2bZKyb=jUuv$Z)+Fy>^LX&IRv?tfH?_}8x zQs2!bEs0m@=4_7d%tDlW+{N{vs>Pf3*kifeE>F+Xr*64K&g zEhx%NPL*Jp?9ZyS*@2aZi8+!>da@yxm{ehDYH^8>Fc(`vVo_>di3B5D+vIiZyBK>X mXL87kV3Xc_isJ_}$3jLf{p9>yy~z)lwI_e&DVV&O*B1bmAS~Gc diff --git a/ShoppingMerchantInventories/metadata/V1Beta/Regionalinventory.php b/ShoppingMerchantInventories/metadata/V1Beta/Regionalinventory.php index a9c8e8e126d4fca08e59e35cf34df6ae5f41af1c..749b3ecc41d3e0a68166178d61ffa16393c883ca 100644 GIT binary patch delta 140 zcmaDVc}i--0%n$nLR`)hy`3jNXTHaHVe&B+J8>~CwxZPZ%=|nFW(7tKPA9epj!X|6 zSvO0t)-tm6GIGgH-oPO~c>^1VgbNp2L1IyAUWo)FSfvS2l^;B}h0%n%qf?UoMy`3jNXTHaHcJeV6I}u?nwxZPZ%=|nFW(7tKPABFEj!c`S zS!)@YVqzxGVp9YuC`c?y%`1^$ge#cDeuQNjBbVIdY%VzoA#5sy;<+X(atm*E;^1Hf E060$}KmY&$ diff --git a/ShoppingMerchantInventories/samples/V1beta/LocalInventoryServiceClient/insert_local_inventory.php b/ShoppingMerchantInventories/samples/V1beta/LocalInventoryServiceClient/insert_local_inventory.php index bac18eb69cf0..01f58e746fa5 100644 --- a/ShoppingMerchantInventories/samples/V1beta/LocalInventoryServiceClient/insert_local_inventory.php +++ b/ShoppingMerchantInventories/samples/V1beta/LocalInventoryServiceClient/insert_local_inventory.php @@ -39,15 +39,19 @@ * It might take up to 30 minutes for the new or updated `LocalInventory` * resource to appear in products. * - * @param string $parent The account and product where this inventory will be inserted. + * @param string $formattedParent The account and product where this inventory will be inserted. * Format: `accounts/{account}/products/{product}` - * @param string $localInventoryStoreCode Store code (the store ID from your Business Profile) of the - * physical store the product is sold in. See the [Local product inventory - * feed specification](https://support.google.com/merchants/answer/3061342) - * for more information. + * Please see {@see LocalInventoryServiceClient::productName()} for help formatting this field. + * @param string $localInventoryStoreCode Immutable. Store code (the store ID from your Business Profile) + * of the physical store the product is sold in. See the [Local product + * inventory feed + * specification](https://support.google.com/merchants/answer/3061342) for + * more information. */ -function insert_local_inventory_sample(string $parent, string $localInventoryStoreCode): void -{ +function insert_local_inventory_sample( + string $formattedParent, + string $localInventoryStoreCode +): void { // Create a client. $localInventoryServiceClient = new LocalInventoryServiceClient(); @@ -55,7 +59,7 @@ function insert_local_inventory_sample(string $parent, string $localInventorySto $localInventory = (new LocalInventory()) ->setStoreCode($localInventoryStoreCode); $request = (new InsertLocalInventoryRequest()) - ->setParent($parent) + ->setParent($formattedParent) ->setLocalInventory($localInventory); // Call the API and handle any network failures. @@ -79,9 +83,9 @@ function insert_local_inventory_sample(string $parent, string $localInventorySto */ function callSample(): void { - $parent = '[PARENT]'; + $formattedParent = LocalInventoryServiceClient::productName('[ACCOUNT]', '[PRODUCT]'); $localInventoryStoreCode = '[STORE_CODE]'; - insert_local_inventory_sample($parent, $localInventoryStoreCode); + insert_local_inventory_sample($formattedParent, $localInventoryStoreCode); } // [END merchantapi_v1beta_generated_LocalInventoryService_InsertLocalInventory_sync] diff --git a/ShoppingMerchantInventories/samples/V1beta/LocalInventoryServiceClient/list_local_inventories.php b/ShoppingMerchantInventories/samples/V1beta/LocalInventoryServiceClient/list_local_inventories.php index 7590e4babdb7..a87dba50891c 100644 --- a/ShoppingMerchantInventories/samples/V1beta/LocalInventoryServiceClient/list_local_inventories.php +++ b/ShoppingMerchantInventories/samples/V1beta/LocalInventoryServiceClient/list_local_inventories.php @@ -37,18 +37,19 @@ * * `LocalInventory` resources are listed per product for a given account. * - * @param string $parent The `name` of the parent product to list local inventories for. - * Format: - * `accounts/{account}/products/{product}` + * @param string $formattedParent The `name` of the parent product to list local inventories for. + * Format: + * `accounts/{account}/products/{product}` + * Please see {@see LocalInventoryServiceClient::productName()} for help formatting this field. */ -function list_local_inventories_sample(string $parent): void +function list_local_inventories_sample(string $formattedParent): void { // Create a client. $localInventoryServiceClient = new LocalInventoryServiceClient(); // Prepare the request message. $request = (new ListLocalInventoriesRequest()) - ->setParent($parent); + ->setParent($formattedParent); // Call the API and handle any network failures. try { @@ -75,8 +76,8 @@ function list_local_inventories_sample(string $parent): void */ function callSample(): void { - $parent = '[PARENT]'; + $formattedParent = LocalInventoryServiceClient::productName('[ACCOUNT]', '[PRODUCT]'); - list_local_inventories_sample($parent); + list_local_inventories_sample($formattedParent); } // [END merchantapi_v1beta_generated_LocalInventoryService_ListLocalInventories_sync] diff --git a/ShoppingMerchantInventories/samples/V1beta/RegionalInventoryServiceClient/insert_regional_inventory.php b/ShoppingMerchantInventories/samples/V1beta/RegionalInventoryServiceClient/insert_regional_inventory.php index 8744ef2144d1..0e213e8a6030 100644 --- a/ShoppingMerchantInventories/samples/V1beta/RegionalInventoryServiceClient/insert_regional_inventory.php +++ b/ShoppingMerchantInventories/samples/V1beta/RegionalInventoryServiceClient/insert_regional_inventory.php @@ -39,15 +39,18 @@ * It might take up to 30 minutes for the new or updated `RegionalInventory` * resource to appear in products. * - * @param string $parent The account and product where this inventory will be inserted. + * @param string $formattedParent The account and product where this inventory will be inserted. * Format: `accounts/{account}/products/{product}` - * @param string $regionalInventoryRegion ID of the region for this + * Please see {@see RegionalInventoryServiceClient::productName()} for help formatting this field. + * @param string $regionalInventoryRegion Immutable. ID of the region for this * `RegionalInventory` resource. See the [Regional availability and * pricing](https://support.google.com/merchants/answer/9698880) for more * details. */ -function insert_regional_inventory_sample(string $parent, string $regionalInventoryRegion): void -{ +function insert_regional_inventory_sample( + string $formattedParent, + string $regionalInventoryRegion +): void { // Create a client. $regionalInventoryServiceClient = new RegionalInventoryServiceClient(); @@ -55,7 +58,7 @@ function insert_regional_inventory_sample(string $parent, string $regionalInvent $regionalInventory = (new RegionalInventory()) ->setRegion($regionalInventoryRegion); $request = (new InsertRegionalInventoryRequest()) - ->setParent($parent) + ->setParent($formattedParent) ->setRegionalInventory($regionalInventory); // Call the API and handle any network failures. @@ -79,9 +82,9 @@ function insert_regional_inventory_sample(string $parent, string $regionalInvent */ function callSample(): void { - $parent = '[PARENT]'; + $formattedParent = RegionalInventoryServiceClient::productName('[ACCOUNT]', '[PRODUCT]'); $regionalInventoryRegion = '[REGION]'; - insert_regional_inventory_sample($parent, $regionalInventoryRegion); + insert_regional_inventory_sample($formattedParent, $regionalInventoryRegion); } // [END merchantapi_v1beta_generated_RegionalInventoryService_InsertRegionalInventory_sync] diff --git a/ShoppingMerchantInventories/samples/V1beta/RegionalInventoryServiceClient/list_regional_inventories.php b/ShoppingMerchantInventories/samples/V1beta/RegionalInventoryServiceClient/list_regional_inventories.php index e4b74f5634d2..c73c599e45b8 100644 --- a/ShoppingMerchantInventories/samples/V1beta/RegionalInventoryServiceClient/list_regional_inventories.php +++ b/ShoppingMerchantInventories/samples/V1beta/RegionalInventoryServiceClient/list_regional_inventories.php @@ -37,17 +37,18 @@ * * `RegionalInventory` resources are listed per product for a given account. * - * @param string $parent The `name` of the parent product to list `RegionalInventory` - * resources for. Format: `accounts/{account}/products/{product}` + * @param string $formattedParent The `name` of the parent product to list `RegionalInventory` + * resources for. Format: `accounts/{account}/products/{product}` + * Please see {@see RegionalInventoryServiceClient::productName()} for help formatting this field. */ -function list_regional_inventories_sample(string $parent): void +function list_regional_inventories_sample(string $formattedParent): void { // Create a client. $regionalInventoryServiceClient = new RegionalInventoryServiceClient(); // Prepare the request message. $request = (new ListRegionalInventoriesRequest()) - ->setParent($parent); + ->setParent($formattedParent); // Call the API and handle any network failures. try { @@ -74,8 +75,8 @@ function list_regional_inventories_sample(string $parent): void */ function callSample(): void { - $parent = '[PARENT]'; + $formattedParent = RegionalInventoryServiceClient::productName('[ACCOUNT]', '[PRODUCT]'); - list_regional_inventories_sample($parent); + list_regional_inventories_sample($formattedParent); } // [END merchantapi_v1beta_generated_RegionalInventoryService_ListRegionalInventories_sync] diff --git a/ShoppingMerchantInventories/src/V1beta/Client/LocalInventoryServiceClient.php b/ShoppingMerchantInventories/src/V1beta/Client/LocalInventoryServiceClient.php index 43be9f6d3f68..fa0307140184 100644 --- a/ShoppingMerchantInventories/src/V1beta/Client/LocalInventoryServiceClient.php +++ b/ShoppingMerchantInventories/src/V1beta/Client/LocalInventoryServiceClient.php @@ -127,11 +127,31 @@ public static function localInventoryName(string $account, string $product, stri ]); } + /** + * Formats a string containing the fully-qualified path to represent a product + * resource. + * + * @param string $account + * @param string $product + * + * @return string The formatted product resource. + * + * @experimental + */ + public static function productName(string $account, string $product): string + { + return self::getPathTemplate('product')->render([ + 'account' => $account, + 'product' => $product, + ]); + } + /** * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: * Template: Pattern * - localInventory: accounts/{account}/products/{product}/localInventories/{store_code} + * - product: accounts/{account}/products/{product} * * 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 diff --git a/ShoppingMerchantInventories/src/V1beta/Client/RegionalInventoryServiceClient.php b/ShoppingMerchantInventories/src/V1beta/Client/RegionalInventoryServiceClient.php index f1afdfb979e0..22c19b9ba2f5 100644 --- a/ShoppingMerchantInventories/src/V1beta/Client/RegionalInventoryServiceClient.php +++ b/ShoppingMerchantInventories/src/V1beta/Client/RegionalInventoryServiceClient.php @@ -107,6 +107,25 @@ private static function getClientDefaults() ]; } + /** + * Formats a string containing the fully-qualified path to represent a product + * resource. + * + * @param string $account + * @param string $product + * + * @return string The formatted product resource. + * + * @experimental + */ + public static function productName(string $account, string $product): string + { + return self::getPathTemplate('product')->render([ + 'account' => $account, + 'product' => $product, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * regional_inventory resource. @@ -132,6 +151,7 @@ public static function regionalInventoryName(string $account, string $product, s * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: * Template: Pattern + * - product: accounts/{account}/products/{product} * - regionalInventory: accounts/{account}/products/{product}/regionalInventories/{region} * * The optional $template argument can be supplied to specify a particular pattern, diff --git a/ShoppingMerchantInventories/src/V1beta/InsertLocalInventoryRequest.php b/ShoppingMerchantInventories/src/V1beta/InsertLocalInventoryRequest.php index 4e52a7996bc8..e3d63aecbede 100644 --- a/ShoppingMerchantInventories/src/V1beta/InsertLocalInventoryRequest.php +++ b/ShoppingMerchantInventories/src/V1beta/InsertLocalInventoryRequest.php @@ -19,7 +19,7 @@ class InsertLocalInventoryRequest extends \Google\Protobuf\Internal\Message * Required. The account and product where this inventory will be inserted. * Format: `accounts/{account}/products/{product}` * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ protected $parent = ''; /** @@ -55,7 +55,7 @@ public function __construct($data = NULL) { * Required. The account and product where this inventory will be inserted. * Format: `accounts/{account}/products/{product}` * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string */ public function getParent() @@ -67,7 +67,7 @@ public function getParent() * Required. The account and product where this inventory will be inserted. * Format: `accounts/{account}/products/{product}` * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var * @return $this */ diff --git a/ShoppingMerchantInventories/src/V1beta/InsertRegionalInventoryRequest.php b/ShoppingMerchantInventories/src/V1beta/InsertRegionalInventoryRequest.php index 7c0ea19d320f..dab8fb1c2941 100644 --- a/ShoppingMerchantInventories/src/V1beta/InsertRegionalInventoryRequest.php +++ b/ShoppingMerchantInventories/src/V1beta/InsertRegionalInventoryRequest.php @@ -19,7 +19,7 @@ class InsertRegionalInventoryRequest extends \Google\Protobuf\Internal\Message * Required. The account and product where this inventory will be inserted. * Format: `accounts/{account}/products/{product}` * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ protected $parent = ''; /** @@ -55,7 +55,7 @@ public function __construct($data = NULL) { * Required. The account and product where this inventory will be inserted. * Format: `accounts/{account}/products/{product}` * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string */ public function getParent() @@ -67,7 +67,7 @@ public function getParent() * Required. The account and product where this inventory will be inserted. * Format: `accounts/{account}/products/{product}` * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var * @return $this */ diff --git a/ShoppingMerchantInventories/src/V1beta/ListLocalInventoriesRequest.php b/ShoppingMerchantInventories/src/V1beta/ListLocalInventoriesRequest.php index e786e9639015..a18b47ce8fc8 100644 --- a/ShoppingMerchantInventories/src/V1beta/ListLocalInventoriesRequest.php +++ b/ShoppingMerchantInventories/src/V1beta/ListLocalInventoriesRequest.php @@ -20,7 +20,7 @@ class ListLocalInventoriesRequest extends \Google\Protobuf\Internal\Message * Format: * `accounts/{account}/products/{product}` * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ protected $parent = ''; /** @@ -49,6 +49,7 @@ class ListLocalInventoriesRequest extends \Google\Protobuf\Internal\Message * @param string $parent Required. The `name` of the parent product to list local inventories for. * Format: * `accounts/{account}/products/{product}` + * Please see {@see LocalInventoryServiceClient::productName()} for help formatting this field. * * @return \Google\Shopping\Merchant\Inventories\V1beta\ListLocalInventoriesRequest * @@ -95,7 +96,7 @@ public function __construct($data = NULL) { * Format: * `accounts/{account}/products/{product}` * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string */ public function getParent() @@ -108,7 +109,7 @@ public function getParent() * Format: * `accounts/{account}/products/{product}` * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var * @return $this */ diff --git a/ShoppingMerchantInventories/src/V1beta/ListRegionalInventoriesRequest.php b/ShoppingMerchantInventories/src/V1beta/ListRegionalInventoriesRequest.php index aaa8fc4a1ebb..3cd4da687599 100644 --- a/ShoppingMerchantInventories/src/V1beta/ListRegionalInventoriesRequest.php +++ b/ShoppingMerchantInventories/src/V1beta/ListRegionalInventoriesRequest.php @@ -19,7 +19,7 @@ class ListRegionalInventoriesRequest extends \Google\Protobuf\Internal\Message * Required. The `name` of the parent product to list `RegionalInventory` * resources for. Format: `accounts/{account}/products/{product}` * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ protected $parent = ''; /** @@ -47,6 +47,7 @@ class ListRegionalInventoriesRequest extends \Google\Protobuf\Internal\Message /** * @param string $parent Required. The `name` of the parent product to list `RegionalInventory` * resources for. Format: `accounts/{account}/products/{product}` + * Please see {@see RegionalInventoryServiceClient::productName()} for help formatting this field. * * @return \Google\Shopping\Merchant\Inventories\V1beta\ListRegionalInventoriesRequest * @@ -91,7 +92,7 @@ public function __construct($data = NULL) { * Required. The `name` of the parent product to list `RegionalInventory` * resources for. Format: `accounts/{account}/products/{product}` * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string */ public function getParent() @@ -103,7 +104,7 @@ public function getParent() * Required. The `name` of the parent product to list `RegionalInventory` * resources for. Format: `accounts/{account}/products/{product}` * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var * @return $this */ diff --git a/ShoppingMerchantInventories/src/V1beta/LocalInventory.php b/ShoppingMerchantInventories/src/V1beta/LocalInventory.php index 640968d14647..708bd5459701 100644 --- a/ShoppingMerchantInventories/src/V1beta/LocalInventory.php +++ b/ShoppingMerchantInventories/src/V1beta/LocalInventory.php @@ -35,12 +35,13 @@ class LocalInventory extends \Google\Protobuf\Internal\Message */ protected $account = 0; /** - * Required. Store code (the store ID from your Business Profile) of the - * physical store the product is sold in. See the [Local product inventory - * feed specification](https://support.google.com/merchants/answer/3061342) - * for more information. + * Required. Immutable. Store code (the store ID from your Business Profile) + * of the physical store the product is sold in. See the [Local product + * inventory feed + * specification](https://support.google.com/merchants/answer/3061342) for + * more information. * - * Generated from protobuf field string store_code = 3 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string store_code = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; */ protected $store_code = ''; /** @@ -128,10 +129,11 @@ class LocalInventory extends \Google\Protobuf\Internal\Message * Output only. The account that owns the product. This field will be ignored * if set by the client. * @type string $store_code - * Required. Store code (the store ID from your Business Profile) of the - * physical store the product is sold in. See the [Local product inventory - * feed specification](https://support.google.com/merchants/answer/3061342) - * for more information. + * Required. Immutable. Store code (the store ID from your Business Profile) + * of the physical store the product is sold in. See the [Local product + * inventory feed + * specification](https://support.google.com/merchants/answer/3061342) for + * more information. * @type \Google\Shopping\Type\Price $price * Price of the product at this store. * @type \Google\Shopping\Type\Price $sale_price @@ -232,12 +234,13 @@ public function setAccount($var) } /** - * Required. Store code (the store ID from your Business Profile) of the - * physical store the product is sold in. See the [Local product inventory - * feed specification](https://support.google.com/merchants/answer/3061342) - * for more information. + * Required. Immutable. Store code (the store ID from your Business Profile) + * of the physical store the product is sold in. See the [Local product + * inventory feed + * specification](https://support.google.com/merchants/answer/3061342) for + * more information. * - * Generated from protobuf field string store_code = 3 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string store_code = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; * @return string */ public function getStoreCode() @@ -246,12 +249,13 @@ public function getStoreCode() } /** - * Required. Store code (the store ID from your Business Profile) of the - * physical store the product is sold in. See the [Local product inventory - * feed specification](https://support.google.com/merchants/answer/3061342) - * for more information. + * Required. Immutable. Store code (the store ID from your Business Profile) + * of the physical store the product is sold in. See the [Local product + * inventory feed + * specification](https://support.google.com/merchants/answer/3061342) for + * more information. * - * Generated from protobuf field string store_code = 3 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string store_code = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; * @param string $var * @return $this */ diff --git a/ShoppingMerchantInventories/src/V1beta/RegionalInventory.php b/ShoppingMerchantInventories/src/V1beta/RegionalInventory.php index f6a640037127..61f20a34609c 100644 --- a/ShoppingMerchantInventories/src/V1beta/RegionalInventory.php +++ b/ShoppingMerchantInventories/src/V1beta/RegionalInventory.php @@ -36,12 +36,12 @@ class RegionalInventory extends \Google\Protobuf\Internal\Message */ protected $account = 0; /** - * Required. ID of the region for this + * Required. Immutable. ID of the region for this * `RegionalInventory` resource. See the [Regional availability and * pricing](https://support.google.com/merchants/answer/9698880) for more * details. * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; */ protected $region = ''; /** @@ -96,7 +96,7 @@ class RegionalInventory extends \Google\Protobuf\Internal\Message * Output only. The account that owns the product. This field will be ignored * if set by the client. * @type string $region - * Required. ID of the region for this + * Required. Immutable. ID of the region for this * `RegionalInventory` resource. See the [Regional availability and * pricing](https://support.google.com/merchants/answer/9698880) for more * details. @@ -183,12 +183,12 @@ public function setAccount($var) } /** - * Required. ID of the region for this + * Required. Immutable. ID of the region for this * `RegionalInventory` resource. See the [Regional availability and * pricing](https://support.google.com/merchants/answer/9698880) for more * details. * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; * @return string */ public function getRegion() @@ -197,12 +197,12 @@ public function getRegion() } /** - * Required. ID of the region for this + * Required. Immutable. ID of the region for this * `RegionalInventory` resource. See the [Regional availability and * pricing](https://support.google.com/merchants/answer/9698880) for more * details. * - * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field string region = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; * @param string $var * @return $this */ diff --git a/ShoppingMerchantInventories/src/V1beta/resources/local_inventory_service_descriptor_config.php b/ShoppingMerchantInventories/src/V1beta/resources/local_inventory_service_descriptor_config.php index 5e3094b48415..ecfd84ebebe5 100644 --- a/ShoppingMerchantInventories/src/V1beta/resources/local_inventory_service_descriptor_config.php +++ b/ShoppingMerchantInventories/src/V1beta/resources/local_inventory_service_descriptor_config.php @@ -49,6 +49,7 @@ ], 'templateMap' => [ 'localInventory' => 'accounts/{account}/products/{product}/localInventories/{store_code}', + 'product' => 'accounts/{account}/products/{product}', ], ], ], diff --git a/ShoppingMerchantInventories/src/V1beta/resources/regional_inventory_service_descriptor_config.php b/ShoppingMerchantInventories/src/V1beta/resources/regional_inventory_service_descriptor_config.php index 14a000b5300b..a4f93fcbeba4 100644 --- a/ShoppingMerchantInventories/src/V1beta/resources/regional_inventory_service_descriptor_config.php +++ b/ShoppingMerchantInventories/src/V1beta/resources/regional_inventory_service_descriptor_config.php @@ -48,6 +48,7 @@ ], ], 'templateMap' => [ + 'product' => 'accounts/{account}/products/{product}', 'regionalInventory' => 'accounts/{account}/products/{product}/regionalInventories/{region}', ], ], diff --git a/ShoppingMerchantInventories/tests/Unit/V1beta/Client/LocalInventoryServiceClientTest.php b/ShoppingMerchantInventories/tests/Unit/V1beta/Client/LocalInventoryServiceClientTest.php index 506dde4096c3..b0eeb897b607 100644 --- a/ShoppingMerchantInventories/tests/Unit/V1beta/Client/LocalInventoryServiceClientTest.php +++ b/ShoppingMerchantInventories/tests/Unit/V1beta/Client/LocalInventoryServiceClientTest.php @@ -153,12 +153,12 @@ public function insertLocalInventoryTest() $expectedResponse->setInstoreProductLocation($instoreProductLocation); $transport->addResponse($expectedResponse); // Mock request - $parent = 'parent-995424086'; + $formattedParent = $gapicClient->productName('[ACCOUNT]', '[PRODUCT]'); $localInventory = new LocalInventory(); $localInventoryStoreCode = 'localInventoryStoreCode1126909757'; $localInventory->setStoreCode($localInventoryStoreCode); $request = (new InsertLocalInventoryRequest()) - ->setParent($parent) + ->setParent($formattedParent) ->setLocalInventory($localInventory); $response = $gapicClient->insertLocalInventory($request); $this->assertEquals($expectedResponse, $response); @@ -168,7 +168,7 @@ public function insertLocalInventoryTest() $actualRequestObject = $actualRequests[0]->getRequestObject(); $this->assertSame('/google.shopping.merchant.inventories.v1beta.LocalInventoryService/InsertLocalInventory', $actualFuncCall); $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); + $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualRequestObject->getLocalInventory(); $this->assertProtobufEquals($localInventory, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -193,12 +193,12 @@ public function insertLocalInventoryExceptionTest() ], JSON_PRETTY_PRINT); $transport->addResponse(null, $status); // Mock request - $parent = 'parent-995424086'; + $formattedParent = $gapicClient->productName('[ACCOUNT]', '[PRODUCT]'); $localInventory = new LocalInventory(); $localInventoryStoreCode = 'localInventoryStoreCode1126909757'; $localInventory->setStoreCode($localInventoryStoreCode); $request = (new InsertLocalInventoryRequest()) - ->setParent($parent) + ->setParent($formattedParent) ->setLocalInventory($localInventory); try { $gapicClient->insertLocalInventory($request); @@ -232,9 +232,9 @@ public function listLocalInventoriesTest() $expectedResponse->setLocalInventories($localInventories); $transport->addResponse($expectedResponse); // Mock request - $parent = 'parent-995424086'; + $formattedParent = $gapicClient->productName('[ACCOUNT]', '[PRODUCT]'); $request = (new ListLocalInventoriesRequest()) - ->setParent($parent); + ->setParent($formattedParent); $response = $gapicClient->listLocalInventories($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -246,7 +246,7 @@ public function listLocalInventoriesTest() $actualRequestObject = $actualRequests[0]->getRequestObject(); $this->assertSame('/google.shopping.merchant.inventories.v1beta.LocalInventoryService/ListLocalInventories', $actualFuncCall); $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); + $this->assertProtobufEquals($formattedParent, $actualValue); $this->assertTrue($transport->isExhausted()); } @@ -269,9 +269,9 @@ public function listLocalInventoriesExceptionTest() ], JSON_PRETTY_PRINT); $transport->addResponse(null, $status); // Mock request - $parent = 'parent-995424086'; + $formattedParent = $gapicClient->productName('[ACCOUNT]', '[PRODUCT]'); $request = (new ListLocalInventoriesRequest()) - ->setParent($parent); + ->setParent($formattedParent); try { $gapicClient->listLocalInventories($request); // If the $gapicClient method call did not throw, fail the test diff --git a/ShoppingMerchantInventories/tests/Unit/V1beta/Client/RegionalInventoryServiceClientTest.php b/ShoppingMerchantInventories/tests/Unit/V1beta/Client/RegionalInventoryServiceClientTest.php index 28b2c73a171c..e615063ee973 100644 --- a/ShoppingMerchantInventories/tests/Unit/V1beta/Client/RegionalInventoryServiceClientTest.php +++ b/ShoppingMerchantInventories/tests/Unit/V1beta/Client/RegionalInventoryServiceClientTest.php @@ -145,12 +145,12 @@ public function insertRegionalInventoryTest() $expectedResponse->setAvailability($availability); $transport->addResponse($expectedResponse); // Mock request - $parent = 'parent-995424086'; + $formattedParent = $gapicClient->productName('[ACCOUNT]', '[PRODUCT]'); $regionalInventory = new RegionalInventory(); $regionalInventoryRegion = 'regionalInventoryRegion-40810671'; $regionalInventory->setRegion($regionalInventoryRegion); $request = (new InsertRegionalInventoryRequest()) - ->setParent($parent) + ->setParent($formattedParent) ->setRegionalInventory($regionalInventory); $response = $gapicClient->insertRegionalInventory($request); $this->assertEquals($expectedResponse, $response); @@ -160,7 +160,7 @@ public function insertRegionalInventoryTest() $actualRequestObject = $actualRequests[0]->getRequestObject(); $this->assertSame('/google.shopping.merchant.inventories.v1beta.RegionalInventoryService/InsertRegionalInventory', $actualFuncCall); $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); + $this->assertProtobufEquals($formattedParent, $actualValue); $actualValue = $actualRequestObject->getRegionalInventory(); $this->assertProtobufEquals($regionalInventory, $actualValue); $this->assertTrue($transport->isExhausted()); @@ -185,12 +185,12 @@ public function insertRegionalInventoryExceptionTest() ], JSON_PRETTY_PRINT); $transport->addResponse(null, $status); // Mock request - $parent = 'parent-995424086'; + $formattedParent = $gapicClient->productName('[ACCOUNT]', '[PRODUCT]'); $regionalInventory = new RegionalInventory(); $regionalInventoryRegion = 'regionalInventoryRegion-40810671'; $regionalInventory->setRegion($regionalInventoryRegion); $request = (new InsertRegionalInventoryRequest()) - ->setParent($parent) + ->setParent($formattedParent) ->setRegionalInventory($regionalInventory); try { $gapicClient->insertRegionalInventory($request); @@ -224,9 +224,9 @@ public function listRegionalInventoriesTest() $expectedResponse->setRegionalInventories($regionalInventories); $transport->addResponse($expectedResponse); // Mock request - $parent = 'parent-995424086'; + $formattedParent = $gapicClient->productName('[ACCOUNT]', '[PRODUCT]'); $request = (new ListRegionalInventoriesRequest()) - ->setParent($parent); + ->setParent($formattedParent); $response = $gapicClient->listRegionalInventories($request); $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); $resources = iterator_to_array($response->iterateAllElements()); @@ -238,7 +238,7 @@ public function listRegionalInventoriesTest() $actualRequestObject = $actualRequests[0]->getRequestObject(); $this->assertSame('/google.shopping.merchant.inventories.v1beta.RegionalInventoryService/ListRegionalInventories', $actualFuncCall); $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); + $this->assertProtobufEquals($formattedParent, $actualValue); $this->assertTrue($transport->isExhausted()); } @@ -261,9 +261,9 @@ public function listRegionalInventoriesExceptionTest() ], JSON_PRETTY_PRINT); $transport->addResponse(null, $status); // Mock request - $parent = 'parent-995424086'; + $formattedParent = $gapicClient->productName('[ACCOUNT]', '[PRODUCT]'); $request = (new ListRegionalInventoriesRequest()) - ->setParent($parent); + ->setParent($formattedParent); try { $gapicClient->listRegionalInventories($request); // If the $gapicClient method call did not throw, fail the test From 83c87e27dcfe04ae197a847d065f38901e74972e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 12 Apr 2024 07:39:55 -0700 Subject: [PATCH 26/86] feat: promote recommendation service to v1 (#7216) feat: promote blending search to v1 feat: promote healthcare search to v1 feat: promote online chunking search to v1 feat: support import data from Cloud Spanner, BigTable, SQL and Firestore feat: support boost/bury on multi-turn search docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 623947579 Source-Link: https://github.com/googleapis/googleapis/commit/83d7bf4b9cf3afb9d1146898a283c105f2cd66ec Source-Link: https://github.com/googleapis/googleapis-gen/commit/af3ef62eefbc9014f50d18416bf2dc0312e5b6a4 Copy-Tag: eyJwIjoiRGlzY292ZXJ5RW5naW5lLy5Pd2xCb3QueWFtbCIsImgiOiJhZjNlZjYyZWVmYmM5MDE0ZjUwZDE4NDE2YmYyZGMwMzEyZTViNmE0In0= --- DiscoveryEngine/metadata/V1/Common.php | Bin 2285 -> 2465 bytes .../V1/ConversationalSearchService.php | 9 +- DiscoveryEngine/metadata/V1/DataStore.php | Bin 1967 -> 2153 bytes DiscoveryEngine/metadata/V1/Document.php | Bin 1797 -> 1943 bytes .../metadata/V1/DocumentService.php | 16 +- DiscoveryEngine/metadata/V1/ImportConfig.php | Bin 4612 -> 6764 bytes DiscoveryEngine/metadata/V1/PurgeConfig.php | 7 +- .../metadata/V1/RecommendationService.php | 65 ++ DiscoveryEngine/metadata/V1/SearchService.php | Bin 7202 -> 7891 bytes .../RecommendationServiceClient/recommend.php | 133 ++++ DiscoveryEngine/src/V1/BigQuerySource.php | 8 +- DiscoveryEngine/src/V1/BigtableOptions.php | 114 ++++ .../src/V1/BigtableOptions/BigtableColumn.php | 218 ++++++ .../BigtableOptions/BigtableColumnFamily.php | 218 ++++++ .../src/V1/BigtableOptions/Encoding.php | 62 ++ .../src/V1/BigtableOptions/Type.php | 101 +++ DiscoveryEngine/src/V1/BigtableSource.php | 191 ++++++ .../src/V1/Client/DataStoreServiceClient.php | 77 +++ .../src/V1/Client/DocumentServiceClient.php | 22 + .../V1/Client/RecommendationServiceClient.php | 417 ++++++++++++ .../src/V1/Client/SearchServiceClient.php | 66 ++ DiscoveryEngine/src/V1/CloudSqlSource.php | 281 ++++++++ .../src/V1/ConverseConversationRequest.php | 52 ++ DiscoveryEngine/src/V1/DataStore.php | 88 +++ DiscoveryEngine/src/V1/Document.php | 56 ++ .../src/V1/Engine/ChatEngineConfig.php | 8 +- .../src/V1/Engine/SearchEngineConfig.php | 8 +- DiscoveryEngine/src/V1/FhirStoreSource.php | 117 ++++ DiscoveryEngine/src/V1/FirestoreSource.php | 201 ++++++ DiscoveryEngine/src/V1/GcsSource.php | 16 +- .../src/V1/ImportDocumentsMetadata.php | 34 + .../src/V1/ImportDocumentsRequest.php | 401 ++++++++--- DiscoveryEngine/src/V1/IndustryVertical.php | 7 + DiscoveryEngine/src/V1/PageInfo.php | 8 +- .../src/V1/PurgeDocumentsMetadata.php | 34 + DiscoveryEngine/src/V1/RecommendRequest.php | 629 ++++++++++++++++++ DiscoveryEngine/src/V1/RecommendResponse.php | 197 ++++++ .../RecommendationResult.php | 167 +++++ DiscoveryEngine/src/V1/SearchRequest.php | 70 +- .../BoostSpec/ConditionBoostSpec.php | 100 +-- .../V1/SearchRequest/ContentSearchSpec.php | 48 ++ .../ExtractiveContentSpec.php | 325 +++++++++ .../ContentSearchSpec/SummarySpec.php | 74 ++- .../SummarySpec/ModelSpec.php | 48 +- .../src/V1/SearchRequest/DataStoreSpec.php | 76 +++ .../V1/SearchResponse/Summary/Reference.php | 34 + .../Summary/Reference/ChunkContent.php | 102 +++ DiscoveryEngine/src/V1/SearchTier.php | 2 +- DiscoveryEngine/src/V1/SolutionType.php | 9 + DiscoveryEngine/src/V1/SpannerSource.php | 219 ++++++ .../src/V1/UpdateDocumentRequest.php | 73 ++ DiscoveryEngine/src/V1/UserEvent.php | 100 +-- DiscoveryEngine/src/V1/gapic_metadata.json | 14 + .../data_store_service_descriptor_config.php | 3 + .../document_service_descriptor_config.php | 1 + .../recommendation_service_client_config.json | 39 ++ ...commendation_service_descriptor_config.php | 29 + ...ommendation_service_rest_client_config.php | 173 +++++ .../search_service_client_config.json | 20 +- .../search_service_descriptor_config.php | 3 + .../RecommendationServiceClientTest.php | 196 ++++++ 61 files changed, 5538 insertions(+), 248 deletions(-) create mode 100644 DiscoveryEngine/metadata/V1/RecommendationService.php create mode 100644 DiscoveryEngine/samples/V1/RecommendationServiceClient/recommend.php create mode 100644 DiscoveryEngine/src/V1/BigtableOptions.php create mode 100644 DiscoveryEngine/src/V1/BigtableOptions/BigtableColumn.php create mode 100644 DiscoveryEngine/src/V1/BigtableOptions/BigtableColumnFamily.php create mode 100644 DiscoveryEngine/src/V1/BigtableOptions/Encoding.php create mode 100644 DiscoveryEngine/src/V1/BigtableOptions/Type.php create mode 100644 DiscoveryEngine/src/V1/BigtableSource.php create mode 100644 DiscoveryEngine/src/V1/Client/RecommendationServiceClient.php create mode 100644 DiscoveryEngine/src/V1/CloudSqlSource.php create mode 100644 DiscoveryEngine/src/V1/FhirStoreSource.php create mode 100644 DiscoveryEngine/src/V1/FirestoreSource.php create mode 100644 DiscoveryEngine/src/V1/RecommendRequest.php create mode 100644 DiscoveryEngine/src/V1/RecommendResponse.php create mode 100644 DiscoveryEngine/src/V1/RecommendResponse/RecommendationResult.php create mode 100644 DiscoveryEngine/src/V1/SearchRequest/ContentSearchSpec/ExtractiveContentSpec.php create mode 100644 DiscoveryEngine/src/V1/SearchRequest/DataStoreSpec.php create mode 100644 DiscoveryEngine/src/V1/SearchResponse/Summary/Reference/ChunkContent.php create mode 100644 DiscoveryEngine/src/V1/SpannerSource.php create mode 100644 DiscoveryEngine/src/V1/resources/recommendation_service_client_config.json create mode 100644 DiscoveryEngine/src/V1/resources/recommendation_service_descriptor_config.php create mode 100644 DiscoveryEngine/src/V1/resources/recommendation_service_rest_client_config.php create mode 100644 DiscoveryEngine/tests/Unit/V1/Client/RecommendationServiceClientTest.php diff --git a/DiscoveryEngine/metadata/V1/Common.php b/DiscoveryEngine/metadata/V1/Common.php index a73faca0b3f6360e98018d833196a7ad7deb75d0..f75a7503f7096f81d3da5e57b4e8b73421187700 100644 GIT binary patch delta 200 zcmaDWxKMb5G!xSvzRj{sx{QoTlf9XJ#f5~q_&r=5eL_5(9fMrs-8?*l1lYBfOrFKu zq%5S!B^&JT6B^>_?-w5u8Q>c4?&{|nT)oM@ zO!Avwv20`3dgWNjrJRwPm{XFGoLH2qm!6-Wo|BqbkXft;RH*Nkky#X6l3$c66g2q( kn}%jeVo73gYDuwvHI!AWp9WI`6a=y3i$Urq&*$(109TqpwEzGB delta 44 zcmZ1|{8n&-G!s(??`ByhT}DRV$==MqOj?bT*E2Uw4q;i&bc22KUzXdinternalAddGeneratedFile( ' -Ë% -Cgoogle/cloud/discoveryengine/v1/conversational_search_service.protogoogle.cloud.discoveryengine.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto2google/cloud/discoveryengine/v1/conversation.proto4google/cloud/discoveryengine/v1/search_service.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"Ï +™& +Cgoogle/cloud/discoveryengine/v1/conversational_search_service.protogoogle.cloud.discoveryengine.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto2google/cloud/discoveryengine/v1/conversation.proto4google/cloud/discoveryengine/v1/search_service.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto" ConverseConversationRequestA name ( B3àAúA- +discoveryengine.googleapis.com/Conversation> @@ -36,7 +36,10 @@ public static function initOnce() { safe_search (a user_labels ( 2L.google.cloud.discoveryengine.v1.ConverseConversationRequest.UserLabelsEntryb summary_spec ( 2L.google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec -filter ( 1 +filter ( L + +boost_spec + ( 28.google.cloud.discoveryengine.v1.SearchRequest.BoostSpec1 UserLabelsEntry key (  value ( :8"ð diff --git a/DiscoveryEngine/metadata/V1/DataStore.php b/DiscoveryEngine/metadata/V1/DataStore.php index 6e191818bf5a64c37d0f8290a81905a2386219d0..7bf1c3558ea0be7d3bf5108e209619d8b8cd4f14 100644 GIT binary patch delta 101 zcmZ3_|59K>H`Byf66`U-$r-7+iIWqV8d*Mbav4nYHkd5NoIN?1S&^+6B2~q#!T59Y uV&+Ch86gKQ{^F9vqLR$K^mvH0gp2~C2Ded+`s9r)ifjg=w-jlPqUQW^QV6Nn&onsWeT$1g2gOETnW~vm&z+qk)hy7guIpN@_(sNPz^e0;2}Ek(3@pH$*8= Nw;tTK&2}uunE)viEw%sv delta 30 mcmbQv-^#Zkg=z8vCVj@`lP@rJGb#0Nu47hW++k diff --git a/DiscoveryEngine/metadata/V1/DocumentService.php b/DiscoveryEngine/metadata/V1/DocumentService.php index 53efde1832b7..dc72957cdbd1 100644 --- a/DiscoveryEngine/metadata/V1/DocumentService.php +++ b/DiscoveryEngine/metadata/V1/DocumentService.php @@ -23,10 +23,11 @@ public static function initOnce() { \GPBMetadata\Google\Cloud\Discoveryengine\V1\PurgeConfig::initOnce(); \GPBMetadata\Google\Longrunning\Operations::initOnce(); \GPBMetadata\Google\Protobuf\GPBEmpty::initOnce(); + \GPBMetadata\Google\Protobuf\FieldMask::initOnce(); $pool->internalAddGeneratedFile( ' -ð -6google/cloud/discoveryengine/v1/document_service.protogoogle.cloud.discoveryengine.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto.google/cloud/discoveryengine/v1/document.proto3google/cloud/discoveryengine/v1/import_config.proto2google/cloud/discoveryengine/v1/purge_config.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto"S +Û +6google/cloud/discoveryengine/v1/document_service.protogoogle.cloud.discoveryengine.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto.google/cloud/discoveryengine/v1/document.proto3google/cloud/discoveryengine/v1/import_config.proto2google/cloud/discoveryengine/v1/purge_config.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"S GetDocumentRequest= name ( B/àAúA) \'discoveryengine.googleapis.com/Document"| @@ -43,18 +44,19 @@ public static function initOnce() { parent ( B-àAúA\' %discoveryengine.googleapis.com/Branch@ document ( 2).google.cloud.discoveryengine.v1.DocumentBàA - document_id ( BàA"p + document_id ( BàA"¡ UpdateDocumentRequest@ document ( 2).google.cloud.discoveryengine.v1.DocumentBàA - allow_missing ("V + allow_missing (/ + update_mask ( 2.google.protobuf.FieldMask"V DeleteDocumentRequest= name ( B/àAúA) -\'discoveryengine.googleapis.com/Document2 +\'discoveryengine.googleapis.com/Document2§ DocumentServiceœ GetDocument3.google.cloud.discoveryengine.v1.GetDocumentRequest).google.cloud.discoveryengine.v1.Document"¬ÚAname‚Óä“žE/v1/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}ZUS/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}¯ ListDocuments5.google.cloud.discoveryengine.v1.ListDocumentsRequest6.google.cloud.discoveryengine.v1.ListDocumentsResponse"®ÚAparent‚Óä“žE/v1/{parent=projects/*/locations/*/dataStores/*/branches/*}/documentsZUS/v1/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documentsÍ -CreateDocument6.google.cloud.discoveryengine.v1.CreateDocumentRequest).google.cloud.discoveryengine.v1.Document"×ÚAparent,document,document_id‚Ó䓲"E/v1/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:documentZ_"S/v1/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:documentÁ -UpdateDocument6.google.cloud.discoveryengine.v1.UpdateDocumentRequest).google.cloud.discoveryengine.v1.Document"Ë‚Óä“Ä2N/v1/{document.name=projects/*/locations/*/dataStores/*/branches/*/documents/*}:documentZh2\\/v1/{document.name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}:document +CreateDocument6.google.cloud.discoveryengine.v1.CreateDocumentRequest).google.cloud.discoveryengine.v1.Document"×ÚAparent,document,document_id‚Ó䓲"E/v1/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:documentZ_"S/v1/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:documentØ +UpdateDocument6.google.cloud.discoveryengine.v1.UpdateDocumentRequest).google.cloud.discoveryengine.v1.Document"âÚAdocument,update_mask‚Óä“Ä2N/v1/{document.name=projects/*/locations/*/dataStores/*/branches/*/documents/*}:documentZh2\\/v1/{document.name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}:document DeleteDocument6.google.cloud.discoveryengine.v1.DeleteDocumentRequest.google.protobuf.Empty"¬ÚAname‚Óä“ž*E/v1/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}ZU*S/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}š ImportDocuments7.google.cloud.discoveryengine.v1.ImportDocumentsRequest.google.longrunning.Operation"®ÊAr 7google.cloud.discoveryengine.v1.ImportDocumentsResponse7google.cloud.discoveryengine.v1.ImportDocumentsMetadata‚Ó䓲"L/v1/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:import:*Z_"Z/v1/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:import:*” diff --git a/DiscoveryEngine/metadata/V1/ImportConfig.php b/DiscoveryEngine/metadata/V1/ImportConfig.php index 870245ae4abb65df1372b3ce60f764cdb224262d..469f4466166935ac03b7a838da21f59480f2727f 100644 GIT binary patch delta 1739 zcmbtVO^@4D6s=?D>pCB*)RHBujN>a}>?MyOC(yHBHd7PJw8OJZ< zk4nQP8y2uA2pI|S2Us8$NVD%x;2$7?#Ht{%2C?A1XM3ErdYJ z{oNmK@Wo9F*~1;fI|yIRTo2dzXTqOr@J{%puo6~;U$3r=F&^8fK6SB=_kvM)==SAxYeSpfM_|MZ#X8R!3+&H`JWpZ zdNMS8W6$u|37?)^h60J(EG(qqm*FCESe)i<>w6e`zLF(?g8DQM)uuIOY2B%BVaJnS zg319p(j(rEF+nkM9;B866=vT=ig-&zC@2teM2 zyvc6&6oGNSO|i2@Z1Ns4UH*}S%IOfPPVq1>Y>RMrSz$_%EvMx$zvOv25yP9cs6A?? zje}t={G)W~zr|56V{xs7O;QOeZutq6PZeDjfhQKmz6~Jz#IOUzDk^Sh|3i3W(XGsT zocb{ctbj`(4Ib}m`h!k?S8KI5+u9xJ0ui0-4|?s+mc-HL&V!w%){`=XK)&4>Xj|lk zm#ZK?Z1nUbAdtXJY__*_0@r%&mXxLVX1BYoH9AsGE`V^a-|a|w^%fLPtX5!2>$JLe z$Yl#82!5bF8blPD?M|cjSjwp1&Utrc&@P`lY2i=VYgfA&K6{w5*aqp`?}<{BB`zZ!4C>-)&C{e9DLQQQ#5)beU3p43l1 zBVU2)*z`!gF(&h%4=tBEI9n~M-w3|^-VvwqqslCTZZC@E8tP)_-*FVv7^+=J>#PsReO k=?#TsDTH5%e@k@`gDI&mV*eZ^A3l|?q(80WFG@l7A70G-C;$Ke delta 61 zcmV-D0K)(5G=wCuH3O4z1GNOr8wxX%%>*EkYZH@Q1ktll1xx|6;0&t+0jZOW5UK+r T*9Egq5e5O1)D!cw_!M*ny1o|D diff --git a/DiscoveryEngine/metadata/V1/PurgeConfig.php b/DiscoveryEngine/metadata/V1/PurgeConfig.php index 816dbdf8a38d..fed470377b1a 100644 --- a/DiscoveryEngine/metadata/V1/PurgeConfig.php +++ b/DiscoveryEngine/metadata/V1/PurgeConfig.php @@ -20,7 +20,7 @@ public static function initOnce() { \GPBMetadata\Google\Rpc\Status::initOnce(); $pool->internalAddGeneratedFile( ' -´ +Ë 2google/cloud/discoveryengine/v1/purge_config.protogoogle.cloud.discoveryengine.v1google/api/resource.protogoogle/protobuf/timestamp.protogoogle/rpc/status.proto"z PurgeDocumentsRequest= parent ( B-àAúA\' @@ -30,12 +30,13 @@ public static function initOnce() { PurgeDocumentsResponse purge_count (B purge_sample ( B,úA) -\'discoveryengine.googleapis.com/Document"¨ +\'discoveryengine.googleapis.com/Document"¿ PurgeDocumentsMetadata/ create_time ( 2.google.protobuf.Timestamp/ update_time ( 2.google.protobuf.Timestamp success_count ( - failure_count ("i + failure_count ( + ignored_count ("i %PurgeSuggestionDenyListEntriesRequest@ parent ( B0àAúA* (discoveryengine.googleapis.com/DataStore"h diff --git a/DiscoveryEngine/metadata/V1/RecommendationService.php b/DiscoveryEngine/metadata/V1/RecommendationService.php new file mode 100644 index 000000000000..e13fd9b62d3e --- /dev/null +++ b/DiscoveryEngine/metadata/V1/RecommendationService.php @@ -0,0 +1,65 @@ +internalAddGeneratedFile( + ' +¬ +$7ocP?NG=#CwfPULIkR3U7pka`3l|r{3<*XBMh#9Ug9naGzZ|u=G$uQ; z%5%U>*=)$UjhX2^$K;nhw`GOOxx`Z|N{SMbOESw+cMmz;2LWo*cvPF6auE zb%sbzKERvK_-?ZX-vmZkA!#n*(qf>SQ*#sZN-~qk zk}pavDJ{xFHV&lH6YQI0VAx48gWMz}%O#punj2qGlv<(iA s(X&twkO7nZ5JZy-5_$sJ5VM979|HpI3A3jax&i@elVccbvv3(>1z!Lj*Z=?k diff --git a/DiscoveryEngine/samples/V1/RecommendationServiceClient/recommend.php b/DiscoveryEngine/samples/V1/RecommendationServiceClient/recommend.php new file mode 100644 index 000000000000..0a7bee7714a3 --- /dev/null +++ b/DiscoveryEngine/samples/V1/RecommendationServiceClient/recommend.php @@ -0,0 +1,133 @@ + Men > Jeans + * + * Retail-related values: + * + * * `add-to-cart`: Add an item(s) to cart, e.g. in Retail online shopping + * * `purchase`: Purchase an item(s) + * + * Media-related values: + * + * * `media-play`: Start/resume watching a video, playing a song, etc. + * * `media-complete`: Finished or stopped midway through a video, song, etc. + * @param string $userEventUserPseudoId A unique identifier for tracking visitors. + * + * For example, this could be implemented with an HTTP cookie, which should be + * able to uniquely identify a visitor on a single device. This unique + * identifier should not change if the visitor log in/out of the website. + * + * Do not set the field to the same fixed ID for different users. This mixes + * the event history of those users together, which results in degraded model + * quality. + * + * The field must be a UTF-8 encoded string with a length limit of 128 + * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + * + * The field should not contain PII or user-data. We recommend to use Google + * Analytics [Client + * ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) + * for this field. + */ +function recommend_sample( + string $formattedServingConfig, + string $userEventEventType, + string $userEventUserPseudoId +): void { + // Create a client. + $recommendationServiceClient = new RecommendationServiceClient(); + + // Prepare the request message. + $userEvent = (new UserEvent()) + ->setEventType($userEventEventType) + ->setUserPseudoId($userEventUserPseudoId); + $request = (new RecommendRequest()) + ->setServingConfig($formattedServingConfig) + ->setUserEvent($userEvent); + + // Call the API and handle any network failures. + try { + /** @var RecommendResponse $response */ + $response = $recommendationServiceClient->recommend($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedServingConfig = RecommendationServiceClient::servingConfigName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[SERVING_CONFIG]' + ); + $userEventEventType = '[EVENT_TYPE]'; + $userEventUserPseudoId = '[USER_PSEUDO_ID]'; + + recommend_sample($formattedServingConfig, $userEventEventType, $userEventUserPseudoId); +} +// [END discoveryengine_v1_generated_RecommendationService_Recommend_sync] diff --git a/DiscoveryEngine/src/V1/BigQuerySource.php b/DiscoveryEngine/src/V1/BigQuerySource.php index 1ac1a898584d..66a26187db00 100644 --- a/DiscoveryEngine/src/V1/BigQuerySource.php +++ b/DiscoveryEngine/src/V1/BigQuerySource.php @@ -60,7 +60,7 @@ class BigQuerySource extends \Google\Protobuf\Internal\Message * [Document.struct_data][google.cloud.discoveryengine.v1.Document.struct_data]. * * `custom`: One custom data per row in arbitrary format that conforms to * the defined [Schema][google.cloud.discoveryengine.v1.Schema] of the data - * store. This can only be used by Gen App Builder. + * store. This can only be used by the GENERIC Data Store vertical. * * Generated from protobuf field string data_schema = 6; */ @@ -104,7 +104,7 @@ class BigQuerySource extends \Google\Protobuf\Internal\Message * [Document.struct_data][google.cloud.discoveryengine.v1.Document.struct_data]. * * `custom`: One custom data per row in arbitrary format that conforms to * the defined [Schema][google.cloud.discoveryengine.v1.Schema] of the data - * store. This can only be used by Gen App Builder. + * store. This can only be used by the GENERIC Data Store vertical. * } */ public function __construct($data = NULL) { @@ -274,7 +274,7 @@ public function setGcsStagingDir($var) * [Document.struct_data][google.cloud.discoveryengine.v1.Document.struct_data]. * * `custom`: One custom data per row in arbitrary format that conforms to * the defined [Schema][google.cloud.discoveryengine.v1.Schema] of the data - * store. This can only be used by Gen App Builder. + * store. This can only be used by the GENERIC Data Store vertical. * * Generated from protobuf field string data_schema = 6; * @return string @@ -299,7 +299,7 @@ public function getDataSchema() * [Document.struct_data][google.cloud.discoveryengine.v1.Document.struct_data]. * * `custom`: One custom data per row in arbitrary format that conforms to * the defined [Schema][google.cloud.discoveryengine.v1.Schema] of the data - * store. This can only be used by Gen App Builder. + * store. This can only be used by the GENERIC Data Store vertical. * * Generated from protobuf field string data_schema = 6; * @param string $var diff --git a/DiscoveryEngine/src/V1/BigtableOptions.php b/DiscoveryEngine/src/V1/BigtableOptions.php new file mode 100644 index 000000000000..94fedf2de962 --- /dev/null +++ b/DiscoveryEngine/src/V1/BigtableOptions.php @@ -0,0 +1,114 @@ +google.cloud.discoveryengine.v1.BigtableOptions + */ +class BigtableOptions extends \Google\Protobuf\Internal\Message +{ + /** + * The field name used for saving row key value in the document. The name has + * to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. + * + * Generated from protobuf field string key_field_name = 1; + */ + protected $key_field_name = ''; + /** + * The mapping from family names to an object that contains column families + * level information for the given column family. If a family is not present + * in this map it will be ignored. + * + * Generated from protobuf field map families = 2; + */ + private $families; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key_field_name + * The field name used for saving row key value in the document. The name has + * to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. + * @type array|\Google\Protobuf\Internal\MapField $families + * The mapping from family names to an object that contains column families + * level information for the given column family. If a family is not present + * in this map it will be ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * The field name used for saving row key value in the document. The name has + * to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. + * + * Generated from protobuf field string key_field_name = 1; + * @return string + */ + public function getKeyFieldName() + { + return $this->key_field_name; + } + + /** + * The field name used for saving row key value in the document. The name has + * to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. + * + * Generated from protobuf field string key_field_name = 1; + * @param string $var + * @return $this + */ + public function setKeyFieldName($var) + { + GPBUtil::checkString($var, True); + $this->key_field_name = $var; + + return $this; + } + + /** + * The mapping from family names to an object that contains column families + * level information for the given column family. If a family is not present + * in this map it will be ignored. + * + * Generated from protobuf field map families = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getFamilies() + { + return $this->families; + } + + /** + * The mapping from family names to an object that contains column families + * level information for the given column family. If a family is not present + * in this map it will be ignored. + * + * Generated from protobuf field map families = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setFamilies($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\BigtableOptions\BigtableColumnFamily::class); + $this->families = $arr; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1/BigtableOptions/BigtableColumn.php b/DiscoveryEngine/src/V1/BigtableOptions/BigtableColumn.php new file mode 100644 index 000000000000..0ba93cac113e --- /dev/null +++ b/DiscoveryEngine/src/V1/BigtableOptions/BigtableColumn.php @@ -0,0 +1,218 @@ +google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn + */ +class BigtableColumn extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Qualifier of the column. If it cannot be decoded with utf-8, + * use a base-64 encoded string instead. + * + * Generated from protobuf field bytes qualifier = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $qualifier = ''; + /** + * The field name to use for this column in the document. The name has to + * match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. + * If not set, it is parsed from the qualifier bytes with best effort. + * However, due to different naming patterns, field name collisions could + * happen, where parsing behavior is undefined. + * + * Generated from protobuf field string field_name = 2; + */ + protected $field_name = ''; + /** + * The encoding mode of the values when the type is not `STRING`. + * Acceptable encoding values are: + * * `TEXT`: indicates values are alphanumeric text strings. + * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` + * family of functions. This can be overridden for a specific column + * by listing that column in `columns` and specifying an encoding for it. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.BigtableOptions.Encoding encoding = 3; + */ + protected $encoding = 0; + /** + * The type of values in this column family. + * The values are expected to be encoded using `HBase Bytes.toBytes` + * function when the encoding value is set to `BINARY`. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.BigtableOptions.Type type = 4; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $qualifier + * Required. Qualifier of the column. If it cannot be decoded with utf-8, + * use a base-64 encoded string instead. + * @type string $field_name + * The field name to use for this column in the document. The name has to + * match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. + * If not set, it is parsed from the qualifier bytes with best effort. + * However, due to different naming patterns, field name collisions could + * happen, where parsing behavior is undefined. + * @type int $encoding + * The encoding mode of the values when the type is not `STRING`. + * Acceptable encoding values are: + * * `TEXT`: indicates values are alphanumeric text strings. + * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` + * family of functions. This can be overridden for a specific column + * by listing that column in `columns` and specifying an encoding for it. + * @type int $type + * The type of values in this column family. + * The values are expected to be encoded using `HBase Bytes.toBytes` + * function when the encoding value is set to `BINARY`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. Qualifier of the column. If it cannot be decoded with utf-8, + * use a base-64 encoded string instead. + * + * Generated from protobuf field bytes qualifier = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getQualifier() + { + return $this->qualifier; + } + + /** + * Required. Qualifier of the column. If it cannot be decoded with utf-8, + * use a base-64 encoded string instead. + * + * Generated from protobuf field bytes qualifier = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setQualifier($var) + { + GPBUtil::checkString($var, False); + $this->qualifier = $var; + + return $this; + } + + /** + * The field name to use for this column in the document. The name has to + * match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. + * If not set, it is parsed from the qualifier bytes with best effort. + * However, due to different naming patterns, field name collisions could + * happen, where parsing behavior is undefined. + * + * Generated from protobuf field string field_name = 2; + * @return string + */ + public function getFieldName() + { + return $this->field_name; + } + + /** + * The field name to use for this column in the document. The name has to + * match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. + * If not set, it is parsed from the qualifier bytes with best effort. + * However, due to different naming patterns, field name collisions could + * happen, where parsing behavior is undefined. + * + * Generated from protobuf field string field_name = 2; + * @param string $var + * @return $this + */ + public function setFieldName($var) + { + GPBUtil::checkString($var, True); + $this->field_name = $var; + + return $this; + } + + /** + * The encoding mode of the values when the type is not `STRING`. + * Acceptable encoding values are: + * * `TEXT`: indicates values are alphanumeric text strings. + * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` + * family of functions. This can be overridden for a specific column + * by listing that column in `columns` and specifying an encoding for it. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.BigtableOptions.Encoding encoding = 3; + * @return int + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * The encoding mode of the values when the type is not `STRING`. + * Acceptable encoding values are: + * * `TEXT`: indicates values are alphanumeric text strings. + * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` + * family of functions. This can be overridden for a specific column + * by listing that column in `columns` and specifying an encoding for it. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.BigtableOptions.Encoding encoding = 3; + * @param int $var + * @return $this + */ + public function setEncoding($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1\BigtableOptions\Encoding::class); + $this->encoding = $var; + + return $this; + } + + /** + * The type of values in this column family. + * The values are expected to be encoded using `HBase Bytes.toBytes` + * function when the encoding value is set to `BINARY`. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.BigtableOptions.Type type = 4; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of values in this column family. + * The values are expected to be encoded using `HBase Bytes.toBytes` + * function when the encoding value is set to `BINARY`. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.BigtableOptions.Type type = 4; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1\BigtableOptions\Type::class); + $this->type = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1/BigtableOptions/BigtableColumnFamily.php b/DiscoveryEngine/src/V1/BigtableOptions/BigtableColumnFamily.php new file mode 100644 index 000000000000..582de21a14f8 --- /dev/null +++ b/DiscoveryEngine/src/V1/BigtableOptions/BigtableColumnFamily.php @@ -0,0 +1,218 @@ +google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumnFamily + */ +class BigtableColumnFamily extends \Google\Protobuf\Internal\Message +{ + /** + * The field name to use for this column family in the document. The + * name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set, + * it is parsed from the family name with best effort. However, due to + * different naming patterns, field name collisions could happen, where + * parsing behavior is undefined. + * + * Generated from protobuf field string field_name = 1; + */ + protected $field_name = ''; + /** + * The encoding mode of the values when the type is not STRING. + * Acceptable encoding values are: + * * `TEXT`: indicates values are alphanumeric text strings. + * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` + * family of functions. This can be overridden for a specific column + * by listing that column in `columns` and specifying an encoding for it. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.BigtableOptions.Encoding encoding = 2; + */ + protected $encoding = 0; + /** + * The type of values in this column family. + * The values are expected to be encoded using `HBase Bytes.toBytes` + * function when the encoding value is set to `BINARY`. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.BigtableOptions.Type type = 3; + */ + protected $type = 0; + /** + * The list of objects that contains column level information for each + * column. If a column is not present in this list it will be ignored. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn columns = 4; + */ + private $columns; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field_name + * The field name to use for this column family in the document. The + * name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set, + * it is parsed from the family name with best effort. However, due to + * different naming patterns, field name collisions could happen, where + * parsing behavior is undefined. + * @type int $encoding + * The encoding mode of the values when the type is not STRING. + * Acceptable encoding values are: + * * `TEXT`: indicates values are alphanumeric text strings. + * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` + * family of functions. This can be overridden for a specific column + * by listing that column in `columns` and specifying an encoding for it. + * @type int $type + * The type of values in this column family. + * The values are expected to be encoded using `HBase Bytes.toBytes` + * function when the encoding value is set to `BINARY`. + * @type array<\Google\Cloud\DiscoveryEngine\V1\BigtableOptions\BigtableColumn>|\Google\Protobuf\Internal\RepeatedField $columns + * The list of objects that contains column level information for each + * column. If a column is not present in this list it will be ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * The field name to use for this column family in the document. The + * name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set, + * it is parsed from the family name with best effort. However, due to + * different naming patterns, field name collisions could happen, where + * parsing behavior is undefined. + * + * Generated from protobuf field string field_name = 1; + * @return string + */ + public function getFieldName() + { + return $this->field_name; + } + + /** + * The field name to use for this column family in the document. The + * name has to match the pattern `[a-zA-Z0-9][a-zA-Z0-9-_]*`. If not set, + * it is parsed from the family name with best effort. However, due to + * different naming patterns, field name collisions could happen, where + * parsing behavior is undefined. + * + * Generated from protobuf field string field_name = 1; + * @param string $var + * @return $this + */ + public function setFieldName($var) + { + GPBUtil::checkString($var, True); + $this->field_name = $var; + + return $this; + } + + /** + * The encoding mode of the values when the type is not STRING. + * Acceptable encoding values are: + * * `TEXT`: indicates values are alphanumeric text strings. + * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` + * family of functions. This can be overridden for a specific column + * by listing that column in `columns` and specifying an encoding for it. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.BigtableOptions.Encoding encoding = 2; + * @return int + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * The encoding mode of the values when the type is not STRING. + * Acceptable encoding values are: + * * `TEXT`: indicates values are alphanumeric text strings. + * * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` + * family of functions. This can be overridden for a specific column + * by listing that column in `columns` and specifying an encoding for it. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.BigtableOptions.Encoding encoding = 2; + * @param int $var + * @return $this + */ + public function setEncoding($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1\BigtableOptions\Encoding::class); + $this->encoding = $var; + + return $this; + } + + /** + * The type of values in this column family. + * The values are expected to be encoded using `HBase Bytes.toBytes` + * function when the encoding value is set to `BINARY`. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.BigtableOptions.Type type = 3; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of values in this column family. + * The values are expected to be encoded using `HBase Bytes.toBytes` + * function when the encoding value is set to `BINARY`. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.BigtableOptions.Type type = 3; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1\BigtableOptions\Type::class); + $this->type = $var; + + return $this; + } + + /** + * The list of objects that contains column level information for each + * column. If a column is not present in this list it will be ignored. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn columns = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getColumns() + { + return $this->columns; + } + + /** + * The list of objects that contains column level information for each + * column. If a column is not present in this list it will be ignored. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.BigtableOptions.BigtableColumn columns = 4; + * @param array<\Google\Cloud\DiscoveryEngine\V1\BigtableOptions\BigtableColumn>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setColumns($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\BigtableOptions\BigtableColumn::class); + $this->columns = $arr; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1/BigtableOptions/Encoding.php b/DiscoveryEngine/src/V1/BigtableOptions/Encoding.php new file mode 100644 index 000000000000..e3b300de6bed --- /dev/null +++ b/DiscoveryEngine/src/V1/BigtableOptions/Encoding.php @@ -0,0 +1,62 @@ +google.cloud.discoveryengine.v1.BigtableOptions.Encoding + */ +class Encoding +{ + /** + * The encoding is unspecified. + * + * Generated from protobuf enum ENCODING_UNSPECIFIED = 0; + */ + const ENCODING_UNSPECIFIED = 0; + /** + * Text encoding. + * + * Generated from protobuf enum TEXT = 1; + */ + const TEXT = 1; + /** + * Binary encoding. + * + * Generated from protobuf enum BINARY = 2; + */ + const BINARY = 2; + + private static $valueToName = [ + self::ENCODING_UNSPECIFIED => 'ENCODING_UNSPECIFIED', + self::TEXT => 'TEXT', + self::BINARY => 'BINARY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/DiscoveryEngine/src/V1/BigtableOptions/Type.php b/DiscoveryEngine/src/V1/BigtableOptions/Type.php new file mode 100644 index 000000000000..63b186103f28 --- /dev/null +++ b/DiscoveryEngine/src/V1/BigtableOptions/Type.php @@ -0,0 +1,101 @@ +google.cloud.discoveryengine.v1.BigtableOptions.Type + */ +class Type +{ + /** + * The type is unspecified. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * String type. + * + * Generated from protobuf enum STRING = 1; + */ + const STRING = 1; + /** + * Numerical type. + * + * Generated from protobuf enum NUMBER = 2; + */ + const NUMBER = 2; + /** + * Integer type. + * + * Generated from protobuf enum INTEGER = 3; + */ + const INTEGER = 3; + /** + * Variable length integer type. + * + * Generated from protobuf enum VAR_INTEGER = 4; + */ + const VAR_INTEGER = 4; + /** + * BigDecimal type. + * + * Generated from protobuf enum BIG_NUMERIC = 5; + */ + const BIG_NUMERIC = 5; + /** + * Boolean type. + * + * Generated from protobuf enum BOOLEAN = 6; + */ + const BOOLEAN = 6; + /** + * JSON type. + * + * Generated from protobuf enum JSON = 7; + */ + const JSON = 7; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::STRING => 'STRING', + self::NUMBER => 'NUMBER', + self::INTEGER => 'INTEGER', + self::VAR_INTEGER => 'VAR_INTEGER', + self::BIG_NUMERIC => 'BIG_NUMERIC', + self::BOOLEAN => 'BOOLEAN', + self::JSON => 'JSON', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/DiscoveryEngine/src/V1/BigtableSource.php b/DiscoveryEngine/src/V1/BigtableSource.php new file mode 100644 index 000000000000..29bae93e6d65 --- /dev/null +++ b/DiscoveryEngine/src/V1/BigtableSource.php @@ -0,0 +1,191 @@ +google.cloud.discoveryengine.v1.BigtableSource + */ +class BigtableSource extends \Google\Protobuf\Internal\Message +{ + /** + * The project ID that the Bigtable source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * + * Generated from protobuf field string project_id = 1; + */ + protected $project_id = ''; + /** + * Required. The instance ID of the Cloud Bigtable that needs to be imported. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance_id = ''; + /** + * Required. The table ID of the Cloud Bigtable that needs to be imported. + * + * Generated from protobuf field string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $table_id = ''; + /** + * Required. Bigtable options that contains information needed when parsing + * data into typed structures. For example, column type annotations. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.BigtableOptions bigtable_options = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bigtable_options = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * The project ID that the Bigtable source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * @type string $instance_id + * Required. The instance ID of the Cloud Bigtable that needs to be imported. + * @type string $table_id + * Required. The table ID of the Cloud Bigtable that needs to be imported. + * @type \Google\Cloud\DiscoveryEngine\V1\BigtableOptions $bigtable_options + * Required. Bigtable options that contains information needed when parsing + * data into typed structures. For example, column type annotations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * The project ID that the Bigtable source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * + * Generated from protobuf field string project_id = 1; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * The project ID that the Bigtable source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * + * Generated from protobuf field string project_id = 1; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * Required. The instance ID of the Cloud Bigtable that needs to be imported. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstanceId() + { + return $this->instance_id; + } + + /** + * Required. The instance ID of the Cloud Bigtable that needs to be imported. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->instance_id = $var; + + return $this; + } + + /** + * Required. The table ID of the Cloud Bigtable that needs to be imported. + * + * Generated from protobuf field string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTableId() + { + return $this->table_id; + } + + /** + * Required. The table ID of the Cloud Bigtable that needs to be imported. + * + * Generated from protobuf field string table_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTableId($var) + { + GPBUtil::checkString($var, True); + $this->table_id = $var; + + return $this; + } + + /** + * Required. Bigtable options that contains information needed when parsing + * data into typed structures. For example, column type annotations. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.BigtableOptions bigtable_options = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DiscoveryEngine\V1\BigtableOptions|null + */ + public function getBigtableOptions() + { + return $this->bigtable_options; + } + + public function hasBigtableOptions() + { + return isset($this->bigtable_options); + } + + public function clearBigtableOptions() + { + unset($this->bigtable_options); + } + + /** + * Required. Bigtable options that contains information needed when parsing + * data into typed structures. For example, column type annotations. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.BigtableOptions bigtable_options = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DiscoveryEngine\V1\BigtableOptions $var + * @return $this + */ + public function setBigtableOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\BigtableOptions::class); + $this->bigtable_options = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1/Client/DataStoreServiceClient.php b/DiscoveryEngine/src/V1/Client/DataStoreServiceClient.php index 6c2de3634266..0b53c5d90acf 100644 --- a/DiscoveryEngine/src/V1/Client/DataStoreServiceClient.php +++ b/DiscoveryEngine/src/V1/Client/DataStoreServiceClient.php @@ -204,6 +204,34 @@ public static function projectLocationCollectionDataStoreName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store_schema resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * @param string $schema + * + * @return string The formatted project_location_collection_data_store_schema resource. + */ + public static function projectLocationCollectionDataStoreSchemaName( + string $project, + string $location, + string $collection, + string $dataStore, + string $schema + ): string { + return self::getPathTemplate('projectLocationCollectionDataStoreSchema')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + 'schema' => $schema, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * project_location_data_store resource. @@ -223,6 +251,52 @@ public static function projectLocationDataStoreName(string $project, string $loc ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store_schema resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $schema + * + * @return string The formatted project_location_data_store_schema resource. + */ + public static function projectLocationDataStoreSchemaName( + string $project, + string $location, + string $dataStore, + string $schema + ): string { + return self::getPathTemplate('projectLocationDataStoreSchema')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'schema' => $schema, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a schema + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $schema + * + * @return string The formatted schema resource. + */ + public static function schemaName(string $project, string $location, string $dataStore, string $schema): string + { + return self::getPathTemplate('schema')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'schema' => $schema, + ]); + } + /** * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: @@ -230,7 +304,10 @@ public static function projectLocationDataStoreName(string $project, string $loc * - collection: projects/{project}/locations/{location}/collections/{collection} * - dataStore: projects/{project}/locations/{location}/dataStores/{data_store} * - projectLocationCollectionDataStore: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store} + * - projectLocationCollectionDataStoreSchema: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema} * - projectLocationDataStore: projects/{project}/locations/{location}/dataStores/{data_store} + * - projectLocationDataStoreSchema: projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema} + * - schema: projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema} * * 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 diff --git a/DiscoveryEngine/src/V1/Client/DocumentServiceClient.php b/DiscoveryEngine/src/V1/Client/DocumentServiceClient.php index d96512a9cbf3..258c76aaa53d 100644 --- a/DiscoveryEngine/src/V1/Client/DocumentServiceClient.php +++ b/DiscoveryEngine/src/V1/Client/DocumentServiceClient.php @@ -194,6 +194,27 @@ public static function documentName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a fhir_store + * resource. + * + * @param string $project + * @param string $location + * @param string $dataset + * @param string $fhirStore + * + * @return string The formatted fhir_store resource. + */ + public static function fhirStoreName(string $project, string $location, string $dataset, string $fhirStore): string + { + return self::getPathTemplate('fhirStore')->render([ + 'project' => $project, + 'location' => $location, + 'dataset' => $dataset, + 'fhir_store' => $fhirStore, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * project_location_collection_data_store_branch resource. @@ -312,6 +333,7 @@ public static function projectLocationDataStoreBranchDocumentName( * Template: Pattern * - branch: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch} * - document: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} + * - fhirStore: projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store} * - projectLocationCollectionDataStoreBranch: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch} * - projectLocationCollectionDataStoreBranchDocument: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document} * - projectLocationDataStoreBranch: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch} diff --git a/DiscoveryEngine/src/V1/Client/RecommendationServiceClient.php b/DiscoveryEngine/src/V1/Client/RecommendationServiceClient.php new file mode 100644 index 000000000000..08cff979e4c7 --- /dev/null +++ b/DiscoveryEngine/src/V1/Client/RecommendationServiceClient.php @@ -0,0 +1,417 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/recommendation_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/recommendation_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/recommendation_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/recommendation_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a document + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $branch + * @param string $document + * + * @return string The formatted document resource. + */ + public static function documentName( + string $project, + string $location, + string $dataStore, + string $branch, + string $document + ): string { + return self::getPathTemplate('document')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'branch' => $branch, + 'document' => $document, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store_branch_document resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * @param string $branch + * @param string $document + * + * @return string The formatted project_location_collection_data_store_branch_document resource. + */ + public static function projectLocationCollectionDataStoreBranchDocumentName( + string $project, + string $location, + string $collection, + string $dataStore, + string $branch, + string $document + ): string { + return self::getPathTemplate('projectLocationCollectionDataStoreBranchDocument')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + 'branch' => $branch, + 'document' => $document, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store_serving_config resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * @param string $servingConfig + * + * @return string The formatted project_location_collection_data_store_serving_config resource. + */ + public static function projectLocationCollectionDataStoreServingConfigName( + string $project, + string $location, + string $collection, + string $dataStore, + string $servingConfig + ): string { + return self::getPathTemplate('projectLocationCollectionDataStoreServingConfig')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + 'serving_config' => $servingConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_engine_serving_config resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $engine + * @param string $servingConfig + * + * @return string The formatted project_location_collection_engine_serving_config resource. + */ + public static function projectLocationCollectionEngineServingConfigName( + string $project, + string $location, + string $collection, + string $engine, + string $servingConfig + ): string { + return self::getPathTemplate('projectLocationCollectionEngineServingConfig')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'engine' => $engine, + 'serving_config' => $servingConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store_branch_document resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $branch + * @param string $document + * + * @return string The formatted project_location_data_store_branch_document resource. + */ + public static function projectLocationDataStoreBranchDocumentName( + string $project, + string $location, + string $dataStore, + string $branch, + string $document + ): string { + return self::getPathTemplate('projectLocationDataStoreBranchDocument')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'branch' => $branch, + 'document' => $document, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store_serving_config resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $servingConfig + * + * @return string The formatted project_location_data_store_serving_config resource. + */ + public static function projectLocationDataStoreServingConfigName( + string $project, + string $location, + string $dataStore, + string $servingConfig + ): string { + return self::getPathTemplate('projectLocationDataStoreServingConfig')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'serving_config' => $servingConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * serving_config resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * @param string $servingConfig + * + * @return string The formatted serving_config resource. + */ + public static function servingConfigName( + string $project, + string $location, + string $dataStore, + string $servingConfig + ): string { + return self::getPathTemplate('servingConfig')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + 'serving_config' => $servingConfig, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - document: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} + * - projectLocationCollectionDataStoreBranchDocument: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document} + * - projectLocationCollectionDataStoreServingConfig: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config} + * - projectLocationCollectionEngineServingConfig: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config} + * - projectLocationDataStoreBranchDocument: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document} + * - projectLocationDataStoreServingConfig: projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config} + * - servingConfig: projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'discoveryengine.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** 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); + } + + /** + * Makes a recommendation, which requires a contextual user event. + * + * The async variant is {@see RecommendationServiceClient::recommendAsync()} . + * + * @example samples/V1/RecommendationServiceClient/recommend.php + * + * @param RecommendRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return RecommendResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function recommend(RecommendRequest $request, array $callOptions = []): RecommendResponse + { + return $this->startApiCall('Recommend', $request, $callOptions)->wait(); + } +} diff --git a/DiscoveryEngine/src/V1/Client/SearchServiceClient.php b/DiscoveryEngine/src/V1/Client/SearchServiceClient.php index 6fae530d3122..1c0a5510e704 100644 --- a/DiscoveryEngine/src/V1/Client/SearchServiceClient.php +++ b/DiscoveryEngine/src/V1/Client/SearchServiceClient.php @@ -116,6 +116,50 @@ public static function branchName(string $project, string $location, string $dat ]); } + /** + * Formats a string containing the fully-qualified path to represent a data_store + * resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * + * @return string The formatted data_store resource. + */ + public static function dataStoreName(string $project, string $location, string $dataStore): string + { + return self::getPathTemplate('dataStore')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_collection_data_store resource. + * + * @param string $project + * @param string $location + * @param string $collection + * @param string $dataStore + * + * @return string The formatted project_location_collection_data_store resource. + */ + public static function projectLocationCollectionDataStoreName( + string $project, + string $location, + string $collection, + string $dataStore + ): string { + return self::getPathTemplate('projectLocationCollectionDataStore')->render([ + 'project' => $project, + 'location' => $location, + 'collection' => $collection, + 'data_store' => $dataStore, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * project_location_collection_data_store_branch resource. @@ -200,6 +244,25 @@ public static function projectLocationCollectionEngineServingConfigName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_data_store resource. + * + * @param string $project + * @param string $location + * @param string $dataStore + * + * @return string The formatted project_location_data_store resource. + */ + public static function projectLocationDataStoreName(string $project, string $location, string $dataStore): string + { + return self::getPathTemplate('projectLocationDataStore')->render([ + 'project' => $project, + 'location' => $location, + 'data_store' => $dataStore, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * project_location_data_store_branch resource. @@ -280,9 +343,12 @@ public static function servingConfigName( * The following name formats are supported: * Template: Pattern * - branch: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch} + * - dataStore: projects/{project}/locations/{location}/dataStores/{data_store} + * - projectLocationCollectionDataStore: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store} * - projectLocationCollectionDataStoreBranch: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch} * - projectLocationCollectionDataStoreServingConfig: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config} * - projectLocationCollectionEngineServingConfig: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config} + * - projectLocationDataStore: projects/{project}/locations/{location}/dataStores/{data_store} * - projectLocationDataStoreBranch: projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch} * - projectLocationDataStoreServingConfig: projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config} * - servingConfig: projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config} diff --git a/DiscoveryEngine/src/V1/CloudSqlSource.php b/DiscoveryEngine/src/V1/CloudSqlSource.php new file mode 100644 index 000000000000..89cc2115c612 --- /dev/null +++ b/DiscoveryEngine/src/V1/CloudSqlSource.php @@ -0,0 +1,281 @@ +google.cloud.discoveryengine.v1.CloudSqlSource + */ +class CloudSqlSource extends \Google\Protobuf\Internal\Message +{ + /** + * The project ID that the Cloud SQL source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * + * Generated from protobuf field string project_id = 1; + */ + protected $project_id = ''; + /** + * Required. The Cloud SQL instance to copy the data from with a length limit + * of 256 characters. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance_id = ''; + /** + * Required. The Cloud SQL database to copy the data from with a length limit + * of 256 characters. + * + * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database_id = ''; + /** + * Required. The Cloud SQL table to copy the data from with a length limit of + * 256 characters. + * + * Generated from protobuf field string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $table_id = ''; + /** + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * Cloud SQL export to a specific Cloud Storage directory. + * Ensure that the Cloud SQL service account has the necessary Cloud + * Storage Admin permissions to access the specified Cloud Storage directory. + * + * Generated from protobuf field string gcs_staging_dir = 5; + */ + protected $gcs_staging_dir = ''; + /** + * Option for serverless export. Enabling this option will incur additional + * cost. More info can be found + * [here](https://cloud.google.com/sql/pricing#serverless). + * + * Generated from protobuf field bool offload = 6; + */ + protected $offload = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * The project ID that the Cloud SQL source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * @type string $instance_id + * Required. The Cloud SQL instance to copy the data from with a length limit + * of 256 characters. + * @type string $database_id + * Required. The Cloud SQL database to copy the data from with a length limit + * of 256 characters. + * @type string $table_id + * Required. The Cloud SQL table to copy the data from with a length limit of + * 256 characters. + * @type string $gcs_staging_dir + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * Cloud SQL export to a specific Cloud Storage directory. + * Ensure that the Cloud SQL service account has the necessary Cloud + * Storage Admin permissions to access the specified Cloud Storage directory. + * @type bool $offload + * Option for serverless export. Enabling this option will incur additional + * cost. More info can be found + * [here](https://cloud.google.com/sql/pricing#serverless). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * The project ID that the Cloud SQL source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * + * Generated from protobuf field string project_id = 1; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * The project ID that the Cloud SQL source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * + * Generated from protobuf field string project_id = 1; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * Required. The Cloud SQL instance to copy the data from with a length limit + * of 256 characters. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstanceId() + { + return $this->instance_id; + } + + /** + * Required. The Cloud SQL instance to copy the data from with a length limit + * of 256 characters. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->instance_id = $var; + + return $this; + } + + /** + * Required. The Cloud SQL database to copy the data from with a length limit + * of 256 characters. + * + * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabaseId() + { + return $this->database_id; + } + + /** + * Required. The Cloud SQL database to copy the data from with a length limit + * of 256 characters. + * + * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabaseId($var) + { + GPBUtil::checkString($var, True); + $this->database_id = $var; + + return $this; + } + + /** + * Required. The Cloud SQL table to copy the data from with a length limit of + * 256 characters. + * + * Generated from protobuf field string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTableId() + { + return $this->table_id; + } + + /** + * Required. The Cloud SQL table to copy the data from with a length limit of + * 256 characters. + * + * Generated from protobuf field string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTableId($var) + { + GPBUtil::checkString($var, True); + $this->table_id = $var; + + return $this; + } + + /** + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * Cloud SQL export to a specific Cloud Storage directory. + * Ensure that the Cloud SQL service account has the necessary Cloud + * Storage Admin permissions to access the specified Cloud Storage directory. + * + * Generated from protobuf field string gcs_staging_dir = 5; + * @return string + */ + public function getGcsStagingDir() + { + return $this->gcs_staging_dir; + } + + /** + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * Cloud SQL export to a specific Cloud Storage directory. + * Ensure that the Cloud SQL service account has the necessary Cloud + * Storage Admin permissions to access the specified Cloud Storage directory. + * + * Generated from protobuf field string gcs_staging_dir = 5; + * @param string $var + * @return $this + */ + public function setGcsStagingDir($var) + { + GPBUtil::checkString($var, True); + $this->gcs_staging_dir = $var; + + return $this; + } + + /** + * Option for serverless export. Enabling this option will incur additional + * cost. More info can be found + * [here](https://cloud.google.com/sql/pricing#serverless). + * + * Generated from protobuf field bool offload = 6; + * @return bool + */ + public function getOffload() + { + return $this->offload; + } + + /** + * Option for serverless export. Enabling this option will incur additional + * cost. More info can be found + * [here](https://cloud.google.com/sql/pricing#serverless). + * + * Generated from protobuf field bool offload = 6; + * @param bool $var + * @return $this + */ + public function setOffload($var) + { + GPBUtil::checkBool($var); + $this->offload = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1/ConverseConversationRequest.php b/DiscoveryEngine/src/V1/ConverseConversationRequest.php index e833161e9ccd..77e933fd05aa 100644 --- a/DiscoveryEngine/src/V1/ConverseConversationRequest.php +++ b/DiscoveryEngine/src/V1/ConverseConversationRequest.php @@ -100,6 +100,14 @@ class ConverseConversationRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field string filter = 9; */ protected $filter = ''; + /** + * Boost specification to boost certain documents in search results which may + * affect the converse response. For more information on boosting, see + * [Boosting](https://cloud.google.com/retail/docs/boosting#boost) + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.BoostSpec boost_spec = 10; + */ + protected $boost_spec = null; /** * @param string $name Required. The resource name of the Conversation to get. Format: @@ -179,6 +187,10 @@ public static function build(string $name, \Google\Cloud\DiscoveryEngine\V1\Text * For more information about filtering including syntax and filter * operators, see * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + * @type \Google\Cloud\DiscoveryEngine\V1\SearchRequest\BoostSpec $boost_spec + * Boost specification to boost certain documents in search results which may + * affect the converse response. For more information on boosting, see + * [Boosting](https://cloud.google.com/retail/docs/boosting#boost) * } */ public function __construct($data = NULL) { @@ -494,5 +506,45 @@ public function setFilter($var) return $this; } + /** + * Boost specification to boost certain documents in search results which may + * affect the converse response. For more information on boosting, see + * [Boosting](https://cloud.google.com/retail/docs/boosting#boost) + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.BoostSpec boost_spec = 10; + * @return \Google\Cloud\DiscoveryEngine\V1\SearchRequest\BoostSpec|null + */ + public function getBoostSpec() + { + return $this->boost_spec; + } + + public function hasBoostSpec() + { + return isset($this->boost_spec); + } + + public function clearBoostSpec() + { + unset($this->boost_spec); + } + + /** + * Boost specification to boost certain documents in search results which may + * affect the converse response. For more information on boosting, see + * [Boosting](https://cloud.google.com/retail/docs/boosting#boost) + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.BoostSpec boost_spec = 10; + * @param \Google\Cloud\DiscoveryEngine\V1\SearchRequest\BoostSpec $var + * @return $this + */ + public function setBoostSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\SearchRequest\BoostSpec::class); + $this->boost_spec = $var; + + return $this; + } + } diff --git a/DiscoveryEngine/src/V1/DataStore.php b/DiscoveryEngine/src/V1/DataStore.php index 5c00e8a4a141..387f2238977b 100644 --- a/DiscoveryEngine/src/V1/DataStore.php +++ b/DiscoveryEngine/src/V1/DataStore.php @@ -72,6 +72,23 @@ class DataStore extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $create_time = null; + /** + * The start schema to use for this + * [DataStore][google.cloud.discoveryengine.v1.DataStore] when provisioning + * it. If unset, a default vertical specialized schema will be used. + * This field is only used by [CreateDataStore][] API, and will be ignored if + * used in other APIs. This field will be omitted from all API responses + * including [CreateDataStore][] API. To retrieve a schema of a + * [DataStore][google.cloud.discoveryengine.v1.DataStore], use + * [SchemaService.GetSchema][google.cloud.discoveryengine.v1.SchemaService.GetSchema] + * API instead. + * The provided schema will be validated against certain rules on schema. + * Learn more from [this + * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.Schema starting_schema = 28; + */ + protected $starting_schema = null; /** * Constructor. @@ -108,6 +125,19 @@ class DataStore extends \Google\Protobuf\Internal\Message * @type \Google\Protobuf\Timestamp $create_time * Output only. Timestamp the * [DataStore][google.cloud.discoveryengine.v1.DataStore] was created at. + * @type \Google\Cloud\DiscoveryEngine\V1\Schema $starting_schema + * The start schema to use for this + * [DataStore][google.cloud.discoveryengine.v1.DataStore] when provisioning + * it. If unset, a default vertical specialized schema will be used. + * This field is only used by [CreateDataStore][] API, and will be ignored if + * used in other APIs. This field will be omitted from all API responses + * including [CreateDataStore][] API. To retrieve a schema of a + * [DataStore][google.cloud.discoveryengine.v1.DataStore], use + * [SchemaService.GetSchema][google.cloud.discoveryengine.v1.SchemaService.GetSchema] + * API instead. + * The provided schema will be validated against certain rules on schema. + * Learn more from [this + * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). * } */ public function __construct($data = NULL) { @@ -337,5 +367,63 @@ public function setCreateTime($var) return $this; } + /** + * The start schema to use for this + * [DataStore][google.cloud.discoveryengine.v1.DataStore] when provisioning + * it. If unset, a default vertical specialized schema will be used. + * This field is only used by [CreateDataStore][] API, and will be ignored if + * used in other APIs. This field will be omitted from all API responses + * including [CreateDataStore][] API. To retrieve a schema of a + * [DataStore][google.cloud.discoveryengine.v1.DataStore], use + * [SchemaService.GetSchema][google.cloud.discoveryengine.v1.SchemaService.GetSchema] + * API instead. + * The provided schema will be validated against certain rules on schema. + * Learn more from [this + * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.Schema starting_schema = 28; + * @return \Google\Cloud\DiscoveryEngine\V1\Schema|null + */ + public function getStartingSchema() + { + return $this->starting_schema; + } + + public function hasStartingSchema() + { + return isset($this->starting_schema); + } + + public function clearStartingSchema() + { + unset($this->starting_schema); + } + + /** + * The start schema to use for this + * [DataStore][google.cloud.discoveryengine.v1.DataStore] when provisioning + * it. If unset, a default vertical specialized schema will be used. + * This field is only used by [CreateDataStore][] API, and will be ignored if + * used in other APIs. This field will be omitted from all API responses + * including [CreateDataStore][] API. To retrieve a schema of a + * [DataStore][google.cloud.discoveryengine.v1.DataStore], use + * [SchemaService.GetSchema][google.cloud.discoveryengine.v1.SchemaService.GetSchema] + * API instead. + * The provided schema will be validated against certain rules on schema. + * Learn more from [this + * doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.Schema starting_schema = 28; + * @param \Google\Cloud\DiscoveryEngine\V1\Schema $var + * @return $this + */ + public function setStartingSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\Schema::class); + $this->starting_schema = $var; + + return $this; + } + } diff --git a/DiscoveryEngine/src/V1/Document.php b/DiscoveryEngine/src/V1/Document.php index 4ee1dc78fa7f..aaf6e0cfe7fa 100644 --- a/DiscoveryEngine/src/V1/Document.php +++ b/DiscoveryEngine/src/V1/Document.php @@ -64,6 +64,15 @@ class Document extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.protobuf.Struct derived_struct_data = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $derived_struct_data = null; + /** + * Output only. The last time the document was indexed. If this field is set, + * the document could be returned in search results. + * This field is OUTPUT_ONLY. If this field is not populated, it means the + * document has never been indexed. + * + * Generated from protobuf field .google.protobuf.Timestamp index_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $index_time = null; protected $data; /** @@ -104,6 +113,11 @@ class Document extends \Google\Protobuf\Internal\Message * @type \Google\Protobuf\Struct $derived_struct_data * Output only. This field is OUTPUT_ONLY. * It contains derived data that are not in the original input document. + * @type \Google\Protobuf\Timestamp $index_time + * Output only. The last time the document was indexed. If this field is set, + * the document could be returned in search results. + * This field is OUTPUT_ONLY. If this field is not populated, it means the + * document has never been indexed. * } */ public function __construct($data = NULL) { @@ -381,6 +395,48 @@ public function setDerivedStructData($var) return $this; } + /** + * Output only. The last time the document was indexed. If this field is set, + * the document could be returned in search results. + * This field is OUTPUT_ONLY. If this field is not populated, it means the + * document has never been indexed. + * + * Generated from protobuf field .google.protobuf.Timestamp index_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getIndexTime() + { + return $this->index_time; + } + + public function hasIndexTime() + { + return isset($this->index_time); + } + + public function clearIndexTime() + { + unset($this->index_time); + } + + /** + * Output only. The last time the document was indexed. If this field is set, + * the document could be returned in search results. + * This field is OUTPUT_ONLY. If this field is not populated, it means the + * document has never been indexed. + * + * Generated from protobuf field .google.protobuf.Timestamp index_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setIndexTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->index_time = $var; + + return $this; + } + /** * @return string */ diff --git a/DiscoveryEngine/src/V1/Engine/ChatEngineConfig.php b/DiscoveryEngine/src/V1/Engine/ChatEngineConfig.php index 5c477ecd4b41..d5d31e2f6987 100644 --- a/DiscoveryEngine/src/V1/Engine/ChatEngineConfig.php +++ b/DiscoveryEngine/src/V1/Engine/ChatEngineConfig.php @@ -39,7 +39,7 @@ class ChatEngineConfig extends \Google\Protobuf\Internal\Message * [EngineService.GetEngine][google.cloud.discoveryengine.v1.EngineService.GetEngine] * or * [EngineService.ListEngines][google.cloud.discoveryengine.v1.EngineService.ListEngines] - * API after engine creation. Please use + * API after engine creation. Use * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1.Engine.ChatEngineMetadata.dialogflow_agent] * for actual agent association after Engine is created. * @@ -73,7 +73,7 @@ class ChatEngineConfig extends \Google\Protobuf\Internal\Message * [EngineService.GetEngine][google.cloud.discoveryengine.v1.EngineService.GetEngine] * or * [EngineService.ListEngines][google.cloud.discoveryengine.v1.EngineService.ListEngines] - * API after engine creation. Please use + * API after engine creation. Use * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1.Engine.ChatEngineMetadata.dialogflow_agent] * for actual agent association after Engine is created. * } @@ -144,7 +144,7 @@ public function setAgentCreationConfig($var) * [EngineService.GetEngine][google.cloud.discoveryengine.v1.EngineService.GetEngine] * or * [EngineService.ListEngines][google.cloud.discoveryengine.v1.EngineService.ListEngines] - * API after engine creation. Please use + * API after engine creation. Use * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1.Engine.ChatEngineMetadata.dialogflow_agent] * for actual agent association after Engine is created. * @@ -167,7 +167,7 @@ public function getDialogflowAgentToLink() * [EngineService.GetEngine][google.cloud.discoveryengine.v1.EngineService.GetEngine] * or * [EngineService.ListEngines][google.cloud.discoveryengine.v1.EngineService.ListEngines] - * API after engine creation. Please use + * API after engine creation. Use * [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1.Engine.ChatEngineMetadata.dialogflow_agent] * for actual agent association after Engine is created. * diff --git a/DiscoveryEngine/src/V1/Engine/SearchEngineConfig.php b/DiscoveryEngine/src/V1/Engine/SearchEngineConfig.php index 0b44ab844f45..97134bec50d3 100644 --- a/DiscoveryEngine/src/V1/Engine/SearchEngineConfig.php +++ b/DiscoveryEngine/src/V1/Engine/SearchEngineConfig.php @@ -18,7 +18,7 @@ class SearchEngineConfig extends \Google\Protobuf\Internal\Message /** * The search feature tier of this engine. * Different tiers might have different - * pricing. To learn more, please check the pricing documentation. + * pricing. To learn more, check the pricing documentation. * Defaults to * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1.SearchTier.SEARCH_TIER_STANDARD] * if not specified. @@ -42,7 +42,7 @@ class SearchEngineConfig extends \Google\Protobuf\Internal\Message * @type int $search_tier * The search feature tier of this engine. * Different tiers might have different - * pricing. To learn more, please check the pricing documentation. + * pricing. To learn more, check the pricing documentation. * Defaults to * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1.SearchTier.SEARCH_TIER_STANDARD] * if not specified. @@ -58,7 +58,7 @@ public function __construct($data = NULL) { /** * The search feature tier of this engine. * Different tiers might have different - * pricing. To learn more, please check the pricing documentation. + * pricing. To learn more, check the pricing documentation. * Defaults to * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1.SearchTier.SEARCH_TIER_STANDARD] * if not specified. @@ -74,7 +74,7 @@ public function getSearchTier() /** * The search feature tier of this engine. * Different tiers might have different - * pricing. To learn more, please check the pricing documentation. + * pricing. To learn more, check the pricing documentation. * Defaults to * [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1.SearchTier.SEARCH_TIER_STANDARD] * if not specified. diff --git a/DiscoveryEngine/src/V1/FhirStoreSource.php b/DiscoveryEngine/src/V1/FhirStoreSource.php new file mode 100644 index 000000000000..6041c313d2b1 --- /dev/null +++ b/DiscoveryEngine/src/V1/FhirStoreSource.php @@ -0,0 +1,117 @@ +google.cloud.discoveryengine.v1.FhirStoreSource + */ +class FhirStoreSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full resource name of the FHIR store to import data from, in + * the format of + * `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`. + * + * Generated from protobuf field string fhir_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $fhir_store = ''; + /** + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * FhirStore export to a specific Cloud Storage directory. + * + * Generated from protobuf field string gcs_staging_dir = 2; + */ + protected $gcs_staging_dir = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $fhir_store + * Required. The full resource name of the FHIR store to import data from, in + * the format of + * `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`. + * @type string $gcs_staging_dir + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * FhirStore export to a specific Cloud Storage directory. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full resource name of the FHIR store to import data from, in + * the format of + * `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`. + * + * Generated from protobuf field string fhir_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getFhirStore() + { + return $this->fhir_store; + } + + /** + * Required. The full resource name of the FHIR store to import data from, in + * the format of + * `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}`. + * + * Generated from protobuf field string fhir_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setFhirStore($var) + { + GPBUtil::checkString($var, True); + $this->fhir_store = $var; + + return $this; + } + + /** + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * FhirStore export to a specific Cloud Storage directory. + * + * Generated from protobuf field string gcs_staging_dir = 2; + * @return string + */ + public function getGcsStagingDir() + { + return $this->gcs_staging_dir; + } + + /** + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * FhirStore export to a specific Cloud Storage directory. + * + * Generated from protobuf field string gcs_staging_dir = 2; + * @param string $var + * @return $this + */ + public function setGcsStagingDir($var) + { + GPBUtil::checkString($var, True); + $this->gcs_staging_dir = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1/FirestoreSource.php b/DiscoveryEngine/src/V1/FirestoreSource.php new file mode 100644 index 000000000000..361f4b02a1f7 --- /dev/null +++ b/DiscoveryEngine/src/V1/FirestoreSource.php @@ -0,0 +1,201 @@ +google.cloud.discoveryengine.v1.FirestoreSource + */ +class FirestoreSource extends \Google\Protobuf\Internal\Message +{ + /** + * The project ID that the Cloud SQL source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * + * Generated from protobuf field string project_id = 1; + */ + protected $project_id = ''; + /** + * Required. The Firestore database to copy the data from with a length limit + * of 256 characters. + * + * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database_id = ''; + /** + * Required. The Firestore collection to copy the data from with a length + * limit of 1,500 characters. + * + * Generated from protobuf field string collection_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $collection_id = ''; + /** + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * Firestore export to a specific Cloud Storage directory. + * Ensure that the Firestore service account has the necessary Cloud + * Storage Admin permissions to access the specified Cloud Storage directory. + * + * Generated from protobuf field string gcs_staging_dir = 4; + */ + protected $gcs_staging_dir = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * The project ID that the Cloud SQL source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * @type string $database_id + * Required. The Firestore database to copy the data from with a length limit + * of 256 characters. + * @type string $collection_id + * Required. The Firestore collection to copy the data from with a length + * limit of 1,500 characters. + * @type string $gcs_staging_dir + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * Firestore export to a specific Cloud Storage directory. + * Ensure that the Firestore service account has the necessary Cloud + * Storage Admin permissions to access the specified Cloud Storage directory. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * The project ID that the Cloud SQL source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * + * Generated from protobuf field string project_id = 1; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * The project ID that the Cloud SQL source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * + * Generated from protobuf field string project_id = 1; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * Required. The Firestore database to copy the data from with a length limit + * of 256 characters. + * + * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabaseId() + { + return $this->database_id; + } + + /** + * Required. The Firestore database to copy the data from with a length limit + * of 256 characters. + * + * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabaseId($var) + { + GPBUtil::checkString($var, True); + $this->database_id = $var; + + return $this; + } + + /** + * Required. The Firestore collection to copy the data from with a length + * limit of 1,500 characters. + * + * Generated from protobuf field string collection_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCollectionId() + { + return $this->collection_id; + } + + /** + * Required. The Firestore collection to copy the data from with a length + * limit of 1,500 characters. + * + * Generated from protobuf field string collection_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCollectionId($var) + { + GPBUtil::checkString($var, True); + $this->collection_id = $var; + + return $this; + } + + /** + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * Firestore export to a specific Cloud Storage directory. + * Ensure that the Firestore service account has the necessary Cloud + * Storage Admin permissions to access the specified Cloud Storage directory. + * + * Generated from protobuf field string gcs_staging_dir = 4; + * @return string + */ + public function getGcsStagingDir() + { + return $this->gcs_staging_dir; + } + + /** + * Intermediate Cloud Storage directory used for the import with a length + * limit of 2,000 characters. Can be specified if one wants to have the + * Firestore export to a specific Cloud Storage directory. + * Ensure that the Firestore service account has the necessary Cloud + * Storage Admin permissions to access the specified Cloud Storage directory. + * + * Generated from protobuf field string gcs_staging_dir = 4; + * @param string $var + * @return $this + */ + public function setGcsStagingDir($var) + { + GPBUtil::checkString($var, True); + $this->gcs_staging_dir = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1/GcsSource.php b/DiscoveryEngine/src/V1/GcsSource.php index b48ba4393c9b..29b8a73ad4f4 100644 --- a/DiscoveryEngine/src/V1/GcsSource.php +++ b/DiscoveryEngine/src/V1/GcsSource.php @@ -39,11 +39,11 @@ class GcsSource extends \Google\Protobuf\Internal\Message * bits of SHA256(URI) encoded as a hex string. * * `custom`: One custom data JSON per row in arbitrary format that conforms * to the defined [Schema][google.cloud.discoveryengine.v1.Schema] of the - * data store. This can only be used by Gen App Builder. + * data store. This can only be used by the GENERIC Data Store vertical. * * `csv`: A CSV file with header conforming to the defined * [Schema][google.cloud.discoveryengine.v1.Schema] of the * data store. Each entry after the header is imported as a Document. - * This can only be used by Gen App Builder. + * This can only be used by the GENERIC Data Store vertical. * Supported values for user even imports: * * `user_event` (default): One JSON * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] per line. @@ -78,11 +78,11 @@ class GcsSource extends \Google\Protobuf\Internal\Message * bits of SHA256(URI) encoded as a hex string. * * `custom`: One custom data JSON per row in arbitrary format that conforms * to the defined [Schema][google.cloud.discoveryengine.v1.Schema] of the - * data store. This can only be used by Gen App Builder. + * data store. This can only be used by the GENERIC Data Store vertical. * * `csv`: A CSV file with header conforming to the defined * [Schema][google.cloud.discoveryengine.v1.Schema] of the * data store. Each entry after the header is imported as a Document. - * This can only be used by Gen App Builder. + * This can only be used by the GENERIC Data Store vertical. * Supported values for user even imports: * * `user_event` (default): One JSON * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] per line. @@ -143,11 +143,11 @@ public function setInputUris($var) * bits of SHA256(URI) encoded as a hex string. * * `custom`: One custom data JSON per row in arbitrary format that conforms * to the defined [Schema][google.cloud.discoveryengine.v1.Schema] of the - * data store. This can only be used by Gen App Builder. + * data store. This can only be used by the GENERIC Data Store vertical. * * `csv`: A CSV file with header conforming to the defined * [Schema][google.cloud.discoveryengine.v1.Schema] of the * data store. Each entry after the header is imported as a Document. - * This can only be used by Gen App Builder. + * This can only be used by the GENERIC Data Store vertical. * Supported values for user even imports: * * `user_event` (default): One JSON * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] per line. @@ -172,11 +172,11 @@ public function getDataSchema() * bits of SHA256(URI) encoded as a hex string. * * `custom`: One custom data JSON per row in arbitrary format that conforms * to the defined [Schema][google.cloud.discoveryengine.v1.Schema] of the - * data store. This can only be used by Gen App Builder. + * data store. This can only be used by the GENERIC Data Store vertical. * * `csv`: A CSV file with header conforming to the defined * [Schema][google.cloud.discoveryengine.v1.Schema] of the * data store. Each entry after the header is imported as a Document. - * This can only be used by Gen App Builder. + * This can only be used by the GENERIC Data Store vertical. * Supported values for user even imports: * * `user_event` (default): One JSON * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] per line. diff --git a/DiscoveryEngine/src/V1/ImportDocumentsMetadata.php b/DiscoveryEngine/src/V1/ImportDocumentsMetadata.php index 9db7179e5998..25d43b37aed8 100644 --- a/DiscoveryEngine/src/V1/ImportDocumentsMetadata.php +++ b/DiscoveryEngine/src/V1/ImportDocumentsMetadata.php @@ -41,6 +41,12 @@ class ImportDocumentsMetadata extends \Google\Protobuf\Internal\Message * Generated from protobuf field int64 failure_count = 4; */ protected $failure_count = 0; + /** + * Total count of entries that were processed. + * + * Generated from protobuf field int64 total_count = 5; + */ + protected $total_count = 0; /** * Constructor. @@ -57,6 +63,8 @@ class ImportDocumentsMetadata extends \Google\Protobuf\Internal\Message * Count of entries that were processed successfully. * @type int|string $failure_count * Count of entries that encountered errors while processing. + * @type int|string $total_count + * Total count of entries that were processed. * } */ public function __construct($data = NULL) { @@ -190,5 +198,31 @@ public function setFailureCount($var) return $this; } + /** + * Total count of entries that were processed. + * + * Generated from protobuf field int64 total_count = 5; + * @return int|string + */ + public function getTotalCount() + { + return $this->total_count; + } + + /** + * Total count of entries that were processed. + * + * Generated from protobuf field int64 total_count = 5; + * @param int|string $var + * @return $this + */ + public function setTotalCount($var) + { + GPBUtil::checkInt64($var); + $this->total_count = $var; + + return $this; + } + } diff --git a/DiscoveryEngine/src/V1/ImportDocumentsRequest.php b/DiscoveryEngine/src/V1/ImportDocumentsRequest.php index ede9abf36c4d..89455e7346e1 100644 --- a/DiscoveryEngine/src/V1/ImportDocumentsRequest.php +++ b/DiscoveryEngine/src/V1/ImportDocumentsRequest.php @@ -37,6 +37,13 @@ class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6; */ protected $reconciliation_mode = 0; + /** + * Indicates which fields in the provided imported documents to update. If + * not set, the default is to update all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 7; + */ + protected $update_mask = null; /** * Whether to automatically generate IDs for the documents if absent. * If set to `true`, @@ -49,41 +56,50 @@ class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message * to be specified using * [id_field][google.cloud.discoveryengine.v1.ImportDocumentsRequest.id_field], * otherwise, documents without IDs fail to be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource], and when + * Supported data sources: + * * [GcsSource][google.cloud.discoveryengine.v1.GcsSource]. * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] - * or + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource]. * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] - * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [SpannerSource][google.cloud.discoveryengine.v1.SpannerSource]. + * * [CloudSqlSource][google.cloud.discoveryengine.v1.CloudSqlSource]. + * * [FirestoreSource][google.cloud.discoveryengine.v1.FirestoreSource]. + * * [BigtableSource][google.cloud.discoveryengine.v1.BigtableSource]. * * Generated from protobuf field bool auto_generate_ids = 8; */ protected $auto_generate_ids = false; /** - * The field in the Cloud Storage and BigQuery sources that indicates the - * unique IDs of the documents. + * The field indicates the ID field or column to be used as unique IDs of + * the documents. * For [GcsSource][google.cloud.discoveryengine.v1.GcsSource] it is the key of * the JSON field. For instance, `my_id` for JSON `{"my_id": "some_uuid"}`. - * For [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource] it is - * the column name of the BigQuery table where the unique ids are stored. - * The values of the JSON field or the BigQuery column are used as the + * For others, it may be the column name of the table where the unique ids are + * stored. + * The values of the JSON field or the table column are used as the * [Document.id][google.cloud.discoveryengine.v1.Document.id]s. The JSON field - * or the BigQuery column must be of string type, and the values must be set - * as valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * or the table column must be of string type, and the values must be set as + * valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) * with 1-63 characters. Otherwise, documents without valid IDs fail to be * imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource], and when - * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] - * or - * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] - * is `custom`. And only set this field when + * Only set this field when * [auto_generate_ids][google.cloud.discoveryengine.v1.ImportDocumentsRequest.auto_generate_ids] * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. * If it is unset, a default value `_id` is used when importing from the * allowed data sources. + * Supported data sources: + * * [GcsSource][google.cloud.discoveryengine.v1.GcsSource]. + * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource]. + * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [SpannerSource][google.cloud.discoveryengine.v1.SpannerSource]. + * * [CloudSqlSource][google.cloud.discoveryengine.v1.CloudSqlSource]. + * * [FirestoreSource][google.cloud.discoveryengine.v1.FirestoreSource]. + * * [BigtableSource][google.cloud.discoveryengine.v1.BigtableSource]. * * Generated from protobuf field string id_field = 9; */ @@ -102,6 +118,16 @@ class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message * Cloud Storage location for the input content. * @type \Google\Cloud\DiscoveryEngine\V1\BigQuerySource $bigquery_source * BigQuery input source. + * @type \Google\Cloud\DiscoveryEngine\V1\FhirStoreSource $fhir_store_source + * FhirStore input source. + * @type \Google\Cloud\DiscoveryEngine\V1\SpannerSource $spanner_source + * Spanner input source. + * @type \Google\Cloud\DiscoveryEngine\V1\CloudSqlSource $cloud_sql_source + * Cloud SQL input source. + * @type \Google\Cloud\DiscoveryEngine\V1\FirestoreSource $firestore_source + * Firestore input source. + * @type \Google\Cloud\DiscoveryEngine\V1\BigtableSource $bigtable_source + * Cloud Bigtable input source. * @type string $parent * Required. The parent branch resource name, such as * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. @@ -112,6 +138,9 @@ class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message * The mode of reconciliation between existing documents and the documents to * be imported. Defaults to * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL]. + * @type \Google\Protobuf\FieldMask $update_mask + * Indicates which fields in the provided imported documents to update. If + * not set, the default is to update all fields. * @type bool $auto_generate_ids * Whether to automatically generate IDs for the documents if absent. * If set to `true`, @@ -124,37 +153,46 @@ class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message * to be specified using * [id_field][google.cloud.discoveryengine.v1.ImportDocumentsRequest.id_field], * otherwise, documents without IDs fail to be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource], and when + * Supported data sources: + * * [GcsSource][google.cloud.discoveryengine.v1.GcsSource]. * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] - * or + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource]. * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] - * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [SpannerSource][google.cloud.discoveryengine.v1.SpannerSource]. + * * [CloudSqlSource][google.cloud.discoveryengine.v1.CloudSqlSource]. + * * [FirestoreSource][google.cloud.discoveryengine.v1.FirestoreSource]. + * * [BigtableSource][google.cloud.discoveryengine.v1.BigtableSource]. * @type string $id_field - * The field in the Cloud Storage and BigQuery sources that indicates the - * unique IDs of the documents. + * The field indicates the ID field or column to be used as unique IDs of + * the documents. * For [GcsSource][google.cloud.discoveryengine.v1.GcsSource] it is the key of * the JSON field. For instance, `my_id` for JSON `{"my_id": "some_uuid"}`. - * For [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource] it is - * the column name of the BigQuery table where the unique ids are stored. - * The values of the JSON field or the BigQuery column are used as the + * For others, it may be the column name of the table where the unique ids are + * stored. + * The values of the JSON field or the table column are used as the * [Document.id][google.cloud.discoveryengine.v1.Document.id]s. The JSON field - * or the BigQuery column must be of string type, and the values must be set - * as valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * or the table column must be of string type, and the values must be set as + * valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) * with 1-63 characters. Otherwise, documents without valid IDs fail to be * imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource], and when - * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] - * or - * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] - * is `custom`. And only set this field when + * Only set this field when * [auto_generate_ids][google.cloud.discoveryengine.v1.ImportDocumentsRequest.auto_generate_ids] * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. * If it is unset, a default value `_id` is used when importing from the * allowed data sources. + * Supported data sources: + * * [GcsSource][google.cloud.discoveryengine.v1.GcsSource]. + * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource]. + * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [SpannerSource][google.cloud.discoveryengine.v1.SpannerSource]. + * * [CloudSqlSource][google.cloud.discoveryengine.v1.CloudSqlSource]. + * * [FirestoreSource][google.cloud.discoveryengine.v1.FirestoreSource]. + * * [BigtableSource][google.cloud.discoveryengine.v1.BigtableSource]. * } */ public function __construct($data = NULL) { @@ -255,6 +293,161 @@ public function setBigquerySource($var) return $this; } + /** + * FhirStore input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.FhirStoreSource fhir_store_source = 10; + * @return \Google\Cloud\DiscoveryEngine\V1\FhirStoreSource|null + */ + public function getFhirStoreSource() + { + return $this->readOneof(10); + } + + public function hasFhirStoreSource() + { + return $this->hasOneof(10); + } + + /** + * FhirStore input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.FhirStoreSource fhir_store_source = 10; + * @param \Google\Cloud\DiscoveryEngine\V1\FhirStoreSource $var + * @return $this + */ + public function setFhirStoreSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\FhirStoreSource::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Spanner input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SpannerSource spanner_source = 11; + * @return \Google\Cloud\DiscoveryEngine\V1\SpannerSource|null + */ + public function getSpannerSource() + { + return $this->readOneof(11); + } + + public function hasSpannerSource() + { + return $this->hasOneof(11); + } + + /** + * Spanner input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SpannerSource spanner_source = 11; + * @param \Google\Cloud\DiscoveryEngine\V1\SpannerSource $var + * @return $this + */ + public function setSpannerSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\SpannerSource::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Cloud SQL input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.CloudSqlSource cloud_sql_source = 12; + * @return \Google\Cloud\DiscoveryEngine\V1\CloudSqlSource|null + */ + public function getCloudSqlSource() + { + return $this->readOneof(12); + } + + public function hasCloudSqlSource() + { + return $this->hasOneof(12); + } + + /** + * Cloud SQL input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.CloudSqlSource cloud_sql_source = 12; + * @param \Google\Cloud\DiscoveryEngine\V1\CloudSqlSource $var + * @return $this + */ + public function setCloudSqlSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\CloudSqlSource::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Firestore input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.FirestoreSource firestore_source = 13; + * @return \Google\Cloud\DiscoveryEngine\V1\FirestoreSource|null + */ + public function getFirestoreSource() + { + return $this->readOneof(13); + } + + public function hasFirestoreSource() + { + return $this->hasOneof(13); + } + + /** + * Firestore input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.FirestoreSource firestore_source = 13; + * @param \Google\Cloud\DiscoveryEngine\V1\FirestoreSource $var + * @return $this + */ + public function setFirestoreSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\FirestoreSource::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * Cloud Bigtable input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.BigtableSource bigtable_source = 15; + * @return \Google\Cloud\DiscoveryEngine\V1\BigtableSource|null + */ + public function getBigtableSource() + { + return $this->readOneof(15); + } + + public function hasBigtableSource() + { + return $this->hasOneof(15); + } + + /** + * Cloud Bigtable input source. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.BigtableSource bigtable_source = 15; + * @param \Google\Cloud\DiscoveryEngine\V1\BigtableSource $var + * @return $this + */ + public function setBigtableSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\BigtableSource::class); + $this->writeOneof(15, $var); + + return $this; + } + /** * Required. The parent branch resource name, such as * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. @@ -351,6 +544,44 @@ public function setReconciliationMode($var) return $this; } + /** + * Indicates which fields in the provided imported documents to update. If + * not set, the default is to update all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 7; + * @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); + } + + /** + * Indicates which fields in the provided imported documents to update. If + * not set, the default is to update all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 7; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + /** * Whether to automatically generate IDs for the documents if absent. * If set to `true`, @@ -363,13 +594,17 @@ public function setReconciliationMode($var) * to be specified using * [id_field][google.cloud.discoveryengine.v1.ImportDocumentsRequest.id_field], * otherwise, documents without IDs fail to be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource], and when + * Supported data sources: + * * [GcsSource][google.cloud.discoveryengine.v1.GcsSource]. * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] - * or + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource]. * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] - * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [SpannerSource][google.cloud.discoveryengine.v1.SpannerSource]. + * * [CloudSqlSource][google.cloud.discoveryengine.v1.CloudSqlSource]. + * * [FirestoreSource][google.cloud.discoveryengine.v1.FirestoreSource]. + * * [BigtableSource][google.cloud.discoveryengine.v1.BigtableSource]. * * Generated from protobuf field bool auto_generate_ids = 8; * @return bool @@ -391,13 +626,17 @@ public function getAutoGenerateIds() * to be specified using * [id_field][google.cloud.discoveryengine.v1.ImportDocumentsRequest.id_field], * otherwise, documents without IDs fail to be imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource], and when + * Supported data sources: + * * [GcsSource][google.cloud.discoveryengine.v1.GcsSource]. * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] - * or + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource]. * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] - * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [SpannerSource][google.cloud.discoveryengine.v1.SpannerSource]. + * * [CloudSqlSource][google.cloud.discoveryengine.v1.CloudSqlSource]. + * * [FirestoreSource][google.cloud.discoveryengine.v1.FirestoreSource]. + * * [BigtableSource][google.cloud.discoveryengine.v1.BigtableSource]. * * Generated from protobuf field bool auto_generate_ids = 8; * @param bool $var @@ -412,29 +651,34 @@ public function setAutoGenerateIds($var) } /** - * The field in the Cloud Storage and BigQuery sources that indicates the - * unique IDs of the documents. + * The field indicates the ID field or column to be used as unique IDs of + * the documents. * For [GcsSource][google.cloud.discoveryengine.v1.GcsSource] it is the key of * the JSON field. For instance, `my_id` for JSON `{"my_id": "some_uuid"}`. - * For [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource] it is - * the column name of the BigQuery table where the unique ids are stored. - * The values of the JSON field or the BigQuery column are used as the + * For others, it may be the column name of the table where the unique ids are + * stored. + * The values of the JSON field or the table column are used as the * [Document.id][google.cloud.discoveryengine.v1.Document.id]s. The JSON field - * or the BigQuery column must be of string type, and the values must be set - * as valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * or the table column must be of string type, and the values must be set as + * valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) * with 1-63 characters. Otherwise, documents without valid IDs fail to be * imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource], and when - * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] - * or - * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] - * is `custom`. And only set this field when + * Only set this field when * [auto_generate_ids][google.cloud.discoveryengine.v1.ImportDocumentsRequest.auto_generate_ids] * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. * If it is unset, a default value `_id` is used when importing from the * allowed data sources. + * Supported data sources: + * * [GcsSource][google.cloud.discoveryengine.v1.GcsSource]. + * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource]. + * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [SpannerSource][google.cloud.discoveryengine.v1.SpannerSource]. + * * [CloudSqlSource][google.cloud.discoveryengine.v1.CloudSqlSource]. + * * [FirestoreSource][google.cloud.discoveryengine.v1.FirestoreSource]. + * * [BigtableSource][google.cloud.discoveryengine.v1.BigtableSource]. * * Generated from protobuf field string id_field = 9; * @return string @@ -445,29 +689,34 @@ public function getIdField() } /** - * The field in the Cloud Storage and BigQuery sources that indicates the - * unique IDs of the documents. + * The field indicates the ID field or column to be used as unique IDs of + * the documents. * For [GcsSource][google.cloud.discoveryengine.v1.GcsSource] it is the key of * the JSON field. For instance, `my_id` for JSON `{"my_id": "some_uuid"}`. - * For [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource] it is - * the column name of the BigQuery table where the unique ids are stored. - * The values of the JSON field or the BigQuery column are used as the + * For others, it may be the column name of the table where the unique ids are + * stored. + * The values of the JSON field or the table column are used as the * [Document.id][google.cloud.discoveryengine.v1.Document.id]s. The JSON field - * or the BigQuery column must be of string type, and the values must be set - * as valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) + * or the table column must be of string type, and the values must be set as + * valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) * with 1-63 characters. Otherwise, documents without valid IDs fail to be * imported. - * Only set this field when using - * [GcsSource][google.cloud.discoveryengine.v1.GcsSource] or - * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource], and when - * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] - * or - * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] - * is `custom`. And only set this field when + * Only set this field when * [auto_generate_ids][google.cloud.discoveryengine.v1.ImportDocumentsRequest.auto_generate_ids] * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. * If it is unset, a default value `_id` is used when importing from the * allowed data sources. + * Supported data sources: + * * [GcsSource][google.cloud.discoveryengine.v1.GcsSource]. + * [GcsSource.data_schema][google.cloud.discoveryengine.v1.GcsSource.data_schema] + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [BigQuerySource][google.cloud.discoveryengine.v1.BigQuerySource]. + * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1.BigQuerySource.data_schema] + * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. + * * [SpannerSource][google.cloud.discoveryengine.v1.SpannerSource]. + * * [CloudSqlSource][google.cloud.discoveryengine.v1.CloudSqlSource]. + * * [FirestoreSource][google.cloud.discoveryengine.v1.FirestoreSource]. + * * [BigtableSource][google.cloud.discoveryengine.v1.BigtableSource]. * * Generated from protobuf field string id_field = 9; * @param string $var diff --git a/DiscoveryEngine/src/V1/IndustryVertical.php b/DiscoveryEngine/src/V1/IndustryVertical.php index 1264e159b0d9..666456ecedc7 100644 --- a/DiscoveryEngine/src/V1/IndustryVertical.php +++ b/DiscoveryEngine/src/V1/IndustryVertical.php @@ -33,11 +33,18 @@ class IndustryVertical * Generated from protobuf enum MEDIA = 2; */ const MEDIA = 2; + /** + * The healthcare FHIR vertical. + * + * Generated from protobuf enum HEALTHCARE_FHIR = 7; + */ + const HEALTHCARE_FHIR = 7; private static $valueToName = [ self::INDUSTRY_VERTICAL_UNSPECIFIED => 'INDUSTRY_VERTICAL_UNSPECIFIED', self::GENERIC => 'GENERIC', self::MEDIA => 'MEDIA', + self::HEALTHCARE_FHIR => 'HEALTHCARE_FHIR', ]; public static function name($value) diff --git a/DiscoveryEngine/src/V1/PageInfo.php b/DiscoveryEngine/src/V1/PageInfo.php index cefddd76f08c..56b337b655c8 100644 --- a/DiscoveryEngine/src/V1/PageInfo.php +++ b/DiscoveryEngine/src/V1/PageInfo.php @@ -31,7 +31,7 @@ class PageInfo extends \Google\Protobuf\Internal\Message /** * The most specific category associated with a category page. * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: @@ -79,7 +79,7 @@ class PageInfo extends \Google\Protobuf\Internal\Message * @type string $page_category * The most specific category associated with a category page. * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: @@ -146,7 +146,7 @@ public function setPageviewId($var) /** * The most specific category associated with a category page. * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: @@ -165,7 +165,7 @@ public function getPageCategory() /** * The most specific category associated with a category page. * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: diff --git a/DiscoveryEngine/src/V1/PurgeDocumentsMetadata.php b/DiscoveryEngine/src/V1/PurgeDocumentsMetadata.php index e059a000bd93..1869a355563d 100644 --- a/DiscoveryEngine/src/V1/PurgeDocumentsMetadata.php +++ b/DiscoveryEngine/src/V1/PurgeDocumentsMetadata.php @@ -41,6 +41,12 @@ class PurgeDocumentsMetadata extends \Google\Protobuf\Internal\Message * Generated from protobuf field int64 failure_count = 4; */ protected $failure_count = 0; + /** + * Count of entries that were ignored as entries were not found. + * + * Generated from protobuf field int64 ignored_count = 5; + */ + protected $ignored_count = 0; /** * Constructor. @@ -57,6 +63,8 @@ class PurgeDocumentsMetadata extends \Google\Protobuf\Internal\Message * Count of entries that were deleted successfully. * @type int|string $failure_count * Count of entries that encountered errors while processing. + * @type int|string $ignored_count + * Count of entries that were ignored as entries were not found. * } */ public function __construct($data = NULL) { @@ -190,5 +198,31 @@ public function setFailureCount($var) return $this; } + /** + * Count of entries that were ignored as entries were not found. + * + * Generated from protobuf field int64 ignored_count = 5; + * @return int|string + */ + public function getIgnoredCount() + { + return $this->ignored_count; + } + + /** + * Count of entries that were ignored as entries were not found. + * + * Generated from protobuf field int64 ignored_count = 5; + * @param int|string $var + * @return $this + */ + public function setIgnoredCount($var) + { + GPBUtil::checkInt64($var); + $this->ignored_count = $var; + + return $this; + } + } diff --git a/DiscoveryEngine/src/V1/RecommendRequest.php b/DiscoveryEngine/src/V1/RecommendRequest.php new file mode 100644 index 000000000000..60a6de5550df --- /dev/null +++ b/DiscoveryEngine/src/V1/RecommendRequest.php @@ -0,0 +1,629 @@ +google.cloud.discoveryengine.v1.RecommendRequest + */ +class RecommendRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Full resource name of a [ServingConfig][]: + * `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or + * `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` + * One default serving config is created along with your recommendation engine + * creation. The engine ID will be used as the ID of the default serving + * config. For example, for Engine + * `projects/*/locations/global/collections/*/engines/my-engine`, you can use + * `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` + * for your + * [RecommendationService.Recommend][google.cloud.discoveryengine.v1.RecommendationService.Recommend] + * requests. + * + * Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $serving_config = ''; + /** + * Required. Context about the user, what they are looking at and what action + * they took to trigger the Recommend request. Note that this user event + * detail won't be ingested to userEvent logs. Thus, a separate userEvent + * write request is required for event logging. + * Don't set + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] + * or + * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1.UserInfo.user_id] + * to the same fixed ID for different users. If you are trying to receive + * non-personalized recommendations (not recommended; this can negatively + * impact model performance), instead set + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] + * to a random unique ID and leave + * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1.UserInfo.user_id] + * unset. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $user_event = null; + /** + * Maximum number of results to return. Set this property + * to the number of recommendation results needed. If zero, the service will + * choose a reasonable default. The maximum allowed value is 100. Values + * above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * Filter for restricting recommendation results with a length limit of 5,000 + * characters. Currently, only filter expressions on the `filter_tags` + * attribute is supported. + * Examples: + * * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` + * * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))` + * If `attributeFilteringSyntax` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie")) + * * (available: true) AND + * (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) + * If your filter blocks all results, the API will return generic + * (unfiltered) popular Documents. If you only want results strictly matching + * the filters, set `strictFiltering` to True in + * [RecommendRequest.params][google.cloud.discoveryengine.v1.RecommendRequest.params] + * to receive empty results instead. + * Note that the API will never return + * [Document][google.cloud.discoveryengine.v1.Document]s with `storageStatus` + * of `EXPIRED` or `DELETED` regardless of filter choices. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Use validate only mode for this recommendation query. If set to true, a + * fake model will be used that returns arbitrary Document IDs. + * Note that the validate only mode should only be used for testing the API, + * or if the model is not ready. + * + * Generated from protobuf field bool validate_only = 5; + */ + protected $validate_only = false; + /** + * Additional domain specific parameters for the recommendations. + * Allowed values: + * * `returnDocument`: Boolean. If set to true, the associated Document + * object will be returned in + * [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1.RecommendResponse.RecommendationResult.document]. + * * `returnScore`: Boolean. If set to true, the recommendation 'score' + * corresponding to each returned Document will be set in + * [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1.RecommendResponse.RecommendationResult.metadata]. + * The given 'score' indicates the probability of a Document conversion + * given the user's context and history. + * * `strictFiltering`: Boolean. True by default. If set to false, the service + * will return generic (unfiltered) popular Documents instead of empty if + * your filter blocks all recommendation results. + * * `diversityLevel`: String. Default empty. If set to be non-empty, then + * it needs to be one of: + * * `no-diversity` + * * `low-diversity` + * * `medium-diversity` + * * `high-diversity` + * * `auto-diversity` + * This gives request-level control and adjusts recommendation results + * based on Document category. + * * `attributeFilteringSyntax`: Boolean. False by default. If set to true, + * the `filter` field is interpreted according to the new, + * attribute-based syntax. + * + * Generated from protobuf field map params = 6; + */ + private $params; + /** + * The user labels applied to a resource must meet the following requirements: + * * Each resource can have multiple labels, up to a maximum of 64. + * * Each label must be a key-value pair. + * * Keys have a minimum length of 1 character and a maximum length of 63 + * characters and cannot be empty. Values can be empty and have a maximum + * length of 63 characters. + * * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. All characters must use UTF-8 encoding, and + * international characters are allowed. + * * The key portion of a label must be unique. However, you can use the same + * key with multiple resources. + * * Keys must start with a lowercase letter or international character. + * See [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * for more details. + * + * Generated from protobuf field map user_labels = 8; + */ + private $user_labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $serving_config + * Required. Full resource name of a [ServingConfig][]: + * `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or + * `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` + * One default serving config is created along with your recommendation engine + * creation. The engine ID will be used as the ID of the default serving + * config. For example, for Engine + * `projects/*/locations/global/collections/*/engines/my-engine`, you can use + * `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` + * for your + * [RecommendationService.Recommend][google.cloud.discoveryengine.v1.RecommendationService.Recommend] + * requests. + * @type \Google\Cloud\DiscoveryEngine\V1\UserEvent $user_event + * Required. Context about the user, what they are looking at and what action + * they took to trigger the Recommend request. Note that this user event + * detail won't be ingested to userEvent logs. Thus, a separate userEvent + * write request is required for event logging. + * Don't set + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] + * or + * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1.UserInfo.user_id] + * to the same fixed ID for different users. If you are trying to receive + * non-personalized recommendations (not recommended; this can negatively + * impact model performance), instead set + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] + * to a random unique ID and leave + * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1.UserInfo.user_id] + * unset. + * @type int $page_size + * Maximum number of results to return. Set this property + * to the number of recommendation results needed. If zero, the service will + * choose a reasonable default. The maximum allowed value is 100. Values + * above 100 will be coerced to 100. + * @type string $filter + * Filter for restricting recommendation results with a length limit of 5,000 + * characters. Currently, only filter expressions on the `filter_tags` + * attribute is supported. + * Examples: + * * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` + * * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))` + * If `attributeFilteringSyntax` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie")) + * * (available: true) AND + * (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) + * If your filter blocks all results, the API will return generic + * (unfiltered) popular Documents. If you only want results strictly matching + * the filters, set `strictFiltering` to True in + * [RecommendRequest.params][google.cloud.discoveryengine.v1.RecommendRequest.params] + * to receive empty results instead. + * Note that the API will never return + * [Document][google.cloud.discoveryengine.v1.Document]s with `storageStatus` + * of `EXPIRED` or `DELETED` regardless of filter choices. + * @type bool $validate_only + * Use validate only mode for this recommendation query. If set to true, a + * fake model will be used that returns arbitrary Document IDs. + * Note that the validate only mode should only be used for testing the API, + * or if the model is not ready. + * @type array|\Google\Protobuf\Internal\MapField $params + * Additional domain specific parameters for the recommendations. + * Allowed values: + * * `returnDocument`: Boolean. If set to true, the associated Document + * object will be returned in + * [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1.RecommendResponse.RecommendationResult.document]. + * * `returnScore`: Boolean. If set to true, the recommendation 'score' + * corresponding to each returned Document will be set in + * [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1.RecommendResponse.RecommendationResult.metadata]. + * The given 'score' indicates the probability of a Document conversion + * given the user's context and history. + * * `strictFiltering`: Boolean. True by default. If set to false, the service + * will return generic (unfiltered) popular Documents instead of empty if + * your filter blocks all recommendation results. + * * `diversityLevel`: String. Default empty. If set to be non-empty, then + * it needs to be one of: + * * `no-diversity` + * * `low-diversity` + * * `medium-diversity` + * * `high-diversity` + * * `auto-diversity` + * This gives request-level control and adjusts recommendation results + * based on Document category. + * * `attributeFilteringSyntax`: Boolean. False by default. If set to true, + * the `filter` field is interpreted according to the new, + * attribute-based syntax. + * @type array|\Google\Protobuf\Internal\MapField $user_labels + * The user labels applied to a resource must meet the following requirements: + * * Each resource can have multiple labels, up to a maximum of 64. + * * Each label must be a key-value pair. + * * Keys have a minimum length of 1 character and a maximum length of 63 + * characters and cannot be empty. Values can be empty and have a maximum + * length of 63 characters. + * * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. All characters must use UTF-8 encoding, and + * international characters are allowed. + * * The key portion of a label must be unique. However, you can use the same + * key with multiple resources. + * * Keys must start with a lowercase letter or international character. + * See [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * for more details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\RecommendationService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Full resource name of a [ServingConfig][]: + * `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or + * `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` + * One default serving config is created along with your recommendation engine + * creation. The engine ID will be used as the ID of the default serving + * config. For example, for Engine + * `projects/*/locations/global/collections/*/engines/my-engine`, you can use + * `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` + * for your + * [RecommendationService.Recommend][google.cloud.discoveryengine.v1.RecommendationService.Recommend] + * requests. + * + * Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getServingConfig() + { + return $this->serving_config; + } + + /** + * Required. Full resource name of a [ServingConfig][]: + * `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or + * `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` + * One default serving config is created along with your recommendation engine + * creation. The engine ID will be used as the ID of the default serving + * config. For example, for Engine + * `projects/*/locations/global/collections/*/engines/my-engine`, you can use + * `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` + * for your + * [RecommendationService.Recommend][google.cloud.discoveryengine.v1.RecommendationService.Recommend] + * requests. + * + * Generated from protobuf field string serving_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setServingConfig($var) + { + GPBUtil::checkString($var, True); + $this->serving_config = $var; + + return $this; + } + + /** + * Required. Context about the user, what they are looking at and what action + * they took to trigger the Recommend request. Note that this user event + * detail won't be ingested to userEvent logs. Thus, a separate userEvent + * write request is required for event logging. + * Don't set + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] + * or + * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1.UserInfo.user_id] + * to the same fixed ID for different users. If you are trying to receive + * non-personalized recommendations (not recommended; this can negatively + * impact model performance), instead set + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] + * to a random unique ID and leave + * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1.UserInfo.user_id] + * unset. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\DiscoveryEngine\V1\UserEvent|null + */ + public function getUserEvent() + { + return $this->user_event; + } + + public function hasUserEvent() + { + return isset($this->user_event); + } + + public function clearUserEvent() + { + unset($this->user_event); + } + + /** + * Required. Context about the user, what they are looking at and what action + * they took to trigger the Recommend request. Note that this user event + * detail won't be ingested to userEvent logs. Thus, a separate userEvent + * write request is required for event logging. + * Don't set + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] + * or + * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1.UserInfo.user_id] + * to the same fixed ID for different users. If you are trying to receive + * non-personalized recommendations (not recommended; this can negatively + * impact model performance), instead set + * [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id] + * to a random unique ID and leave + * [UserEvent.user_info.user_id][google.cloud.discoveryengine.v1.UserInfo.user_id] + * unset. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.UserEvent user_event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\DiscoveryEngine\V1\UserEvent $var + * @return $this + */ + public function setUserEvent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\UserEvent::class); + $this->user_event = $var; + + return $this; + } + + /** + * Maximum number of results to return. Set this property + * to the number of recommendation results needed. If zero, the service will + * choose a reasonable default. The maximum allowed value is 100. Values + * above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of results to return. Set this property + * to the number of recommendation results needed. If zero, the service will + * choose a reasonable default. The maximum allowed value is 100. Values + * above 100 will be coerced to 100. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Filter for restricting recommendation results with a length limit of 5,000 + * characters. Currently, only filter expressions on the `filter_tags` + * attribute is supported. + * Examples: + * * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` + * * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))` + * If `attributeFilteringSyntax` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie")) + * * (available: true) AND + * (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) + * If your filter blocks all results, the API will return generic + * (unfiltered) popular Documents. If you only want results strictly matching + * the filters, set `strictFiltering` to True in + * [RecommendRequest.params][google.cloud.discoveryengine.v1.RecommendRequest.params] + * to receive empty results instead. + * Note that the API will never return + * [Document][google.cloud.discoveryengine.v1.Document]s with `storageStatus` + * of `EXPIRED` or `DELETED` regardless of filter choices. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter for restricting recommendation results with a length limit of 5,000 + * characters. Currently, only filter expressions on the `filter_tags` + * attribute is supported. + * Examples: + * * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` + * * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))` + * If `attributeFilteringSyntax` is set to true under the `params` field, then + * attribute-based expressions are expected instead of the above described + * tag-based syntax. Examples: + * * (launguage: ANY("en", "es")) AND NOT (categories: ANY("Movie")) + * * (available: true) AND + * (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) + * If your filter blocks all results, the API will return generic + * (unfiltered) popular Documents. If you only want results strictly matching + * the filters, set `strictFiltering` to True in + * [RecommendRequest.params][google.cloud.discoveryengine.v1.RecommendRequest.params] + * to receive empty results instead. + * Note that the API will never return + * [Document][google.cloud.discoveryengine.v1.Document]s with `storageStatus` + * of `EXPIRED` or `DELETED` regardless of filter choices. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Use validate only mode for this recommendation query. If set to true, a + * fake model will be used that returns arbitrary Document IDs. + * Note that the validate only mode should only be used for testing the API, + * or if the model is not ready. + * + * Generated from protobuf field bool validate_only = 5; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * Use validate only mode for this recommendation query. If set to true, a + * fake model will be used that returns arbitrary Document IDs. + * Note that the validate only mode should only be used for testing the API, + * or if the model is not ready. + * + * Generated from protobuf field bool validate_only = 5; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * Additional domain specific parameters for the recommendations. + * Allowed values: + * * `returnDocument`: Boolean. If set to true, the associated Document + * object will be returned in + * [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1.RecommendResponse.RecommendationResult.document]. + * * `returnScore`: Boolean. If set to true, the recommendation 'score' + * corresponding to each returned Document will be set in + * [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1.RecommendResponse.RecommendationResult.metadata]. + * The given 'score' indicates the probability of a Document conversion + * given the user's context and history. + * * `strictFiltering`: Boolean. True by default. If set to false, the service + * will return generic (unfiltered) popular Documents instead of empty if + * your filter blocks all recommendation results. + * * `diversityLevel`: String. Default empty. If set to be non-empty, then + * it needs to be one of: + * * `no-diversity` + * * `low-diversity` + * * `medium-diversity` + * * `high-diversity` + * * `auto-diversity` + * This gives request-level control and adjusts recommendation results + * based on Document category. + * * `attributeFilteringSyntax`: Boolean. False by default. If set to true, + * the `filter` field is interpreted according to the new, + * attribute-based syntax. + * + * Generated from protobuf field map params = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getParams() + { + return $this->params; + } + + /** + * Additional domain specific parameters for the recommendations. + * Allowed values: + * * `returnDocument`: Boolean. If set to true, the associated Document + * object will be returned in + * [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1.RecommendResponse.RecommendationResult.document]. + * * `returnScore`: Boolean. If set to true, the recommendation 'score' + * corresponding to each returned Document will be set in + * [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1.RecommendResponse.RecommendationResult.metadata]. + * The given 'score' indicates the probability of a Document conversion + * given the user's context and history. + * * `strictFiltering`: Boolean. True by default. If set to false, the service + * will return generic (unfiltered) popular Documents instead of empty if + * your filter blocks all recommendation results. + * * `diversityLevel`: String. Default empty. If set to be non-empty, then + * it needs to be one of: + * * `no-diversity` + * * `low-diversity` + * * `medium-diversity` + * * `high-diversity` + * * `auto-diversity` + * This gives request-level control and adjusts recommendation results + * based on Document category. + * * `attributeFilteringSyntax`: Boolean. False by default. If set to true, + * the `filter` field is interpreted according to the new, + * attribute-based syntax. + * + * Generated from protobuf field map params = 6; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setParams($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); + $this->params = $arr; + + return $this; + } + + /** + * The user labels applied to a resource must meet the following requirements: + * * Each resource can have multiple labels, up to a maximum of 64. + * * Each label must be a key-value pair. + * * Keys have a minimum length of 1 character and a maximum length of 63 + * characters and cannot be empty. Values can be empty and have a maximum + * length of 63 characters. + * * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. All characters must use UTF-8 encoding, and + * international characters are allowed. + * * The key portion of a label must be unique. However, you can use the same + * key with multiple resources. + * * Keys must start with a lowercase letter or international character. + * See [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * for more details. + * + * Generated from protobuf field map user_labels = 8; + * @return \Google\Protobuf\Internal\MapField + */ + public function getUserLabels() + { + return $this->user_labels; + } + + /** + * The user labels applied to a resource must meet the following requirements: + * * Each resource can have multiple labels, up to a maximum of 64. + * * Each label must be a key-value pair. + * * Keys have a minimum length of 1 character and a maximum length of 63 + * characters and cannot be empty. Values can be empty and have a maximum + * length of 63 characters. + * * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. All characters must use UTF-8 encoding, and + * international characters are allowed. + * * The key portion of a label must be unique. However, you can use the same + * key with multiple resources. + * * Keys must start with a lowercase letter or international character. + * See [Requirements for + * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * for more details. + * + * Generated from protobuf field map user_labels = 8; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setUserLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->user_labels = $arr; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1/RecommendResponse.php b/DiscoveryEngine/src/V1/RecommendResponse.php new file mode 100644 index 000000000000..f93b989ec3bf --- /dev/null +++ b/DiscoveryEngine/src/V1/RecommendResponse.php @@ -0,0 +1,197 @@ +google.cloud.discoveryengine.v1.RecommendResponse + */ +class RecommendResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of recommended Documents. The order represents the ranking (from the + * most relevant Document to the least). + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.RecommendResponse.RecommendationResult results = 1; + */ + private $results; + /** + * A unique attribution token. This should be included in the + * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] logs resulting from + * this recommendation, which enables accurate attribution of recommendation + * model performance. + * + * Generated from protobuf field string attribution_token = 2; + */ + protected $attribution_token = ''; + /** + * IDs of documents in the request that were missing from the default Branch + * associated with the requested ServingConfig. + * + * Generated from protobuf field repeated string missing_ids = 3; + */ + private $missing_ids; + /** + * True if + * [RecommendRequest.validate_only][google.cloud.discoveryengine.v1.RecommendRequest.validate_only] + * was set. + * + * Generated from protobuf field bool validate_only = 4; + */ + protected $validate_only = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\DiscoveryEngine\V1\RecommendResponse\RecommendationResult>|\Google\Protobuf\Internal\RepeatedField $results + * A list of recommended Documents. The order represents the ranking (from the + * most relevant Document to the least). + * @type string $attribution_token + * A unique attribution token. This should be included in the + * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] logs resulting from + * this recommendation, which enables accurate attribution of recommendation + * model performance. + * @type array|\Google\Protobuf\Internal\RepeatedField $missing_ids + * IDs of documents in the request that were missing from the default Branch + * associated with the requested ServingConfig. + * @type bool $validate_only + * True if + * [RecommendRequest.validate_only][google.cloud.discoveryengine.v1.RecommendRequest.validate_only] + * was set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\RecommendationService::initOnce(); + parent::__construct($data); + } + + /** + * A list of recommended Documents. The order represents the ranking (from the + * most relevant Document to the least). + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.RecommendResponse.RecommendationResult results = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResults() + { + return $this->results; + } + + /** + * A list of recommended Documents. The order represents the ranking (from the + * most relevant Document to the least). + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.RecommendResponse.RecommendationResult results = 1; + * @param array<\Google\Cloud\DiscoveryEngine\V1\RecommendResponse\RecommendationResult>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\RecommendResponse\RecommendationResult::class); + $this->results = $arr; + + return $this; + } + + /** + * A unique attribution token. This should be included in the + * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] logs resulting from + * this recommendation, which enables accurate attribution of recommendation + * model performance. + * + * Generated from protobuf field string attribution_token = 2; + * @return string + */ + public function getAttributionToken() + { + return $this->attribution_token; + } + + /** + * A unique attribution token. This should be included in the + * [UserEvent][google.cloud.discoveryengine.v1.UserEvent] logs resulting from + * this recommendation, which enables accurate attribution of recommendation + * model performance. + * + * Generated from protobuf field string attribution_token = 2; + * @param string $var + * @return $this + */ + public function setAttributionToken($var) + { + GPBUtil::checkString($var, True); + $this->attribution_token = $var; + + return $this; + } + + /** + * IDs of documents in the request that were missing from the default Branch + * associated with the requested ServingConfig. + * + * Generated from protobuf field repeated string missing_ids = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMissingIds() + { + return $this->missing_ids; + } + + /** + * IDs of documents in the request that were missing from the default Branch + * associated with the requested ServingConfig. + * + * Generated from protobuf field repeated string missing_ids = 3; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMissingIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->missing_ids = $arr; + + return $this; + } + + /** + * True if + * [RecommendRequest.validate_only][google.cloud.discoveryengine.v1.RecommendRequest.validate_only] + * was set. + * + * Generated from protobuf field bool validate_only = 4; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * True if + * [RecommendRequest.validate_only][google.cloud.discoveryengine.v1.RecommendRequest.validate_only] + * was set. + * + * Generated from protobuf field bool validate_only = 4; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1/RecommendResponse/RecommendationResult.php b/DiscoveryEngine/src/V1/RecommendResponse/RecommendationResult.php new file mode 100644 index 000000000000..998dd2b90468 --- /dev/null +++ b/DiscoveryEngine/src/V1/RecommendResponse/RecommendationResult.php @@ -0,0 +1,167 @@ +google.cloud.discoveryengine.v1.RecommendResponse.RecommendationResult + */ +class RecommendationResult extends \Google\Protobuf\Internal\Message +{ + /** + * Resource ID of the recommended Document. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * Set if `returnDocument` is set to true in + * [RecommendRequest.params][google.cloud.discoveryengine.v1.RecommendRequest.params]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.Document document = 2; + */ + protected $document = null; + /** + * Additional Document metadata / annotations. + * Possible values: + * * `score`: Recommendation score in double value. Is set if + * `returnScore` is set to true in + * [RecommendRequest.params][google.cloud.discoveryengine.v1.RecommendRequest.params]. + * + * Generated from protobuf field map metadata = 3; + */ + private $metadata; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Resource ID of the recommended Document. + * @type \Google\Cloud\DiscoveryEngine\V1\Document $document + * Set if `returnDocument` is set to true in + * [RecommendRequest.params][google.cloud.discoveryengine.v1.RecommendRequest.params]. + * @type array|\Google\Protobuf\Internal\MapField $metadata + * Additional Document metadata / annotations. + * Possible values: + * * `score`: Recommendation score in double value. Is set if + * `returnScore` is set to true in + * [RecommendRequest.params][google.cloud.discoveryengine.v1.RecommendRequest.params]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\RecommendationService::initOnce(); + parent::__construct($data); + } + + /** + * Resource ID of the recommended Document. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Resource ID of the recommended Document. + * + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Set if `returnDocument` is set to true in + * [RecommendRequest.params][google.cloud.discoveryengine.v1.RecommendRequest.params]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.Document document = 2; + * @return \Google\Cloud\DiscoveryEngine\V1\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * Set if `returnDocument` is set to true in + * [RecommendRequest.params][google.cloud.discoveryengine.v1.RecommendRequest.params]. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.Document document = 2; + * @param \Google\Cloud\DiscoveryEngine\V1\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\Document::class); + $this->document = $var; + + return $this; + } + + /** + * Additional Document metadata / annotations. + * Possible values: + * * `score`: Recommendation score in double value. Is set if + * `returnScore` is set to true in + * [RecommendRequest.params][google.cloud.discoveryengine.v1.RecommendRequest.params]. + * + * Generated from protobuf field map metadata = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Additional Document metadata / annotations. + * Possible values: + * * `score`: Recommendation score in double value. Is set if + * `returnScore` is set to true in + * [RecommendRequest.params][google.cloud.discoveryengine.v1.RecommendRequest.params]. + * + * Generated from protobuf field map metadata = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMetadata($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Value::class); + $this->metadata = $arr; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1/SearchRequest.php b/DiscoveryEngine/src/V1/SearchRequest.php index 0446a911c4ba..891ac3eb8723 100644 --- a/DiscoveryEngine/src/V1/SearchRequest.php +++ b/DiscoveryEngine/src/V1/SearchRequest.php @@ -51,9 +51,12 @@ class SearchRequest extends \Google\Protobuf\Internal\Message protected $image_query = null; /** * Maximum number of [Document][google.cloud.discoveryengine.v1.Document]s to - * return. If unspecified, defaults to a reasonable value. The maximum allowed - * value is 100. Values above 100 are coerced to 100. - * If this field is negative, an `INVALID_ARGUMENT` is returned. + * return. The maximum allowed value depends on the data type. Values above + * the maximum value are coerced to the maximum value. + * * Websites with basic indexing: Default `10`, Maximum `25`. + * * Websites with advanced indexing: Default `25`, Maximum `50`. + * * Other: Default `50`, Maximum `100`. + * If this field is negative, an `INVALID_ARGUMENT` is returned. * * Generated from protobuf field int32 page_size = 4; */ @@ -82,6 +85,12 @@ class SearchRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field int32 offset = 6; */ protected $offset = 0; + /** + * A list of data store specs to apply on a search call. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec data_store_specs = 32; + */ + private $data_store_specs; /** * The filter syntax consists of an expression language for constructing a * predicate from one or more fields of the documents being filtered. Filter @@ -256,9 +265,12 @@ class SearchRequest extends \Google\Protobuf\Internal\Message * Raw image query. * @type int $page_size * Maximum number of [Document][google.cloud.discoveryengine.v1.Document]s to - * return. If unspecified, defaults to a reasonable value. The maximum allowed - * value is 100. Values above 100 are coerced to 100. - * If this field is negative, an `INVALID_ARGUMENT` is returned. + * return. The maximum allowed value depends on the data type. Values above + * the maximum value are coerced to the maximum value. + * * Websites with basic indexing: Default `10`, Maximum `25`. + * * Websites with advanced indexing: Default `25`, Maximum `50`. + * * Other: Default `50`, Maximum `100`. + * If this field is negative, an `INVALID_ARGUMENT` is returned. * @type string $page_token * A page token received from a previous * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search] @@ -275,6 +287,8 @@ class SearchRequest extends \Google\Protobuf\Internal\Message * [page_token][google.cloud.discoveryengine.v1.SearchRequest.page_token] is * unset. * If this field is negative, an `INVALID_ARGUMENT` is returned. + * @type array<\Google\Cloud\DiscoveryEngine\V1\SearchRequest\DataStoreSpec>|\Google\Protobuf\Internal\RepeatedField $data_store_specs + * A list of data store specs to apply on a search call. * @type string $filter * The filter syntax consists of an expression language for constructing a * predicate from one or more fields of the documents being filtered. Filter @@ -511,9 +525,12 @@ public function setImageQuery($var) /** * Maximum number of [Document][google.cloud.discoveryengine.v1.Document]s to - * return. If unspecified, defaults to a reasonable value. The maximum allowed - * value is 100. Values above 100 are coerced to 100. - * If this field is negative, an `INVALID_ARGUMENT` is returned. + * return. The maximum allowed value depends on the data type. Values above + * the maximum value are coerced to the maximum value. + * * Websites with basic indexing: Default `10`, Maximum `25`. + * * Websites with advanced indexing: Default `25`, Maximum `50`. + * * Other: Default `50`, Maximum `100`. + * If this field is negative, an `INVALID_ARGUMENT` is returned. * * Generated from protobuf field int32 page_size = 4; * @return int @@ -525,9 +542,12 @@ public function getPageSize() /** * Maximum number of [Document][google.cloud.discoveryengine.v1.Document]s to - * return. If unspecified, defaults to a reasonable value. The maximum allowed - * value is 100. Values above 100 are coerced to 100. - * If this field is negative, an `INVALID_ARGUMENT` is returned. + * return. The maximum allowed value depends on the data type. Values above + * the maximum value are coerced to the maximum value. + * * Websites with basic indexing: Default `10`, Maximum `25`. + * * Websites with advanced indexing: Default `25`, Maximum `50`. + * * Other: Default `50`, Maximum `100`. + * If this field is negative, an `INVALID_ARGUMENT` is returned. * * Generated from protobuf field int32 page_size = 4; * @param int $var @@ -617,6 +637,32 @@ public function setOffset($var) return $this; } + /** + * A list of data store specs to apply on a search call. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec data_store_specs = 32; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDataStoreSpecs() + { + return $this->data_store_specs; + } + + /** + * A list of data store specs to apply on a search call. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec data_store_specs = 32; + * @param array<\Google\Cloud\DiscoveryEngine\V1\SearchRequest\DataStoreSpec>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDataStoreSpecs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\SearchRequest\DataStoreSpec::class); + $this->data_store_specs = $arr; + + return $this; + } + /** * The filter syntax consists of an expression language for constructing a * predicate from one or more fields of the documents being filtered. Filter diff --git a/DiscoveryEngine/src/V1/SearchRequest/BoostSpec/ConditionBoostSpec.php b/DiscoveryEngine/src/V1/SearchRequest/BoostSpec/ConditionBoostSpec.php index cf00b202fde1..8326b453bf08 100644 --- a/DiscoveryEngine/src/V1/SearchRequest/BoostSpec/ConditionBoostSpec.php +++ b/DiscoveryEngine/src/V1/SearchRequest/BoostSpec/ConditionBoostSpec.php @@ -22,9 +22,8 @@ class ConditionBoostSpec extends \Google\Protobuf\Internal\Message * for detail syntax and limitations. * Examples: * * To boost documents with document ID "doc_1" or "doc_2", and - * color - * "Red" or "Blue": - * * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) + * color "Red" or "Blue": + * `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` * * Generated from protobuf field string condition = 1; */ @@ -32,18 +31,20 @@ class ConditionBoostSpec extends \Google\Protobuf\Internal\Message /** * Strength of the condition boost, which should be in [-1, 1]. Negative * boost means demotion. Default is 0.0. - * Setting to 1.0 gives the document a big promotion. However, it does not - * necessarily mean that the boosted document will be the top result at - * all times, nor that other documents will be excluded. Results could - * still be shown even when none of them matches the condition. And - * results that are significantly more relevant to the search query can - * still trump your heavily favored but irrelevant documents. + * Setting to 1.0 gives the document a big promotion. However, it does + * not necessarily mean that the boosted document will be the top result + * at all times, nor that other documents will be excluded. Results + * could still be shown even when none of them matches the condition. + * And results that are significantly more relevant to the search query + * can still trump your heavily favored but irrelevant documents. * Setting to -1.0 gives the document a big demotion. However, results * that are deeply relevant might still be shown. The document will have - * an upstream battle to get a fairly high ranking, but it is not blocked - * out completely. + * an upstream battle to get a fairly high ranking, but it is not + * blocked out completely. * Setting to 0.0 means no boost applied. The boosting condition is - * ignored. + * ignored. Only one of the (condition, boost) combination or the + * boost_control_spec below are set. If both are set then the global boost + * is ignored and the more fine-grained boost_control_spec is applied. * * Generated from protobuf field float boost = 2; */ @@ -62,24 +63,25 @@ class ConditionBoostSpec extends \Google\Protobuf\Internal\Message * for detail syntax and limitations. * Examples: * * To boost documents with document ID "doc_1" or "doc_2", and - * color - * "Red" or "Blue": - * * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) + * color "Red" or "Blue": + * `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` * @type float $boost * Strength of the condition boost, which should be in [-1, 1]. Negative * boost means demotion. Default is 0.0. - * Setting to 1.0 gives the document a big promotion. However, it does not - * necessarily mean that the boosted document will be the top result at - * all times, nor that other documents will be excluded. Results could - * still be shown even when none of them matches the condition. And - * results that are significantly more relevant to the search query can - * still trump your heavily favored but irrelevant documents. + * Setting to 1.0 gives the document a big promotion. However, it does + * not necessarily mean that the boosted document will be the top result + * at all times, nor that other documents will be excluded. Results + * could still be shown even when none of them matches the condition. + * And results that are significantly more relevant to the search query + * can still trump your heavily favored but irrelevant documents. * Setting to -1.0 gives the document a big demotion. However, results * that are deeply relevant might still be shown. The document will have - * an upstream battle to get a fairly high ranking, but it is not blocked - * out completely. + * an upstream battle to get a fairly high ranking, but it is not + * blocked out completely. * Setting to 0.0 means no boost applied. The boosting condition is - * ignored. + * ignored. Only one of the (condition, boost) combination or the + * boost_control_spec below are set. If both are set then the global boost + * is ignored and the more fine-grained boost_control_spec is applied. * } */ public function __construct($data = NULL) { @@ -94,9 +96,8 @@ public function __construct($data = NULL) { * for detail syntax and limitations. * Examples: * * To boost documents with document ID "doc_1" or "doc_2", and - * color - * "Red" or "Blue": - * * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) + * color "Red" or "Blue": + * `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` * * Generated from protobuf field string condition = 1; * @return string @@ -113,9 +114,8 @@ public function getCondition() * for detail syntax and limitations. * Examples: * * To boost documents with document ID "doc_1" or "doc_2", and - * color - * "Red" or "Blue": - * * (id: ANY("doc_1", "doc_2")) AND (color: ANY("Red","Blue")) + * color "Red" or "Blue": + * `(document_id: ANY("doc_1", "doc_2")) AND (color: ANY("Red", "Blue"))` * * Generated from protobuf field string condition = 1; * @param string $var @@ -132,18 +132,20 @@ public function setCondition($var) /** * Strength of the condition boost, which should be in [-1, 1]. Negative * boost means demotion. Default is 0.0. - * Setting to 1.0 gives the document a big promotion. However, it does not - * necessarily mean that the boosted document will be the top result at - * all times, nor that other documents will be excluded. Results could - * still be shown even when none of them matches the condition. And - * results that are significantly more relevant to the search query can - * still trump your heavily favored but irrelevant documents. + * Setting to 1.0 gives the document a big promotion. However, it does + * not necessarily mean that the boosted document will be the top result + * at all times, nor that other documents will be excluded. Results + * could still be shown even when none of them matches the condition. + * And results that are significantly more relevant to the search query + * can still trump your heavily favored but irrelevant documents. * Setting to -1.0 gives the document a big demotion. However, results * that are deeply relevant might still be shown. The document will have - * an upstream battle to get a fairly high ranking, but it is not blocked - * out completely. + * an upstream battle to get a fairly high ranking, but it is not + * blocked out completely. * Setting to 0.0 means no boost applied. The boosting condition is - * ignored. + * ignored. Only one of the (condition, boost) combination or the + * boost_control_spec below are set. If both are set then the global boost + * is ignored and the more fine-grained boost_control_spec is applied. * * Generated from protobuf field float boost = 2; * @return float @@ -156,18 +158,20 @@ public function getBoost() /** * Strength of the condition boost, which should be in [-1, 1]. Negative * boost means demotion. Default is 0.0. - * Setting to 1.0 gives the document a big promotion. However, it does not - * necessarily mean that the boosted document will be the top result at - * all times, nor that other documents will be excluded. Results could - * still be shown even when none of them matches the condition. And - * results that are significantly more relevant to the search query can - * still trump your heavily favored but irrelevant documents. + * Setting to 1.0 gives the document a big promotion. However, it does + * not necessarily mean that the boosted document will be the top result + * at all times, nor that other documents will be excluded. Results + * could still be shown even when none of them matches the condition. + * And results that are significantly more relevant to the search query + * can still trump your heavily favored but irrelevant documents. * Setting to -1.0 gives the document a big demotion. However, results * that are deeply relevant might still be shown. The document will have - * an upstream battle to get a fairly high ranking, but it is not blocked - * out completely. + * an upstream battle to get a fairly high ranking, but it is not + * blocked out completely. * Setting to 0.0 means no boost applied. The boosting condition is - * ignored. + * ignored. Only one of the (condition, boost) combination or the + * boost_control_spec below are set. If both are set then the global boost + * is ignored and the more fine-grained boost_control_spec is applied. * * Generated from protobuf field float boost = 2; * @param float $var diff --git a/DiscoveryEngine/src/V1/SearchRequest/ContentSearchSpec.php b/DiscoveryEngine/src/V1/SearchRequest/ContentSearchSpec.php index 6ccbed29ca11..6e60374fc873 100644 --- a/DiscoveryEngine/src/V1/SearchRequest/ContentSearchSpec.php +++ b/DiscoveryEngine/src/V1/SearchRequest/ContentSearchSpec.php @@ -29,6 +29,13 @@ class ContentSearchSpec extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec summary_spec = 2; */ protected $summary_spec = null; + /** + * If there is no extractive_content_spec provided, there will be no + * extractive answer in the search response. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + */ + protected $extractive_content_spec = null; /** * Constructor. @@ -42,6 +49,9 @@ class ContentSearchSpec extends \Google\Protobuf\Internal\Message * @type \Google\Cloud\DiscoveryEngine\V1\SearchRequest\ContentSearchSpec\SummarySpec $summary_spec * If `summarySpec` is not specified, summaries are not included in the * search response. + * @type \Google\Cloud\DiscoveryEngine\V1\SearchRequest\ContentSearchSpec\ExtractiveContentSpec $extractive_content_spec + * If there is no extractive_content_spec provided, there will be no + * extractive answer in the search response. * } */ public function __construct($data = NULL) { @@ -125,6 +135,44 @@ public function setSummarySpec($var) return $this; } + /** + * If there is no extractive_content_spec provided, there will be no + * extractive answer in the search response. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * @return \Google\Cloud\DiscoveryEngine\V1\SearchRequest\ContentSearchSpec\ExtractiveContentSpec|null + */ + public function getExtractiveContentSpec() + { + return $this->extractive_content_spec; + } + + public function hasExtractiveContentSpec() + { + return isset($this->extractive_content_spec); + } + + public function clearExtractiveContentSpec() + { + unset($this->extractive_content_spec); + } + + /** + * If there is no extractive_content_spec provided, there will be no + * extractive answer in the search response. + * + * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec extractive_content_spec = 3; + * @param \Google\Cloud\DiscoveryEngine\V1\SearchRequest\ContentSearchSpec\ExtractiveContentSpec $var + * @return $this + */ + public function setExtractiveContentSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1\SearchRequest\ContentSearchSpec\ExtractiveContentSpec::class); + $this->extractive_content_spec = $var; + + return $this; + } + } diff --git a/DiscoveryEngine/src/V1/SearchRequest/ContentSearchSpec/ExtractiveContentSpec.php b/DiscoveryEngine/src/V1/SearchRequest/ContentSearchSpec/ExtractiveContentSpec.php new file mode 100644 index 000000000000..386c71b2bca9 --- /dev/null +++ b/DiscoveryEngine/src/V1/SearchRequest/ContentSearchSpec/ExtractiveContentSpec.php @@ -0,0 +1,325 @@ +google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.ExtractiveContentSpec + */ +class ExtractiveContentSpec extends \Google\Protobuf\Internal\Message +{ + /** + * The maximum number of extractive answers returned in each search + * result. + * An extractive answer is a verbatim answer extracted from the original + * document, which provides a precise and contextually relevant answer to + * the search query. + * If the number of matching answers is less than the + * `max_extractive_answer_count`, return all of the answers. Otherwise, + * return the `max_extractive_answer_count`. + * At most five answers are returned for each + * [SearchResult][google.cloud.discoveryengine.v1.SearchResponse.SearchResult]. + * + * Generated from protobuf field int32 max_extractive_answer_count = 1; + */ + protected $max_extractive_answer_count = 0; + /** + * The max number of extractive segments returned in each search result. + * Only applied if the + * [DataStore][google.cloud.discoveryengine.v1.DataStore] is set to + * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1.DataStore.ContentConfig.CONTENT_REQUIRED] + * or + * [DataStore.solution_types][google.cloud.discoveryengine.v1.DataStore.solution_types] + * is + * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_CHAT]. + * An extractive segment is a text segment extracted from the original + * document that is relevant to the search query, and, in general, more + * verbose than an extractive answer. The segment could then be used as + * input for LLMs to generate summaries and answers. + * If the number of matching segments is less than + * `max_extractive_segment_count`, return all of the segments. Otherwise, + * return the `max_extractive_segment_count`. + * + * Generated from protobuf field int32 max_extractive_segment_count = 2; + */ + protected $max_extractive_segment_count = 0; + /** + * Specifies whether to return the confidence score from the extractive + * segments in each search result. This feature is available only for new + * or allowlisted data stores. To allowlist your data store, + * contact your Customer Engineer. The default value is `false`. + * + * Generated from protobuf field bool return_extractive_segment_score = 3; + */ + protected $return_extractive_segment_score = false; + /** + * Specifies whether to also include the adjacent from each selected + * segments. + * Return at most `num_previous_segments` segments before each selected + * segments. + * + * Generated from protobuf field int32 num_previous_segments = 4; + */ + protected $num_previous_segments = 0; + /** + * Return at most `num_next_segments` segments after each selected + * segments. + * + * Generated from protobuf field int32 num_next_segments = 5; + */ + protected $num_next_segments = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $max_extractive_answer_count + * The maximum number of extractive answers returned in each search + * result. + * An extractive answer is a verbatim answer extracted from the original + * document, which provides a precise and contextually relevant answer to + * the search query. + * If the number of matching answers is less than the + * `max_extractive_answer_count`, return all of the answers. Otherwise, + * return the `max_extractive_answer_count`. + * At most five answers are returned for each + * [SearchResult][google.cloud.discoveryengine.v1.SearchResponse.SearchResult]. + * @type int $max_extractive_segment_count + * The max number of extractive segments returned in each search result. + * Only applied if the + * [DataStore][google.cloud.discoveryengine.v1.DataStore] is set to + * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1.DataStore.ContentConfig.CONTENT_REQUIRED] + * or + * [DataStore.solution_types][google.cloud.discoveryengine.v1.DataStore.solution_types] + * is + * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_CHAT]. + * An extractive segment is a text segment extracted from the original + * document that is relevant to the search query, and, in general, more + * verbose than an extractive answer. The segment could then be used as + * input for LLMs to generate summaries and answers. + * If the number of matching segments is less than + * `max_extractive_segment_count`, return all of the segments. Otherwise, + * return the `max_extractive_segment_count`. + * @type bool $return_extractive_segment_score + * Specifies whether to return the confidence score from the extractive + * segments in each search result. This feature is available only for new + * or allowlisted data stores. To allowlist your data store, + * contact your Customer Engineer. The default value is `false`. + * @type int $num_previous_segments + * Specifies whether to also include the adjacent from each selected + * segments. + * Return at most `num_previous_segments` segments before each selected + * segments. + * @type int $num_next_segments + * Return at most `num_next_segments` segments after each selected + * segments. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * The maximum number of extractive answers returned in each search + * result. + * An extractive answer is a verbatim answer extracted from the original + * document, which provides a precise and contextually relevant answer to + * the search query. + * If the number of matching answers is less than the + * `max_extractive_answer_count`, return all of the answers. Otherwise, + * return the `max_extractive_answer_count`. + * At most five answers are returned for each + * [SearchResult][google.cloud.discoveryengine.v1.SearchResponse.SearchResult]. + * + * Generated from protobuf field int32 max_extractive_answer_count = 1; + * @return int + */ + public function getMaxExtractiveAnswerCount() + { + return $this->max_extractive_answer_count; + } + + /** + * The maximum number of extractive answers returned in each search + * result. + * An extractive answer is a verbatim answer extracted from the original + * document, which provides a precise and contextually relevant answer to + * the search query. + * If the number of matching answers is less than the + * `max_extractive_answer_count`, return all of the answers. Otherwise, + * return the `max_extractive_answer_count`. + * At most five answers are returned for each + * [SearchResult][google.cloud.discoveryengine.v1.SearchResponse.SearchResult]. + * + * Generated from protobuf field int32 max_extractive_answer_count = 1; + * @param int $var + * @return $this + */ + public function setMaxExtractiveAnswerCount($var) + { + GPBUtil::checkInt32($var); + $this->max_extractive_answer_count = $var; + + return $this; + } + + /** + * The max number of extractive segments returned in each search result. + * Only applied if the + * [DataStore][google.cloud.discoveryengine.v1.DataStore] is set to + * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1.DataStore.ContentConfig.CONTENT_REQUIRED] + * or + * [DataStore.solution_types][google.cloud.discoveryengine.v1.DataStore.solution_types] + * is + * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_CHAT]. + * An extractive segment is a text segment extracted from the original + * document that is relevant to the search query, and, in general, more + * verbose than an extractive answer. The segment could then be used as + * input for LLMs to generate summaries and answers. + * If the number of matching segments is less than + * `max_extractive_segment_count`, return all of the segments. Otherwise, + * return the `max_extractive_segment_count`. + * + * Generated from protobuf field int32 max_extractive_segment_count = 2; + * @return int + */ + public function getMaxExtractiveSegmentCount() + { + return $this->max_extractive_segment_count; + } + + /** + * The max number of extractive segments returned in each search result. + * Only applied if the + * [DataStore][google.cloud.discoveryengine.v1.DataStore] is set to + * [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1.DataStore.ContentConfig.CONTENT_REQUIRED] + * or + * [DataStore.solution_types][google.cloud.discoveryengine.v1.DataStore.solution_types] + * is + * [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1.SolutionType.SOLUTION_TYPE_CHAT]. + * An extractive segment is a text segment extracted from the original + * document that is relevant to the search query, and, in general, more + * verbose than an extractive answer. The segment could then be used as + * input for LLMs to generate summaries and answers. + * If the number of matching segments is less than + * `max_extractive_segment_count`, return all of the segments. Otherwise, + * return the `max_extractive_segment_count`. + * + * Generated from protobuf field int32 max_extractive_segment_count = 2; + * @param int $var + * @return $this + */ + public function setMaxExtractiveSegmentCount($var) + { + GPBUtil::checkInt32($var); + $this->max_extractive_segment_count = $var; + + return $this; + } + + /** + * Specifies whether to return the confidence score from the extractive + * segments in each search result. This feature is available only for new + * or allowlisted data stores. To allowlist your data store, + * contact your Customer Engineer. The default value is `false`. + * + * Generated from protobuf field bool return_extractive_segment_score = 3; + * @return bool + */ + public function getReturnExtractiveSegmentScore() + { + return $this->return_extractive_segment_score; + } + + /** + * Specifies whether to return the confidence score from the extractive + * segments in each search result. This feature is available only for new + * or allowlisted data stores. To allowlist your data store, + * contact your Customer Engineer. The default value is `false`. + * + * Generated from protobuf field bool return_extractive_segment_score = 3; + * @param bool $var + * @return $this + */ + public function setReturnExtractiveSegmentScore($var) + { + GPBUtil::checkBool($var); + $this->return_extractive_segment_score = $var; + + return $this; + } + + /** + * Specifies whether to also include the adjacent from each selected + * segments. + * Return at most `num_previous_segments` segments before each selected + * segments. + * + * Generated from protobuf field int32 num_previous_segments = 4; + * @return int + */ + public function getNumPreviousSegments() + { + return $this->num_previous_segments; + } + + /** + * Specifies whether to also include the adjacent from each selected + * segments. + * Return at most `num_previous_segments` segments before each selected + * segments. + * + * Generated from protobuf field int32 num_previous_segments = 4; + * @param int $var + * @return $this + */ + public function setNumPreviousSegments($var) + { + GPBUtil::checkInt32($var); + $this->num_previous_segments = $var; + + return $this; + } + + /** + * Return at most `num_next_segments` segments after each selected + * segments. + * + * Generated from protobuf field int32 num_next_segments = 5; + * @return int + */ + public function getNumNextSegments() + { + return $this->num_next_segments; + } + + /** + * Return at most `num_next_segments` segments after each selected + * segments. + * + * Generated from protobuf field int32 num_next_segments = 5; + * @param int $var + * @return $this + */ + public function setNumNextSegments($var) + { + GPBUtil::checkInt32($var); + $this->num_next_segments = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1/SearchRequest/ContentSearchSpec/SummarySpec.php b/DiscoveryEngine/src/V1/SearchRequest/ContentSearchSpec/SummarySpec.php index b3ccca454034..a9a225be8f80 100644 --- a/DiscoveryEngine/src/V1/SearchRequest/ContentSearchSpec/SummarySpec.php +++ b/DiscoveryEngine/src/V1/SearchRequest/ContentSearchSpec/SummarySpec.php @@ -20,7 +20,10 @@ class SummarySpec extends \Google\Protobuf\Internal\Message * The number of top results to generate the summary from. If the number * of results returned is less than `summaryResultCount`, the summary is * generated from all of the results. - * At most five results can be used to generate a summary. + * At most 10 results for documents mode, or 50 for chunks mode, can be + * used to generate a summary. The chunks mode is used when + * [SearchRequest.ContentSearchSpec.search_result_mode][] is set to + * [CHUNKS][SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]. * * Generated from protobuf field int32 summary_result_count = 1; */ @@ -94,6 +97,17 @@ class SummarySpec extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec.SummarySpec.ModelSpec model_spec = 7; */ protected $model_spec = null; + /** + * If true, answer will be generated from most relevant chunks from top + * search results. This feature will improve summary quality. + * Note that with this feature enabled, not all top search results + * will be referenced and included in the reference list, so the citation + * source index only points to the search results listed in the reference + * list. + * + * Generated from protobuf field bool use_semantic_chunks = 8; + */ + protected $use_semantic_chunks = false; /** * Constructor. @@ -105,7 +119,10 @@ class SummarySpec extends \Google\Protobuf\Internal\Message * The number of top results to generate the summary from. If the number * of results returned is less than `summaryResultCount`, the summary is * generated from all of the results. - * At most five results can be used to generate a summary. + * At most 10 results for documents mode, or 50 for chunks mode, can be + * used to generate a summary. The chunks mode is used when + * [SearchRequest.ContentSearchSpec.search_result_mode][] is set to + * [CHUNKS][SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]. * @type bool $include_citations * Specifies whether to include citations in the summary. The default * value is `false`. @@ -151,6 +168,13 @@ class SummarySpec extends \Google\Protobuf\Internal\Message * @type \Google\Cloud\DiscoveryEngine\V1\SearchRequest\ContentSearchSpec\SummarySpec\ModelSpec $model_spec * If specified, the spec will be used to modify the model specification * provided to the LLM. + * @type bool $use_semantic_chunks + * If true, answer will be generated from most relevant chunks from top + * search results. This feature will improve summary quality. + * Note that with this feature enabled, not all top search results + * will be referenced and included in the reference list, so the citation + * source index only points to the search results listed in the reference + * list. * } */ public function __construct($data = NULL) { @@ -162,7 +186,10 @@ public function __construct($data = NULL) { * The number of top results to generate the summary from. If the number * of results returned is less than `summaryResultCount`, the summary is * generated from all of the results. - * At most five results can be used to generate a summary. + * At most 10 results for documents mode, or 50 for chunks mode, can be + * used to generate a summary. The chunks mode is used when + * [SearchRequest.ContentSearchSpec.search_result_mode][] is set to + * [CHUNKS][SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]. * * Generated from protobuf field int32 summary_result_count = 1; * @return int @@ -176,7 +203,10 @@ public function getSummaryResultCount() * The number of top results to generate the summary from. If the number * of results returned is less than `summaryResultCount`, the summary is * generated from all of the results. - * At most five results can be used to generate a summary. + * At most 10 results for documents mode, or 50 for chunks mode, can be + * used to generate a summary. The chunks mode is used when + * [SearchRequest.ContentSearchSpec.search_result_mode][] is set to + * [CHUNKS][SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]. * * Generated from protobuf field int32 summary_result_count = 1; * @param int $var @@ -432,6 +462,42 @@ public function setModelSpec($var) return $this; } + /** + * If true, answer will be generated from most relevant chunks from top + * search results. This feature will improve summary quality. + * Note that with this feature enabled, not all top search results + * will be referenced and included in the reference list, so the citation + * source index only points to the search results listed in the reference + * list. + * + * Generated from protobuf field bool use_semantic_chunks = 8; + * @return bool + */ + public function getUseSemanticChunks() + { + return $this->use_semantic_chunks; + } + + /** + * If true, answer will be generated from most relevant chunks from top + * search results. This feature will improve summary quality. + * Note that with this feature enabled, not all top search results + * will be referenced and included in the reference list, so the citation + * source index only points to the search results listed in the reference + * list. + * + * Generated from protobuf field bool use_semantic_chunks = 8; + * @param bool $var + * @return $this + */ + public function setUseSemanticChunks($var) + { + GPBUtil::checkBool($var); + $this->use_semantic_chunks = $var; + + return $this; + } + } diff --git a/DiscoveryEngine/src/V1/SearchRequest/ContentSearchSpec/SummarySpec/ModelSpec.php b/DiscoveryEngine/src/V1/SearchRequest/ContentSearchSpec/SummarySpec/ModelSpec.php index a562abaf1a32..b5f6bb1cde90 100644 --- a/DiscoveryEngine/src/V1/SearchRequest/ContentSearchSpec/SummarySpec/ModelSpec.php +++ b/DiscoveryEngine/src/V1/SearchRequest/ContentSearchSpec/SummarySpec/ModelSpec.php @@ -19,11 +19,13 @@ class ModelSpec extends \Google\Protobuf\Internal\Message * The model version used to generate the summary. * Supported values are: * * `stable`: string. Default value when no value is specified. Uses a - * generally available, fine-tuned version of the text-bison@001 - * model. - * * `preview`: string. (Public preview) Uses a fine-tuned version of - * the text-bison@002 model. This model works only for summaries in - * English. + * generally available, fine-tuned model. For more information, see + * [Answer generation model versions and + * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + * * `preview`: string. (Public preview) Uses a preview model. For more + * information, see + * [Answer generation model versions and + * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * * Generated from protobuf field string version = 1; */ @@ -39,11 +41,13 @@ class ModelSpec extends \Google\Protobuf\Internal\Message * The model version used to generate the summary. * Supported values are: * * `stable`: string. Default value when no value is specified. Uses a - * generally available, fine-tuned version of the text-bison@001 - * model. - * * `preview`: string. (Public preview) Uses a fine-tuned version of - * the text-bison@002 model. This model works only for summaries in - * English. + * generally available, fine-tuned model. For more information, see + * [Answer generation model versions and + * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + * * `preview`: string. (Public preview) Uses a preview model. For more + * information, see + * [Answer generation model versions and + * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * } */ public function __construct($data = NULL) { @@ -55,11 +59,13 @@ public function __construct($data = NULL) { * The model version used to generate the summary. * Supported values are: * * `stable`: string. Default value when no value is specified. Uses a - * generally available, fine-tuned version of the text-bison@001 - * model. - * * `preview`: string. (Public preview) Uses a fine-tuned version of - * the text-bison@002 model. This model works only for summaries in - * English. + * generally available, fine-tuned model. For more information, see + * [Answer generation model versions and + * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + * * `preview`: string. (Public preview) Uses a preview model. For more + * information, see + * [Answer generation model versions and + * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * * Generated from protobuf field string version = 1; * @return string @@ -73,11 +79,13 @@ public function getVersion() * The model version used to generate the summary. * Supported values are: * * `stable`: string. Default value when no value is specified. Uses a - * generally available, fine-tuned version of the text-bison@001 - * model. - * * `preview`: string. (Public preview) Uses a fine-tuned version of - * the text-bison@002 model. This model works only for summaries in - * English. + * generally available, fine-tuned model. For more information, see + * [Answer generation model versions and + * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + * * `preview`: string. (Public preview) Uses a preview model. For more + * information, see + * [Answer generation model versions and + * lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * * Generated from protobuf field string version = 1; * @param string $var diff --git a/DiscoveryEngine/src/V1/SearchRequest/DataStoreSpec.php b/DiscoveryEngine/src/V1/SearchRequest/DataStoreSpec.php new file mode 100644 index 000000000000..3cc0381b4bf9 --- /dev/null +++ b/DiscoveryEngine/src/V1/SearchRequest/DataStoreSpec.php @@ -0,0 +1,76 @@ +google.cloud.discoveryengine.v1.SearchRequest.DataStoreSpec + */ +class DataStoreSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Full resource name of + * [DataStore][google.cloud.discoveryengine.v1.DataStore], such as + * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. + * + * Generated from protobuf field string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $data_store = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $data_store + * Required. Full resource name of + * [DataStore][google.cloud.discoveryengine.v1.DataStore], such as + * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Full resource name of + * [DataStore][google.cloud.discoveryengine.v1.DataStore], such as + * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. + * + * Generated from protobuf field string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getDataStore() + { + return $this->data_store; + } + + /** + * Required. Full resource name of + * [DataStore][google.cloud.discoveryengine.v1.DataStore], such as + * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. + * + * Generated from protobuf field string data_store = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDataStore($var) + { + GPBUtil::checkString($var, True); + $this->data_store = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1/SearchResponse/Summary/Reference.php b/DiscoveryEngine/src/V1/SearchResponse/Summary/Reference.php index de714c5f3dbe..bf62afb95e9d 100644 --- a/DiscoveryEngine/src/V1/SearchResponse/Summary/Reference.php +++ b/DiscoveryEngine/src/V1/SearchResponse/Summary/Reference.php @@ -36,6 +36,12 @@ class Reference extends \Google\Protobuf\Internal\Message * Generated from protobuf field string uri = 3; */ protected $uri = ''; + /** + * List of cited chunk contents derived from document content. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + */ + private $chunk_contents; /** * Constructor. @@ -52,6 +58,8 @@ class Reference extends \Google\Protobuf\Internal\Message * `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`. * @type string $uri * Cloud Storage or HTTP uri for the document. + * @type array<\Google\Cloud\DiscoveryEngine\V1\SearchResponse\Summary\Reference\ChunkContent>|\Google\Protobuf\Internal\RepeatedField $chunk_contents + * List of cited chunk contents derived from document content. * } */ public function __construct($data = NULL) { @@ -143,6 +151,32 @@ public function setUri($var) return $this; } + /** + * List of cited chunk contents derived from document content. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getChunkContents() + { + return $this->chunk_contents; + } + + /** + * List of cited chunk contents derived from document content. + * + * Generated from protobuf field repeated .google.cloud.discoveryengine.v1.SearchResponse.Summary.Reference.ChunkContent chunk_contents = 4; + * @param array<\Google\Cloud\DiscoveryEngine\V1\SearchResponse\Summary\Reference\ChunkContent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setChunkContents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DiscoveryEngine\V1\SearchResponse\Summary\Reference\ChunkContent::class); + $this->chunk_contents = $arr; + + return $this; + } + } diff --git a/DiscoveryEngine/src/V1/SearchResponse/Summary/Reference/ChunkContent.php b/DiscoveryEngine/src/V1/SearchResponse/Summary/Reference/ChunkContent.php new file mode 100644 index 000000000000..aa316b4a79d9 --- /dev/null +++ b/DiscoveryEngine/src/V1/SearchResponse/Summary/Reference/ChunkContent.php @@ -0,0 +1,102 @@ +google.cloud.discoveryengine.v1.SearchResponse.Summary.Reference.ChunkContent + */ +class ChunkContent extends \Google\Protobuf\Internal\Message +{ + /** + * Chunk textual content. + * + * Generated from protobuf field string content = 1; + */ + protected $content = ''; + /** + * Page identifier. + * + * Generated from protobuf field string page_identifier = 2; + */ + protected $page_identifier = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $content + * Chunk textual content. + * @type string $page_identifier + * Page identifier. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\SearchService::initOnce(); + parent::__construct($data); + } + + /** + * Chunk textual content. + * + * Generated from protobuf field string content = 1; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * Chunk textual content. + * + * Generated from protobuf field string content = 1; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, True); + $this->content = $var; + + return $this; + } + + /** + * Page identifier. + * + * Generated from protobuf field string page_identifier = 2; + * @return string + */ + public function getPageIdentifier() + { + return $this->page_identifier; + } + + /** + * Page identifier. + * + * Generated from protobuf field string page_identifier = 2; + * @param string $var + * @return $this + */ + public function setPageIdentifier($var) + { + GPBUtil::checkString($var, True); + $this->page_identifier = $var; + + return $this; + } + +} + + diff --git a/DiscoveryEngine/src/V1/SearchTier.php b/DiscoveryEngine/src/V1/SearchTier.php index 1933b6182bda..a64eb62c1a65 100644 --- a/DiscoveryEngine/src/V1/SearchTier.php +++ b/DiscoveryEngine/src/V1/SearchTier.php @@ -8,7 +8,7 @@ /** * Tiers of search features. Different tiers might have different - * pricing. To learn more, please check the pricing documentation. + * pricing. To learn more, check the pricing documentation. * * Protobuf type google.cloud.discoveryengine.v1.SearchTier */ diff --git a/DiscoveryEngine/src/V1/SolutionType.php b/DiscoveryEngine/src/V1/SolutionType.php index 89865de9d868..73b4196e8511 100644 --- a/DiscoveryEngine/src/V1/SolutionType.php +++ b/DiscoveryEngine/src/V1/SolutionType.php @@ -37,12 +37,21 @@ class SolutionType * Generated from protobuf enum SOLUTION_TYPE_CHAT = 3; */ const SOLUTION_TYPE_CHAT = 3; + /** + * Used for use cases related to the Generative Chat agent. + * It's used for Generative chat engine only, the associated data stores + * must enrolled with `SOLUTION_TYPE_CHAT` solution. + * + * Generated from protobuf enum SOLUTION_TYPE_GENERATIVE_CHAT = 4; + */ + const SOLUTION_TYPE_GENERATIVE_CHAT = 4; private static $valueToName = [ self::SOLUTION_TYPE_UNSPECIFIED => 'SOLUTION_TYPE_UNSPECIFIED', self::SOLUTION_TYPE_RECOMMENDATION => 'SOLUTION_TYPE_RECOMMENDATION', self::SOLUTION_TYPE_SEARCH => 'SOLUTION_TYPE_SEARCH', self::SOLUTION_TYPE_CHAT => 'SOLUTION_TYPE_CHAT', + self::SOLUTION_TYPE_GENERATIVE_CHAT => 'SOLUTION_TYPE_GENERATIVE_CHAT', ]; public static function name($value) diff --git a/DiscoveryEngine/src/V1/SpannerSource.php b/DiscoveryEngine/src/V1/SpannerSource.php new file mode 100644 index 000000000000..ffe6a47999c5 --- /dev/null +++ b/DiscoveryEngine/src/V1/SpannerSource.php @@ -0,0 +1,219 @@ +google.cloud.discoveryengine.v1.SpannerSource + */ +class SpannerSource extends \Google\Protobuf\Internal\Message +{ + /** + * The project ID that the Spanner source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * + * Generated from protobuf field string project_id = 1; + */ + protected $project_id = ''; + /** + * Required. The instance ID of the source Spanner table. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance_id = ''; + /** + * Required. The database ID of the source Spanner table. + * + * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database_id = ''; + /** + * Required. The table name of the Spanner database that needs to be imported. + * + * Generated from protobuf field string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $table_id = ''; + /** + * Whether to apply data boost on Spanner export. Enabling this option will + * incur additional cost. More info can be found + * [here](https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas). + * + * Generated from protobuf field bool enable_data_boost = 5; + */ + protected $enable_data_boost = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * The project ID that the Spanner source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * @type string $instance_id + * Required. The instance ID of the source Spanner table. + * @type string $database_id + * Required. The database ID of the source Spanner table. + * @type string $table_id + * Required. The table name of the Spanner database that needs to be imported. + * @type bool $enable_data_boost + * Whether to apply data boost on Spanner export. Enabling this option will + * incur additional cost. More info can be found + * [here](https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Discoveryengine\V1\ImportConfig::initOnce(); + parent::__construct($data); + } + + /** + * The project ID that the Spanner source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * + * Generated from protobuf field string project_id = 1; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * The project ID that the Spanner source is in with a length limit of 128 + * characters. If not specified, inherits the project ID from the parent + * request. + * + * Generated from protobuf field string project_id = 1; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * Required. The instance ID of the source Spanner table. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstanceId() + { + return $this->instance_id; + } + + /** + * Required. The instance ID of the source Spanner table. + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->instance_id = $var; + + return $this; + } + + /** + * Required. The database ID of the source Spanner table. + * + * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabaseId() + { + return $this->database_id; + } + + /** + * Required. The database ID of the source Spanner table. + * + * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabaseId($var) + { + GPBUtil::checkString($var, True); + $this->database_id = $var; + + return $this; + } + + /** + * Required. The table name of the Spanner database that needs to be imported. + * + * Generated from protobuf field string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTableId() + { + return $this->table_id; + } + + /** + * Required. The table name of the Spanner database that needs to be imported. + * + * Generated from protobuf field string table_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTableId($var) + { + GPBUtil::checkString($var, True); + $this->table_id = $var; + + return $this; + } + + /** + * Whether to apply data boost on Spanner export. Enabling this option will + * incur additional cost. More info can be found + * [here](https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas). + * + * Generated from protobuf field bool enable_data_boost = 5; + * @return bool + */ + public function getEnableDataBoost() + { + return $this->enable_data_boost; + } + + /** + * Whether to apply data boost on Spanner export. Enabling this option will + * incur additional cost. More info can be found + * [here](https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas). + * + * Generated from protobuf field bool enable_data_boost = 5; + * @param bool $var + * @return $this + */ + public function setEnableDataBoost($var) + { + GPBUtil::checkBool($var); + $this->enable_data_boost = $var; + + return $this; + } + +} + diff --git a/DiscoveryEngine/src/V1/UpdateDocumentRequest.php b/DiscoveryEngine/src/V1/UpdateDocumentRequest.php index 5a010ca542f9..055a7081b703 100644 --- a/DiscoveryEngine/src/V1/UpdateDocumentRequest.php +++ b/DiscoveryEngine/src/V1/UpdateDocumentRequest.php @@ -38,6 +38,38 @@ class UpdateDocumentRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field bool allow_missing = 2; */ protected $allow_missing = false; + /** + * Indicates which fields in the provided imported 'document' to update. If + * not set, will by default update all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\DiscoveryEngine\V1\Document $document Required. The document to update/create. + * + * If the caller does not have permission to update the + * [Document][google.cloud.discoveryengine.v1.Document], regardless of whether + * or not it exists, a `PERMISSION_DENIED` error is returned. + * + * If the [Document][google.cloud.discoveryengine.v1.Document] to update does + * not exist and + * [allow_missing][google.cloud.discoveryengine.v1.UpdateDocumentRequest.allow_missing] + * is not set, a `NOT_FOUND` error is returned. + * @param \Google\Protobuf\FieldMask $updateMask Indicates which fields in the provided imported 'document' to update. If + * not set, will by default update all fields. + * + * @return \Google\Cloud\DiscoveryEngine\V1\UpdateDocumentRequest + * + * @experimental + */ + public static function build(\Google\Cloud\DiscoveryEngine\V1\Document $document, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setDocument($document) + ->setUpdateMask($updateMask); + } /** * Constructor. @@ -58,6 +90,9 @@ class UpdateDocumentRequest extends \Google\Protobuf\Internal\Message * If set to true, and the * [Document][google.cloud.discoveryengine.v1.Document] is not found, a new * [Document][google.cloud.discoveryengine.v1.Document] will be created. + * @type \Google\Protobuf\FieldMask $update_mask + * Indicates which fields in the provided imported 'document' to update. If + * not set, will by default update all fields. * } */ public function __construct($data = NULL) { @@ -145,5 +180,43 @@ public function setAllowMissing($var) return $this; } + /** + * Indicates which fields in the provided imported 'document' to update. If + * not set, will by default update all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Indicates which fields in the provided imported 'document' to update. If + * not set, will by default update all fields. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + } diff --git a/DiscoveryEngine/src/V1/UserEvent.php b/DiscoveryEngine/src/V1/UserEvent.php index 1b7f1c7cfbc7..c28628645192 100644 --- a/DiscoveryEngine/src/V1/UserEvent.php +++ b/DiscoveryEngine/src/V1/UserEvent.php @@ -103,19 +103,23 @@ class UserEvent extends \Google\Protobuf\Internal\Message /** * Token to attribute an API response to user action(s) to trigger the event. * Highly recommended for user events that are the result of - * [RecommendationService.Recommend][]. This field enables accurate - * attribution of recommendation model performance. + * [RecommendationService.Recommend][google.cloud.discoveryengine.v1.RecommendationService.Recommend]. + * This field enables accurate attribution of recommendation model + * performance. * The value must be one of: - * * [RecommendResponse.attribution_token][] for events that are the result of - * [RecommendationService.Recommend][]. + * * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1.RecommendResponse.attribution_token] for events that are the result of + * [RecommendationService.Recommend][google.cloud.discoveryengine.v1.RecommendationService.Recommend]. * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1.SearchResponse.attribution_token] for events that are the result of * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search]. * This token enables us to accurately attribute page view or conversion * completion back to the event and the particular predict response containing * this clicked/purchased product. If user clicks on product K in the - * recommendation results, pass [RecommendResponse.attribution_token][] as a - * URL parameter to product K's page. When recording events on product K's - * page, log the [RecommendResponse.attribution_token][] to this field. + * recommendation results, pass + * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1.RecommendResponse.attribution_token] + * as a URL parameter to product K's page. When recording events on product + * K's page, log the + * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1.RecommendResponse.attribution_token] + * to this field. * * Generated from protobuf field string attribution_token = 8; */ @@ -129,9 +133,10 @@ class UserEvent extends \Google\Protobuf\Internal\Message * [SearchRequest.filter][google.cloud.discoveryengine.v1.SearchRequest.filter] * conforming to https://google.aip.dev/160#filtering. * Similarly, for `view-item-list` events that are generated from a - * [RecommendRequest][], this field may be populated directly from - * [RecommendRequest.filter][] conforming to - * https://google.aip.dev/160#filtering. + * [RecommendRequest][google.cloud.discoveryengine.v1.RecommendRequest], this + * field may be populated directly from + * [RecommendRequest.filter][google.cloud.discoveryengine.v1.RecommendRequest.filter] + * conforming to https://google.aip.dev/160#filtering. * The value must be a UTF-8 encoded string with a length limit of 1,000 * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * @@ -301,19 +306,23 @@ class UserEvent extends \Google\Protobuf\Internal\Message * @type string $attribution_token * Token to attribute an API response to user action(s) to trigger the event. * Highly recommended for user events that are the result of - * [RecommendationService.Recommend][]. This field enables accurate - * attribution of recommendation model performance. + * [RecommendationService.Recommend][google.cloud.discoveryengine.v1.RecommendationService.Recommend]. + * This field enables accurate attribution of recommendation model + * performance. * The value must be one of: - * * [RecommendResponse.attribution_token][] for events that are the result of - * [RecommendationService.Recommend][]. + * * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1.RecommendResponse.attribution_token] for events that are the result of + * [RecommendationService.Recommend][google.cloud.discoveryengine.v1.RecommendationService.Recommend]. * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1.SearchResponse.attribution_token] for events that are the result of * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search]. * This token enables us to accurately attribute page view or conversion * completion back to the event and the particular predict response containing * this clicked/purchased product. If user clicks on product K in the - * recommendation results, pass [RecommendResponse.attribution_token][] as a - * URL parameter to product K's page. When recording events on product K's - * page, log the [RecommendResponse.attribution_token][] to this field. + * recommendation results, pass + * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1.RecommendResponse.attribution_token] + * as a URL parameter to product K's page. When recording events on product + * K's page, log the + * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1.RecommendResponse.attribution_token] + * to this field. * @type string $filter * The filter syntax consists of an expression language for constructing a * predicate from one or more fields of the documents being filtered. @@ -323,9 +332,10 @@ class UserEvent extends \Google\Protobuf\Internal\Message * [SearchRequest.filter][google.cloud.discoveryengine.v1.SearchRequest.filter] * conforming to https://google.aip.dev/160#filtering. * Similarly, for `view-item-list` events that are generated from a - * [RecommendRequest][], this field may be populated directly from - * [RecommendRequest.filter][] conforming to - * https://google.aip.dev/160#filtering. + * [RecommendRequest][google.cloud.discoveryengine.v1.RecommendRequest], this + * field may be populated directly from + * [RecommendRequest.filter][google.cloud.discoveryengine.v1.RecommendRequest.filter] + * conforming to https://google.aip.dev/160#filtering. * The value must be a UTF-8 encoded string with a length limit of 1,000 * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * @type array<\Google\Cloud\DiscoveryEngine\V1\DocumentInfo>|\Google\Protobuf\Internal\RepeatedField $documents @@ -695,19 +705,23 @@ public function setPageInfo($var) /** * Token to attribute an API response to user action(s) to trigger the event. * Highly recommended for user events that are the result of - * [RecommendationService.Recommend][]. This field enables accurate - * attribution of recommendation model performance. + * [RecommendationService.Recommend][google.cloud.discoveryengine.v1.RecommendationService.Recommend]. + * This field enables accurate attribution of recommendation model + * performance. * The value must be one of: - * * [RecommendResponse.attribution_token][] for events that are the result of - * [RecommendationService.Recommend][]. + * * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1.RecommendResponse.attribution_token] for events that are the result of + * [RecommendationService.Recommend][google.cloud.discoveryengine.v1.RecommendationService.Recommend]. * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1.SearchResponse.attribution_token] for events that are the result of * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search]. * This token enables us to accurately attribute page view or conversion * completion back to the event and the particular predict response containing * this clicked/purchased product. If user clicks on product K in the - * recommendation results, pass [RecommendResponse.attribution_token][] as a - * URL parameter to product K's page. When recording events on product K's - * page, log the [RecommendResponse.attribution_token][] to this field. + * recommendation results, pass + * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1.RecommendResponse.attribution_token] + * as a URL parameter to product K's page. When recording events on product + * K's page, log the + * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1.RecommendResponse.attribution_token] + * to this field. * * Generated from protobuf field string attribution_token = 8; * @return string @@ -720,19 +734,23 @@ public function getAttributionToken() /** * Token to attribute an API response to user action(s) to trigger the event. * Highly recommended for user events that are the result of - * [RecommendationService.Recommend][]. This field enables accurate - * attribution of recommendation model performance. + * [RecommendationService.Recommend][google.cloud.discoveryengine.v1.RecommendationService.Recommend]. + * This field enables accurate attribution of recommendation model + * performance. * The value must be one of: - * * [RecommendResponse.attribution_token][] for events that are the result of - * [RecommendationService.Recommend][]. + * * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1.RecommendResponse.attribution_token] for events that are the result of + * [RecommendationService.Recommend][google.cloud.discoveryengine.v1.RecommendationService.Recommend]. * * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1.SearchResponse.attribution_token] for events that are the result of * [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search]. * This token enables us to accurately attribute page view or conversion * completion back to the event and the particular predict response containing * this clicked/purchased product. If user clicks on product K in the - * recommendation results, pass [RecommendResponse.attribution_token][] as a - * URL parameter to product K's page. When recording events on product K's - * page, log the [RecommendResponse.attribution_token][] to this field. + * recommendation results, pass + * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1.RecommendResponse.attribution_token] + * as a URL parameter to product K's page. When recording events on product + * K's page, log the + * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1.RecommendResponse.attribution_token] + * to this field. * * Generated from protobuf field string attribution_token = 8; * @param string $var @@ -755,9 +773,10 @@ public function setAttributionToken($var) * [SearchRequest.filter][google.cloud.discoveryengine.v1.SearchRequest.filter] * conforming to https://google.aip.dev/160#filtering. * Similarly, for `view-item-list` events that are generated from a - * [RecommendRequest][], this field may be populated directly from - * [RecommendRequest.filter][] conforming to - * https://google.aip.dev/160#filtering. + * [RecommendRequest][google.cloud.discoveryengine.v1.RecommendRequest], this + * field may be populated directly from + * [RecommendRequest.filter][google.cloud.discoveryengine.v1.RecommendRequest.filter] + * conforming to https://google.aip.dev/160#filtering. * The value must be a UTF-8 encoded string with a length limit of 1,000 * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * @@ -778,9 +797,10 @@ public function getFilter() * [SearchRequest.filter][google.cloud.discoveryengine.v1.SearchRequest.filter] * conforming to https://google.aip.dev/160#filtering. * Similarly, for `view-item-list` events that are generated from a - * [RecommendRequest][], this field may be populated directly from - * [RecommendRequest.filter][] conforming to - * https://google.aip.dev/160#filtering. + * [RecommendRequest][google.cloud.discoveryengine.v1.RecommendRequest], this + * field may be populated directly from + * [RecommendRequest.filter][google.cloud.discoveryengine.v1.RecommendRequest.filter] + * conforming to https://google.aip.dev/160#filtering. * The value must be a UTF-8 encoded string with a length limit of 1,000 * characters. Otherwise, an `INVALID_ARGUMENT` error is returned. * diff --git a/DiscoveryEngine/src/V1/gapic_metadata.json b/DiscoveryEngine/src/V1/gapic_metadata.json index 0241a4103530..d41389e464c8 100644 --- a/DiscoveryEngine/src/V1/gapic_metadata.json +++ b/DiscoveryEngine/src/V1/gapic_metadata.json @@ -194,6 +194,20 @@ } } }, + "RecommendationService": { + "clients": { + "grpc": { + "libraryClient": "RecommendationServiceGapicClient", + "rpcs": { + "Recommend": { + "methods": [ + "recommend" + ] + } + } + } + } + }, "SchemaService": { "clients": { "grpc": { diff --git a/DiscoveryEngine/src/V1/resources/data_store_service_descriptor_config.php b/DiscoveryEngine/src/V1/resources/data_store_service_descriptor_config.php index 25c715da5ebc..66a49fb98a54 100644 --- a/DiscoveryEngine/src/V1/resources/data_store_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1/resources/data_store_service_descriptor_config.php @@ -90,7 +90,10 @@ 'collection' => 'projects/{project}/locations/{location}/collections/{collection}', 'dataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', 'projectLocationCollectionDataStore' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}', + 'projectLocationCollectionDataStoreSchema' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}', 'projectLocationDataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', + 'projectLocationDataStoreSchema' => 'projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}', + 'schema' => 'projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}', ], ], ], diff --git a/DiscoveryEngine/src/V1/resources/document_service_descriptor_config.php b/DiscoveryEngine/src/V1/resources/document_service_descriptor_config.php index 4b86a66c0b39..689949e5c846 100644 --- a/DiscoveryEngine/src/V1/resources/document_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1/resources/document_service_descriptor_config.php @@ -113,6 +113,7 @@ 'templateMap' => [ 'branch' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}', 'document' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', + 'fhirStore' => 'projects/{project}/locations/{location}/datasets/{dataset}/fhirStores/{fhir_store}', 'projectLocationCollectionDataStoreBranch' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}', 'projectLocationCollectionDataStoreBranchDocument' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}', 'projectLocationDataStoreBranch' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}', diff --git a/DiscoveryEngine/src/V1/resources/recommendation_service_client_config.json b/DiscoveryEngine/src/V1/resources/recommendation_service_client_config.json new file mode 100644 index 000000000000..f9b55119b59f --- /dev/null +++ b/DiscoveryEngine/src/V1/resources/recommendation_service_client_config.json @@ -0,0 +1,39 @@ +{ + "interfaces": { + "google.cloud.discoveryengine.v1.RecommendationService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 5000, + "initial_rpc_timeout_millis": 5000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 5000, + "total_timeout_millis": 5000 + } + }, + "methods": { + "Recommend": { + "timeout_millis": 5000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/DiscoveryEngine/src/V1/resources/recommendation_service_descriptor_config.php b/DiscoveryEngine/src/V1/resources/recommendation_service_descriptor_config.php new file mode 100644 index 000000000000..eb05e94eaa98 --- /dev/null +++ b/DiscoveryEngine/src/V1/resources/recommendation_service_descriptor_config.php @@ -0,0 +1,29 @@ + [ + 'google.cloud.discoveryengine.v1.RecommendationService' => [ + 'Recommend' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\DiscoveryEngine\V1\RecommendResponse', + 'headerParams' => [ + [ + 'keyName' => 'serving_config', + 'fieldAccessors' => [ + 'getServingConfig', + ], + ], + ], + ], + 'templateMap' => [ + 'document' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', + 'projectLocationCollectionDataStoreBranchDocument' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}', + 'projectLocationCollectionDataStoreServingConfig' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}', + 'projectLocationCollectionEngineServingConfig' => 'projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}', + 'projectLocationDataStoreBranchDocument' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}', + 'projectLocationDataStoreServingConfig' => 'projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}', + 'servingConfig' => 'projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}', + ], + ], + ], +]; diff --git a/DiscoveryEngine/src/V1/resources/recommendation_service_rest_client_config.php b/DiscoveryEngine/src/V1/resources/recommendation_service_rest_client_config.php new file mode 100644 index 000000000000..d1270915f0d1 --- /dev/null +++ b/DiscoveryEngine/src/V1/resources/recommendation_service_rest_client_config.php @@ -0,0 +1,173 @@ + [ + 'google.cloud.discoveryengine.v1.RecommendationService' => [ + 'Recommend' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:recommend', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:recommend', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:recommend', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'serving_config' => [ + 'getters' => [ + 'getServingConfig', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataConnector}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*/engines/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/collections/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*/models/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/dataStores/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/DiscoveryEngine/src/V1/resources/search_service_client_config.json b/DiscoveryEngine/src/V1/resources/search_service_client_config.json index 5e8091122348..53151b5b8302 100644 --- a/DiscoveryEngine/src/V1/resources/search_service_client_config.json +++ b/DiscoveryEngine/src/V1/resources/search_service_client_config.json @@ -3,7 +3,7 @@ "google.cloud.discoveryengine.v1.SearchService": { "retry_codes": { "no_retry_codes": [], - "retry_policy_1_codes": [ + "retry_policy_2_codes": [ "UNAVAILABLE" ] }, @@ -17,21 +17,21 @@ "max_rpc_timeout_millis": 0, "total_timeout_millis": 0 }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, + "retry_policy_2_params": { + "initial_retry_delay_millis": 1000, "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 5000, - "initial_rpc_timeout_millis": 5000, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 30000, "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 5000, - "total_timeout_millis": 5000 + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 } }, "methods": { "Search": { - "timeout_millis": 5000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" } } } diff --git a/DiscoveryEngine/src/V1/resources/search_service_descriptor_config.php b/DiscoveryEngine/src/V1/resources/search_service_descriptor_config.php index 243b63038f39..06c8c9c6b7ec 100644 --- a/DiscoveryEngine/src/V1/resources/search_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1/resources/search_service_descriptor_config.php @@ -25,9 +25,12 @@ ], 'templateMap' => [ 'branch' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}', + 'dataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', + 'projectLocationCollectionDataStore' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}', 'projectLocationCollectionDataStoreBranch' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}', 'projectLocationCollectionDataStoreServingConfig' => 'projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}', 'projectLocationCollectionEngineServingConfig' => 'projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}', + 'projectLocationDataStore' => 'projects/{project}/locations/{location}/dataStores/{data_store}', 'projectLocationDataStoreBranch' => 'projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}', 'projectLocationDataStoreServingConfig' => 'projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}', 'servingConfig' => 'projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}', diff --git a/DiscoveryEngine/tests/Unit/V1/Client/RecommendationServiceClientTest.php b/DiscoveryEngine/tests/Unit/V1/Client/RecommendationServiceClientTest.php new file mode 100644 index 000000000000..e7d374f8425f --- /dev/null +++ b/DiscoveryEngine/tests/Unit/V1/Client/RecommendationServiceClientTest.php @@ -0,0 +1,196 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return RecommendationServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new RecommendationServiceClient($options); + } + + /** @test */ + public function recommendTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $attributionToken = 'attributionToken-729411015'; + $validateOnly2 = true; + $expectedResponse = new RecommendResponse(); + $expectedResponse->setAttributionToken($attributionToken); + $expectedResponse->setValidateOnly($validateOnly2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedServingConfig = $gapicClient->servingConfigName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[SERVING_CONFIG]' + ); + $userEvent = new UserEvent(); + $userEventEventType = 'userEventEventType341658661'; + $userEvent->setEventType($userEventEventType); + $userEventUserPseudoId = 'userEventUserPseudoId-1929667693'; + $userEvent->setUserPseudoId($userEventUserPseudoId); + $request = (new RecommendRequest())->setServingConfig($formattedServingConfig)->setUserEvent($userEvent); + $response = $gapicClient->recommend($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1.RecommendationService/Recommend', $actualFuncCall); + $actualValue = $actualRequestObject->getServingConfig(); + $this->assertProtobufEquals($formattedServingConfig, $actualValue); + $actualValue = $actualRequestObject->getUserEvent(); + $this->assertProtobufEquals($userEvent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function recommendExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedServingConfig = $gapicClient->servingConfigName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[SERVING_CONFIG]' + ); + $userEvent = new UserEvent(); + $userEventEventType = 'userEventEventType341658661'; + $userEvent->setEventType($userEventEventType); + $userEventUserPseudoId = 'userEventUserPseudoId-1929667693'; + $userEvent->setUserPseudoId($userEventUserPseudoId); + $request = (new RecommendRequest())->setServingConfig($formattedServingConfig)->setUserEvent($userEvent); + try { + $gapicClient->recommend($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function recommendAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $attributionToken = 'attributionToken-729411015'; + $validateOnly2 = true; + $expectedResponse = new RecommendResponse(); + $expectedResponse->setAttributionToken($attributionToken); + $expectedResponse->setValidateOnly($validateOnly2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedServingConfig = $gapicClient->servingConfigName( + '[PROJECT]', + '[LOCATION]', + '[DATA_STORE]', + '[SERVING_CONFIG]' + ); + $userEvent = new UserEvent(); + $userEventEventType = 'userEventEventType341658661'; + $userEvent->setEventType($userEventEventType); + $userEventUserPseudoId = 'userEventUserPseudoId-1929667693'; + $userEvent->setUserPseudoId($userEventUserPseudoId); + $request = (new RecommendRequest())->setServingConfig($formattedServingConfig)->setUserEvent($userEvent); + $response = $gapicClient->recommendAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.discoveryengine.v1.RecommendationService/Recommend', $actualFuncCall); + $actualValue = $actualRequestObject->getServingConfig(); + $this->assertProtobufEquals($formattedServingConfig, $actualValue); + $actualValue = $actualRequestObject->getUserEvent(); + $this->assertProtobufEquals($userEvent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} From faafbffbc5187540d2347626b42407339c076855 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 12 Apr 2024 14:55:12 +0000 Subject: [PATCH 27/86] chore: update copyright year for Secret Manager (#7220) PiperOrigin-RevId: 624057603 Source-Link: https://github.com/googleapis/googleapis/commit/13edbc1d295bc1bcedd9b561eb7c83db36ca0f7e Source-Link: https://github.com/googleapis/googleapis-gen/commit/c93be74a315a33ec3eaa493a52a308c5aafbd8bd Copy-Tag: eyJwIjoiU2VjcmV0TWFuYWdlci8uT3dsQm90LnlhbWwiLCJoIjoiYzkzYmU3NGEzMTVhMzNlYzNlYWE0OTNhNTJhMzA4YzVhYWZiZDhiZCJ9 --- .../access_secret_version.php | 6 +- .../add_secret_version.php | 11 +- .../create_secret.php | 3 +- .../delete_secret.php | 3 +- .../destroy_secret_version.php | 12 +- .../disable_secret_version.php | 8 +- .../enable_secret_version.php | 8 +- .../SecretManagerServiceClient/get_secret.php | 4 +- .../get_secret_version.php | 6 +- .../list_secret_versions.php | 11 +- .../list_secrets.php | 3 +- .../set_iam_policy.php | 6 +- .../update_secret.php | 3 +- .../src/V1/AccessSecretVersionRequest.php | 18 ++- .../src/V1/AccessSecretVersionResponse.php | 15 ++- .../src/V1/AddSecretVersionRequest.php | 48 ++++--- .../V1/Client/SecretManagerServiceClient.php | 40 +++--- SecretManager/src/V1/CreateSecretRequest.php | 18 ++- SecretManager/src/V1/DeleteSecretRequest.php | 42 +++--- .../src/V1/DestroySecretVersionRequest.php | 56 ++++---- .../src/V1/DisableSecretVersionRequest.php | 56 ++++---- .../src/V1/EnableSecretVersionRequest.php | 56 ++++---- .../Gapic/SecretManagerServiceGapicClient.php | 120 +++++++++++------- SecretManager/src/V1/GetSecretRequest.php | 23 +++- .../src/V1/GetSecretVersionRequest.php | 18 ++- .../src/V1/ListSecretVersionsRequest.php | 38 +++--- .../src/V1/ListSecretVersionsResponse.php | 43 ++++--- SecretManager/src/V1/ListSecretsRequest.php | 18 ++- SecretManager/src/V1/ListSecretsResponse.php | 31 +++-- SecretManager/src/V1/UpdateSecretRequest.php | 18 ++- 30 files changed, 460 insertions(+), 282 deletions(-) diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/access_secret_version.php b/SecretManager/samples/V1/SecretManagerServiceClient/access_secret_version.php index 22eef958fb70..18de71a6fb58 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/access_secret_version.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/access_secret_version.php @@ -29,12 +29,14 @@ use Google\Cloud\SecretManager\V1\Client\SecretManagerServiceClient; /** - * Accesses a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. This call returns the secret data. + * Accesses a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * This call returns the secret data. * * `projects/*/secrets/*/versions/latest` is an alias to the most recently * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * - * @param string $formattedName The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + * @param string $formattedName The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format * `projects/*/secrets/*/versions/*`. * * `projects/*/secrets/*/versions/latest` is an alias to the most recently diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/add_secret_version.php b/SecretManager/samples/V1/SecretManagerServiceClient/add_secret_version.php index b8330870b4ad..014fbd00fb46 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/add_secret_version.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/add_secret_version.php @@ -30,11 +30,14 @@ use Google\Cloud\SecretManager\V1\SecretVersion; /** - * Creates a new [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] containing secret data and attaches - * it to an existing [Secret][google.cloud.secretmanager.v1.Secret]. + * Creates a new [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] + * containing secret data and attaches it to an existing + * [Secret][google.cloud.secretmanager.v1.Secret]. * - * @param string $formattedParent The resource name of the [Secret][google.cloud.secretmanager.v1.Secret] to associate with the - * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format `projects/*/secrets/*`. Please see + * @param string $formattedParent The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret] to associate with the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + * `projects/*/secrets/*`. Please see * {@see SecretManagerServiceClient::secretName()} for help formatting this field. */ function add_secret_version_sample(string $formattedParent): void diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/create_secret.php b/SecretManager/samples/V1/SecretManagerServiceClient/create_secret.php index ee04941991a8..6732f8bc6ae3 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/create_secret.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/create_secret.php @@ -30,7 +30,8 @@ use Google\Cloud\SecretManager\V1\Secret; /** - * Creates a new [Secret][google.cloud.secretmanager.v1.Secret] containing no [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. + * Creates a new [Secret][google.cloud.secretmanager.v1.Secret] containing no + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. * * @param string $formattedParent The resource name of the project to associate with the * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`. Please see diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/delete_secret.php b/SecretManager/samples/V1/SecretManagerServiceClient/delete_secret.php index 1b9b22748d3b..e5adcd87caa1 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/delete_secret.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/delete_secret.php @@ -30,7 +30,8 @@ /** * Deletes a [Secret][google.cloud.secretmanager.v1.Secret]. * - * @param string $formattedName The resource name of the [Secret][google.cloud.secretmanager.v1.Secret] to delete in the format + * @param string $formattedName The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret] to delete in the format * `projects/*/secrets/*`. Please see * {@see SecretManagerServiceClient::secretName()} for help formatting this field. */ diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/destroy_secret_version.php b/SecretManager/samples/V1/SecretManagerServiceClient/destroy_secret_version.php index e0c9976993be..c341d3064e85 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/destroy_secret_version.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/destroy_secret_version.php @@ -31,12 +31,14 @@ /** * Destroys a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * - * Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to - * [DESTROYED][google.cloud.secretmanager.v1.SecretVersion.State.DESTROYED] and irrevocably destroys the - * secret data. + * Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to + * [DESTROYED][google.cloud.secretmanager.v1.SecretVersion.State.DESTROYED] + * and irrevocably destroys the secret data. * - * @param string $formattedName The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in the format - * `projects/*/secrets/*/versions/*`. Please see + * @param string $formattedName The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in + * the format `projects/*/secrets/*/versions/*`. Please see * {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field. */ function destroy_secret_version_sample(string $formattedName): void diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/disable_secret_version.php b/SecretManager/samples/V1/SecretManagerServiceClient/disable_secret_version.php index 5a8de42b8619..187ea02b7839 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/disable_secret_version.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/disable_secret_version.php @@ -31,11 +31,13 @@ /** * Disables a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * - * Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to + * Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to * [DISABLED][google.cloud.secretmanager.v1.SecretVersion.State.DISABLED]. * - * @param string $formattedName The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in the format - * `projects/*/secrets/*/versions/*`. Please see + * @param string $formattedName The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in + * the format `projects/*/secrets/*/versions/*`. Please see * {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field. */ function disable_secret_version_sample(string $formattedName): void diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/enable_secret_version.php b/SecretManager/samples/V1/SecretManagerServiceClient/enable_secret_version.php index 9669e4ab1266..0f30e13556da 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/enable_secret_version.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/enable_secret_version.php @@ -31,11 +31,13 @@ /** * Enables a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * - * Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to + * Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to * [ENABLED][google.cloud.secretmanager.v1.SecretVersion.State.ENABLED]. * - * @param string $formattedName The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in the format - * `projects/*/secrets/*/versions/*`. Please see + * @param string $formattedName The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in + * the format `projects/*/secrets/*/versions/*`. Please see * {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field. */ function enable_secret_version_sample(string $formattedName): void diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/get_secret.php b/SecretManager/samples/V1/SecretManagerServiceClient/get_secret.php index 2e565915135b..14f0523fb22d 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/get_secret.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/get_secret.php @@ -31,7 +31,9 @@ /** * Gets metadata for a given [Secret][google.cloud.secretmanager.v1.Secret]. * - * @param string $formattedName The resource name of the [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*/secrets/*`. Please see + * @param string $formattedName The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret], in the format + * `projects/*/secrets/*`. Please see * {@see SecretManagerServiceClient::secretName()} for help formatting this field. */ function get_secret_sample(string $formattedName): void diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/get_secret_version.php b/SecretManager/samples/V1/SecretManagerServiceClient/get_secret_version.php index dd1289027ad9..a7baf9974bed 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/get_secret_version.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/get_secret_version.php @@ -29,12 +29,14 @@ use Google\Cloud\SecretManager\V1\SecretVersion; /** - * Gets metadata for a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * Gets metadata for a + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * * `projects/*/secrets/*/versions/latest` is an alias to the most recently * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * - * @param string $formattedName The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + * @param string $formattedName The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format * `projects/*/secrets/*/versions/*`. * * `projects/*/secrets/*/versions/latest` is an alias to the most recently diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/list_secret_versions.php b/SecretManager/samples/V1/SecretManagerServiceClient/list_secret_versions.php index b5a47f7f41db..60a231f14b50 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/list_secret_versions.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/list_secret_versions.php @@ -30,12 +30,13 @@ use Google\Cloud\SecretManager\V1\SecretVersion; /** - * Lists [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. This call does not return secret - * data. + * Lists [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. This + * call does not return secret data. * - * @param string $formattedParent The resource name of the [Secret][google.cloud.secretmanager.v1.Secret] associated with the - * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in the format - * `projects/*/secrets/*`. Please see + * @param string $formattedParent The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret] associated with the + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in + * the format `projects/*/secrets/*`. Please see * {@see SecretManagerServiceClient::secretName()} for help formatting this field. */ function list_secret_versions_sample(string $formattedParent): void diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/list_secrets.php b/SecretManager/samples/V1/SecretManagerServiceClient/list_secrets.php index fdcc33ba9a90..dfd1cf50ca86 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/list_secrets.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/list_secrets.php @@ -33,7 +33,8 @@ * Lists [Secrets][google.cloud.secretmanager.v1.Secret]. * * @param string $formattedParent The resource name of the project associated with the - * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*`. Please see + * [Secrets][google.cloud.secretmanager.v1.Secret], in the format + * `projects/*`. Please see * {@see SecretManagerServiceClient::projectName()} for help formatting this field. */ function list_secrets_sample(string $formattedParent): void diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/set_iam_policy.php b/SecretManager/samples/V1/SecretManagerServiceClient/set_iam_policy.php index e7e313aea5f9..e596b6bef5ec 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/set_iam_policy.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/set_iam_policy.php @@ -32,8 +32,10 @@ * Sets the access control policy on the specified secret. Replaces any * existing policy. * - * Permissions on [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] are enforced according - * to the policy set on the associated [Secret][google.cloud.secretmanager.v1.Secret]. + * Permissions on + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] are enforced + * according to the policy set on the associated + * [Secret][google.cloud.secretmanager.v1.Secret]. * * @param string $resource REQUIRED: The resource for which the policy is being specified. * See the operation documentation for the appropriate value for this field. diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/update_secret.php b/SecretManager/samples/V1/SecretManagerServiceClient/update_secret.php index 93c001e9cd8a..a38220555f73 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/update_secret.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/update_secret.php @@ -31,7 +31,8 @@ use Google\Protobuf\FieldMask; /** - * Updates metadata of an existing [Secret][google.cloud.secretmanager.v1.Secret]. + * Updates metadata of an existing + * [Secret][google.cloud.secretmanager.v1.Secret]. * * This sample has been automatically generated and should be regarded as a code * template only. It will require modifications to work: diff --git a/SecretManager/src/V1/AccessSecretVersionRequest.php b/SecretManager/src/V1/AccessSecretVersionRequest.php index c59913cffdc3..022c5103edae 100644 --- a/SecretManager/src/V1/AccessSecretVersionRequest.php +++ b/SecretManager/src/V1/AccessSecretVersionRequest.php @@ -9,14 +9,16 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [SecretManagerService.AccessSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.AccessSecretVersion]. + * Request message for + * [SecretManagerService.AccessSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.AccessSecretVersion]. * * Generated from protobuf message google.cloud.secretmanager.v1.AccessSecretVersionRequest */ class AccessSecretVersionRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + * Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format * `projects/*/secrets/*/versions/*`. * `projects/*/secrets/*/versions/latest` is an alias to the most recently * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. @@ -26,7 +28,8 @@ class AccessSecretVersionRequest extends \Google\Protobuf\Internal\Message private $name = ''; /** - * @param string $name Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + * @param string $name Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format * `projects/*/secrets/*/versions/*`. * * `projects/*/secrets/*/versions/latest` is an alias to the most recently @@ -50,7 +53,8 @@ public static function build(string $name): self * Optional. Data for populating the Message object. * * @type string $name - * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + * Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format * `projects/*/secrets/*/versions/*`. * `projects/*/secrets/*/versions/latest` is an alias to the most recently * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. @@ -62,7 +66,8 @@ public function __construct($data = NULL) { } /** - * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + * Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format * `projects/*/secrets/*/versions/*`. * `projects/*/secrets/*/versions/latest` is an alias to the most recently * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. @@ -76,7 +81,8 @@ public function getName() } /** - * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + * Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format * `projects/*/secrets/*/versions/*`. * `projects/*/secrets/*/versions/latest` is an alias to the most recently * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. diff --git a/SecretManager/src/V1/AccessSecretVersionResponse.php b/SecretManager/src/V1/AccessSecretVersionResponse.php index f7fc65342b56..e5b0ae63fb21 100644 --- a/SecretManager/src/V1/AccessSecretVersionResponse.php +++ b/SecretManager/src/V1/AccessSecretVersionResponse.php @@ -9,14 +9,16 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Response message for [SecretManagerService.AccessSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.AccessSecretVersion]. + * Response message for + * [SecretManagerService.AccessSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.AccessSecretVersion]. * * Generated from protobuf message google.cloud.secretmanager.v1.AccessSecretVersionResponse */ class AccessSecretVersionResponse extends \Google\Protobuf\Internal\Message { /** - * The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + * The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format * `projects/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { @@ -36,7 +38,8 @@ class AccessSecretVersionResponse extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + * The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format * `projects/*/secrets/*/versions/*`. * @type \Google\Cloud\SecretManager\V1\SecretPayload $payload * Secret payload @@ -48,7 +51,8 @@ public function __construct($data = NULL) { } /** - * The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + * The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format * `projects/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { @@ -60,7 +64,8 @@ public function getName() } /** - * The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + * The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format * `projects/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { diff --git a/SecretManager/src/V1/AddSecretVersionRequest.php b/SecretManager/src/V1/AddSecretVersionRequest.php index 4a021c0b10ce..44da58621e23 100644 --- a/SecretManager/src/V1/AddSecretVersionRequest.php +++ b/SecretManager/src/V1/AddSecretVersionRequest.php @@ -9,31 +9,38 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [SecretManagerService.AddSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.AddSecretVersion]. + * Request message for + * [SecretManagerService.AddSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.AddSecretVersion]. * * Generated from protobuf message google.cloud.secretmanager.v1.AddSecretVersionRequest */ class AddSecretVersionRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret] to associate with the - * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format `projects/*/secrets/*`. + * Required. The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret] to associate with the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + * `projects/*/secrets/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ private $parent = ''; /** - * Required. The secret payload of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * Required. The secret payload of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * * Generated from protobuf field .google.cloud.secretmanager.v1.SecretPayload payload = 2 [(.google.api.field_behavior) = REQUIRED]; */ private $payload = null; /** - * @param string $parent Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret] to associate with the - * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format `projects/*/secrets/*`. Please see + * @param string $parent Required. The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret] to associate with the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + * `projects/*/secrets/*`. Please see * {@see SecretManagerServiceClient::secretName()} for help formatting this field. - * @param \Google\Cloud\SecretManager\V1\SecretPayload $payload Required. The secret payload of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * @param \Google\Cloud\SecretManager\V1\SecretPayload $payload Required. The secret payload of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * * @return \Google\Cloud\SecretManager\V1\AddSecretVersionRequest * @@ -53,10 +60,13 @@ public static function build(string $parent, \Google\Cloud\SecretManager\V1\Secr * Optional. Data for populating the Message object. * * @type string $parent - * Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret] to associate with the - * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format `projects/*/secrets/*`. + * Required. The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret] to associate with the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + * `projects/*/secrets/*`. * @type \Google\Cloud\SecretManager\V1\SecretPayload $payload - * Required. The secret payload of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * Required. The secret payload of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * } */ public function __construct($data = NULL) { @@ -65,8 +75,10 @@ public function __construct($data = NULL) { } /** - * Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret] to associate with the - * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format `projects/*/secrets/*`. + * Required. The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret] to associate with the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + * `projects/*/secrets/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -77,8 +89,10 @@ public function getParent() } /** - * Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret] to associate with the - * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format `projects/*/secrets/*`. + * Required. The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret] to associate with the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + * `projects/*/secrets/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var @@ -93,7 +107,8 @@ public function setParent($var) } /** - * Required. The secret payload of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * Required. The secret payload of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * * Generated from protobuf field .google.cloud.secretmanager.v1.SecretPayload payload = 2 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Cloud\SecretManager\V1\SecretPayload|null @@ -114,7 +129,8 @@ public function clearPayload() } /** - * Required. The secret payload of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * Required. The secret payload of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * * Generated from protobuf field .google.cloud.secretmanager.v1.SecretPayload payload = 2 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Cloud\SecretManager\V1\SecretPayload $var diff --git a/SecretManager/src/V1/Client/SecretManagerServiceClient.php b/SecretManager/src/V1/Client/SecretManagerServiceClient.php index 20b41ada8f35..3232855ab61f 100644 --- a/SecretManager/src/V1/Client/SecretManagerServiceClient.php +++ b/SecretManager/src/V1/Client/SecretManagerServiceClient.php @@ -303,7 +303,8 @@ public function __call($method, $args) } /** - * Accesses a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. This call returns the secret data. + * Accesses a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * This call returns the secret data. * * `projects/*/secrets/*/versions/latest` is an alias to the most recently * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. @@ -333,8 +334,9 @@ public function accessSecretVersion(AccessSecretVersionRequest $request, array $ } /** - * Creates a new [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] containing secret data and attaches - * it to an existing [Secret][google.cloud.secretmanager.v1.Secret]. + * Creates a new [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] + * containing secret data and attaches it to an existing + * [Secret][google.cloud.secretmanager.v1.Secret]. * * The async variant is {@see SecretManagerServiceClient::addSecretVersionAsync()} * . @@ -361,7 +363,8 @@ public function addSecretVersion(AddSecretVersionRequest $request, array $callOp } /** - * Creates a new [Secret][google.cloud.secretmanager.v1.Secret] containing no [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. + * Creates a new [Secret][google.cloud.secretmanager.v1.Secret] containing no + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. * * The async variant is {@see SecretManagerServiceClient::createSecretAsync()} . * @@ -413,9 +416,10 @@ public function deleteSecret(DeleteSecretRequest $request, array $callOptions = /** * Destroys a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * - * Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to - * [DESTROYED][google.cloud.secretmanager.v1.SecretVersion.State.DESTROYED] and irrevocably destroys the - * secret data. + * Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to + * [DESTROYED][google.cloud.secretmanager.v1.SecretVersion.State.DESTROYED] + * and irrevocably destroys the secret data. * * The async variant is * {@see SecretManagerServiceClient::destroySecretVersionAsync()} . @@ -444,7 +448,8 @@ public function destroySecretVersion(DestroySecretVersionRequest $request, array /** * Disables a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * - * Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to + * Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to * [DISABLED][google.cloud.secretmanager.v1.SecretVersion.State.DISABLED]. * * The async variant is @@ -474,7 +479,8 @@ public function disableSecretVersion(DisableSecretVersionRequest $request, array /** * Enables a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * - * Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to + * Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to * [ENABLED][google.cloud.secretmanager.v1.SecretVersion.State.ENABLED]. * * The async variant is @@ -555,7 +561,8 @@ public function getSecret(GetSecretRequest $request, array $callOptions = []): S } /** - * Gets metadata for a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * Gets metadata for a + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * * `projects/*/secrets/*/versions/latest` is an alias to the most recently * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. @@ -585,8 +592,8 @@ public function getSecretVersion(GetSecretVersionRequest $request, array $callOp } /** - * Lists [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. This call does not return secret - * data. + * Lists [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. This + * call does not return secret data. * * The async variant is * {@see SecretManagerServiceClient::listSecretVersionsAsync()} . @@ -642,8 +649,10 @@ public function listSecrets(ListSecretsRequest $request, array $callOptions = [] * Sets the access control policy on the specified secret. Replaces any * existing policy. * - * Permissions on [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] are enforced according - * to the policy set on the associated [Secret][google.cloud.secretmanager.v1.Secret]. + * Permissions on + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] are enforced + * according to the policy set on the associated + * [Secret][google.cloud.secretmanager.v1.Secret]. * * The async variant is {@see SecretManagerServiceClient::setIamPolicyAsync()} . * @@ -702,7 +711,8 @@ public function testIamPermissions(TestIamPermissionsRequest $request, array $ca } /** - * Updates metadata of an existing [Secret][google.cloud.secretmanager.v1.Secret]. + * Updates metadata of an existing + * [Secret][google.cloud.secretmanager.v1.Secret]. * * The async variant is {@see SecretManagerServiceClient::updateSecretAsync()} . * diff --git a/SecretManager/src/V1/CreateSecretRequest.php b/SecretManager/src/V1/CreateSecretRequest.php index 572d93a949da..df487a7b3aad 100644 --- a/SecretManager/src/V1/CreateSecretRequest.php +++ b/SecretManager/src/V1/CreateSecretRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [SecretManagerService.CreateSecret][google.cloud.secretmanager.v1.SecretManagerService.CreateSecret]. + * Request message for + * [SecretManagerService.CreateSecret][google.cloud.secretmanager.v1.SecretManagerService.CreateSecret]. * * Generated from protobuf message google.cloud.secretmanager.v1.CreateSecretRequest */ @@ -32,7 +33,8 @@ class CreateSecretRequest extends \Google\Protobuf\Internal\Message */ private $secret_id = ''; /** - * Required. A [Secret][google.cloud.secretmanager.v1.Secret] with initial field values. + * Required. A [Secret][google.cloud.secretmanager.v1.Secret] with initial + * field values. * * Generated from protobuf field .google.cloud.secretmanager.v1.Secret secret = 3 [(.google.api.field_behavior) = REQUIRED]; */ @@ -47,7 +49,8 @@ class CreateSecretRequest extends \Google\Protobuf\Internal\Message * A secret ID is a string with a maximum length of 255 characters and can * contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and * underscore (`_`) characters. - * @param \Google\Cloud\SecretManager\V1\Secret $secret Required. A [Secret][google.cloud.secretmanager.v1.Secret] with initial field values. + * @param \Google\Cloud\SecretManager\V1\Secret $secret Required. A [Secret][google.cloud.secretmanager.v1.Secret] with initial + * field values. * * @return \Google\Cloud\SecretManager\V1\CreateSecretRequest * @@ -76,7 +79,8 @@ public static function build(string $parent, string $secretId, \Google\Cloud\Sec * contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and * underscore (`_`) characters. * @type \Google\Cloud\SecretManager\V1\Secret $secret - * Required. A [Secret][google.cloud.secretmanager.v1.Secret] with initial field values. + * Required. A [Secret][google.cloud.secretmanager.v1.Secret] with initial + * field values. * } */ public function __construct($data = NULL) { @@ -145,7 +149,8 @@ public function setSecretId($var) } /** - * Required. A [Secret][google.cloud.secretmanager.v1.Secret] with initial field values. + * Required. A [Secret][google.cloud.secretmanager.v1.Secret] with initial + * field values. * * Generated from protobuf field .google.cloud.secretmanager.v1.Secret secret = 3 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Cloud\SecretManager\V1\Secret|null @@ -166,7 +171,8 @@ public function clearSecret() } /** - * Required. A [Secret][google.cloud.secretmanager.v1.Secret] with initial field values. + * Required. A [Secret][google.cloud.secretmanager.v1.Secret] with initial + * field values. * * Generated from protobuf field .google.cloud.secretmanager.v1.Secret secret = 3 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Cloud\SecretManager\V1\Secret $var diff --git a/SecretManager/src/V1/DeleteSecretRequest.php b/SecretManager/src/V1/DeleteSecretRequest.php index b909ea95f993..b4cd1a484ef1 100644 --- a/SecretManager/src/V1/DeleteSecretRequest.php +++ b/SecretManager/src/V1/DeleteSecretRequest.php @@ -9,30 +9,33 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [SecretManagerService.DeleteSecret][google.cloud.secretmanager.v1.SecretManagerService.DeleteSecret]. + * Request message for + * [SecretManagerService.DeleteSecret][google.cloud.secretmanager.v1.SecretManagerService.DeleteSecret]. * * Generated from protobuf message google.cloud.secretmanager.v1.DeleteSecretRequest */ class DeleteSecretRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret] to delete in the format + * Required. The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret] to delete in the format * `projects/*/secrets/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ private $name = ''; /** - * Optional. Etag of the [Secret][google.cloud.secretmanager.v1.Secret]. The request succeeds if it matches - * the etag of the currently stored secret object. If the etag is omitted, - * the request succeeds. + * Optional. Etag of the [Secret][google.cloud.secretmanager.v1.Secret]. The + * request succeeds if it matches the etag of the currently stored secret + * object. If the etag is omitted, the request succeeds. * * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $etag = ''; /** - * @param string $name Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret] to delete in the format + * @param string $name Required. The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret] to delete in the format * `projects/*/secrets/*`. Please see * {@see SecretManagerServiceClient::secretName()} for help formatting this field. * @@ -53,12 +56,13 @@ public static function build(string $name): self * Optional. Data for populating the Message object. * * @type string $name - * Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret] to delete in the format + * Required. The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret] to delete in the format * `projects/*/secrets/*`. * @type string $etag - * Optional. Etag of the [Secret][google.cloud.secretmanager.v1.Secret]. The request succeeds if it matches - * the etag of the currently stored secret object. If the etag is omitted, - * the request succeeds. + * Optional. Etag of the [Secret][google.cloud.secretmanager.v1.Secret]. The + * request succeeds if it matches the etag of the currently stored secret + * object. If the etag is omitted, the request succeeds. * } */ public function __construct($data = NULL) { @@ -67,7 +71,8 @@ public function __construct($data = NULL) { } /** - * Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret] to delete in the format + * Required. The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret] to delete in the format * `projects/*/secrets/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -79,7 +84,8 @@ public function getName() } /** - * Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret] to delete in the format + * Required. The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret] to delete in the format * `projects/*/secrets/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -95,9 +101,9 @@ public function setName($var) } /** - * Optional. Etag of the [Secret][google.cloud.secretmanager.v1.Secret]. The request succeeds if it matches - * the etag of the currently stored secret object. If the etag is omitted, - * the request succeeds. + * Optional. Etag of the [Secret][google.cloud.secretmanager.v1.Secret]. The + * request succeeds if it matches the etag of the currently stored secret + * object. If the etag is omitted, the request succeeds. * * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -108,9 +114,9 @@ public function getEtag() } /** - * Optional. Etag of the [Secret][google.cloud.secretmanager.v1.Secret]. The request succeeds if it matches - * the etag of the currently stored secret object. If the etag is omitted, - * the request succeeds. + * Optional. Etag of the [Secret][google.cloud.secretmanager.v1.Secret]. The + * request succeeds if it matches the etag of the currently stored secret + * object. If the etag is omitted, the request succeeds. * * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var diff --git a/SecretManager/src/V1/DestroySecretVersionRequest.php b/SecretManager/src/V1/DestroySecretVersionRequest.php index 34a0cbfbf5db..00eaf0dc2bb0 100644 --- a/SecretManager/src/V1/DestroySecretVersionRequest.php +++ b/SecretManager/src/V1/DestroySecretVersionRequest.php @@ -9,31 +9,35 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [SecretManagerService.DestroySecretVersion][google.cloud.secretmanager.v1.SecretManagerService.DestroySecretVersion]. + * Request message for + * [SecretManagerService.DestroySecretVersion][google.cloud.secretmanager.v1.SecretManagerService.DestroySecretVersion]. * * Generated from protobuf message google.cloud.secretmanager.v1.DestroySecretVersionRequest */ class DestroySecretVersionRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in the format - * `projects/*/secrets/*/versions/*`. + * Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in + * the format `projects/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ private $name = ''; /** - * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches - * the etag of the currently stored secret version object. If the etag is - * omitted, the request succeeds. + * Optional. Etag of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request + * succeeds if it matches the etag of the currently stored secret version + * object. If the etag is omitted, the request succeeds. * * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $etag = ''; /** - * @param string $name Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in the format - * `projects/*/secrets/*/versions/*`. Please see + * @param string $name Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in + * the format `projects/*/secrets/*/versions/*`. Please see * {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field. * * @return \Google\Cloud\SecretManager\V1\DestroySecretVersionRequest @@ -53,12 +57,14 @@ public static function build(string $name): self * Optional. Data for populating the Message object. * * @type string $name - * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in the format - * `projects/*/secrets/*/versions/*`. + * Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in + * the format `projects/*/secrets/*/versions/*`. * @type string $etag - * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches - * the etag of the currently stored secret version object. If the etag is - * omitted, the request succeeds. + * Optional. Etag of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request + * succeeds if it matches the etag of the currently stored secret version + * object. If the etag is omitted, the request succeeds. * } */ public function __construct($data = NULL) { @@ -67,8 +73,9 @@ public function __construct($data = NULL) { } /** - * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in the format - * `projects/*/secrets/*/versions/*`. + * Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in + * the format `projects/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -79,8 +86,9 @@ public function getName() } /** - * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in the format - * `projects/*/secrets/*/versions/*`. + * Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in + * the format `projects/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var @@ -95,9 +103,10 @@ public function setName($var) } /** - * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches - * the etag of the currently stored secret version object. If the etag is - * omitted, the request succeeds. + * Optional. Etag of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request + * succeeds if it matches the etag of the currently stored secret version + * object. If the etag is omitted, the request succeeds. * * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -108,9 +117,10 @@ public function getEtag() } /** - * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches - * the etag of the currently stored secret version object. If the etag is - * omitted, the request succeeds. + * Optional. Etag of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request + * succeeds if it matches the etag of the currently stored secret version + * object. If the etag is omitted, the request succeeds. * * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var diff --git a/SecretManager/src/V1/DisableSecretVersionRequest.php b/SecretManager/src/V1/DisableSecretVersionRequest.php index 7bc1d292eadb..fe7c574a3f2c 100644 --- a/SecretManager/src/V1/DisableSecretVersionRequest.php +++ b/SecretManager/src/V1/DisableSecretVersionRequest.php @@ -9,31 +9,35 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [SecretManagerService.DisableSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.DisableSecretVersion]. + * Request message for + * [SecretManagerService.DisableSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.DisableSecretVersion]. * * Generated from protobuf message google.cloud.secretmanager.v1.DisableSecretVersionRequest */ class DisableSecretVersionRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in the format - * `projects/*/secrets/*/versions/*`. + * Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in + * the format `projects/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ private $name = ''; /** - * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches - * the etag of the currently stored secret version object. If the etag is - * omitted, the request succeeds. + * Optional. Etag of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request + * succeeds if it matches the etag of the currently stored secret version + * object. If the etag is omitted, the request succeeds. * * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $etag = ''; /** - * @param string $name Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in the format - * `projects/*/secrets/*/versions/*`. Please see + * @param string $name Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in + * the format `projects/*/secrets/*/versions/*`. Please see * {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field. * * @return \Google\Cloud\SecretManager\V1\DisableSecretVersionRequest @@ -53,12 +57,14 @@ public static function build(string $name): self * Optional. Data for populating the Message object. * * @type string $name - * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in the format - * `projects/*/secrets/*/versions/*`. + * Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in + * the format `projects/*/secrets/*/versions/*`. * @type string $etag - * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches - * the etag of the currently stored secret version object. If the etag is - * omitted, the request succeeds. + * Optional. Etag of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request + * succeeds if it matches the etag of the currently stored secret version + * object. If the etag is omitted, the request succeeds. * } */ public function __construct($data = NULL) { @@ -67,8 +73,9 @@ public function __construct($data = NULL) { } /** - * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in the format - * `projects/*/secrets/*/versions/*`. + * Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in + * the format `projects/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -79,8 +86,9 @@ public function getName() } /** - * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in the format - * `projects/*/secrets/*/versions/*`. + * Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in + * the format `projects/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var @@ -95,9 +103,10 @@ public function setName($var) } /** - * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches - * the etag of the currently stored secret version object. If the etag is - * omitted, the request succeeds. + * Optional. Etag of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request + * succeeds if it matches the etag of the currently stored secret version + * object. If the etag is omitted, the request succeeds. * * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -108,9 +117,10 @@ public function getEtag() } /** - * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches - * the etag of the currently stored secret version object. If the etag is - * omitted, the request succeeds. + * Optional. Etag of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request + * succeeds if it matches the etag of the currently stored secret version + * object. If the etag is omitted, the request succeeds. * * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var diff --git a/SecretManager/src/V1/EnableSecretVersionRequest.php b/SecretManager/src/V1/EnableSecretVersionRequest.php index 0158a3584f84..79bc681fadc6 100644 --- a/SecretManager/src/V1/EnableSecretVersionRequest.php +++ b/SecretManager/src/V1/EnableSecretVersionRequest.php @@ -9,31 +9,35 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [SecretManagerService.EnableSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.EnableSecretVersion]. + * Request message for + * [SecretManagerService.EnableSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.EnableSecretVersion]. * * Generated from protobuf message google.cloud.secretmanager.v1.EnableSecretVersionRequest */ class EnableSecretVersionRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in the format - * `projects/*/secrets/*/versions/*`. + * Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in + * the format `projects/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ private $name = ''; /** - * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches - * the etag of the currently stored secret version object. If the etag is - * omitted, the request succeeds. + * Optional. Etag of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request + * succeeds if it matches the etag of the currently stored secret version + * object. If the etag is omitted, the request succeeds. * * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $etag = ''; /** - * @param string $name Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in the format - * `projects/*/secrets/*/versions/*`. Please see + * @param string $name Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in + * the format `projects/*/secrets/*/versions/*`. Please see * {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field. * * @return \Google\Cloud\SecretManager\V1\EnableSecretVersionRequest @@ -53,12 +57,14 @@ public static function build(string $name): self * Optional. Data for populating the Message object. * * @type string $name - * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in the format - * `projects/*/secrets/*/versions/*`. + * Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in + * the format `projects/*/secrets/*/versions/*`. * @type string $etag - * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches - * the etag of the currently stored secret version object. If the etag is - * omitted, the request succeeds. + * Optional. Etag of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request + * succeeds if it matches the etag of the currently stored secret version + * object. If the etag is omitted, the request succeeds. * } */ public function __construct($data = NULL) { @@ -67,8 +73,9 @@ public function __construct($data = NULL) { } /** - * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in the format - * `projects/*/secrets/*/versions/*`. + * Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in + * the format `projects/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -79,8 +86,9 @@ public function getName() } /** - * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in the format - * `projects/*/secrets/*/versions/*`. + * Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in + * the format `projects/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var @@ -95,9 +103,10 @@ public function setName($var) } /** - * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches - * the etag of the currently stored secret version object. If the etag is - * omitted, the request succeeds. + * Optional. Etag of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request + * succeeds if it matches the etag of the currently stored secret version + * object. If the etag is omitted, the request succeeds. * * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -108,9 +117,10 @@ public function getEtag() } /** - * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches - * the etag of the currently stored secret version object. If the etag is - * omitted, the request succeeds. + * Optional. Etag of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request + * succeeds if it matches the etag of the currently stored secret version + * object. If the etag is omitted, the request succeeds. * * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var diff --git a/SecretManager/src/V1/Gapic/SecretManagerServiceGapicClient.php b/SecretManager/src/V1/Gapic/SecretManagerServiceGapicClient.php index 52e203aa344f..72cebb265d8c 100644 --- a/SecretManager/src/V1/Gapic/SecretManagerServiceGapicClient.php +++ b/SecretManager/src/V1/Gapic/SecretManagerServiceGapicClient.php @@ -369,7 +369,8 @@ public function __construct(array $options = []) } /** - * Accesses a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. This call returns the secret data. + * Accesses a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * This call returns the secret data. * * `projects/*/secrets/*/versions/latest` is an alias to the most recently * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. @@ -385,7 +386,8 @@ public function __construct(array $options = []) * } * ``` * - * @param string $name Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + * @param string $name Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format * `projects/*/secrets/*/versions/*`. * * `projects/*/secrets/*/versions/latest` is an alias to the most recently @@ -415,8 +417,9 @@ public function accessSecretVersion($name, array $optionalArgs = []) } /** - * Creates a new [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] containing secret data and attaches - * it to an existing [Secret][google.cloud.secretmanager.v1.Secret]. + * Creates a new [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] + * containing secret data and attaches it to an existing + * [Secret][google.cloud.secretmanager.v1.Secret]. * * Sample code: * ``` @@ -430,9 +433,12 @@ public function accessSecretVersion($name, array $optionalArgs = []) * } * ``` * - * @param string $parent Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret] to associate with the - * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format `projects/*/secrets/*`. - * @param SecretPayload $payload Required. The secret payload of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * @param string $parent Required. The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret] to associate with the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + * `projects/*/secrets/*`. + * @param SecretPayload $payload Required. The secret payload of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * @param array $optionalArgs { * Optional. * @@ -459,7 +465,8 @@ public function addSecretVersion($parent, $payload, array $optionalArgs = []) } /** - * Creates a new [Secret][google.cloud.secretmanager.v1.Secret] containing no [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. + * Creates a new [Secret][google.cloud.secretmanager.v1.Secret] containing no + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. * * Sample code: * ``` @@ -481,7 +488,8 @@ public function addSecretVersion($parent, $payload, array $optionalArgs = []) * A secret ID is a string with a maximum length of 255 characters and can * contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and * underscore (`_`) characters. - * @param Secret $secret Required. A [Secret][google.cloud.secretmanager.v1.Secret] with initial field values. + * @param Secret $secret Required. A [Secret][google.cloud.secretmanager.v1.Secret] with initial + * field values. * @param array $optionalArgs { * Optional. * @@ -522,15 +530,16 @@ public function createSecret($parent, $secretId, $secret, array $optionalArgs = * } * ``` * - * @param string $name Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret] to delete in the format + * @param string $name Required. The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret] to delete in the format * `projects/*/secrets/*`. * @param array $optionalArgs { * Optional. * * @type string $etag - * Optional. Etag of the [Secret][google.cloud.secretmanager.v1.Secret]. The request succeeds if it matches - * the etag of the currently stored secret object. If the etag is omitted, - * the request succeeds. + * Optional. Etag of the [Secret][google.cloud.secretmanager.v1.Secret]. The + * request succeeds if it matches the etag of the currently stored secret + * object. If the etag is omitted, the request succeeds. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on @@ -557,9 +566,10 @@ public function deleteSecret($name, array $optionalArgs = []) /** * Destroys a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * - * Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to - * [DESTROYED][google.cloud.secretmanager.v1.SecretVersion.State.DESTROYED] and irrevocably destroys the - * secret data. + * Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to + * [DESTROYED][google.cloud.secretmanager.v1.SecretVersion.State.DESTROYED] + * and irrevocably destroys the secret data. * * Sample code: * ``` @@ -572,15 +582,17 @@ public function deleteSecret($name, array $optionalArgs = []) * } * ``` * - * @param string $name Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in the format - * `projects/*/secrets/*/versions/*`. + * @param string $name Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in + * the format `projects/*/secrets/*/versions/*`. * @param array $optionalArgs { * Optional. * * @type string $etag - * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches - * the etag of the currently stored secret version object. If the etag is - * omitted, the request succeeds. + * Optional. Etag of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request + * succeeds if it matches the etag of the currently stored secret version + * object. If the etag is omitted, the request succeeds. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on @@ -609,7 +621,8 @@ public function destroySecretVersion($name, array $optionalArgs = []) /** * Disables a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * - * Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to + * Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to * [DISABLED][google.cloud.secretmanager.v1.SecretVersion.State.DISABLED]. * * Sample code: @@ -623,15 +636,17 @@ public function destroySecretVersion($name, array $optionalArgs = []) * } * ``` * - * @param string $name Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in the format - * `projects/*/secrets/*/versions/*`. + * @param string $name Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in + * the format `projects/*/secrets/*/versions/*`. * @param array $optionalArgs { * Optional. * * @type string $etag - * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches - * the etag of the currently stored secret version object. If the etag is - * omitted, the request succeeds. + * Optional. Etag of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request + * succeeds if it matches the etag of the currently stored secret version + * object. If the etag is omitted, the request succeeds. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on @@ -660,7 +675,8 @@ public function disableSecretVersion($name, array $optionalArgs = []) /** * Enables a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * - * Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to + * Sets the [state][google.cloud.secretmanager.v1.SecretVersion.state] of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to * [ENABLED][google.cloud.secretmanager.v1.SecretVersion.State.ENABLED]. * * Sample code: @@ -674,15 +690,17 @@ public function disableSecretVersion($name, array $optionalArgs = []) * } * ``` * - * @param string $name Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in the format - * `projects/*/secrets/*/versions/*`. + * @param string $name Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in + * the format `projects/*/secrets/*/versions/*`. * @param array $optionalArgs { * Optional. * * @type string $etag - * Optional. Etag of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request succeeds if it matches - * the etag of the currently stored secret version object. If the etag is - * omitted, the request succeeds. + * Optional. Etag of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request + * succeeds if it matches the etag of the currently stored secret version + * object. If the etag is omitted, the request succeeds. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on @@ -770,7 +788,9 @@ public function getIamPolicy($resource, array $optionalArgs = []) * } * ``` * - * @param string $name Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*/secrets/*`. + * @param string $name Required. The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret], in the format + * `projects/*/secrets/*`. * @param array $optionalArgs { * Optional. * @@ -796,7 +816,8 @@ public function getSecret($name, array $optionalArgs = []) } /** - * Gets metadata for a [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * Gets metadata for a + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * * `projects/*/secrets/*/versions/latest` is an alias to the most recently * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. @@ -812,7 +833,8 @@ public function getSecret($name, array $optionalArgs = []) * } * ``` * - * @param string $name Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + * @param string $name Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format * `projects/*/secrets/*/versions/*`. * * `projects/*/secrets/*/versions/latest` is an alias to the most recently @@ -842,8 +864,8 @@ public function getSecretVersion($name, array $optionalArgs = []) } /** - * Lists [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. This call does not return secret - * data. + * Lists [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. This + * call does not return secret data. * * Sample code: * ``` @@ -868,9 +890,10 @@ public function getSecretVersion($name, array $optionalArgs = []) * } * ``` * - * @param string $parent Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret] associated with the - * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in the format - * `projects/*/secrets/*`. + * @param string $parent Required. The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret] associated with the + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in + * the format `projects/*/secrets/*`. * @param array $optionalArgs { * Optional. * @@ -949,7 +972,8 @@ public function listSecretVersions($parent, array $optionalArgs = []) * ``` * * @param string $parent Required. The resource name of the project associated with the - * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*`. + * [Secrets][google.cloud.secretmanager.v1.Secret], in the format + * `projects/*`. * @param array $optionalArgs { * Optional. * @@ -1005,8 +1029,10 @@ public function listSecrets($parent, array $optionalArgs = []) * Sets the access control policy on the specified secret. Replaces any * existing policy. * - * Permissions on [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] are enforced according - * to the policy set on the associated [Secret][google.cloud.secretmanager.v1.Secret]. + * Permissions on + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] are enforced + * according to the policy set on the associated + * [Secret][google.cloud.secretmanager.v1.Secret]. * * Sample code: * ``` @@ -1114,7 +1140,8 @@ public function testIamPermissions($resource, $permissions, array $optionalArgs } /** - * Updates metadata of an existing [Secret][google.cloud.secretmanager.v1.Secret]. + * Updates metadata of an existing + * [Secret][google.cloud.secretmanager.v1.Secret]. * * Sample code: * ``` @@ -1128,7 +1155,8 @@ public function testIamPermissions($resource, $permissions, array $optionalArgs * } * ``` * - * @param Secret $secret Required. [Secret][google.cloud.secretmanager.v1.Secret] with updated field values. + * @param Secret $secret Required. [Secret][google.cloud.secretmanager.v1.Secret] with updated field + * values. * @param FieldMask $updateMask Required. Specifies the fields to be updated. * @param array $optionalArgs { * Optional. diff --git a/SecretManager/src/V1/GetSecretRequest.php b/SecretManager/src/V1/GetSecretRequest.php index a4835e2a2149..90f8705c6adb 100644 --- a/SecretManager/src/V1/GetSecretRequest.php +++ b/SecretManager/src/V1/GetSecretRequest.php @@ -9,21 +9,26 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [SecretManagerService.GetSecret][google.cloud.secretmanager.v1.SecretManagerService.GetSecret]. + * Request message for + * [SecretManagerService.GetSecret][google.cloud.secretmanager.v1.SecretManagerService.GetSecret]. * * Generated from protobuf message google.cloud.secretmanager.v1.GetSecretRequest */ class GetSecretRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*/secrets/*`. + * Required. The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret], in the format + * `projects/*/secrets/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ private $name = ''; /** - * @param string $name Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*/secrets/*`. Please see + * @param string $name Required. The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret], in the format + * `projects/*/secrets/*`. Please see * {@see SecretManagerServiceClient::secretName()} for help formatting this field. * * @return \Google\Cloud\SecretManager\V1\GetSecretRequest @@ -43,7 +48,9 @@ public static function build(string $name): self * Optional. Data for populating the Message object. * * @type string $name - * Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*/secrets/*`. + * Required. The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret], in the format + * `projects/*/secrets/*`. * } */ public function __construct($data = NULL) { @@ -52,7 +59,9 @@ public function __construct($data = NULL) { } /** - * Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*/secrets/*`. + * Required. The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret], in the format + * `projects/*/secrets/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -63,7 +72,9 @@ public function getName() } /** - * Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*/secrets/*`. + * Required. The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret], in the format + * `projects/*/secrets/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/SecretManager/src/V1/GetSecretVersionRequest.php b/SecretManager/src/V1/GetSecretVersionRequest.php index 2d3ceaa14d0b..6ac5e42e7fd2 100644 --- a/SecretManager/src/V1/GetSecretVersionRequest.php +++ b/SecretManager/src/V1/GetSecretVersionRequest.php @@ -9,14 +9,16 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [SecretManagerService.GetSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.GetSecretVersion]. + * Request message for + * [SecretManagerService.GetSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.GetSecretVersion]. * * Generated from protobuf message google.cloud.secretmanager.v1.GetSecretVersionRequest */ class GetSecretVersionRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + * Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format * `projects/*/secrets/*/versions/*`. * `projects/*/secrets/*/versions/latest` is an alias to the most recently * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. @@ -26,7 +28,8 @@ class GetSecretVersionRequest extends \Google\Protobuf\Internal\Message private $name = ''; /** - * @param string $name Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + * @param string $name Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format * `projects/*/secrets/*/versions/*`. * * `projects/*/secrets/*/versions/latest` is an alias to the most recently @@ -50,7 +53,8 @@ public static function build(string $name): self * Optional. Data for populating the Message object. * * @type string $name - * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + * Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format * `projects/*/secrets/*/versions/*`. * `projects/*/secrets/*/versions/latest` is an alias to the most recently * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. @@ -62,7 +66,8 @@ public function __construct($data = NULL) { } /** - * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + * Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format * `projects/*/secrets/*/versions/*`. * `projects/*/secrets/*/versions/latest` is an alias to the most recently * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. @@ -76,7 +81,8 @@ public function getName() } /** - * Required. The resource name of the [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format + * Required. The resource name of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format * `projects/*/secrets/*/versions/*`. * `projects/*/secrets/*/versions/latest` is an alias to the most recently * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. diff --git a/SecretManager/src/V1/ListSecretVersionsRequest.php b/SecretManager/src/V1/ListSecretVersionsRequest.php index 22d3efb6e577..4053e960474e 100644 --- a/SecretManager/src/V1/ListSecretVersionsRequest.php +++ b/SecretManager/src/V1/ListSecretVersionsRequest.php @@ -9,16 +9,18 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [SecretManagerService.ListSecretVersions][google.cloud.secretmanager.v1.SecretManagerService.ListSecretVersions]. + * Request message for + * [SecretManagerService.ListSecretVersions][google.cloud.secretmanager.v1.SecretManagerService.ListSecretVersions]. * * Generated from protobuf message google.cloud.secretmanager.v1.ListSecretVersionsRequest */ class ListSecretVersionsRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret] associated with the - * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in the format - * `projects/*/secrets/*`. + * Required. The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret] associated with the + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in + * the format `projects/*/secrets/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -50,9 +52,10 @@ class ListSecretVersionsRequest extends \Google\Protobuf\Internal\Message private $filter = ''; /** - * @param string $parent Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret] associated with the - * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in the format - * `projects/*/secrets/*`. Please see + * @param string $parent Required. The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret] associated with the + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in + * the format `projects/*/secrets/*`. Please see * {@see SecretManagerServiceClient::secretName()} for help formatting this field. * * @return \Google\Cloud\SecretManager\V1\ListSecretVersionsRequest @@ -72,9 +75,10 @@ public static function build(string $parent): self * Optional. Data for populating the Message object. * * @type string $parent - * Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret] associated with the - * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in the format - * `projects/*/secrets/*`. + * Required. The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret] associated with the + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in + * the format `projects/*/secrets/*`. * @type int $page_size * Optional. The maximum number of results to be returned in a single page. If * set to 0, the server decides the number of results to return. If the @@ -96,9 +100,10 @@ public function __construct($data = NULL) { } /** - * Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret] associated with the - * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in the format - * `projects/*/secrets/*`. + * Required. The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret] associated with the + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in + * the format `projects/*/secrets/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -109,9 +114,10 @@ public function getParent() } /** - * Required. The resource name of the [Secret][google.cloud.secretmanager.v1.Secret] associated with the - * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in the format - * `projects/*/secrets/*`. + * Required. The resource name of the + * [Secret][google.cloud.secretmanager.v1.Secret] associated with the + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in + * the format `projects/*/secrets/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/SecretManager/src/V1/ListSecretVersionsResponse.php b/SecretManager/src/V1/ListSecretVersionsResponse.php index d1cdfc6a331e..22df5857848e 100644 --- a/SecretManager/src/V1/ListSecretVersionsResponse.php +++ b/SecretManager/src/V1/ListSecretVersionsResponse.php @@ -9,28 +9,31 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Response message for [SecretManagerService.ListSecretVersions][google.cloud.secretmanager.v1.SecretManagerService.ListSecretVersions]. + * Response message for + * [SecretManagerService.ListSecretVersions][google.cloud.secretmanager.v1.SecretManagerService.ListSecretVersions]. * * Generated from protobuf message google.cloud.secretmanager.v1.ListSecretVersionsResponse */ class ListSecretVersionsResponse extends \Google\Protobuf\Internal\Message { /** - * The list of [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] sorted in reverse by - * create_time (newest first). + * The list of [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] + * sorted in reverse by create_time (newest first). * * Generated from protobuf field repeated .google.cloud.secretmanager.v1.SecretVersion versions = 1; */ private $versions; /** * A token to retrieve the next page of results. Pass this value in - * [ListSecretVersionsRequest.page_token][google.cloud.secretmanager.v1.ListSecretVersionsRequest.page_token] to retrieve the next page. + * [ListSecretVersionsRequest.page_token][google.cloud.secretmanager.v1.ListSecretVersionsRequest.page_token] + * to retrieve the next page. * * Generated from protobuf field string next_page_token = 2; */ private $next_page_token = ''; /** - * The total number of [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. + * The total number of + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. * * Generated from protobuf field int32 total_size = 3; */ @@ -43,13 +46,15 @@ class ListSecretVersionsResponse extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type array<\Google\Cloud\SecretManager\V1\SecretVersion>|\Google\Protobuf\Internal\RepeatedField $versions - * The list of [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] sorted in reverse by - * create_time (newest first). + * The list of [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] + * sorted in reverse by create_time (newest first). * @type string $next_page_token * A token to retrieve the next page of results. Pass this value in - * [ListSecretVersionsRequest.page_token][google.cloud.secretmanager.v1.ListSecretVersionsRequest.page_token] to retrieve the next page. + * [ListSecretVersionsRequest.page_token][google.cloud.secretmanager.v1.ListSecretVersionsRequest.page_token] + * to retrieve the next page. * @type int $total_size - * The total number of [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. + * The total number of + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. * } */ public function __construct($data = NULL) { @@ -58,8 +63,8 @@ public function __construct($data = NULL) { } /** - * The list of [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] sorted in reverse by - * create_time (newest first). + * The list of [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] + * sorted in reverse by create_time (newest first). * * Generated from protobuf field repeated .google.cloud.secretmanager.v1.SecretVersion versions = 1; * @return \Google\Protobuf\Internal\RepeatedField @@ -70,8 +75,8 @@ public function getVersions() } /** - * The list of [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] sorted in reverse by - * create_time (newest first). + * The list of [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] + * sorted in reverse by create_time (newest first). * * Generated from protobuf field repeated .google.cloud.secretmanager.v1.SecretVersion versions = 1; * @param array<\Google\Cloud\SecretManager\V1\SecretVersion>|\Google\Protobuf\Internal\RepeatedField $var @@ -87,7 +92,8 @@ public function setVersions($var) /** * A token to retrieve the next page of results. Pass this value in - * [ListSecretVersionsRequest.page_token][google.cloud.secretmanager.v1.ListSecretVersionsRequest.page_token] to retrieve the next page. + * [ListSecretVersionsRequest.page_token][google.cloud.secretmanager.v1.ListSecretVersionsRequest.page_token] + * to retrieve the next page. * * Generated from protobuf field string next_page_token = 2; * @return string @@ -99,7 +105,8 @@ public function getNextPageToken() /** * A token to retrieve the next page of results. Pass this value in - * [ListSecretVersionsRequest.page_token][google.cloud.secretmanager.v1.ListSecretVersionsRequest.page_token] to retrieve the next page. + * [ListSecretVersionsRequest.page_token][google.cloud.secretmanager.v1.ListSecretVersionsRequest.page_token] + * to retrieve the next page. * * Generated from protobuf field string next_page_token = 2; * @param string $var @@ -114,7 +121,8 @@ public function setNextPageToken($var) } /** - * The total number of [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. + * The total number of + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. * * Generated from protobuf field int32 total_size = 3; * @return int @@ -125,7 +133,8 @@ public function getTotalSize() } /** - * The total number of [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. + * The total number of + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. * * Generated from protobuf field int32 total_size = 3; * @param int $var diff --git a/SecretManager/src/V1/ListSecretsRequest.php b/SecretManager/src/V1/ListSecretsRequest.php index 3c97885f73c2..b86481071939 100644 --- a/SecretManager/src/V1/ListSecretsRequest.php +++ b/SecretManager/src/V1/ListSecretsRequest.php @@ -9,7 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [SecretManagerService.ListSecrets][google.cloud.secretmanager.v1.SecretManagerService.ListSecrets]. + * Request message for + * [SecretManagerService.ListSecrets][google.cloud.secretmanager.v1.SecretManagerService.ListSecrets]. * * Generated from protobuf message google.cloud.secretmanager.v1.ListSecretsRequest */ @@ -17,7 +18,8 @@ class ListSecretsRequest extends \Google\Protobuf\Internal\Message { /** * Required. The resource name of the project associated with the - * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*`. + * [Secrets][google.cloud.secretmanager.v1.Secret], in the format + * `projects/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -50,7 +52,8 @@ class ListSecretsRequest extends \Google\Protobuf\Internal\Message /** * @param string $parent Required. The resource name of the project associated with the - * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*`. Please see + * [Secrets][google.cloud.secretmanager.v1.Secret], in the format + * `projects/*`. Please see * {@see SecretManagerServiceClient::projectName()} for help formatting this field. * * @return \Google\Cloud\SecretManager\V1\ListSecretsRequest @@ -71,7 +74,8 @@ public static function build(string $parent): self * * @type string $parent * Required. The resource name of the project associated with the - * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*`. + * [Secrets][google.cloud.secretmanager.v1.Secret], in the format + * `projects/*`. * @type int $page_size * Optional. The maximum number of results to be returned in a single page. If * set to 0, the server decides the number of results to return. If the @@ -94,7 +98,8 @@ public function __construct($data = NULL) { /** * Required. The resource name of the project associated with the - * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*`. + * [Secrets][google.cloud.secretmanager.v1.Secret], in the format + * `projects/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -106,7 +111,8 @@ public function getParent() /** * Required. The resource name of the project associated with the - * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*`. + * [Secrets][google.cloud.secretmanager.v1.Secret], in the format + * `projects/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/SecretManager/src/V1/ListSecretsResponse.php b/SecretManager/src/V1/ListSecretsResponse.php index f2bdd5f609ec..0dfe831310d1 100644 --- a/SecretManager/src/V1/ListSecretsResponse.php +++ b/SecretManager/src/V1/ListSecretsResponse.php @@ -9,22 +9,24 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Response message for [SecretManagerService.ListSecrets][google.cloud.secretmanager.v1.SecretManagerService.ListSecrets]. + * Response message for + * [SecretManagerService.ListSecrets][google.cloud.secretmanager.v1.SecretManagerService.ListSecrets]. * * Generated from protobuf message google.cloud.secretmanager.v1.ListSecretsResponse */ class ListSecretsResponse extends \Google\Protobuf\Internal\Message { /** - * The list of [Secrets][google.cloud.secretmanager.v1.Secret] sorted in reverse by create_time (newest - * first). + * The list of [Secrets][google.cloud.secretmanager.v1.Secret] sorted in + * reverse by create_time (newest first). * * Generated from protobuf field repeated .google.cloud.secretmanager.v1.Secret secrets = 1; */ private $secrets; /** * A token to retrieve the next page of results. Pass this value in - * [ListSecretsRequest.page_token][google.cloud.secretmanager.v1.ListSecretsRequest.page_token] to retrieve the next page. + * [ListSecretsRequest.page_token][google.cloud.secretmanager.v1.ListSecretsRequest.page_token] + * to retrieve the next page. * * Generated from protobuf field string next_page_token = 2; */ @@ -43,11 +45,12 @@ class ListSecretsResponse extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type array<\Google\Cloud\SecretManager\V1\Secret>|\Google\Protobuf\Internal\RepeatedField $secrets - * The list of [Secrets][google.cloud.secretmanager.v1.Secret] sorted in reverse by create_time (newest - * first). + * The list of [Secrets][google.cloud.secretmanager.v1.Secret] sorted in + * reverse by create_time (newest first). * @type string $next_page_token * A token to retrieve the next page of results. Pass this value in - * [ListSecretsRequest.page_token][google.cloud.secretmanager.v1.ListSecretsRequest.page_token] to retrieve the next page. + * [ListSecretsRequest.page_token][google.cloud.secretmanager.v1.ListSecretsRequest.page_token] + * to retrieve the next page. * @type int $total_size * The total number of [Secrets][google.cloud.secretmanager.v1.Secret]. * } @@ -58,8 +61,8 @@ public function __construct($data = NULL) { } /** - * The list of [Secrets][google.cloud.secretmanager.v1.Secret] sorted in reverse by create_time (newest - * first). + * The list of [Secrets][google.cloud.secretmanager.v1.Secret] sorted in + * reverse by create_time (newest first). * * Generated from protobuf field repeated .google.cloud.secretmanager.v1.Secret secrets = 1; * @return \Google\Protobuf\Internal\RepeatedField @@ -70,8 +73,8 @@ public function getSecrets() } /** - * The list of [Secrets][google.cloud.secretmanager.v1.Secret] sorted in reverse by create_time (newest - * first). + * The list of [Secrets][google.cloud.secretmanager.v1.Secret] sorted in + * reverse by create_time (newest first). * * Generated from protobuf field repeated .google.cloud.secretmanager.v1.Secret secrets = 1; * @param array<\Google\Cloud\SecretManager\V1\Secret>|\Google\Protobuf\Internal\RepeatedField $var @@ -87,7 +90,8 @@ public function setSecrets($var) /** * A token to retrieve the next page of results. Pass this value in - * [ListSecretsRequest.page_token][google.cloud.secretmanager.v1.ListSecretsRequest.page_token] to retrieve the next page. + * [ListSecretsRequest.page_token][google.cloud.secretmanager.v1.ListSecretsRequest.page_token] + * to retrieve the next page. * * Generated from protobuf field string next_page_token = 2; * @return string @@ -99,7 +103,8 @@ public function getNextPageToken() /** * A token to retrieve the next page of results. Pass this value in - * [ListSecretsRequest.page_token][google.cloud.secretmanager.v1.ListSecretsRequest.page_token] to retrieve the next page. + * [ListSecretsRequest.page_token][google.cloud.secretmanager.v1.ListSecretsRequest.page_token] + * to retrieve the next page. * * Generated from protobuf field string next_page_token = 2; * @param string $var diff --git a/SecretManager/src/V1/UpdateSecretRequest.php b/SecretManager/src/V1/UpdateSecretRequest.php index 50672b8087e2..75ce63f392c4 100644 --- a/SecretManager/src/V1/UpdateSecretRequest.php +++ b/SecretManager/src/V1/UpdateSecretRequest.php @@ -9,14 +9,16 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for [SecretManagerService.UpdateSecret][google.cloud.secretmanager.v1.SecretManagerService.UpdateSecret]. + * Request message for + * [SecretManagerService.UpdateSecret][google.cloud.secretmanager.v1.SecretManagerService.UpdateSecret]. * * Generated from protobuf message google.cloud.secretmanager.v1.UpdateSecretRequest */ class UpdateSecretRequest extends \Google\Protobuf\Internal\Message { /** - * Required. [Secret][google.cloud.secretmanager.v1.Secret] with updated field values. + * Required. [Secret][google.cloud.secretmanager.v1.Secret] with updated field + * values. * * Generated from protobuf field .google.cloud.secretmanager.v1.Secret secret = 1 [(.google.api.field_behavior) = REQUIRED]; */ @@ -29,7 +31,8 @@ class UpdateSecretRequest extends \Google\Protobuf\Internal\Message private $update_mask = null; /** - * @param \Google\Cloud\SecretManager\V1\Secret $secret Required. [Secret][google.cloud.secretmanager.v1.Secret] with updated field values. + * @param \Google\Cloud\SecretManager\V1\Secret $secret Required. [Secret][google.cloud.secretmanager.v1.Secret] with updated field + * values. * @param \Google\Protobuf\FieldMask $updateMask Required. Specifies the fields to be updated. * * @return \Google\Cloud\SecretManager\V1\UpdateSecretRequest @@ -50,7 +53,8 @@ public static function build(\Google\Cloud\SecretManager\V1\Secret $secret, \Goo * Optional. Data for populating the Message object. * * @type \Google\Cloud\SecretManager\V1\Secret $secret - * Required. [Secret][google.cloud.secretmanager.v1.Secret] with updated field values. + * Required. [Secret][google.cloud.secretmanager.v1.Secret] with updated field + * values. * @type \Google\Protobuf\FieldMask $update_mask * Required. Specifies the fields to be updated. * } @@ -61,7 +65,8 @@ public function __construct($data = NULL) { } /** - * Required. [Secret][google.cloud.secretmanager.v1.Secret] with updated field values. + * Required. [Secret][google.cloud.secretmanager.v1.Secret] with updated field + * values. * * Generated from protobuf field .google.cloud.secretmanager.v1.Secret secret = 1 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Cloud\SecretManager\V1\Secret|null @@ -82,7 +87,8 @@ public function clearSecret() } /** - * Required. [Secret][google.cloud.secretmanager.v1.Secret] with updated field values. + * Required. [Secret][google.cloud.secretmanager.v1.Secret] with updated field + * values. * * Generated from protobuf field .google.cloud.secretmanager.v1.Secret secret = 1 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Cloud\SecretManager\V1\Secret $var From 0fcd58035e4706e4d3505d2489f51f25ad082c52 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 12 Apr 2024 22:57:50 +0200 Subject: [PATCH 28/86] fix(deps): update dependency google/shopping-common-protos to ^0.3.0 (#7221) --- ShoppingCss/composer.json | 2 +- ShoppingMerchantInventories/composer.json | 2 +- ShoppingMerchantReports/composer.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ShoppingCss/composer.json b/ShoppingCss/composer.json index cf87f0739958..0fd8b8ebf72a 100644 --- a/ShoppingCss/composer.json +++ b/ShoppingCss/composer.json @@ -19,7 +19,7 @@ "require": { "php": "^8.0", "google/gax": "^1.30", - "google/shopping-common-protos": "^0.2.0" + "google/shopping-common-protos": "^0.3.0" }, "require-dev": { "phpunit/phpunit": "^9.0" diff --git a/ShoppingMerchantInventories/composer.json b/ShoppingMerchantInventories/composer.json index cda45bb3ddb3..c425b3dcc3e4 100644 --- a/ShoppingMerchantInventories/composer.json +++ b/ShoppingMerchantInventories/composer.json @@ -19,7 +19,7 @@ "require": { "php": "^8.0", "google/gax": "^1.30", - "google/shopping-common-protos": "^0.2.0" + "google/shopping-common-protos": "^0.3.0" }, "require-dev": { "phpunit/phpunit": "^9.0" diff --git a/ShoppingMerchantReports/composer.json b/ShoppingMerchantReports/composer.json index 721160b72f73..ee190ed472f0 100644 --- a/ShoppingMerchantReports/composer.json +++ b/ShoppingMerchantReports/composer.json @@ -19,7 +19,7 @@ "require": { "php": "^8.0", "google/gax": "^1.30", - "google/shopping-common-protos": "^0.2.0" + "google/shopping-common-protos": "^0.3.0" }, "require-dev": { "phpunit/phpunit": "^9.0" From e64fcf9344377ddfc229ce674d744cbd2bbf0511 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 12 Apr 2024 23:17:34 +0000 Subject: [PATCH 29/86] feat: publish Automated Backups protos (#7118) PiperOrigin-RevId: 620381983 Source-Link: https://github.com/googleapis/googleapis/commit/a70aa2c04ddad801a518be4f5b67345cf758a6ba Source-Link: https://github.com/googleapis/googleapis-gen/commit/e3fb57f9dd4a10b6c20359ec92a72e87631991b8 Copy-Tag: eyJwIjoiQmlndGFibGUvLk93bEJvdC55YW1sIiwiaCI6ImUzZmI1N2Y5ZGQ0YTEwYjZjMjAzNTllYzkyYTcyZTg3NjMxOTkxYjgifQ== feat: add feature flag for client side metrics PiperOrigin-RevId: 619540187 Source-Link: https://github.com/googleapis/googleapis/commit/cbe62016a4eb24e71186899b79b9a4736f858653 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1587174866b7ab761aed1dbfb9588f5b36ee1590 Copy-Tag: eyJwIjoiQmlndGFibGUvLk93bEJvdC55YW1sIiwiaCI6IjE1ODcxNzQ4NjZiN2FiNzYxYWVkMWRiZmI5NTg4ZjViMzZlZTE1OTAifQ== feat: add Data Boost configurations to admin API PiperOrigin-RevId: 617925342 Source-Link: https://github.com/googleapis/googleapis/commit/6f289d775912966eb0cf04bda91e5e355c998d30 Source-Link: https://github.com/googleapis/googleapis-gen/commit/92da6d5d435af533f726a97bcfff3c717832c877 Copy-Tag: eyJwIjoiQmlndGFibGUvLk93bEJvdC55YW1sIiwiaCI6IjkyZGE2ZDVkNDM1YWY1MzNmNzI2YTk3YmNmZmYzYzcxNzgzMmM4NzcifQ== feat: Publish new bigtable APIs for types and aggregates Bigtable aggregates will allow users to configure column families whose cells accumulate values via an aggregation function rather than simply overwrite them PiperOrigin-RevId: 613716423 Source-Link: https://github.com/googleapis/googleapis/commit/66fc31d257cabb2d4462ce3149da9e3a232b3ad1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b983c8f87e6643d9a74d7b8183d66349943b436e Copy-Tag: eyJwIjoiQmlndGFibGUvLk93bEJvdC55YW1sIiwiaCI6ImI5ODNjOGY4N2U2NjQzZDlhNzRkN2I4MTgzZDY2MzQ5OTQzYjQzNmUifQ== feat: Add authorized view bindings to Cloud Bigtable data APIs and messages docs: The field `table_name` in message `.google.bigtable.v2.ReadRowsRequest` is changed from required to optional docs: The field `table_name` in message `.google.bigtable.v2.SampleRowKeysRequest` is changed from required to optional docs: The field `table_name` in message `.google.bigtable.v2.MutateRowRequest` is changed from required to optional docs: The field `table_name` in message `.google.bigtable.v2.MutateRowsRequest` is changed from required to optional docs: The field `table_name` in message `.google.bigtable.v2.CheckAndMutateRowRequest` is changed from required to optional docs: The field `table_name` in message `.google.bigtable.v2.ReadModifyWriteRowRequest` is changed from required to optional PiperOrigin-RevId: 612537984 Source-Link: https://github.com/googleapis/googleapis/commit/6465963c92930626473457717ff697aeb1bf4a12 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f4a996071801f559bb6f4d0c99bb9a3c0ecf4844 Copy-Tag: eyJwIjoiQmlndGFibGUvLk93bEJvdC55YW1sIiwiaCI6ImY0YTk5NjA3MTgwMWY1NTliYjZmNGQwYzk5YmI5YTNjMGVjZjQ4NDQifQ== feat: Cloud Bigtable Authorized Views admin APIs protos PiperOrigin-RevId: 612537460 Source-Link: https://github.com/googleapis/googleapis/commit/b98fe7ff808454e9d11a83946f40259ea9c6a63b Source-Link: https://github.com/googleapis/googleapis-gen/commit/03d9b5c5517cf9123f120461180ebdd387a47bcc Copy-Tag: eyJwIjoiQmlndGFibGUvLk93bEJvdC55YW1sIiwiaCI6IjAzZDliNWM1NTE3Y2Y5MTIzZjEyMDQ2MTE4MGViZGQzODdhNDdiY2MifQ== --- .../metadata/Admin/V2/BigtableTableAdmin.php | Bin 12664 -> 15592 bytes Bigtable/metadata/Admin/V2/Instance.php | Bin 4321 -> 4683 bytes Bigtable/metadata/Admin/V2/Table.php | Bin 4960 -> 6109 bytes Bigtable/metadata/Admin/V2/Types.php | Bin 0 -> 1736 bytes Bigtable/metadata/V2/Bigtable.php | Bin 9610 -> 11426 bytes Bigtable/metadata/V2/Data.php | Bin 3798 -> 4187 bytes Bigtable/metadata/V2/FeatureFlags.php | 7 +- .../BigtableClient/check_and_mutate_row.php | 6 +- .../samples/V2/BigtableClient/mutate_row.php | 6 +- .../samples/V2/BigtableClient/mutate_rows.php | 7 +- .../BigtableClient/read_modify_write_row.php | 6 +- .../samples/V2/BigtableClient/read_rows.php | 3 +- .../V2/BigtableClient/sample_row_keys.php | 3 +- Bigtable/src/Admin/V2/AppProfile.php | 36 ++ .../AppProfile/DataBoostIsolationReadOnly.php | 90 ++++ .../ComputeBillingOwner.php | 60 +++ Bigtable/src/Admin/V2/AuthorizedView.php | 203 ++++++++ .../Admin/V2/AuthorizedView/FamilySubsets.php | 120 +++++ .../Admin/V2/AuthorizedView/ResponseView.php | 72 +++ .../Admin/V2/AuthorizedView/SubsetView.php | 112 +++++ .../src/Admin/V2/CheckConsistencyRequest.php | 87 ++++ .../V2/Client/BigtableTableAdminClient.php | 165 ++++++ Bigtable/src/Admin/V2/ColumnFamily.php | 64 +++ .../Admin/V2/CreateAuthorizedViewMetadata.php | 165 ++++++ .../Admin/V2/CreateAuthorizedViewRequest.php | 189 +++++++ .../src/Admin/V2/DataBoostReadLocalWrites.php | 34 ++ .../Admin/V2/DeleteAuthorizedViewRequest.php | 138 +++++ .../Gapic/BigtableTableAdminGapicClient.php | 395 +++++++++++++++ .../src/Admin/V2/GetAuthorizedViewRequest.php | 130 +++++ .../Admin/V2/ListAuthorizedViewsRequest.php | 222 ++++++++ .../Admin/V2/ListAuthorizedViewsResponse.php | 110 ++++ .../Modification.php | 52 ++ .../src/Admin/V2/StandardReadRemoteWrites.php | 34 ++ Bigtable/src/Admin/V2/Table.php | 45 ++ .../Admin/V2/Table/AutomatedBackupPolicy.php | 132 +++++ Bigtable/src/Admin/V2/Type.php | 167 ++++++ Bigtable/src/Admin/V2/Type/Aggregate.php | 185 +++++++ Bigtable/src/Admin/V2/Type/Aggregate/Sum.php | 38 ++ Bigtable/src/Admin/V2/Type/Bytes.php | 81 +++ Bigtable/src/Admin/V2/Type/Bytes/Encoding.php | 78 +++ .../src/Admin/V2/Type/Bytes/Encoding/Raw.php | 39 ++ Bigtable/src/Admin/V2/Type/Int64.php | 81 +++ Bigtable/src/Admin/V2/Type/Int64/Encoding.php | 78 +++ .../V2/Type/Int64/Encoding/BigEndianBytes.php | 87 ++++ .../Admin/V2/UpdateAuthorizedViewMetadata.php | 170 +++++++ .../Admin/V2/UpdateAuthorizedViewRequest.php | 220 ++++++++ ...table_instance_admin_descriptor_config.php | 20 + ...able_instance_admin_rest_client_config.php | 20 + .../bigtable_table_admin_client_config.json | 25 + ...bigtable_table_admin_descriptor_config.php | 104 ++++ ...igtable_table_admin_rest_client_config.php | 81 +++ Bigtable/src/V2/CheckAndMutateRowRequest.php | 84 +++- Bigtable/src/V2/Client/BigtableClient.php | 22 + Bigtable/src/V2/FeatureFlags.php | 34 ++ Bigtable/src/V2/Gapic/BigtableGapicClient.php | 146 +++++- Bigtable/src/V2/MutateRowRequest.php | 84 +++- Bigtable/src/V2/MutateRowsRequest.php | 82 ++- Bigtable/src/V2/Mutation.php | 33 ++ Bigtable/src/V2/Mutation/AddToCell.php | 222 ++++++++ Bigtable/src/V2/ReadModifyWriteRowRequest.php | 84 +++- Bigtable/src/V2/ReadRowsRequest.php | 62 ++- Bigtable/src/V2/SampleRowKeysRequest.php | 66 ++- Bigtable/src/V2/Value.php | 153 ++++++ .../resources/bigtable_descriptor_config.php | 75 +++ .../resources/bigtable_rest_client_config.php | 91 ++++ .../Admin/V2/BigtableTableAdminClientTest.php | 445 ++++++++++++++++ .../Client/BigtableTableAdminClientTest.php | 474 ++++++++++++++++++ 67 files changed, 6228 insertions(+), 96 deletions(-) create mode 100644 Bigtable/metadata/Admin/V2/Types.php create mode 100644 Bigtable/src/Admin/V2/AppProfile/DataBoostIsolationReadOnly.php create mode 100644 Bigtable/src/Admin/V2/AppProfile/DataBoostIsolationReadOnly/ComputeBillingOwner.php create mode 100644 Bigtable/src/Admin/V2/AuthorizedView.php create mode 100644 Bigtable/src/Admin/V2/AuthorizedView/FamilySubsets.php create mode 100644 Bigtable/src/Admin/V2/AuthorizedView/ResponseView.php create mode 100644 Bigtable/src/Admin/V2/AuthorizedView/SubsetView.php create mode 100644 Bigtable/src/Admin/V2/CreateAuthorizedViewMetadata.php create mode 100644 Bigtable/src/Admin/V2/CreateAuthorizedViewRequest.php create mode 100644 Bigtable/src/Admin/V2/DataBoostReadLocalWrites.php create mode 100644 Bigtable/src/Admin/V2/DeleteAuthorizedViewRequest.php create mode 100644 Bigtable/src/Admin/V2/GetAuthorizedViewRequest.php create mode 100644 Bigtable/src/Admin/V2/ListAuthorizedViewsRequest.php create mode 100644 Bigtable/src/Admin/V2/ListAuthorizedViewsResponse.php create mode 100644 Bigtable/src/Admin/V2/StandardReadRemoteWrites.php create mode 100644 Bigtable/src/Admin/V2/Table/AutomatedBackupPolicy.php create mode 100644 Bigtable/src/Admin/V2/Type.php create mode 100644 Bigtable/src/Admin/V2/Type/Aggregate.php create mode 100644 Bigtable/src/Admin/V2/Type/Aggregate/Sum.php create mode 100644 Bigtable/src/Admin/V2/Type/Bytes.php create mode 100644 Bigtable/src/Admin/V2/Type/Bytes/Encoding.php create mode 100644 Bigtable/src/Admin/V2/Type/Bytes/Encoding/Raw.php create mode 100644 Bigtable/src/Admin/V2/Type/Int64.php create mode 100644 Bigtable/src/Admin/V2/Type/Int64/Encoding.php create mode 100644 Bigtable/src/Admin/V2/Type/Int64/Encoding/BigEndianBytes.php create mode 100644 Bigtable/src/Admin/V2/UpdateAuthorizedViewMetadata.php create mode 100644 Bigtable/src/Admin/V2/UpdateAuthorizedViewRequest.php create mode 100644 Bigtable/src/V2/Mutation/AddToCell.php create mode 100644 Bigtable/src/V2/Value.php diff --git a/Bigtable/metadata/Admin/V2/BigtableTableAdmin.php b/Bigtable/metadata/Admin/V2/BigtableTableAdmin.php index 2019865274276e1f55a6ea2f5580a75adfc77fc6..979499d062a6aa9cfe426725348c324bf22ba963 100644 GIT binary patch delta 1929 zcma)7&rcIU6n5Gzu|o>&fU@oKqb$nLN@GD{5H(u}5(SAh{=!3D>;xOyZs~3zV!U|w z;`{+<)OaP-XuJ^5dO~m211284axaifQSYgq};pb697Ov_XT`a!CuDvNH(!8zT{N)*p!8EaPGn7UQTp95izb zEx>k~N{=rZhG~^}QpQ6)RiTlpGz(J{7-cxdGs{pFnrH)*(nbQS0Vp4ojGZ0CQ26Le zy2sV804kHT7Yl27>yeR5uH(e*BwmZ*l{_{rGzlBBdJbnS8PKxa(UD!v@lQL0hR82( z$5nd_>Vin$XNj*;ns_oHJ9waz2BK-$TmvYJ*3U#6v(rUci24n{c2R+I*wUGdXr5d@ z;Roj!L8}Nzwp*9a{{%2Fn=~zZ2J=W=&f9~~N$Ae%OE_*)t$1@TRw+Pj5c2Pqv5Ygk zFL&u+21-l|nGLon!YjRR=NyhN-?}1($Fr3cb2rYLiaLN&UyAY_ju{ zy_Ue}I{@V?xJH7C0vePudK%lO4EdBh?OdqR4x8(d+xbL&c8jl=ovo5z;0$KC1KPRl z8KSP~XxP_@WKNnt`H2ccQ2bl$JK6+dWeIPS^9<_us@ZuTBu7LnYZBcp+Sk zVQw_XYgZQS0N5h%CK_csNL~&|vR#wPngzJ^8DOvuP_nf;SJcY)4X^7G+OMm>wl1^{ zps&u)h+n^fy6&c&IjKcUf%J#IVnoFST>AbR~lT0Iy#7#Wqk zxrDLE38``^I{W(ugoe1rJ9+x}c>1}=`-l6v2E~W^1qZk~d%AhLx(F}`@p5r`_y>o? Y2RKFs3rI6MNpOk9V|C}|13Zc>04z{&5&!@I delta 32 ocmX@D@=$TZDJG_4(womPRk1U@VB74$wSaMQFwc$6T6~Hu0NF?j!vFvP diff --git a/Bigtable/metadata/Admin/V2/Table.php b/Bigtable/metadata/Admin/V2/Table.php index d433da322c08d6080e72f5dbca4b4fff2ecbb366..75bebeee9abedf00eb410ef93277a289e89d934f 100644 GIT binary patch delta 833 zcmZ`&-)qxQ6y8nJ+MISZy-wSvbj&)WI9Rdb7-J&sXsva)xlY-GETrwt45mq%ADdBz zFFuMe;@==X2vhpM_$ChKlTZ5-yh+uzGN10{JKy=vch0%@kg3IR;@Up+l-NIG&q{85vz$+H%yF~AJ z{ty0YB!mZVFPx(7YW5r(9Ya^ty~1e(l2rYfVW}@k_lZgla0)nG?vV_l4*5VPhMN$# z-L_2}X`eDO%pCGlk=fUiiHog}5@AVL{VSdBQ~`{gW?$i7*)qJkg$w{ z-z-WRD(pg13Cl>sUWUo>a@|jH;_82US)A}z(;dqbHNfMjk76@I4I=xp=8|AKbhAr= z>Yaa7$CK<8W*HS8L1K&8rlH#;9DW|MTea5a#=}-k@;}51c^)FwO6&fbz~C5g^~dY$ z0=x1F{j7XMu;8bKyf9e<@A#`iQE}w9M(on7@H{NZ6Dy|p2nbhtc;n&-35?j~D!6{1uUx@pfUtAPp%TQAPSR^0~?c21301rw!FLX6p@neI-PiQC!D?kofi z*FK9rgHJ%>jZfgUiSOXd?DmHs6zNST?RU<1zB%8Vjm_{Vgh!}FIgN;*F6y2laYRuV z1tM?)A9a&nk4DG|`XTdagb~`>M{o8I(Dv5e!9xj+gCugOiM$~2d|K@?Pmr!W5Vy~G z^|)3Qry-58CIsN5Pvej{6t&vcYbuCK1hHEhYg-xCZYr#OSgQj#K8a&=pg7<&Ao&TC zuFo743nJuKnZ+H(nP9|cpQQc<>JdMt5_!3{mvBe0fFlLi=MJqbqm)zCmcu~K+du;~ zZFL25e0z@z8gb&=TQqhe7K$Kh%Tm+ys2E7mb?Qp)e8S z`?qkta^oq0db8Qy2kjdpL-^sz)oev6ZTUXel(9Tj@#`f?0V#;Egy2vyKJf^9MO!KhTozbG6 YEDa-QB@M-~481Zxb!D1zXK)7a7fyvNNB{r; literal 0 HcmV?d00001 diff --git a/Bigtable/metadata/V2/Bigtable.php b/Bigtable/metadata/V2/Bigtable.php index 46871a7e8d4403c495628aef1896079dcc00a07e..1d67086c27bd722549a5db7261890f5ce37775bb 100644 GIT binary patch delta 1623 zcmeD3UKF{(g@vUjfJ^tiUzAyuni5}@ znOYv7mzbL>!KuKg!RciDz>)Enqb`^BWJUp5K1aC1Frd24jBISoEC(66L?$1U5Sc8; zDM7$U7J^1jW@HndT*&Fh)X6k?Cnq5%vJq#V99KHiMW)H^T-pTO$4ZoWo8NMsVPt7! z=8~A4CnGWWG(m3@4oQ%=H*4_LGP2BM;*y*!C@)Ebu|)e`X0su`9S8q=MJ^7f%=D7P zq?}Zt+su>e#KV{xnJ0f&&|{g!sAM^LowT8HQEFmJP=0x_6{A*Elv1dEnUQ`qTI!fA zD50vRj}QcIU6-FsX4=3wd7qTOW&-x~CFFt4U%r=|m&SSFvAjAUBQJXuXD zh-D6=k`>T_R??tgj8+Q672R2x-40Hzo#vH$=8 delta 390 zcmZ1!+2y^#g@xstBbVYtZ^g}-EUt`yls_@uWtzN7rG)7@<75R@Z$^*FxvCyWN?3L?aj8yTC8)ajk6H{f`)ejHvE=;R S$%Y)ln~Ss}7$=A7_yPbF9D>9E diff --git a/Bigtable/metadata/V2/Data.php b/Bigtable/metadata/V2/Data.php index eaa31e50f7461db573459e78d9e6951045bfa0a7..a2ec6ded5e7638d51a6a571eeb0f29a174d819f4 100644 GIT binary patch delta 310 zcmca6ds|_{3`V0E_W&o~)RM%M#FE4q_x$|yoYWY{g3K7V%+#C|r__wZvdsJ&g9$7EE0-n@=)2Ge$*nv4$n)l%@&^b8!|WmdBTYI1(HRj2b*13_@~T zA|Sz%%-q!ClEmDC_}t9oqWoeBPM|z9P#&l$Gp_`yi47v?#Ky&votc-inVb158`BQ9 z$xK|XVzyk|i76@ZCHe8msW~|ktU#sQMrxBca>=qfrlf@AZ+77FX5?JU$i)ffPS)d= zk~ZcNNY2kG&CQE1EKSVGOv_9yl3)UBl$`vLT~bs?hl>;LG6`mcjG&MP7i(r-L1~Eu M3qo{r7q<^H0A7e#cK`qY delta 46 zcmV+}0MY;3Al4nQm;sa10WSo=844YdOC7T#0we*mq672>0?7oEm diff --git a/Bigtable/metadata/V2/FeatureFlags.php b/Bigtable/metadata/V2/FeatureFlags.php index d8a9b49e8810..58d9e1e6bd5a 100644 --- a/Bigtable/metadata/V2/FeatureFlags.php +++ b/Bigtable/metadata/V2/FeatureFlags.php @@ -16,8 +16,8 @@ public static function initOnce() { } $pool->internalAddGeneratedFile( ' -½ -&google/bigtable/v2/feature_flags.protogoogle.bigtable.v2"¶ +â +&google/bigtable/v2/feature_flags.protogoogle.bigtable.v2"Û FeatureFlags reverse_scans ( mutate_rows_rate_limit ( @@ -25,7 +25,8 @@ public static function initOnce() { last_scanned_row_responses ( routing_cookie ( -retry_info (B½ +retry_info (# +client_side_metrics_enabled (B½ com.google.bigtable.v2BFeatureFlagsProtoPZ:google.golang.org/genproto/googleapis/bigtable/v2;bigtableªGoogle.Cloud.Bigtable.V2ÊGoogle\\Cloud\\Bigtable\\V2êGoogle::Cloud::Bigtable::V2bproto3' , true); diff --git a/Bigtable/samples/V2/BigtableClient/check_and_mutate_row.php b/Bigtable/samples/V2/BigtableClient/check_and_mutate_row.php index fb4975790576..ed92aa99764a 100644 --- a/Bigtable/samples/V2/BigtableClient/check_and_mutate_row.php +++ b/Bigtable/samples/V2/BigtableClient/check_and_mutate_row.php @@ -31,8 +31,10 @@ /** * Mutates a row atomically based on the output of a predicate Reader filter. * - * @param string $formattedTableName The unique name of the table to which the conditional mutation - * should be applied. Values are of the form + * @param string $formattedTableName Optional. The unique name of the table to which the conditional mutation + * should be applied. + * + * Values are of the form * `projects//instances//tables/`. Please see * {@see BigtableClient::tableName()} for help formatting this field. * @param string $rowKey The key of the row to which the conditional mutation should be diff --git a/Bigtable/samples/V2/BigtableClient/mutate_row.php b/Bigtable/samples/V2/BigtableClient/mutate_row.php index ed55ef62abc8..82463a5a0a50 100644 --- a/Bigtable/samples/V2/BigtableClient/mutate_row.php +++ b/Bigtable/samples/V2/BigtableClient/mutate_row.php @@ -33,8 +33,10 @@ * Mutates a row atomically. Cells already present in the row are left * unchanged unless explicitly changed by `mutation`. * - * @param string $formattedTableName The unique name of the table to which the mutation should be - * applied. Values are of the form + * @param string $formattedTableName Optional. The unique name of the table to which the mutation should be + * applied. + * + * Values are of the form * `projects//instances//tables/
`. Please see * {@see BigtableClient::tableName()} for help formatting this field. * @param string $rowKey The key of the row to which the mutation should be applied. diff --git a/Bigtable/samples/V2/BigtableClient/mutate_rows.php b/Bigtable/samples/V2/BigtableClient/mutate_rows.php index 2878c05d7275..8045a69af565 100644 --- a/Bigtable/samples/V2/BigtableClient/mutate_rows.php +++ b/Bigtable/samples/V2/BigtableClient/mutate_rows.php @@ -36,8 +36,11 @@ * atomically as in MutateRow, but the entire batch is not executed * atomically. * - * @param string $formattedTableName The unique name of the table to which the mutations should be - * applied. Please see + * @param string $formattedTableName Optional. The unique name of the table to which the mutations should be + * applied. + * + * Values are of the form + * `projects//instances//tables/
`. Please see * {@see BigtableClient::tableName()} for help formatting this field. */ function mutate_rows_sample(string $formattedTableName): void diff --git a/Bigtable/samples/V2/BigtableClient/read_modify_write_row.php b/Bigtable/samples/V2/BigtableClient/read_modify_write_row.php index 751582cb04eb..b744a5c8a7ef 100644 --- a/Bigtable/samples/V2/BigtableClient/read_modify_write_row.php +++ b/Bigtable/samples/V2/BigtableClient/read_modify_write_row.php @@ -36,8 +36,10 @@ * timestamp is the greater of the existing timestamp or the current server * time. The method returns the new contents of all modified cells. * - * @param string $formattedTableName The unique name of the table to which the read/modify/write rules - * should be applied. Values are of the form + * @param string $formattedTableName Optional. The unique name of the table to which the read/modify/write rules + * should be applied. + * + * Values are of the form * `projects//instances//tables/
`. Please see * {@see BigtableClient::tableName()} for help formatting this field. * @param string $rowKey The key of the row to which the read/modify/write rules should be diff --git a/Bigtable/samples/V2/BigtableClient/read_rows.php b/Bigtable/samples/V2/BigtableClient/read_rows.php index d0dd122b1458..d2a3d207af5d 100644 --- a/Bigtable/samples/V2/BigtableClient/read_rows.php +++ b/Bigtable/samples/V2/BigtableClient/read_rows.php @@ -36,7 +36,8 @@ * atomicity of each row will still be preserved. See the * ReadRowsResponse documentation for details. * - * @param string $formattedTableName The unique name of the table from which to read. + * @param string $formattedTableName Optional. The unique name of the table from which to read. + * * Values are of the form * `projects//instances//tables/
`. Please see * {@see BigtableClient::tableName()} for help formatting this field. diff --git a/Bigtable/samples/V2/BigtableClient/sample_row_keys.php b/Bigtable/samples/V2/BigtableClient/sample_row_keys.php index cc3efa77f103..5dc763092979 100644 --- a/Bigtable/samples/V2/BigtableClient/sample_row_keys.php +++ b/Bigtable/samples/V2/BigtableClient/sample_row_keys.php @@ -35,7 +35,8 @@ * which can be used to break up the data for distributed tasks like * mapreduces. * - * @param string $formattedTableName The unique name of the table from which to sample row keys. + * @param string $formattedTableName Optional. The unique name of the table from which to sample row keys. + * * Values are of the form * `projects//instances//tables/
`. Please see * {@see BigtableClient::tableName()} for help formatting this field. diff --git a/Bigtable/src/Admin/V2/AppProfile.php b/Bigtable/src/Admin/V2/AppProfile.php index 645c6ac2a02d..7dca81d1a909 100644 --- a/Bigtable/src/Admin/V2/AppProfile.php +++ b/Bigtable/src/Admin/V2/AppProfile.php @@ -76,6 +76,9 @@ class AppProfile extends \Google\Protobuf\Internal\Message * @type \Google\Cloud\Bigtable\Admin\V2\AppProfile\StandardIsolation $standard_isolation * The standard options used for isolating this app profile's traffic from * other use cases. + * @type \Google\Cloud\Bigtable\Admin\V2\AppProfile\DataBoostIsolationReadOnly $data_boost_isolation_read_only + * Specifies that this app profile is intended for read-only usage via the + * Data Boost feature. * } */ public function __construct($data = NULL) { @@ -312,6 +315,39 @@ public function setStandardIsolation($var) return $this; } + /** + * Specifies that this app profile is intended for read-only usage via the + * Data Boost feature. + * + * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly data_boost_isolation_read_only = 10; + * @return \Google\Cloud\Bigtable\Admin\V2\AppProfile\DataBoostIsolationReadOnly|null + */ + public function getDataBoostIsolationReadOnly() + { + return $this->readOneof(10); + } + + public function hasDataBoostIsolationReadOnly() + { + return $this->hasOneof(10); + } + + /** + * Specifies that this app profile is intended for read-only usage via the + * Data Boost feature. + * + * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly data_boost_isolation_read_only = 10; + * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile\DataBoostIsolationReadOnly $var + * @return $this + */ + public function setDataBoostIsolationReadOnly($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile\DataBoostIsolationReadOnly::class); + $this->writeOneof(10, $var); + + return $this; + } + /** * @return string */ diff --git a/Bigtable/src/Admin/V2/AppProfile/DataBoostIsolationReadOnly.php b/Bigtable/src/Admin/V2/AppProfile/DataBoostIsolationReadOnly.php new file mode 100644 index 000000000000..981244776615 --- /dev/null +++ b/Bigtable/src/Admin/V2/AppProfile/DataBoostIsolationReadOnly.php @@ -0,0 +1,90 @@ +google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly + */ +class DataBoostIsolationReadOnly extends \Google\Protobuf\Internal\Message +{ + /** + * The Compute Billing Owner for this Data Boost App Profile. + * + * Generated from protobuf field optional .google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner compute_billing_owner = 1; + */ + private $compute_billing_owner = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $compute_billing_owner + * The Compute Billing Owner for this Data Boost App Profile. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); + parent::__construct($data); + } + + /** + * The Compute Billing Owner for this Data Boost App Profile. + * + * Generated from protobuf field optional .google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner compute_billing_owner = 1; + * @return int + */ + public function getComputeBillingOwner() + { + return isset($this->compute_billing_owner) ? $this->compute_billing_owner : 0; + } + + public function hasComputeBillingOwner() + { + return isset($this->compute_billing_owner); + } + + public function clearComputeBillingOwner() + { + unset($this->compute_billing_owner); + } + + /** + * The Compute Billing Owner for this Data Boost App Profile. + * + * Generated from protobuf field optional .google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner compute_billing_owner = 1; + * @param int $var + * @return $this + */ + public function setComputeBillingOwner($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile\DataBoostIsolationReadOnly\ComputeBillingOwner::class); + $this->compute_billing_owner = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DataBoostIsolationReadOnly::class, \Google\Cloud\Bigtable\Admin\V2\AppProfile_DataBoostIsolationReadOnly::class); + diff --git a/Bigtable/src/Admin/V2/AppProfile/DataBoostIsolationReadOnly/ComputeBillingOwner.php b/Bigtable/src/Admin/V2/AppProfile/DataBoostIsolationReadOnly/ComputeBillingOwner.php new file mode 100644 index 000000000000..7da3c3942452 --- /dev/null +++ b/Bigtable/src/Admin/V2/AppProfile/DataBoostIsolationReadOnly/ComputeBillingOwner.php @@ -0,0 +1,60 @@ +google.bigtable.admin.v2.AppProfile.DataBoostIsolationReadOnly.ComputeBillingOwner + */ +class ComputeBillingOwner +{ + /** + * Unspecified value. + * + * Generated from protobuf enum COMPUTE_BILLING_OWNER_UNSPECIFIED = 0; + */ + const COMPUTE_BILLING_OWNER_UNSPECIFIED = 0; + /** + * The host Cloud Project containing the targeted Bigtable Instance / + * Table pays for compute. + * + * Generated from protobuf enum HOST_PAYS = 1; + */ + const HOST_PAYS = 1; + + private static $valueToName = [ + self::COMPUTE_BILLING_OWNER_UNSPECIFIED => 'COMPUTE_BILLING_OWNER_UNSPECIFIED', + self::HOST_PAYS => 'HOST_PAYS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ComputeBillingOwner::class, \Google\Cloud\Bigtable\Admin\V2\AppProfile_DataBoostIsolationReadOnly_ComputeBillingOwner::class); + diff --git a/Bigtable/src/Admin/V2/AuthorizedView.php b/Bigtable/src/Admin/V2/AuthorizedView.php new file mode 100644 index 000000000000..f891a683d9f6 --- /dev/null +++ b/Bigtable/src/Admin/V2/AuthorizedView.php @@ -0,0 +1,203 @@ +google.bigtable.admin.v2.AuthorizedView + */ +class AuthorizedView extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The name of this AuthorizedView. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + private $name = ''; + /** + * The etag for this AuthorizedView. + * If this is provided on update, it must match the server's etag. The server + * returns ABORTED error on a mismatched etag. + * + * Generated from protobuf field string etag = 3; + */ + private $etag = ''; + /** + * Set to true to make the AuthorizedView protected against deletion. + * The parent Table and containing Instance cannot be deleted if an + * AuthorizedView has this bit set. + * + * Generated from protobuf field bool deletion_protection = 4; + */ + private $deletion_protection = false; + protected $authorized_view; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The name of this AuthorizedView. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}` + * @type \Google\Cloud\Bigtable\Admin\V2\AuthorizedView\SubsetView $subset_view + * An AuthorizedView permitting access to an explicit subset of a Table. + * @type string $etag + * The etag for this AuthorizedView. + * If this is provided on update, it must match the server's etag. The server + * returns ABORTED error on a mismatched etag. + * @type bool $deletion_protection + * Set to true to make the AuthorizedView protected against deletion. + * The parent Table and containing Instance cannot be deleted if an + * AuthorizedView has this bit set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The name of this AuthorizedView. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}` + * + * 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 AuthorizedView. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}` + * + * 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; + } + + /** + * An AuthorizedView permitting access to an explicit subset of a Table. + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView.SubsetView subset_view = 2; + * @return \Google\Cloud\Bigtable\Admin\V2\AuthorizedView\SubsetView|null + */ + public function getSubsetView() + { + return $this->readOneof(2); + } + + public function hasSubsetView() + { + return $this->hasOneof(2); + } + + /** + * An AuthorizedView permitting access to an explicit subset of a Table. + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView.SubsetView subset_view = 2; + * @param \Google\Cloud\Bigtable\Admin\V2\AuthorizedView\SubsetView $var + * @return $this + */ + public function setSubsetView($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView\SubsetView::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The etag for this AuthorizedView. + * If this is provided on update, it must match the server's etag. The server + * returns ABORTED error on a mismatched etag. + * + * Generated from protobuf field string etag = 3; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * The etag for this AuthorizedView. + * If this is provided on update, it must match the server's etag. The server + * returns ABORTED error on a mismatched etag. + * + * Generated from protobuf field string etag = 3; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Set to true to make the AuthorizedView protected against deletion. + * The parent Table and containing Instance cannot be deleted if an + * AuthorizedView has this bit set. + * + * Generated from protobuf field bool deletion_protection = 4; + * @return bool + */ + public function getDeletionProtection() + { + return $this->deletion_protection; + } + + /** + * Set to true to make the AuthorizedView protected against deletion. + * The parent Table and containing Instance cannot be deleted if an + * AuthorizedView has this bit set. + * + * Generated from protobuf field bool deletion_protection = 4; + * @param bool $var + * @return $this + */ + public function setDeletionProtection($var) + { + GPBUtil::checkBool($var); + $this->deletion_protection = $var; + + return $this; + } + + /** + * @return string + */ + public function getAuthorizedView() + { + return $this->whichOneof("authorized_view"); + } + +} + diff --git a/Bigtable/src/Admin/V2/AuthorizedView/FamilySubsets.php b/Bigtable/src/Admin/V2/AuthorizedView/FamilySubsets.php new file mode 100644 index 000000000000..3a6359fca96d --- /dev/null +++ b/Bigtable/src/Admin/V2/AuthorizedView/FamilySubsets.php @@ -0,0 +1,120 @@ +google.bigtable.admin.v2.AuthorizedView.FamilySubsets + */ +class FamilySubsets extends \Google\Protobuf\Internal\Message +{ + /** + * Individual exact column qualifiers to be included in the AuthorizedView. + * + * Generated from protobuf field repeated bytes qualifiers = 1; + */ + private $qualifiers; + /** + * Prefixes for qualifiers to be included in the AuthorizedView. Every + * qualifier starting with one of these prefixes is included in the + * AuthorizedView. To provide access to all qualifiers, include the empty + * string as a prefix + * (""). + * + * Generated from protobuf field repeated bytes qualifier_prefixes = 2; + */ + private $qualifier_prefixes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $qualifiers + * Individual exact column qualifiers to be included in the AuthorizedView. + * @type array|\Google\Protobuf\Internal\RepeatedField $qualifier_prefixes + * Prefixes for qualifiers to be included in the AuthorizedView. Every + * qualifier starting with one of these prefixes is included in the + * AuthorizedView. To provide access to all qualifiers, include the empty + * string as a prefix + * (""). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); + parent::__construct($data); + } + + /** + * Individual exact column qualifiers to be included in the AuthorizedView. + * + * Generated from protobuf field repeated bytes qualifiers = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getQualifiers() + { + return $this->qualifiers; + } + + /** + * Individual exact column qualifiers to be included in the AuthorizedView. + * + * Generated from protobuf field repeated bytes qualifiers = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setQualifiers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES); + $this->qualifiers = $arr; + + return $this; + } + + /** + * Prefixes for qualifiers to be included in the AuthorizedView. Every + * qualifier starting with one of these prefixes is included in the + * AuthorizedView. To provide access to all qualifiers, include the empty + * string as a prefix + * (""). + * + * Generated from protobuf field repeated bytes qualifier_prefixes = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getQualifierPrefixes() + { + return $this->qualifier_prefixes; + } + + /** + * Prefixes for qualifiers to be included in the AuthorizedView. Every + * qualifier starting with one of these prefixes is included in the + * AuthorizedView. To provide access to all qualifiers, include the empty + * string as a prefix + * (""). + * + * Generated from protobuf field repeated bytes qualifier_prefixes = 2; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setQualifierPrefixes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES); + $this->qualifier_prefixes = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FamilySubsets::class, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView_FamilySubsets::class); + diff --git a/Bigtable/src/Admin/V2/AuthorizedView/ResponseView.php b/Bigtable/src/Admin/V2/AuthorizedView/ResponseView.php new file mode 100644 index 000000000000..de81a7c072d4 --- /dev/null +++ b/Bigtable/src/Admin/V2/AuthorizedView/ResponseView.php @@ -0,0 +1,72 @@ +google.bigtable.admin.v2.AuthorizedView.ResponseView + */ +class ResponseView +{ + /** + * Uses the default view for each method as documented in the request. + * + * Generated from protobuf enum RESPONSE_VIEW_UNSPECIFIED = 0; + */ + const RESPONSE_VIEW_UNSPECIFIED = 0; + /** + * Only populates `name`. + * + * Generated from protobuf enum NAME_ONLY = 1; + */ + const NAME_ONLY = 1; + /** + * Only populates the AuthorizedView's basic metadata. This includes: + * name, deletion_protection, etag. + * + * Generated from protobuf enum BASIC = 2; + */ + const BASIC = 2; + /** + * Populates every fields. + * + * Generated from protobuf enum FULL = 3; + */ + const FULL = 3; + + private static $valueToName = [ + self::RESPONSE_VIEW_UNSPECIFIED => 'RESPONSE_VIEW_UNSPECIFIED', + self::NAME_ONLY => 'NAME_ONLY', + self::BASIC => 'BASIC', + self::FULL => 'FULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ResponseView::class, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView_ResponseView::class); + diff --git a/Bigtable/src/Admin/V2/AuthorizedView/SubsetView.php b/Bigtable/src/Admin/V2/AuthorizedView/SubsetView.php new file mode 100644 index 000000000000..e20712a5b644 --- /dev/null +++ b/Bigtable/src/Admin/V2/AuthorizedView/SubsetView.php @@ -0,0 +1,112 @@ +google.bigtable.admin.v2.AuthorizedView.SubsetView + */ +class SubsetView extends \Google\Protobuf\Internal\Message +{ + /** + * Row prefixes to be included in the AuthorizedView. + * To provide access to all rows, include the empty string as a prefix (""). + * + * Generated from protobuf field repeated bytes row_prefixes = 1; + */ + private $row_prefixes; + /** + * Map from column family name to the columns in this family to be included + * in the AuthorizedView. + * + * Generated from protobuf field map family_subsets = 2; + */ + private $family_subsets; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $row_prefixes + * Row prefixes to be included in the AuthorizedView. + * To provide access to all rows, include the empty string as a prefix (""). + * @type array|\Google\Protobuf\Internal\MapField $family_subsets + * Map from column family name to the columns in this family to be included + * in the AuthorizedView. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); + parent::__construct($data); + } + + /** + * Row prefixes to be included in the AuthorizedView. + * To provide access to all rows, include the empty string as a prefix (""). + * + * Generated from protobuf field repeated bytes row_prefixes = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRowPrefixes() + { + return $this->row_prefixes; + } + + /** + * Row prefixes to be included in the AuthorizedView. + * To provide access to all rows, include the empty string as a prefix (""). + * + * Generated from protobuf field repeated bytes row_prefixes = 1; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRowPrefixes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES); + $this->row_prefixes = $arr; + + return $this; + } + + /** + * Map from column family name to the columns in this family to be included + * in the AuthorizedView. + * + * Generated from protobuf field map family_subsets = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getFamilySubsets() + { + return $this->family_subsets; + } + + /** + * Map from column family name to the columns in this family to be included + * in the AuthorizedView. + * + * Generated from protobuf field map family_subsets = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setFamilySubsets($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView\FamilySubsets::class); + $this->family_subsets = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SubsetView::class, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView_SubsetView::class); + diff --git a/Bigtable/src/Admin/V2/CheckConsistencyRequest.php b/Bigtable/src/Admin/V2/CheckConsistencyRequest.php index 5e042b56f355..1a96e4a2a4af 100644 --- a/Bigtable/src/Admin/V2/CheckConsistencyRequest.php +++ b/Bigtable/src/Admin/V2/CheckConsistencyRequest.php @@ -30,6 +30,7 @@ class CheckConsistencyRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field string consistency_token = 2 [(.google.api.field_behavior) = REQUIRED]; */ private $consistency_token = ''; + protected $mode; /** * @param string $name Required. The unique name of the Table for which to check replication @@ -61,6 +62,14 @@ public static function build(string $name, string $consistencyToken): self * `projects/{project}/instances/{instance}/tables/{table}`. * @type string $consistency_token * Required. The token created using GenerateConsistencyToken for the Table. + * @type \Google\Cloud\Bigtable\Admin\V2\StandardReadRemoteWrites $standard_read_remote_writes + * Checks that reads using an app profile with `StandardIsolation` can + * see all writes committed before the token was created, even if the + * read and write target different clusters. + * @type \Google\Cloud\Bigtable\Admin\V2\DataBoostReadLocalWrites $data_boost_read_local_writes + * Checks that reads using an app profile with `DataBoostIsolationReadOnly` + * can see all writes committed before the token was created, but only if + * the read and write target the same cluster. * } */ public function __construct($data = NULL) { @@ -124,5 +133,83 @@ public function setConsistencyToken($var) return $this; } + /** + * Checks that reads using an app profile with `StandardIsolation` can + * see all writes committed before the token was created, even if the + * read and write target different clusters. + * + * Generated from protobuf field .google.bigtable.admin.v2.StandardReadRemoteWrites standard_read_remote_writes = 3; + * @return \Google\Cloud\Bigtable\Admin\V2\StandardReadRemoteWrites|null + */ + public function getStandardReadRemoteWrites() + { + return $this->readOneof(3); + } + + public function hasStandardReadRemoteWrites() + { + return $this->hasOneof(3); + } + + /** + * Checks that reads using an app profile with `StandardIsolation` can + * see all writes committed before the token was created, even if the + * read and write target different clusters. + * + * Generated from protobuf field .google.bigtable.admin.v2.StandardReadRemoteWrites standard_read_remote_writes = 3; + * @param \Google\Cloud\Bigtable\Admin\V2\StandardReadRemoteWrites $var + * @return $this + */ + public function setStandardReadRemoteWrites($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\StandardReadRemoteWrites::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Checks that reads using an app profile with `DataBoostIsolationReadOnly` + * can see all writes committed before the token was created, but only if + * the read and write target the same cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.DataBoostReadLocalWrites data_boost_read_local_writes = 4; + * @return \Google\Cloud\Bigtable\Admin\V2\DataBoostReadLocalWrites|null + */ + public function getDataBoostReadLocalWrites() + { + return $this->readOneof(4); + } + + public function hasDataBoostReadLocalWrites() + { + return $this->hasOneof(4); + } + + /** + * Checks that reads using an app profile with `DataBoostIsolationReadOnly` + * can see all writes committed before the token was created, but only if + * the read and write target the same cluster. + * + * Generated from protobuf field .google.bigtable.admin.v2.DataBoostReadLocalWrites data_boost_read_local_writes = 4; + * @param \Google\Cloud\Bigtable\Admin\V2\DataBoostReadLocalWrites $var + * @return $this + */ + public function setDataBoostReadLocalWrites($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\DataBoostReadLocalWrites::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getMode() + { + return $this->whichOneof("mode"); + } + } diff --git a/Bigtable/src/Admin/V2/Client/BigtableTableAdminClient.php b/Bigtable/src/Admin/V2/Client/BigtableTableAdminClient.php index 3ab2c55688d5..2bad059c5935 100644 --- a/Bigtable/src/Admin/V2/Client/BigtableTableAdminClient.php +++ b/Bigtable/src/Admin/V2/Client/BigtableTableAdminClient.php @@ -35,23 +35,28 @@ use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; use Google\Auth\FetchAuthTokenInterface; +use Google\Cloud\Bigtable\Admin\V2\AuthorizedView; use Google\Cloud\Bigtable\Admin\V2\Backup; use Google\Cloud\Bigtable\Admin\V2\CheckConsistencyRequest; use Google\Cloud\Bigtable\Admin\V2\CheckConsistencyResponse; use Google\Cloud\Bigtable\Admin\V2\CopyBackupRequest; +use Google\Cloud\Bigtable\Admin\V2\CreateAuthorizedViewRequest; use Google\Cloud\Bigtable\Admin\V2\CreateBackupMetadata; use Google\Cloud\Bigtable\Admin\V2\CreateBackupRequest; use Google\Cloud\Bigtable\Admin\V2\CreateTableFromSnapshotRequest; use Google\Cloud\Bigtable\Admin\V2\CreateTableRequest; +use Google\Cloud\Bigtable\Admin\V2\DeleteAuthorizedViewRequest; use Google\Cloud\Bigtable\Admin\V2\DeleteBackupRequest; use Google\Cloud\Bigtable\Admin\V2\DeleteSnapshotRequest; use Google\Cloud\Bigtable\Admin\V2\DeleteTableRequest; use Google\Cloud\Bigtable\Admin\V2\DropRowRangeRequest; use Google\Cloud\Bigtable\Admin\V2\GenerateConsistencyTokenRequest; use Google\Cloud\Bigtable\Admin\V2\GenerateConsistencyTokenResponse; +use Google\Cloud\Bigtable\Admin\V2\GetAuthorizedViewRequest; use Google\Cloud\Bigtable\Admin\V2\GetBackupRequest; use Google\Cloud\Bigtable\Admin\V2\GetSnapshotRequest; use Google\Cloud\Bigtable\Admin\V2\GetTableRequest; +use Google\Cloud\Bigtable\Admin\V2\ListAuthorizedViewsRequest; use Google\Cloud\Bigtable\Admin\V2\ListBackupsRequest; use Google\Cloud\Bigtable\Admin\V2\ListSnapshotsRequest; use Google\Cloud\Bigtable\Admin\V2\ListTablesRequest; @@ -62,6 +67,7 @@ use Google\Cloud\Bigtable\Admin\V2\SnapshotTableRequest; use Google\Cloud\Bigtable\Admin\V2\Table; use Google\Cloud\Bigtable\Admin\V2\UndeleteTableRequest; +use Google\Cloud\Bigtable\Admin\V2\UpdateAuthorizedViewRequest; use Google\Cloud\Bigtable\Admin\V2\UpdateBackupRequest; use Google\Cloud\Bigtable\Admin\V2\UpdateTableRequest; use Google\Cloud\Iam\V1\GetIamPolicyRequest; @@ -89,18 +95,22 @@ * * @method PromiseInterface checkConsistencyAsync(CheckConsistencyRequest $request, array $optionalArgs = []) * @method PromiseInterface copyBackupAsync(CopyBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface createAuthorizedViewAsync(CreateAuthorizedViewRequest $request, array $optionalArgs = []) * @method PromiseInterface createBackupAsync(CreateBackupRequest $request, array $optionalArgs = []) * @method PromiseInterface createTableAsync(CreateTableRequest $request, array $optionalArgs = []) * @method PromiseInterface createTableFromSnapshotAsync(CreateTableFromSnapshotRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAuthorizedViewAsync(DeleteAuthorizedViewRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteBackupAsync(DeleteBackupRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteSnapshotAsync(DeleteSnapshotRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteTableAsync(DeleteTableRequest $request, array $optionalArgs = []) * @method PromiseInterface dropRowRangeAsync(DropRowRangeRequest $request, array $optionalArgs = []) * @method PromiseInterface generateConsistencyTokenAsync(GenerateConsistencyTokenRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAuthorizedViewAsync(GetAuthorizedViewRequest $request, array $optionalArgs = []) * @method PromiseInterface getBackupAsync(GetBackupRequest $request, array $optionalArgs = []) * @method PromiseInterface getIamPolicyAsync(GetIamPolicyRequest $request, array $optionalArgs = []) * @method PromiseInterface getSnapshotAsync(GetSnapshotRequest $request, array $optionalArgs = []) * @method PromiseInterface getTableAsync(GetTableRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAuthorizedViewsAsync(ListAuthorizedViewsRequest $request, array $optionalArgs = []) * @method PromiseInterface listBackupsAsync(ListBackupsRequest $request, array $optionalArgs = []) * @method PromiseInterface listSnapshotsAsync(ListSnapshotsRequest $request, array $optionalArgs = []) * @method PromiseInterface listTablesAsync(ListTablesRequest $request, array $optionalArgs = []) @@ -110,6 +120,7 @@ * @method PromiseInterface snapshotTableAsync(SnapshotTableRequest $request, array $optionalArgs = []) * @method PromiseInterface testIamPermissionsAsync(TestIamPermissionsRequest $request, array $optionalArgs = []) * @method PromiseInterface undeleteTableAsync(UndeleteTableRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAuthorizedViewAsync(UpdateAuthorizedViewRequest $request, array $optionalArgs = []) * @method PromiseInterface updateBackupAsync(UpdateBackupRequest $request, array $optionalArgs = []) * @method PromiseInterface updateTableAsync(UpdateTableRequest $request, array $optionalArgs = []) */ @@ -197,6 +208,27 @@ public function resumeOperation($operationName, $methodName = null) return $operation; } + /** + * Formats a string containing the fully-qualified path to represent a + * authorized_view resource. + * + * @param string $project + * @param string $instance + * @param string $table + * @param string $authorizedView + * + * @return string The formatted authorized_view resource. + */ + public static function authorizedViewName(string $project, string $instance, string $table, string $authorizedView): string + { + return self::getPathTemplate('authorizedView')->render([ + 'project' => $project, + 'instance' => $instance, + 'table' => $table, + 'authorized_view' => $authorizedView, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a backup * resource. @@ -321,6 +353,7 @@ public static function tableName(string $project, string $instance, string $tabl * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: * Template: Pattern + * - authorizedView: projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view} * - backup: projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup} * - cluster: projects/{project}/instances/{instance}/clusters/{cluster} * - cryptoKeyVersion: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version} @@ -473,6 +506,33 @@ public function copyBackup(CopyBackupRequest $request, array $callOptions = []): return $this->startApiCall('CopyBackup', $request, $callOptions)->wait(); } + /** + * Creates a new AuthorizedView in a table. + * + * The async variant is + * {@see BigtableTableAdminClient::createAuthorizedViewAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/create_authorized_view.php + * + * @param CreateAuthorizedViewRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createAuthorizedView(CreateAuthorizedViewRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateAuthorizedView', $request, $callOptions)->wait(); + } + /** * Starts creating a new Cloud Bigtable Backup. The returned backup * [long-running operation][google.longrunning.Operation] can be used to @@ -568,6 +628,31 @@ public function createTableFromSnapshot(CreateTableFromSnapshotRequest $request, return $this->startApiCall('CreateTableFromSnapshot', $request, $callOptions)->wait(); } + /** + * Permanently deletes a specified AuthorizedView. + * + * The async variant is + * {@see BigtableTableAdminClient::deleteAuthorizedViewAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/delete_authorized_view.php + * + * @param DeleteAuthorizedViewRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteAuthorizedView(DeleteAuthorizedViewRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteAuthorizedView', $request, $callOptions)->wait(); + } + /** * Deletes a pending or completed Cloud Bigtable backup. * @@ -702,6 +787,32 @@ public function generateConsistencyToken(GenerateConsistencyTokenRequest $reques return $this->startApiCall('GenerateConsistencyToken', $request, $callOptions)->wait(); } + /** + * Gets information from a specified AuthorizedView. + * + * The async variant is {@see BigtableTableAdminClient::getAuthorizedViewAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/get_authorized_view.php + * + * @param GetAuthorizedViewRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return AuthorizedView + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAuthorizedView(GetAuthorizedViewRequest $request, array $callOptions = []): AuthorizedView + { + return $this->startApiCall('GetAuthorizedView', $request, $callOptions)->wait(); + } + /** * Gets metadata on a pending or completed Cloud Bigtable Backup. * @@ -814,6 +925,33 @@ public function getTable(GetTableRequest $request, array $callOptions = []): Tab return $this->startApiCall('GetTable', $request, $callOptions)->wait(); } + /** + * Lists all AuthorizedViews from a specific table. + * + * The async variant is {@see BigtableTableAdminClient::listAuthorizedViewsAsync()} + * . + * + * @example samples/V2/BigtableTableAdminClient/list_authorized_views.php + * + * @param ListAuthorizedViewsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listAuthorizedViews(ListAuthorizedViewsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAuthorizedViews', $request, $callOptions); + } + /** * Lists Cloud Bigtable backups. Returns both completed and pending * backups. @@ -1075,6 +1213,33 @@ public function undeleteTable(UndeleteTableRequest $request, array $callOptions return $this->startApiCall('UndeleteTable', $request, $callOptions)->wait(); } + /** + * Updates an AuthorizedView in a table. + * + * The async variant is + * {@see BigtableTableAdminClient::updateAuthorizedViewAsync()} . + * + * @example samples/V2/BigtableTableAdminClient/update_authorized_view.php + * + * @param UpdateAuthorizedViewRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateAuthorizedView(UpdateAuthorizedViewRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateAuthorizedView', $request, $callOptions)->wait(); + } + /** * Updates a pending or completed Cloud Bigtable Backup. * diff --git a/Bigtable/src/Admin/V2/ColumnFamily.php b/Bigtable/src/Admin/V2/ColumnFamily.php index 01a5ddd98e54..a4a7bcdb8539 100644 --- a/Bigtable/src/Admin/V2/ColumnFamily.php +++ b/Bigtable/src/Admin/V2/ColumnFamily.php @@ -25,6 +25,17 @@ class ColumnFamily extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.bigtable.admin.v2.GcRule gc_rule = 1; */ private $gc_rule = null; + /** + * The type of data stored in each of this family's cell values, including its + * full encoding. If omitted, the family only serves raw untyped bytes. + * For now, only the `Aggregate` type is supported. + * `Aggregate` can only be set at family creation and is immutable afterwards. + * If `value_type` is `Aggregate`, written data must be compatible with: + * * `value_type.input_type` for `AddInput` mutations + * + * Generated from protobuf field .google.bigtable.admin.v2.Type value_type = 3; + */ + private $value_type = null; /** * Constructor. @@ -38,6 +49,13 @@ class ColumnFamily extends \Google\Protobuf\Internal\Message * NOTE: Garbage collection executes opportunistically in the background, and * so it's possible for reads to return a cell even if it matches the active * GC expression for its family. + * @type \Google\Cloud\Bigtable\Admin\V2\Type $value_type + * The type of data stored in each of this family's cell values, including its + * full encoding. If omitted, the family only serves raw untyped bytes. + * For now, only the `Aggregate` type is supported. + * `Aggregate` can only be set at family creation and is immutable afterwards. + * If `value_type` is `Aggregate`, written data must be compatible with: + * * `value_type.input_type` for `AddInput` mutations * } */ public function __construct($data = NULL) { @@ -89,5 +107,51 @@ public function setGcRule($var) return $this; } + /** + * The type of data stored in each of this family's cell values, including its + * full encoding. If omitted, the family only serves raw untyped bytes. + * For now, only the `Aggregate` type is supported. + * `Aggregate` can only be set at family creation and is immutable afterwards. + * If `value_type` is `Aggregate`, written data must be compatible with: + * * `value_type.input_type` for `AddInput` mutations + * + * Generated from protobuf field .google.bigtable.admin.v2.Type value_type = 3; + * @return \Google\Cloud\Bigtable\Admin\V2\Type|null + */ + public function getValueType() + { + return $this->value_type; + } + + public function hasValueType() + { + return isset($this->value_type); + } + + public function clearValueType() + { + unset($this->value_type); + } + + /** + * The type of data stored in each of this family's cell values, including its + * full encoding. If omitted, the family only serves raw untyped bytes. + * For now, only the `Aggregate` type is supported. + * `Aggregate` can only be set at family creation and is immutable afterwards. + * If `value_type` is `Aggregate`, written data must be compatible with: + * * `value_type.input_type` for `AddInput` mutations + * + * Generated from protobuf field .google.bigtable.admin.v2.Type value_type = 3; + * @param \Google\Cloud\Bigtable\Admin\V2\Type $var + * @return $this + */ + public function setValueType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type::class); + $this->value_type = $var; + + return $this; + } + } diff --git a/Bigtable/src/Admin/V2/CreateAuthorizedViewMetadata.php b/Bigtable/src/Admin/V2/CreateAuthorizedViewMetadata.php new file mode 100644 index 000000000000..d2a0d15a4087 --- /dev/null +++ b/Bigtable/src/Admin/V2/CreateAuthorizedViewMetadata.php @@ -0,0 +1,165 @@ +google.bigtable.admin.v2.CreateAuthorizedViewMetadata + */ +class CreateAuthorizedViewMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The request that prompted the initiation of this CreateInstance operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.CreateAuthorizedViewRequest original_request = 1; + */ + private $original_request = null; + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + */ + private $request_time = null; + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + */ + private $finish_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\CreateAuthorizedViewRequest $original_request + * The request that prompted the initiation of this CreateInstance operation. + * @type \Google\Protobuf\Timestamp $request_time + * The time at which the original request was received. + * @type \Google\Protobuf\Timestamp $finish_time + * The time at which the operation failed or was completed successfully. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The request that prompted the initiation of this CreateInstance operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.CreateAuthorizedViewRequest original_request = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\CreateAuthorizedViewRequest|null + */ + public function getOriginalRequest() + { + return $this->original_request; + } + + public function hasOriginalRequest() + { + return isset($this->original_request); + } + + public function clearOriginalRequest() + { + unset($this->original_request); + } + + /** + * The request that prompted the initiation of this CreateInstance operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.CreateAuthorizedViewRequest original_request = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\CreateAuthorizedViewRequest $var + * @return $this + */ + public function setOriginalRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\CreateAuthorizedViewRequest::class); + $this->original_request = $var; + + return $this; + } + + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRequestTime() + { + return $this->request_time; + } + + public function hasRequestTime() + { + return isset($this->request_time); + } + + public function clearRequestTime() + { + unset($this->request_time); + } + + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRequestTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->request_time = $var; + + return $this; + } + + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getFinishTime() + { + return $this->finish_time; + } + + public function hasFinishTime() + { + return isset($this->finish_time); + } + + public function clearFinishTime() + { + unset($this->finish_time); + } + + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setFinishTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->finish_time = $var; + + return $this; + } + +} + diff --git a/Bigtable/src/Admin/V2/CreateAuthorizedViewRequest.php b/Bigtable/src/Admin/V2/CreateAuthorizedViewRequest.php new file mode 100644 index 000000000000..e3971ef2ea32 --- /dev/null +++ b/Bigtable/src/Admin/V2/CreateAuthorizedViewRequest.php @@ -0,0 +1,189 @@ +google.bigtable.admin.v2.CreateAuthorizedViewRequest + */ +class CreateAuthorizedViewRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. This is the name of the table the AuthorizedView belongs to. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $parent = ''; + /** + * Required. The id of the AuthorizedView to create. This AuthorizedView must + * not already exist. The `authorized_view_id` appended to `parent` forms the + * full AuthorizedView name of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`. + * + * Generated from protobuf field string authorized_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $authorized_view_id = ''; + /** + * Required. The AuthorizedView to create. + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView authorized_view = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + private $authorized_view = null; + + /** + * @param string $parent Required. This is the name of the table the AuthorizedView belongs to. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. Please see + * {@see BigtableTableAdminClient::tableName()} for help formatting this field. + * @param \Google\Cloud\Bigtable\Admin\V2\AuthorizedView $authorizedView Required. The AuthorizedView to create. + * @param string $authorizedViewId Required. The id of the AuthorizedView to create. This AuthorizedView must + * not already exist. The `authorized_view_id` appended to `parent` forms the + * full AuthorizedView name of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`. + * + * @return \Google\Cloud\Bigtable\Admin\V2\CreateAuthorizedViewRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView $authorizedView, string $authorizedViewId): self + { + return (new self()) + ->setParent($parent) + ->setAuthorizedView($authorizedView) + ->setAuthorizedViewId($authorizedViewId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. This is the name of the table the AuthorizedView belongs to. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @type string $authorized_view_id + * Required. The id of the AuthorizedView to create. This AuthorizedView must + * not already exist. The `authorized_view_id` appended to `parent` forms the + * full AuthorizedView name of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`. + * @type \Google\Cloud\Bigtable\Admin\V2\AuthorizedView $authorized_view + * Required. The AuthorizedView to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. This is the name of the table the AuthorizedView belongs to. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. This is the name of the table the AuthorizedView belongs to. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The id of the AuthorizedView to create. This AuthorizedView must + * not already exist. The `authorized_view_id` appended to `parent` forms the + * full AuthorizedView name of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`. + * + * Generated from protobuf field string authorized_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAuthorizedViewId() + { + return $this->authorized_view_id; + } + + /** + * Required. The id of the AuthorizedView to create. This AuthorizedView must + * not already exist. The `authorized_view_id` appended to `parent` forms the + * full AuthorizedView name of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`. + * + * Generated from protobuf field string authorized_view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAuthorizedViewId($var) + { + GPBUtil::checkString($var, True); + $this->authorized_view_id = $var; + + return $this; + } + + /** + * Required. The AuthorizedView to create. + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView authorized_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Bigtable\Admin\V2\AuthorizedView|null + */ + public function getAuthorizedView() + { + return $this->authorized_view; + } + + public function hasAuthorizedView() + { + return isset($this->authorized_view); + } + + public function clearAuthorizedView() + { + unset($this->authorized_view); + } + + /** + * Required. The AuthorizedView to create. + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView authorized_view = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Bigtable\Admin\V2\AuthorizedView $var + * @return $this + */ + public function setAuthorizedView($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView::class); + $this->authorized_view = $var; + + return $this; + } + +} + diff --git a/Bigtable/src/Admin/V2/DataBoostReadLocalWrites.php b/Bigtable/src/Admin/V2/DataBoostReadLocalWrites.php new file mode 100644 index 000000000000..6d8e2927312c --- /dev/null +++ b/Bigtable/src/Admin/V2/DataBoostReadLocalWrites.php @@ -0,0 +1,34 @@ +google.bigtable.admin.v2.DataBoostReadLocalWrites + */ +class DataBoostReadLocalWrites extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + +} + diff --git a/Bigtable/src/Admin/V2/DeleteAuthorizedViewRequest.php b/Bigtable/src/Admin/V2/DeleteAuthorizedViewRequest.php new file mode 100644 index 000000000000..38e240c2b038 --- /dev/null +++ b/Bigtable/src/Admin/V2/DeleteAuthorizedViewRequest.php @@ -0,0 +1,138 @@ +google.bigtable.admin.v2.DeleteAuthorizedViewRequest + */ +class DeleteAuthorizedViewRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the AuthorizedView to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $name = ''; + /** + * Optional. The current etag of the AuthorizedView. + * If an etag is provided and does not match the current etag of the + * AuthorizedView, deletion will be blocked and an ABORTED error will be + * returned. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $etag = ''; + + /** + * @param string $name Required. The unique name of the AuthorizedView to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. Please see + * {@see BigtableTableAdminClient::authorizedViewName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\DeleteAuthorizedViewRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The unique name of the AuthorizedView to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + * @type string $etag + * Optional. The current etag of the AuthorizedView. + * If an etag is provided and does not match the current etag of the + * AuthorizedView, deletion will be blocked and an ABORTED error will be + * returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the AuthorizedView to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique name of the AuthorizedView to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The current etag of the AuthorizedView. + * If an etag is provided and does not match the current etag of the + * AuthorizedView, deletion will be blocked and an ABORTED error will be + * returned. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * Optional. The current etag of the AuthorizedView. + * If an etag is provided and does not match the current etag of the + * AuthorizedView, deletion will be blocked and an ABORTED error will be + * returned. + * + * Generated from protobuf field string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/Bigtable/src/Admin/V2/Gapic/BigtableTableAdminGapicClient.php b/Bigtable/src/Admin/V2/Gapic/BigtableTableAdminGapicClient.php index b146fe6568b7..f109aeeae093 100644 --- a/Bigtable/src/Admin/V2/Gapic/BigtableTableAdminGapicClient.php +++ b/Bigtable/src/Admin/V2/Gapic/BigtableTableAdminGapicClient.php @@ -35,24 +35,31 @@ use Google\ApiCore\Transport\TransportInterface; use Google\ApiCore\ValidationException; use Google\Auth\FetchAuthTokenInterface; +use Google\Cloud\Bigtable\Admin\V2\AuthorizedView; use Google\Cloud\Bigtable\Admin\V2\Backup; use Google\Cloud\Bigtable\Admin\V2\CheckConsistencyRequest; use Google\Cloud\Bigtable\Admin\V2\CheckConsistencyResponse; use Google\Cloud\Bigtable\Admin\V2\CopyBackupRequest; +use Google\Cloud\Bigtable\Admin\V2\CreateAuthorizedViewRequest; use Google\Cloud\Bigtable\Admin\V2\CreateBackupMetadata; use Google\Cloud\Bigtable\Admin\V2\CreateBackupRequest; use Google\Cloud\Bigtable\Admin\V2\CreateTableFromSnapshotRequest; use Google\Cloud\Bigtable\Admin\V2\CreateTableRequest; use Google\Cloud\Bigtable\Admin\V2\CreateTableRequest\Split; +use Google\Cloud\Bigtable\Admin\V2\DataBoostReadLocalWrites; +use Google\Cloud\Bigtable\Admin\V2\DeleteAuthorizedViewRequest; use Google\Cloud\Bigtable\Admin\V2\DeleteBackupRequest; use Google\Cloud\Bigtable\Admin\V2\DeleteSnapshotRequest; use Google\Cloud\Bigtable\Admin\V2\DeleteTableRequest; use Google\Cloud\Bigtable\Admin\V2\DropRowRangeRequest; use Google\Cloud\Bigtable\Admin\V2\GenerateConsistencyTokenRequest; use Google\Cloud\Bigtable\Admin\V2\GenerateConsistencyTokenResponse; +use Google\Cloud\Bigtable\Admin\V2\GetAuthorizedViewRequest; use Google\Cloud\Bigtable\Admin\V2\GetBackupRequest; use Google\Cloud\Bigtable\Admin\V2\GetSnapshotRequest; use Google\Cloud\Bigtable\Admin\V2\GetTableRequest; +use Google\Cloud\Bigtable\Admin\V2\ListAuthorizedViewsRequest; +use Google\Cloud\Bigtable\Admin\V2\ListAuthorizedViewsResponse; use Google\Cloud\Bigtable\Admin\V2\ListBackupsRequest; use Google\Cloud\Bigtable\Admin\V2\ListBackupsResponse; use Google\Cloud\Bigtable\Admin\V2\ListSnapshotsRequest; @@ -65,9 +72,11 @@ use Google\Cloud\Bigtable\Admin\V2\RestoreTableRequest; use Google\Cloud\Bigtable\Admin\V2\Snapshot; use Google\Cloud\Bigtable\Admin\V2\SnapshotTableRequest; +use Google\Cloud\Bigtable\Admin\V2\StandardReadRemoteWrites; use Google\Cloud\Bigtable\Admin\V2\Table; use Google\Cloud\Bigtable\Admin\V2\Table\View; use Google\Cloud\Bigtable\Admin\V2\UndeleteTableRequest; +use Google\Cloud\Bigtable\Admin\V2\UpdateAuthorizedViewRequest; use Google\Cloud\Bigtable\Admin\V2\UpdateBackupRequest; use Google\Cloud\Bigtable\Admin\V2\UpdateTableRequest; use Google\Cloud\Iam\V1\GetIamPolicyRequest; @@ -143,6 +152,8 @@ class BigtableTableAdminGapicClient 'https://www.googleapis.com/auth/cloud-platform.read-only', ]; + private static $authorizedViewNameTemplate; + private static $backupNameTemplate; private static $clusterNameTemplate; @@ -178,6 +189,15 @@ private static function getClientDefaults() ]; } + private static function getAuthorizedViewNameTemplate() + { + if (self::$authorizedViewNameTemplate == null) { + self::$authorizedViewNameTemplate = new PathTemplate('projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}'); + } + + return self::$authorizedViewNameTemplate; + } + private static function getBackupNameTemplate() { if (self::$backupNameTemplate == null) { @@ -236,6 +256,7 @@ private static function getPathTemplateMap() { if (self::$pathTemplateMap == null) { self::$pathTemplateMap = [ + 'authorizedView' => self::getAuthorizedViewNameTemplate(), 'backup' => self::getBackupNameTemplate(), 'cluster' => self::getClusterNameTemplate(), 'cryptoKeyVersion' => self::getCryptoKeyVersionNameTemplate(), @@ -248,6 +269,27 @@ private static function getPathTemplateMap() return self::$pathTemplateMap; } + /** + * Formats a string containing the fully-qualified path to represent a + * authorized_view resource. + * + * @param string $project + * @param string $instance + * @param string $table + * @param string $authorizedView + * + * @return string The formatted authorized_view resource. + */ + public static function authorizedViewName($project, $instance, $table, $authorizedView) + { + return self::getAuthorizedViewNameTemplate()->render([ + 'project' => $project, + 'instance' => $instance, + 'table' => $table, + 'authorized_view' => $authorizedView, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a backup * resource. @@ -372,6 +414,7 @@ public static function tableName($project, $instance, $table) * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: * Template: Pattern + * - authorizedView: projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view} * - backup: projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup} * - cluster: projects/{project}/instances/{instance}/clusters/{cluster} * - cryptoKeyVersion: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version} @@ -528,6 +571,14 @@ public function __construct(array $options = []) * @param array $optionalArgs { * Optional. * + * @type StandardReadRemoteWrites $standardReadRemoteWrites + * Checks that reads using an app profile with `StandardIsolation` can + * see all writes committed before the token was created, even if the + * read and write target different clusters. + * @type DataBoostReadLocalWrites $dataBoostReadLocalWrites + * Checks that reads using an app profile with `DataBoostIsolationReadOnly` + * can see all writes committed before the token was created, but only if + * the read and write target the same cluster. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on @@ -545,6 +596,14 @@ public function checkConsistency($name, $consistencyToken, array $optionalArgs = $request->setName($name); $request->setConsistencyToken($consistencyToken); $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['standardReadRemoteWrites'])) { + $request->setStandardReadRemoteWrites($optionalArgs['standardReadRemoteWrites']); + } + + if (isset($optionalArgs['dataBoostReadLocalWrites'])) { + $request->setDataBoostReadLocalWrites($optionalArgs['dataBoostReadLocalWrites']); + } + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); return $this->startCall('CheckConsistency', CheckConsistencyResponse::class, $optionalArgs, $request)->wait(); @@ -641,6 +700,81 @@ public function copyBackup($parent, $backupId, $sourceBackup, $expireTime, array return $this->startOperationsCall('CopyBackup', $optionalArgs, $request, $this->getOperationsClient())->wait(); } + /** + * Creates a new AuthorizedView in a table. + * + * Sample code: + * ``` + * $bigtableTableAdminClient = new Google\Cloud\Bigtable\Admin\V2\BigtableTableAdminClient(); + * try { + * $formattedParent = $bigtableTableAdminClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + * $authorizedViewId = 'authorized_view_id'; + * $authorizedView = new AuthorizedView(); + * $operationResponse = $bigtableTableAdminClient->createAuthorizedView($formattedParent, $authorizedViewId, $authorizedView); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $bigtableTableAdminClient->createAuthorizedView($formattedParent, $authorizedViewId, $authorizedView); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $bigtableTableAdminClient->resumeOperation($operationName, 'createAuthorizedView'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $bigtableTableAdminClient->close(); + * } + * ``` + * + * @param string $parent Required. This is the name of the table the AuthorizedView belongs to. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @param string $authorizedViewId Required. The id of the AuthorizedView to create. This AuthorizedView must + * not already exist. The `authorized_view_id` appended to `parent` forms the + * full AuthorizedView name of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`. + * @param AuthorizedView $authorizedView Required. The AuthorizedView to create. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function createAuthorizedView($parent, $authorizedViewId, $authorizedView, array $optionalArgs = []) + { + $request = new CreateAuthorizedViewRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $request->setAuthorizedViewId($authorizedViewId); + $request->setAuthorizedView($authorizedView); + $requestParamHeaders['parent'] = $parent; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('CreateAuthorizedView', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + /** * Starts creating a new Cloud Bigtable Backup. The returned backup * [long-running operation][google.longrunning.Operation] can be used to @@ -878,6 +1012,54 @@ public function createTableFromSnapshot($parent, $tableId, $sourceSnapshot, arra return $this->startOperationsCall('CreateTableFromSnapshot', $optionalArgs, $request, $this->getOperationsClient())->wait(); } + /** + * Permanently deletes a specified AuthorizedView. + * + * Sample code: + * ``` + * $bigtableTableAdminClient = new Google\Cloud\Bigtable\Admin\V2\BigtableTableAdminClient(); + * try { + * $formattedName = $bigtableTableAdminClient->authorizedViewName('[PROJECT]', '[INSTANCE]', '[TABLE]', '[AUTHORIZED_VIEW]'); + * $bigtableTableAdminClient->deleteAuthorizedView($formattedName); + * } finally { + * $bigtableTableAdminClient->close(); + * } + * ``` + * + * @param string $name Required. The unique name of the AuthorizedView to be deleted. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + * @param array $optionalArgs { + * Optional. + * + * @type string $etag + * Optional. The current etag of the AuthorizedView. + * If an etag is provided and does not match the current etag of the + * AuthorizedView, deletion will be blocked and an ABORTED error will be + * returned. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException if the remote call fails + */ + public function deleteAuthorizedView($name, array $optionalArgs = []) + { + $request = new DeleteAuthorizedViewRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['etag'])) { + $request->setEtag($optionalArgs['etag']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('DeleteAuthorizedView', GPBEmpty::class, $optionalArgs, $request)->wait(); + } + /** * Deletes a pending or completed Cloud Bigtable backup. * @@ -1099,6 +1281,55 @@ public function generateConsistencyToken($name, array $optionalArgs = []) return $this->startCall('GenerateConsistencyToken', GenerateConsistencyTokenResponse::class, $optionalArgs, $request)->wait(); } + /** + * Gets information from a specified AuthorizedView. + * + * Sample code: + * ``` + * $bigtableTableAdminClient = new Google\Cloud\Bigtable\Admin\V2\BigtableTableAdminClient(); + * try { + * $formattedName = $bigtableTableAdminClient->authorizedViewName('[PROJECT]', '[INSTANCE]', '[TABLE]', '[AUTHORIZED_VIEW]'); + * $response = $bigtableTableAdminClient->getAuthorizedView($formattedName); + * } finally { + * $bigtableTableAdminClient->close(); + * } + * ``` + * + * @param string $name Required. The unique name of the requested AuthorizedView. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $view + * Optional. The resource_view to be applied to the returned AuthorizedView's + * fields. Default to BASIC. + * For allowed values, use constants defined on {@see \Google\Cloud\Bigtable\Admin\V2\AuthorizedView\ResponseView} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Bigtable\Admin\V2\AuthorizedView + * + * @throws ApiException if the remote call fails + */ + public function getAuthorizedView($name, array $optionalArgs = []) + { + $request = new GetAuthorizedViewRequest(); + $requestParamHeaders = []; + $request->setName($name); + $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['view'])) { + $request->setView($optionalArgs['view']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetAuthorizedView', AuthorizedView::class, $optionalArgs, $request)->wait(); + } + /** * Gets metadata on a pending or completed Cloud Bigtable Backup. * @@ -1285,6 +1516,84 @@ public function getTable($name, array $optionalArgs = []) return $this->startCall('GetTable', Table::class, $optionalArgs, $request)->wait(); } + /** + * Lists all AuthorizedViews from a specific table. + * + * Sample code: + * ``` + * $bigtableTableAdminClient = new Google\Cloud\Bigtable\Admin\V2\BigtableTableAdminClient(); + * try { + * $formattedParent = $bigtableTableAdminClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + * // Iterate over pages of elements + * $pagedResponse = $bigtableTableAdminClient->listAuthorizedViews($formattedParent); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $bigtableTableAdminClient->listAuthorizedViews($formattedParent); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $bigtableTableAdminClient->close(); + * } + * ``` + * + * @param string $parent Required. The unique name of the table for which AuthorizedViews should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @param array $optionalArgs { + * Optional. + * + * @type int $pageSize + * The maximum number of resources contained in the underlying API + * response. The API may return fewer values in a page, even if + * there are additional values to be retrieved. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type int $view + * Optional. The resource_view to be applied to the returned views' fields. + * Default to NAME_ONLY. + * For allowed values, use constants defined on {@see \Google\Cloud\Bigtable\Admin\V2\AuthorizedView\ResponseView} + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function listAuthorizedViews($parent, array $optionalArgs = []) + { + $request = new ListAuthorizedViewsRequest(); + $requestParamHeaders = []; + $request->setParent($parent); + $requestParamHeaders['parent'] = $parent; + if (isset($optionalArgs['pageSize'])) { + $request->setPageSize($optionalArgs['pageSize']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['view'])) { + $request->setView($optionalArgs['view']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('ListAuthorizedViews', $optionalArgs, ListAuthorizedViewsResponse::class, $request); + } + /** * Lists Cloud Bigtable backups. Returns both completed and pending * backups. @@ -1986,6 +2295,92 @@ public function undeleteTable($name, array $optionalArgs = []) return $this->startOperationsCall('UndeleteTable', $optionalArgs, $request, $this->getOperationsClient())->wait(); } + /** + * Updates an AuthorizedView in a table. + * + * Sample code: + * ``` + * $bigtableTableAdminClient = new Google\Cloud\Bigtable\Admin\V2\BigtableTableAdminClient(); + * try { + * $authorizedView = new AuthorizedView(); + * $operationResponse = $bigtableTableAdminClient->updateAuthorizedView($authorizedView); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * $result = $operationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $bigtableTableAdminClient->updateAuthorizedView($authorizedView); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $bigtableTableAdminClient->resumeOperation($operationName, 'updateAuthorizedView'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * $result = $newOperationResponse->getResult(); + * // doSomethingWith($result) + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $bigtableTableAdminClient->close(); + * } + * ``` + * + * @param AuthorizedView $authorizedView Required. The AuthorizedView to update. The `name` in `authorized_view` is + * used to identify the AuthorizedView. AuthorizedView name must in this + * format + * projects//instances//tables/
/authorizedViews/ + * @param array $optionalArgs { + * Optional. + * + * @type FieldMask $updateMask + * Optional. The list of fields to update. + * A mask specifying which fields in the AuthorizedView resource should be + * updated. This mask is relative to the AuthorizedView resource, not to the + * request message. A field will be overwritten if it is in the mask. If + * empty, all fields set in the request will be overwritten. A special value + * `*` means to overwrite all fields (including fields not set in the + * request). + * @type bool $ignoreWarnings + * Optional. If true, ignore the safety checks when updating the + * AuthorizedView. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function updateAuthorizedView($authorizedView, array $optionalArgs = []) + { + $request = new UpdateAuthorizedViewRequest(); + $requestParamHeaders = []; + $request->setAuthorizedView($authorizedView); + $requestParamHeaders['authorized_view.name'] = $authorizedView->getName(); + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + if (isset($optionalArgs['ignoreWarnings'])) { + $request->setIgnoreWarnings($optionalArgs['ignoreWarnings']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('UpdateAuthorizedView', $optionalArgs, $request, $this->getOperationsClient())->wait(); + } + /** * Updates a pending or completed Cloud Bigtable Backup. * diff --git a/Bigtable/src/Admin/V2/GetAuthorizedViewRequest.php b/Bigtable/src/Admin/V2/GetAuthorizedViewRequest.php new file mode 100644 index 000000000000..7e0db42b32bd --- /dev/null +++ b/Bigtable/src/Admin/V2/GetAuthorizedViewRequest.php @@ -0,0 +1,130 @@ +google.bigtable.admin.v2.GetAuthorizedViewRequest + */ +class GetAuthorizedViewRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the requested AuthorizedView. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $name = ''; + /** + * Optional. The resource_view to be applied to the returned AuthorizedView's + * fields. Default to BASIC. + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView.ResponseView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $view = 0; + + /** + * @param string $name Required. The unique name of the requested AuthorizedView. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. Please see + * {@see BigtableTableAdminClient::authorizedViewName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\GetAuthorizedViewRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The unique name of the requested AuthorizedView. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + * @type int $view + * Optional. The resource_view to be applied to the returned AuthorizedView's + * fields. Default to BASIC. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the requested AuthorizedView. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The unique name of the requested AuthorizedView. + * Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The resource_view to be applied to the returned AuthorizedView's + * fields. Default to BASIC. + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView.ResponseView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. The resource_view to be applied to the returned AuthorizedView's + * fields. Default to BASIC. + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView.ResponseView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView\ResponseView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/Bigtable/src/Admin/V2/ListAuthorizedViewsRequest.php b/Bigtable/src/Admin/V2/ListAuthorizedViewsRequest.php new file mode 100644 index 000000000000..02e566a938e8 --- /dev/null +++ b/Bigtable/src/Admin/V2/ListAuthorizedViewsRequest.php @@ -0,0 +1,222 @@ +google.bigtable.admin.v2.ListAuthorizedViewsRequest + */ +class ListAuthorizedViewsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The unique name of the table for which AuthorizedViews should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $parent = ''; + /** + * Optional. Maximum number of results per page. + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $page_size = 0; + /** + * Optional. The value of `next_page_token` returned by a previous call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $page_token = ''; + /** + * Optional. The resource_view to be applied to the returned views' fields. + * Default to NAME_ONLY. + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView.ResponseView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $view = 0; + + /** + * @param string $parent Required. The unique name of the table for which AuthorizedViews should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. Please see + * {@see BigtableTableAdminClient::tableName()} for help formatting this field. + * + * @return \Google\Cloud\Bigtable\Admin\V2\ListAuthorizedViewsRequest + * + * @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 unique name of the table for which AuthorizedViews should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * @type int $page_size + * Optional. Maximum number of results per page. + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * @type string $page_token + * Optional. The value of `next_page_token` returned by a previous call. + * @type int $view + * Optional. The resource_view to be applied to the returned views' fields. + * Default to NAME_ONLY. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The unique name of the table for which AuthorizedViews should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The unique name of the table for which AuthorizedViews should be + * listed. Values are of the form + * `projects/{project}/instances/{instance}/tables/{table}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 results per page. + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * + * 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 results per page. + * A page_size of zero lets the server choose the number of items to return. + * A page_size which is strictly positive will return at most that many items. + * A negative page_size will cause an error. + * Following the first request, subsequent paginated calls are not required + * to pass a page_size. If a page_size is set in subsequent calls, it must + * match the page_size given in the first request. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The value of `next_page_token` returned by a previous call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The value of `next_page_token` returned by a previous call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The resource_view to be applied to the returned views' fields. + * Default to NAME_ONLY. + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView.ResponseView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. The resource_view to be applied to the returned views' fields. + * Default to NAME_ONLY. + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView.ResponseView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView\ResponseView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/Bigtable/src/Admin/V2/ListAuthorizedViewsResponse.php b/Bigtable/src/Admin/V2/ListAuthorizedViewsResponse.php new file mode 100644 index 000000000000..e143146f2344 --- /dev/null +++ b/Bigtable/src/Admin/V2/ListAuthorizedViewsResponse.php @@ -0,0 +1,110 @@ +google.bigtable.admin.v2.ListAuthorizedViewsResponse + */ +class ListAuthorizedViewsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The AuthorizedViews present in the requested table. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.AuthorizedView authorized_views = 1; + */ + private $authorized_views; + /** + * Set if not all tables could be returned in a single response. + * Pass this value to `page_token` in another request to get the next + * page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + private $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Bigtable\Admin\V2\AuthorizedView>|\Google\Protobuf\Internal\RepeatedField $authorized_views + * The AuthorizedViews present in the requested table. + * @type string $next_page_token + * Set if not all tables could be returned in a single response. + * Pass this value to `page_token` in another request to get the next + * page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The AuthorizedViews present in the requested table. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.AuthorizedView authorized_views = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAuthorizedViews() + { + return $this->authorized_views; + } + + /** + * The AuthorizedViews present in the requested table. + * + * Generated from protobuf field repeated .google.bigtable.admin.v2.AuthorizedView authorized_views = 1; + * @param array<\Google\Cloud\Bigtable\Admin\V2\AuthorizedView>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAuthorizedViews($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView::class); + $this->authorized_views = $arr; + + return $this; + } + + /** + * Set if not all tables could be returned in a single response. + * Pass this value to `page_token` in another request to get the next + * page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Set if not all tables could be returned in a single response. + * Pass this value to `page_token` in another request to get the next + * page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/Bigtable/src/Admin/V2/ModifyColumnFamiliesRequest/Modification.php b/Bigtable/src/Admin/V2/ModifyColumnFamiliesRequest/Modification.php index 9f96b53df46d..0886bfccdd8f 100644 --- a/Bigtable/src/Admin/V2/ModifyColumnFamiliesRequest/Modification.php +++ b/Bigtable/src/Admin/V2/ModifyColumnFamiliesRequest/Modification.php @@ -21,6 +21,14 @@ class Modification extends \Google\Protobuf\Internal\Message * Generated from protobuf field string id = 1; */ private $id = ''; + /** + * Optional. A mask specifying which fields (e.g. `gc_rule`) in the `update` + * mod should be updated, ignored for other modification types. If unset or + * empty, we treat it as updating `gc_rule` to be backward compatible. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $update_mask = null; protected $mod; /** @@ -40,6 +48,10 @@ class Modification extends \Google\Protobuf\Internal\Message * @type bool $drop * Drop (delete) the column family with the given ID, or fail if no such * family exists. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. A mask specifying which fields (e.g. `gc_rule`) in the `update` + * mod should be updated, ignored for other modification types. If unset or + * empty, we treat it as updating `gc_rule` to be backward compatible. * } */ public function __construct($data = NULL) { @@ -172,6 +184,46 @@ public function setDrop($var) return $this; } + /** + * Optional. A mask specifying which fields (e.g. `gc_rule`) in the `update` + * mod should be updated, ignored for other modification types. If unset or + * empty, we treat it as updating `gc_rule` to be backward compatible. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. A mask specifying which fields (e.g. `gc_rule`) in the `update` + * mod should be updated, ignored for other modification types. If unset or + * empty, we treat it as updating `gc_rule` to be backward compatible. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + /** * @return string */ diff --git a/Bigtable/src/Admin/V2/StandardReadRemoteWrites.php b/Bigtable/src/Admin/V2/StandardReadRemoteWrites.php new file mode 100644 index 000000000000..bc59f6b84f19 --- /dev/null +++ b/Bigtable/src/Admin/V2/StandardReadRemoteWrites.php @@ -0,0 +1,34 @@ +google.bigtable.admin.v2.StandardReadRemoteWrites + */ +class StandardReadRemoteWrites extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + +} + diff --git a/Bigtable/src/Admin/V2/Table.php b/Bigtable/src/Admin/V2/Table.php index f3289d6373a4..d1c8ac9abf63 100644 --- a/Bigtable/src/Admin/V2/Table.php +++ b/Bigtable/src/Admin/V2/Table.php @@ -76,6 +76,7 @@ class Table extends \Google\Protobuf\Internal\Message * Generated from protobuf field bool deletion_protection = 9; */ private $deletion_protection = false; + protected $automated_backup_config; /** * Constructor. @@ -115,6 +116,9 @@ class Table extends \Google\Protobuf\Internal\Message * * The column families in the table. * * The instance containing the table. * Note one can still delete the data stored in the table through Data APIs. + * @type \Google\Cloud\Bigtable\Admin\V2\Table\AutomatedBackupPolicy $automated_backup_policy + * If specified, automated backups are enabled for this table. + * Otherwise, automated backups are disabled. * } */ public function __construct($data = NULL) { @@ -360,5 +364,46 @@ public function setDeletionProtection($var) return $this; } + /** + * If specified, automated backups are enabled for this table. + * Otherwise, automated backups are disabled. + * + * Generated from protobuf field .google.bigtable.admin.v2.Table.AutomatedBackupPolicy automated_backup_policy = 13; + * @return \Google\Cloud\Bigtable\Admin\V2\Table\AutomatedBackupPolicy|null + */ + public function getAutomatedBackupPolicy() + { + return $this->readOneof(13); + } + + public function hasAutomatedBackupPolicy() + { + return $this->hasOneof(13); + } + + /** + * If specified, automated backups are enabled for this table. + * Otherwise, automated backups are disabled. + * + * Generated from protobuf field .google.bigtable.admin.v2.Table.AutomatedBackupPolicy automated_backup_policy = 13; + * @param \Google\Cloud\Bigtable\Admin\V2\Table\AutomatedBackupPolicy $var + * @return $this + */ + public function setAutomatedBackupPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Table\AutomatedBackupPolicy::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * @return string + */ + public function getAutomatedBackupConfig() + { + return $this->whichOneof("automated_backup_config"); + } + } diff --git a/Bigtable/src/Admin/V2/Table/AutomatedBackupPolicy.php b/Bigtable/src/Admin/V2/Table/AutomatedBackupPolicy.php new file mode 100644 index 000000000000..77c2510af299 --- /dev/null +++ b/Bigtable/src/Admin/V2/Table/AutomatedBackupPolicy.php @@ -0,0 +1,132 @@ +google.bigtable.admin.v2.Table.AutomatedBackupPolicy + */ +class AutomatedBackupPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Required. How long the automated backups should be retained. The only + * supported value at this time is 3 days. + * + * Generated from protobuf field .google.protobuf.Duration retention_period = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $retention_period = null; + /** + * Required. How frequently automated backups should occur. The only + * supported value at this time is 24 hours. + * + * Generated from protobuf field .google.protobuf.Duration frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $frequency = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $retention_period + * Required. How long the automated backups should be retained. The only + * supported value at this time is 3 days. + * @type \Google\Protobuf\Duration $frequency + * Required. How frequently automated backups should occur. The only + * supported value at this time is 24 hours. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); + parent::__construct($data); + } + + /** + * Required. How long the automated backups should be retained. The only + * supported value at this time is 3 days. + * + * Generated from protobuf field .google.protobuf.Duration retention_period = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getRetentionPeriod() + { + return $this->retention_period; + } + + public function hasRetentionPeriod() + { + return isset($this->retention_period); + } + + public function clearRetentionPeriod() + { + unset($this->retention_period); + } + + /** + * Required. How long the automated backups should be retained. The only + * supported value at this time is 3 days. + * + * Generated from protobuf field .google.protobuf.Duration retention_period = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setRetentionPeriod($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->retention_period = $var; + + return $this; + } + + /** + * Required. How frequently automated backups should occur. The only + * supported value at this time is 24 hours. + * + * Generated from protobuf field .google.protobuf.Duration frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Duration|null + */ + public function getFrequency() + { + return $this->frequency; + } + + public function hasFrequency() + { + return isset($this->frequency); + } + + public function clearFrequency() + { + unset($this->frequency); + } + + /** + * Required. How frequently automated backups should occur. The only + * supported value at this time is 24 hours. + * + * Generated from protobuf field .google.protobuf.Duration frequency = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setFrequency($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->frequency = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AutomatedBackupPolicy::class, \Google\Cloud\Bigtable\Admin\V2\Table_AutomatedBackupPolicy::class); + diff --git a/Bigtable/src/Admin/V2/Type.php b/Bigtable/src/Admin/V2/Type.php new file mode 100644 index 000000000000..8f116ff2aba4 --- /dev/null +++ b/Bigtable/src/Admin/V2/Type.php @@ -0,0 +1,167 @@ + STRING -> raw bytes. In most cases, a "link" + * in the encoding chain will be based an on existing GoogleSQL conversion + * function like `CAST`. + * Each link in the encoding chain also defines the following properties: + * * Natural sort: Does the encoded value sort consistently with the original + * typed value? Note that Bigtable will always sort data based on the raw + * encoded value, *not* the decoded type. + * - Example: STRING values sort in the same order as their UTF-8 encodings. + * - Counterexample: Encoding INT64 to a fixed-width STRING does *not* + * preserve sort order when dealing with negative numbers. + * INT64(1) > INT64(-1), but STRING("-00001") > STRING("00001). + * - The overall encoding chain sorts naturally if *every* link does. + * * Self-delimiting: If we concatenate two encoded values, can we always tell + * where the first one ends and the second one begins? + * - Example: If we encode INT64s to fixed-width STRINGs, the first value + * will always contain exactly N digits, possibly preceded by a sign. + * - Counterexample: If we concatenate two UTF-8 encoded STRINGs, we have + * no way to tell where the first one ends. + * - The overall encoding chain is self-delimiting if *any* link is. + * * Compatibility: Which other systems have matching encoding schemes? For + * example, does this encoding have a GoogleSQL equivalent? HBase? Java? + * + * Generated from protobuf message google.bigtable.admin.v2.Type + */ +class Type extends \Google\Protobuf\Internal\Message +{ + protected $kind; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Bytes $bytes_type + * Bytes + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Int64 $int64_type + * Int64 + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate $aggregate_type + * Aggregate + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * Bytes + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Bytes|null + */ + public function getBytesType() + { + return $this->readOneof(1); + } + + public function hasBytesType() + { + return $this->hasOneof(1); + } + + /** + * Bytes + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Bytes $var + * @return $this + */ + public function setBytesType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Bytes::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Int64 + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Int64|null + */ + public function getInt64Type() + { + return $this->readOneof(5); + } + + public function hasInt64Type() + { + return $this->hasOneof(5); + } + + /** + * Int64 + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Int64 int64_type = 5; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Int64 $var + * @return $this + */ + public function setInt64Type($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Int64::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Aggregate + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate|null + */ + public function getAggregateType() + { + return $this->readOneof(6); + } + + public function hasAggregateType() + { + return $this->hasOneof(6); + } + + /** + * Aggregate + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Aggregate aggregate_type = 6; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate $var + * @return $this + */ + public function setAggregateType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getKind() + { + return $this->whichOneof("kind"); + } + +} + diff --git a/Bigtable/src/Admin/V2/Type/Aggregate.php b/Bigtable/src/Admin/V2/Type/Aggregate.php new file mode 100644 index 000000000000..b8d2747badb0 --- /dev/null +++ b/Bigtable/src/Admin/V2/Type/Aggregate.php @@ -0,0 +1,185 @@ +google.bigtable.admin.v2.Type.Aggregate + */ +class Aggregate extends \Google\Protobuf\Internal\Message +{ + /** + * Type of the inputs that are accumulated by this `Aggregate`, which must + * specify a full encoding. + * Use `AddInput` mutations to accumulate new inputs. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type input_type = 1; + */ + private $input_type = null; + /** + * Output only. Type that holds the internal accumulator state for the + * `Aggregate`. This is a function of the `input_type` and `aggregator` + * chosen, and will always specify a full encoding. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $state_type = null; + protected $aggregator; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\Type $input_type + * Type of the inputs that are accumulated by this `Aggregate`, which must + * specify a full encoding. + * Use `AddInput` mutations to accumulate new inputs. + * @type \Google\Cloud\Bigtable\Admin\V2\Type $state_type + * Output only. Type that holds the internal accumulator state for the + * `Aggregate`. This is a function of the `input_type` and `aggregator` + * chosen, and will always specify a full encoding. + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Sum $sum + * Sum aggregator. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * Type of the inputs that are accumulated by this `Aggregate`, which must + * specify a full encoding. + * Use `AddInput` mutations to accumulate new inputs. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type input_type = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\Type|null + */ + public function getInputType() + { + return $this->input_type; + } + + public function hasInputType() + { + return isset($this->input_type); + } + + public function clearInputType() + { + unset($this->input_type); + } + + /** + * Type of the inputs that are accumulated by this `Aggregate`, which must + * specify a full encoding. + * Use `AddInput` mutations to accumulate new inputs. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type input_type = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\Type $var + * @return $this + */ + public function setInputType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type::class); + $this->input_type = $var; + + return $this; + } + + /** + * Output only. Type that holds the internal accumulator state for the + * `Aggregate`. This is a function of the `input_type` and `aggregator` + * chosen, and will always specify a full encoding. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Bigtable\Admin\V2\Type|null + */ + public function getStateType() + { + return $this->state_type; + } + + public function hasStateType() + { + return isset($this->state_type); + } + + public function clearStateType() + { + unset($this->state_type); + } + + /** + * Output only. Type that holds the internal accumulator state for the + * `Aggregate`. This is a function of the `input_type` and `aggregator` + * chosen, and will always specify a full encoding. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type state_type = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Bigtable\Admin\V2\Type $var + * @return $this + */ + public function setStateType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type::class); + $this->state_type = $var; + + return $this; + } + + /** + * Sum aggregator. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Sum|null + */ + public function getSum() + { + return $this->readOneof(4); + } + + public function hasSum() + { + return $this->hasOneof(4); + } + + /** + * Sum aggregator. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Aggregate.Sum sum = 4; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Sum $var + * @return $this + */ + public function setSum($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Aggregate\Sum::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getAggregator() + { + return $this->whichOneof("aggregator"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Aggregate::class, \Google\Cloud\Bigtable\Admin\V2\Type_Aggregate::class); + diff --git a/Bigtable/src/Admin/V2/Type/Aggregate/Sum.php b/Bigtable/src/Admin/V2/Type/Aggregate/Sum.php new file mode 100644 index 000000000000..209569e18bcc --- /dev/null +++ b/Bigtable/src/Admin/V2/Type/Aggregate/Sum.php @@ -0,0 +1,38 @@ +google.bigtable.admin.v2.Type.Aggregate.Sum + */ +class Sum extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Sum::class, \Google\Cloud\Bigtable\Admin\V2\Type_Aggregate_Sum::class); + diff --git a/Bigtable/src/Admin/V2/Type/Bytes.php b/Bigtable/src/Admin/V2/Type/Bytes.php new file mode 100644 index 000000000000..02a0e4454513 --- /dev/null +++ b/Bigtable/src/Admin/V2/Type/Bytes.php @@ -0,0 +1,81 @@ +google.bigtable.admin.v2.Type.Bytes + */ +class Bytes extends \Google\Protobuf\Internal\Message +{ + /** + * The encoding to use when converting to/from lower level types. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes.Encoding encoding = 1; + */ + private $encoding = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Bytes\Encoding $encoding + * The encoding to use when converting to/from lower level types. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * The encoding to use when converting to/from lower level types. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes.Encoding encoding = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Bytes\Encoding|null + */ + public function getEncoding() + { + return $this->encoding; + } + + public function hasEncoding() + { + return isset($this->encoding); + } + + public function clearEncoding() + { + unset($this->encoding); + } + + /** + * The encoding to use when converting to/from lower level types. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes.Encoding encoding = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Bytes\Encoding $var + * @return $this + */ + public function setEncoding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Bytes\Encoding::class); + $this->encoding = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Bytes::class, \Google\Cloud\Bigtable\Admin\V2\Type_Bytes::class); + diff --git a/Bigtable/src/Admin/V2/Type/Bytes/Encoding.php b/Bigtable/src/Admin/V2/Type/Bytes/Encoding.php new file mode 100644 index 000000000000..4f4ea68391c9 --- /dev/null +++ b/Bigtable/src/Admin/V2/Type/Bytes/Encoding.php @@ -0,0 +1,78 @@ +google.bigtable.admin.v2.Type.Bytes.Encoding + */ +class Encoding extends \Google\Protobuf\Internal\Message +{ + protected $encoding; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Bytes\Encoding\Raw $raw + * Use `Raw` encoding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * Use `Raw` encoding. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes.Encoding.Raw raw = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Bytes\Encoding\Raw|null + */ + public function getRaw() + { + return $this->readOneof(1); + } + + public function hasRaw() + { + return $this->hasOneof(1); + } + + /** + * Use `Raw` encoding. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes.Encoding.Raw raw = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Bytes\Encoding\Raw $var + * @return $this + */ + public function setRaw($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Bytes\Encoding\Raw::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getEncoding() + { + return $this->whichOneof("encoding"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Encoding::class, \Google\Cloud\Bigtable\Admin\V2\Type_Bytes_Encoding::class); + diff --git a/Bigtable/src/Admin/V2/Type/Bytes/Encoding/Raw.php b/Bigtable/src/Admin/V2/Type/Bytes/Encoding/Raw.php new file mode 100644 index 000000000000..e064c8580d2e --- /dev/null +++ b/Bigtable/src/Admin/V2/Type/Bytes/Encoding/Raw.php @@ -0,0 +1,39 @@ +google.bigtable.admin.v2.Type.Bytes.Encoding.Raw + */ +class Raw extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Raw::class, \Google\Cloud\Bigtable\Admin\V2\Type_Bytes_Encoding_Raw::class); + diff --git a/Bigtable/src/Admin/V2/Type/Int64.php b/Bigtable/src/Admin/V2/Type/Int64.php new file mode 100644 index 000000000000..cdc02b870421 --- /dev/null +++ b/Bigtable/src/Admin/V2/Type/Int64.php @@ -0,0 +1,81 @@ +google.bigtable.admin.v2.Type.Int64 + */ +class Int64 extends \Google\Protobuf\Internal\Message +{ + /** + * The encoding to use when converting to/from lower level types. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; + */ + private $encoding = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Int64\Encoding $encoding + * The encoding to use when converting to/from lower level types. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * The encoding to use when converting to/from lower level types. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Int64\Encoding|null + */ + public function getEncoding() + { + return $this->encoding; + } + + public function hasEncoding() + { + return isset($this->encoding); + } + + public function clearEncoding() + { + unset($this->encoding); + } + + /** + * The encoding to use when converting to/from lower level types. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Int64.Encoding encoding = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Int64\Encoding $var + * @return $this + */ + public function setEncoding($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Int64\Encoding::class); + $this->encoding = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Int64::class, \Google\Cloud\Bigtable\Admin\V2\Type_Int64::class); + diff --git a/Bigtable/src/Admin/V2/Type/Int64/Encoding.php b/Bigtable/src/Admin/V2/Type/Int64/Encoding.php new file mode 100644 index 000000000000..6a18aa7783f8 --- /dev/null +++ b/Bigtable/src/Admin/V2/Type/Int64/Encoding.php @@ -0,0 +1,78 @@ +google.bigtable.admin.v2.Type.Int64.Encoding + */ +class Encoding extends \Google\Protobuf\Internal\Message +{ + protected $encoding; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Int64\Encoding\BigEndianBytes $big_endian_bytes + * Use `BigEndianBytes` encoding. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * Use `BigEndianBytes` encoding. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Int64\Encoding\BigEndianBytes|null + */ + public function getBigEndianBytes() + { + return $this->readOneof(1); + } + + public function hasBigEndianBytes() + { + return $this->hasOneof(1); + } + + /** + * Use `BigEndianBytes` encoding. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes big_endian_bytes = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Int64\Encoding\BigEndianBytes $var + * @return $this + */ + public function setBigEndianBytes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Int64\Encoding\BigEndianBytes::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getEncoding() + { + return $this->whichOneof("encoding"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Encoding::class, \Google\Cloud\Bigtable\Admin\V2\Type_Int64_Encoding::class); + diff --git a/Bigtable/src/Admin/V2/Type/Int64/Encoding/BigEndianBytes.php b/Bigtable/src/Admin/V2/Type/Int64/Encoding/BigEndianBytes.php new file mode 100644 index 000000000000..4d45c8bd7cdb --- /dev/null +++ b/Bigtable/src/Admin/V2/Type/Int64/Encoding/BigEndianBytes.php @@ -0,0 +1,87 @@ +google.bigtable.admin.v2.Type.Int64.Encoding.BigEndianBytes + */ +class BigEndianBytes extends \Google\Protobuf\Internal\Message +{ + /** + * The underlying `Bytes` type, which may be able to encode further. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + */ + private $bytes_type = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\Type\Bytes $bytes_type + * The underlying `Bytes` type, which may be able to encode further. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\Types::initOnce(); + parent::__construct($data); + } + + /** + * The underlying `Bytes` type, which may be able to encode further. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\Type\Bytes|null + */ + public function getBytesType() + { + return $this->bytes_type; + } + + public function hasBytesType() + { + return isset($this->bytes_type); + } + + public function clearBytesType() + { + unset($this->bytes_type); + } + + /** + * The underlying `Bytes` type, which may be able to encode further. + * + * Generated from protobuf field .google.bigtable.admin.v2.Type.Bytes bytes_type = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\Type\Bytes $var + * @return $this + */ + public function setBytesType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Type\Bytes::class); + $this->bytes_type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BigEndianBytes::class, \Google\Cloud\Bigtable\Admin\V2\Type_Int64_Encoding_BigEndianBytes::class); + diff --git a/Bigtable/src/Admin/V2/UpdateAuthorizedViewMetadata.php b/Bigtable/src/Admin/V2/UpdateAuthorizedViewMetadata.php new file mode 100644 index 000000000000..3133122f2298 --- /dev/null +++ b/Bigtable/src/Admin/V2/UpdateAuthorizedViewMetadata.php @@ -0,0 +1,170 @@ +google.bigtable.admin.v2.UpdateAuthorizedViewMetadata + */ +class UpdateAuthorizedViewMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The request that prompted the initiation of this UpdateAuthorizedView + * operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.UpdateAuthorizedViewRequest original_request = 1; + */ + private $original_request = null; + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + */ + private $request_time = null; + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + */ + private $finish_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\UpdateAuthorizedViewRequest $original_request + * The request that prompted the initiation of this UpdateAuthorizedView + * operation. + * @type \Google\Protobuf\Timestamp $request_time + * The time at which the original request was received. + * @type \Google\Protobuf\Timestamp $finish_time + * The time at which the operation failed or was completed successfully. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The request that prompted the initiation of this UpdateAuthorizedView + * operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.UpdateAuthorizedViewRequest original_request = 1; + * @return \Google\Cloud\Bigtable\Admin\V2\UpdateAuthorizedViewRequest|null + */ + public function getOriginalRequest() + { + return $this->original_request; + } + + public function hasOriginalRequest() + { + return isset($this->original_request); + } + + public function clearOriginalRequest() + { + unset($this->original_request); + } + + /** + * The request that prompted the initiation of this UpdateAuthorizedView + * operation. + * + * Generated from protobuf field .google.bigtable.admin.v2.UpdateAuthorizedViewRequest original_request = 1; + * @param \Google\Cloud\Bigtable\Admin\V2\UpdateAuthorizedViewRequest $var + * @return $this + */ + public function setOriginalRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\UpdateAuthorizedViewRequest::class); + $this->original_request = $var; + + return $this; + } + + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRequestTime() + { + return $this->request_time; + } + + public function hasRequestTime() + { + return isset($this->request_time); + } + + public function clearRequestTime() + { + unset($this->request_time); + } + + /** + * The time at which the original request was received. + * + * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRequestTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->request_time = $var; + + return $this; + } + + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getFinishTime() + { + return $this->finish_time; + } + + public function hasFinishTime() + { + return isset($this->finish_time); + } + + public function clearFinishTime() + { + unset($this->finish_time); + } + + /** + * The time at which the operation failed or was completed successfully. + * + * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setFinishTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->finish_time = $var; + + return $this; + } + +} + diff --git a/Bigtable/src/Admin/V2/UpdateAuthorizedViewRequest.php b/Bigtable/src/Admin/V2/UpdateAuthorizedViewRequest.php new file mode 100644 index 000000000000..9616019d26d0 --- /dev/null +++ b/Bigtable/src/Admin/V2/UpdateAuthorizedViewRequest.php @@ -0,0 +1,220 @@ +google.bigtable.admin.v2.UpdateAuthorizedViewRequest + */ +class UpdateAuthorizedViewRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The AuthorizedView to update. The `name` in `authorized_view` is + * used to identify the AuthorizedView. AuthorizedView name must in this + * format + * projects//instances//tables/
/authorizedViews/ + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView authorized_view = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $authorized_view = null; + /** + * Optional. The list of fields to update. + * A mask specifying which fields in the AuthorizedView resource should be + * updated. This mask is relative to the AuthorizedView resource, not to the + * request message. A field will be overwritten if it is in the mask. If + * empty, all fields set in the request will be overwritten. A special value + * `*` means to overwrite all fields (including fields not set in the + * request). + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $update_mask = null; + /** + * Optional. If true, ignore the safety checks when updating the + * AuthorizedView. + * + * Generated from protobuf field bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $ignore_warnings = false; + + /** + * @param \Google\Cloud\Bigtable\Admin\V2\AuthorizedView $authorizedView Required. The AuthorizedView to update. The `name` in `authorized_view` is + * used to identify the AuthorizedView. AuthorizedView name must in this + * format + * projects//instances//tables/
/authorizedViews/ + * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. + * A mask specifying which fields in the AuthorizedView resource should be + * updated. This mask is relative to the AuthorizedView resource, not to the + * request message. A field will be overwritten if it is in the mask. If + * empty, all fields set in the request will be overwritten. A special value + * `*` means to overwrite all fields (including fields not set in the + * request). + * + * @return \Google\Cloud\Bigtable\Admin\V2\UpdateAuthorizedViewRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Bigtable\Admin\V2\AuthorizedView $authorizedView, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setAuthorizedView($authorizedView) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Bigtable\Admin\V2\AuthorizedView $authorized_view + * Required. The AuthorizedView to update. The `name` in `authorized_view` is + * used to identify the AuthorizedView. AuthorizedView name must in this + * format + * projects//instances//tables/
/authorizedViews/ + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of fields to update. + * A mask specifying which fields in the AuthorizedView resource should be + * updated. This mask is relative to the AuthorizedView resource, not to the + * request message. A field will be overwritten if it is in the mask. If + * empty, all fields set in the request will be overwritten. A special value + * `*` means to overwrite all fields (including fields not set in the + * request). + * @type bool $ignore_warnings + * Optional. If true, ignore the safety checks when updating the + * AuthorizedView. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The AuthorizedView to update. The `name` in `authorized_view` is + * used to identify the AuthorizedView. AuthorizedView name must in this + * format + * projects//instances//tables/
/authorizedViews/ + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView authorized_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Bigtable\Admin\V2\AuthorizedView|null + */ + public function getAuthorizedView() + { + return $this->authorized_view; + } + + public function hasAuthorizedView() + { + return isset($this->authorized_view); + } + + public function clearAuthorizedView() + { + unset($this->authorized_view); + } + + /** + * Required. The AuthorizedView to update. The `name` in `authorized_view` is + * used to identify the AuthorizedView. AuthorizedView name must in this + * format + * projects//instances//tables/
/authorizedViews/ + * + * Generated from protobuf field .google.bigtable.admin.v2.AuthorizedView authorized_view = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Bigtable\Admin\V2\AuthorizedView $var + * @return $this + */ + public function setAuthorizedView($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AuthorizedView::class); + $this->authorized_view = $var; + + return $this; + } + + /** + * Optional. The list of fields to update. + * A mask specifying which fields in the AuthorizedView resource should be + * updated. This mask is relative to the AuthorizedView resource, not to the + * request message. A field will be overwritten if it is in the mask. If + * empty, all fields set in the request will be overwritten. A special value + * `*` means to overwrite all fields (including fields not set in the + * request). + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. The list of fields to update. + * A mask specifying which fields in the AuthorizedView resource should be + * updated. This mask is relative to the AuthorizedView resource, not to the + * request message. A field will be overwritten if it is in the mask. If + * empty, all fields set in the request will be overwritten. A special value + * `*` means to overwrite all fields (including fields not set in the + * request). + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Optional. If true, ignore the safety checks when updating the + * AuthorizedView. + * + * Generated from protobuf field bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIgnoreWarnings() + { + return $this->ignore_warnings; + } + + /** + * Optional. If true, ignore the safety checks when updating the + * AuthorizedView. + * + * Generated from protobuf field bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIgnoreWarnings($var) + { + GPBUtil::checkBool($var); + $this->ignore_warnings = $var; + + return $this; + } + +} + diff --git a/Bigtable/src/Admin/V2/resources/bigtable_instance_admin_descriptor_config.php b/Bigtable/src/Admin/V2/resources/bigtable_instance_admin_descriptor_config.php index c396dc6a8ab0..4232256b1ba6 100644 --- a/Bigtable/src/Admin/V2/resources/bigtable_instance_admin_descriptor_config.php +++ b/Bigtable/src/Admin/V2/resources/bigtable_instance_admin_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Bigtable/src/Admin/V2/resources/bigtable_instance_admin_rest_client_config.php b/Bigtable/src/Admin/V2/resources/bigtable_instance_admin_rest_client_config.php index 16303777335e..a92f99ec26d8 100644 --- a/Bigtable/src/Admin/V2/resources/bigtable_instance_admin_rest_client_config.php +++ b/Bigtable/src/Admin/V2/resources/bigtable_instance_admin_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Bigtable/src/Admin/V2/resources/bigtable_table_admin_client_config.json b/Bigtable/src/Admin/V2/resources/bigtable_table_admin_client_config.json index 3f976071db34..47b0c167c97c 100644 --- a/Bigtable/src/Admin/V2/resources/bigtable_table_admin_client_config.json +++ b/Bigtable/src/Admin/V2/resources/bigtable_table_admin_client_config.json @@ -30,6 +30,11 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "CreateAuthorizedView": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "CreateBackup": { "timeout_millis": 60000, "retry_codes_name": "non_idempotent", @@ -45,6 +50,11 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "DeleteAuthorizedView": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "DeleteBackup": { "timeout_millis": 60000, "retry_codes_name": "non_idempotent", @@ -70,6 +80,11 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "GetAuthorizedView": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, "GetBackup": { "timeout_millis": 60000, "retry_codes_name": "idempotent", @@ -90,6 +105,11 @@ "retry_codes_name": "idempotent", "retry_params_name": "default" }, + "ListAuthorizedViews": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, "ListBackups": { "timeout_millis": 60000, "retry_codes_name": "idempotent", @@ -135,6 +155,11 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "UpdateAuthorizedView": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "UpdateBackup": { "timeout_millis": 60000, "retry_codes_name": "non_idempotent", diff --git a/Bigtable/src/Admin/V2/resources/bigtable_table_admin_descriptor_config.php b/Bigtable/src/Admin/V2/resources/bigtable_table_admin_descriptor_config.php index 16ebe75c26fc..c2ada4e51105 100644 --- a/Bigtable/src/Admin/V2/resources/bigtable_table_admin_descriptor_config.php +++ b/Bigtable/src/Admin/V2/resources/bigtable_table_admin_descriptor_config.php @@ -1,4 +1,24 @@ [ @@ -22,6 +42,25 @@ ], ], ], + 'CreateAuthorizedView' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\AuthorizedView', + 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\CreateAuthorizedViewMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], 'CreateBackup' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Backup', @@ -117,6 +156,26 @@ ], ], ], + 'UpdateAuthorizedView' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\AuthorizedView', + 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\UpdateAuthorizedViewMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'authorized_view.name', + 'fieldAccessors' => [ + 'getAuthorizedView', + 'getName', + ], + ], + ], + ], 'UpdateTable' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Table', @@ -161,6 +220,18 @@ ], ], ], + 'DeleteAuthorizedView' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], 'DeleteBackup' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Protobuf\GPBEmpty', @@ -221,6 +292,18 @@ ], ], ], + 'GetAuthorizedView' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\AuthorizedView', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], 'GetBackup' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Backup', @@ -269,6 +352,26 @@ ], ], ], + 'ListAuthorizedViews' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAuthorizedViews', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\ListAuthorizedViewsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], 'ListBackups' => [ 'pageStreaming' => [ 'requestPageTokenGetMethod' => 'getPageToken', @@ -379,6 +482,7 @@ ], ], 'templateMap' => [ + 'authorizedView' => 'projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}', 'backup' => 'projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}', 'cluster' => 'projects/{project}/instances/{instance}/clusters/{cluster}', 'cryptoKeyVersion' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}', diff --git a/Bigtable/src/Admin/V2/resources/bigtable_table_admin_rest_client_config.php b/Bigtable/src/Admin/V2/resources/bigtable_table_admin_rest_client_config.php index 2414ff1b10c7..70910ee9a916 100644 --- a/Bigtable/src/Admin/V2/resources/bigtable_table_admin_rest_client_config.php +++ b/Bigtable/src/Admin/V2/resources/bigtable_table_admin_rest_client_config.php @@ -1,4 +1,24 @@ [ @@ -27,6 +47,21 @@ ], ], ], + 'CreateAuthorizedView' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/instances/*/tables/*}/authorizedViews', + 'body' => 'authorized_view', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'authorized_view_id', + ], + ], 'CreateBackup' => [ 'method' => 'post', 'uriTemplate' => '/v2/{parent=projects/*/instances/*/clusters/*}/backups', @@ -66,6 +101,17 @@ ], ], ], + 'DeleteAuthorizedView' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*/authorizedViews/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'DeleteBackup' => [ 'method' => 'delete', 'uriTemplate' => '/v2/{name=projects/*/instances/*/clusters/*/backups/*}', @@ -123,6 +169,17 @@ ], ], ], + 'GetAuthorizedView' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*/authorizedViews/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'GetBackup' => [ 'method' => 'get', 'uriTemplate' => '/v2/{name=projects/*/instances/*/clusters/*/backups/*}', @@ -175,6 +232,17 @@ ], ], ], + 'ListAuthorizedViews' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/instances/*/tables/*}/authorizedViews', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], 'ListBackups' => [ 'method' => 'get', 'uriTemplate' => '/v2/{parent=projects/*/instances/*/clusters/*}/backups', @@ -294,6 +362,19 @@ ], ], ], + 'UpdateAuthorizedView' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{authorized_view.name=projects/*/instances/*/tables/*/authorizedViews/*}', + 'body' => 'authorized_view', + 'placeholders' => [ + 'authorized_view.name' => [ + 'getters' => [ + 'getAuthorizedView', + 'getName', + ], + ], + ], + ], 'UpdateBackup' => [ 'method' => 'patch', 'uriTemplate' => '/v2/{backup.name=projects/*/instances/*/clusters/*/backups/*}', diff --git a/Bigtable/src/V2/CheckAndMutateRowRequest.php b/Bigtable/src/V2/CheckAndMutateRowRequest.php index ea4e5feef2c9..c87631158d03 100644 --- a/Bigtable/src/V2/CheckAndMutateRowRequest.php +++ b/Bigtable/src/V2/CheckAndMutateRowRequest.php @@ -16,13 +16,23 @@ class CheckAndMutateRowRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The unique name of the table to which the conditional mutation - * should be applied. Values are of the form + * Optional. The unique name of the table to which the conditional mutation + * should be applied. + * Values are of the form * `projects//instances//tables/
`. * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { */ private $table_name = ''; + /** + * Optional. The unique name of the AuthorizedView to which the conditional + * mutation should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $authorized_view_name = ''; /** * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -68,8 +78,10 @@ class CheckAndMutateRowRequest extends \Google\Protobuf\Internal\Message private $false_mutations; /** - * @param string $tableName Required. The unique name of the table to which the conditional mutation - * should be applied. Values are of the form + * @param string $tableName Optional. The unique name of the table to which the conditional mutation + * should be applied. + * + * Values are of the form * `projects//instances//tables/
`. Please see * {@see BigtableClient::tableName()} for help formatting this field. * @param string $rowKey Required. The key of the row to which the conditional mutation should be @@ -104,8 +116,10 @@ public static function build(string $tableName, string $rowKey, \Google\Cloud\Bi } /** - * @param string $tableName Required. The unique name of the table to which the conditional mutation - * should be applied. Values are of the form + * @param string $tableName Optional. The unique name of the table to which the conditional mutation + * should be applied. + * + * Values are of the form * `projects//instances//tables/
`. Please see * {@see BigtableClient::tableName()} for help formatting this field. * @param string $rowKey Required. The key of the row to which the conditional mutation should be @@ -149,9 +163,15 @@ public static function buildFromTableNameRowKeyPredicateFilterTrueMutationsFalse * Optional. Data for populating the Message object. * * @type string $table_name - * Required. The unique name of the table to which the conditional mutation - * should be applied. Values are of the form + * Optional. The unique name of the table to which the conditional mutation + * should be applied. + * Values are of the form * `projects//instances//tables/
`. + * @type string $authorized_view_name + * Optional. The unique name of the AuthorizedView to which the conditional + * mutation should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. * @type string $app_profile_id * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -183,11 +203,12 @@ public function __construct($data = NULL) { } /** - * Required. The unique name of the table to which the conditional mutation - * should be applied. Values are of the form + * Optional. The unique name of the table to which the conditional mutation + * should be applied. + * Values are of the form * `projects//instances//tables/
`. * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { * @return string */ public function getTableName() @@ -196,11 +217,12 @@ public function getTableName() } /** - * Required. The unique name of the table to which the conditional mutation - * should be applied. Values are of the form + * Optional. The unique name of the table to which the conditional mutation + * should be applied. + * Values are of the form * `projects//instances//tables/
`. * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { * @param string $var * @return $this */ @@ -212,6 +234,38 @@ public function setTableName($var) return $this; } + /** + * Optional. The unique name of the AuthorizedView to which the conditional + * mutation should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getAuthorizedViewName() + { + return $this->authorized_view_name; + } + + /** + * Optional. The unique name of the AuthorizedView to which the conditional + * mutation should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAuthorizedViewName($var) + { + GPBUtil::checkString($var, True); + $this->authorized_view_name = $var; + + return $this; + } + /** * This value specifies routing for replication. If not specified, the * "default" application profile will be used. diff --git a/Bigtable/src/V2/Client/BigtableClient.php b/Bigtable/src/V2/Client/BigtableClient.php index 2f3df3908ff6..01f9efeb2843 100644 --- a/Bigtable/src/V2/Client/BigtableClient.php +++ b/Bigtable/src/V2/Client/BigtableClient.php @@ -119,6 +119,27 @@ private static function getClientDefaults() ]; } + /** + * Formats a string containing the fully-qualified path to represent a + * authorized_view resource. + * + * @param string $project + * @param string $instance + * @param string $table + * @param string $authorizedView + * + * @return string The formatted authorized_view resource. + */ + public static function authorizedViewName(string $project, string $instance, string $table, string $authorizedView): string + { + return self::getPathTemplate('authorizedView')->render([ + 'project' => $project, + 'instance' => $instance, + 'table' => $table, + 'authorized_view' => $authorizedView, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a instance * resource. @@ -159,6 +180,7 @@ public static function tableName(string $project, string $instance, string $tabl * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: * Template: Pattern + * - authorizedView: projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view} * - instance: projects/{project}/instances/{instance} * - table: projects/{project}/instances/{instance}/tables/{table} * diff --git a/Bigtable/src/V2/FeatureFlags.php b/Bigtable/src/V2/FeatureFlags.php index 90c3a53e83e8..f9d2d8bcacea 100644 --- a/Bigtable/src/V2/FeatureFlags.php +++ b/Bigtable/src/V2/FeatureFlags.php @@ -66,6 +66,12 @@ class FeatureFlags extends \Google\Protobuf\Internal\Message * Generated from protobuf field bool retry_info = 7; */ private $retry_info = false; + /** + * Notify the server that the client has client side metrics enabled. + * + * Generated from protobuf field bool client_side_metrics_enabled = 8; + */ + private $client_side_metrics_enabled = false; /** * Constructor. @@ -93,6 +99,8 @@ class FeatureFlags extends \Google\Protobuf\Internal\Message * @type bool $retry_info * Notify the server that the client supports using retry info back off * durations to retry requests with. + * @type bool $client_side_metrics_enabled + * Notify the server that the client has client side metrics enabled. * } */ public function __construct($data = NULL) { @@ -272,5 +280,31 @@ public function setRetryInfo($var) return $this; } + /** + * Notify the server that the client has client side metrics enabled. + * + * Generated from protobuf field bool client_side_metrics_enabled = 8; + * @return bool + */ + public function getClientSideMetricsEnabled() + { + return $this->client_side_metrics_enabled; + } + + /** + * Notify the server that the client has client side metrics enabled. + * + * Generated from protobuf field bool client_side_metrics_enabled = 8; + * @param bool $var + * @return $this + */ + public function setClientSideMetricsEnabled($var) + { + GPBUtil::checkBool($var); + $this->client_side_metrics_enabled = $var; + + return $this; + } + } diff --git a/Bigtable/src/V2/Gapic/BigtableGapicClient.php b/Bigtable/src/V2/Gapic/BigtableGapicClient.php index ce645037b4e8..99c5625a5b27 100644 --- a/Bigtable/src/V2/Gapic/BigtableGapicClient.php +++ b/Bigtable/src/V2/Gapic/BigtableGapicClient.php @@ -119,6 +119,8 @@ class BigtableGapicClient 'https://www.googleapis.com/auth/cloud-platform.read-only', ]; + private static $authorizedViewNameTemplate; + private static $instanceNameTemplate; private static $tableNameTemplate; @@ -144,6 +146,15 @@ private static function getClientDefaults() ]; } + private static function getAuthorizedViewNameTemplate() + { + if (self::$authorizedViewNameTemplate == null) { + self::$authorizedViewNameTemplate = new PathTemplate('projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}'); + } + + return self::$authorizedViewNameTemplate; + } + private static function getInstanceNameTemplate() { if (self::$instanceNameTemplate == null) { @@ -166,6 +177,7 @@ private static function getPathTemplateMap() { if (self::$pathTemplateMap == null) { self::$pathTemplateMap = [ + 'authorizedView' => self::getAuthorizedViewNameTemplate(), 'instance' => self::getInstanceNameTemplate(), 'table' => self::getTableNameTemplate(), ]; @@ -174,6 +186,27 @@ private static function getPathTemplateMap() return self::$pathTemplateMap; } + /** + * Formats a string containing the fully-qualified path to represent a + * authorized_view resource. + * + * @param string $project + * @param string $instance + * @param string $table + * @param string $authorizedView + * + * @return string The formatted authorized_view resource. + */ + public static function authorizedViewName($project, $instance, $table, $authorizedView) + { + return self::getAuthorizedViewNameTemplate()->render([ + 'project' => $project, + 'instance' => $instance, + 'table' => $table, + 'authorized_view' => $authorizedView, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a instance * resource. @@ -214,6 +247,7 @@ public static function tableName($project, $instance, $table) * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: * Template: Pattern + * - authorizedView: projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view} * - instance: projects/{project}/instances/{instance} * - table: projects/{project}/instances/{instance}/tables/{table} * @@ -327,14 +361,22 @@ public function __construct(array $options = []) * } * ``` * - * @param string $tableName Required. The unique name of the table to which the conditional mutation - * should be applied. Values are of the form + * @param string $tableName Optional. The unique name of the table to which the conditional mutation + * should be applied. + * + * Values are of the form * `projects//instances//tables/
`. * @param string $rowKey Required. The key of the row to which the conditional mutation should be * applied. * @param array $optionalArgs { * Optional. * + * @type string $authorizedViewName + * Optional. The unique name of the AuthorizedView to which the conditional + * mutation should be applied. + * + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. * @type string $appProfileId * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -376,6 +418,14 @@ public function checkAndMutateRow($tableName, $rowKey, array $optionalArgs = []) $requestParamHeaders['table_name'] = $tableNameMatches['table_name']; } + if (isset($optionalArgs['authorizedViewName'])) { + $request->setAuthorizedViewName($optionalArgs['authorizedViewName']); + $authorizedViewNameMatches = []; + if (preg_match('/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+\/authorizedViews\/[^\/]+)$/', $optionalArgs['authorizedViewName'], $authorizedViewNameMatches)) { + $requestParamHeaders['authorized_view_name'] = $authorizedViewNameMatches['authorized_view_name']; + } + } + if (isset($optionalArgs['appProfileId'])) { $request->setAppProfileId($optionalArgs['appProfileId']); $requestParamHeaders['app_profile_id'] = $optionalArgs['appProfileId']; @@ -470,8 +520,10 @@ public function generateInitialChangeStreamPartitions($tableName, array $optiona * } * ``` * - * @param string $tableName Required. The unique name of the table to which the mutation should be - * applied. Values are of the form + * @param string $tableName Optional. The unique name of the table to which the mutation should be + * applied. + * + * Values are of the form * `projects//instances//tables/
`. * @param string $rowKey Required. The key of the row to which the mutation should be applied. * @param Mutation[] $mutations Required. Changes to be atomically applied to the specified row. Entries @@ -480,6 +532,12 @@ public function generateInitialChangeStreamPartitions($tableName, array $optiona * @param array $optionalArgs { * Optional. * + * @type string $authorizedViewName + * Optional. The unique name of the AuthorizedView to which the mutation + * should be applied. + * + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. * @type string $appProfileId * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -505,6 +563,14 @@ public function mutateRow($tableName, $rowKey, $mutations, array $optionalArgs = $requestParamHeaders['table_name'] = $tableNameMatches['table_name']; } + if (isset($optionalArgs['authorizedViewName'])) { + $request->setAuthorizedViewName($optionalArgs['authorizedViewName']); + $authorizedViewNameMatches = []; + if (preg_match('/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+\/authorizedViews\/[^\/]+)$/', $optionalArgs['authorizedViewName'], $authorizedViewNameMatches)) { + $requestParamHeaders['authorized_view_name'] = $authorizedViewNameMatches['authorized_view_name']; + } + } + if (isset($optionalArgs['appProfileId'])) { $request->setAppProfileId($optionalArgs['appProfileId']); $requestParamHeaders['app_profile_id'] = $optionalArgs['appProfileId']; @@ -536,8 +602,11 @@ public function mutateRow($tableName, $rowKey, $mutations, array $optionalArgs = * } * ``` * - * @param string $tableName Required. The unique name of the table to which the mutations should be + * @param string $tableName Optional. The unique name of the table to which the mutations should be * applied. + * + * Values are of the form + * `projects//instances//tables/
`. * @param Entry[] $entries Required. The row keys and corresponding mutations to be applied in bulk. * Each entry is applied as an atomic mutation, but the entries may be * applied in arbitrary order (even between entries for the same row). @@ -546,6 +615,12 @@ public function mutateRow($tableName, $rowKey, $mutations, array $optionalArgs = * @param array $optionalArgs { * Optional. * + * @type string $authorizedViewName + * Optional. The unique name of the AuthorizedView to which the mutations + * should be applied. + * + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. * @type string $appProfileId * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -568,6 +643,14 @@ public function mutateRows($tableName, $entries, array $optionalArgs = []) $requestParamHeaders['table_name'] = $tableNameMatches['table_name']; } + if (isset($optionalArgs['authorizedViewName'])) { + $request->setAuthorizedViewName($optionalArgs['authorizedViewName']); + $authorizedViewNameMatches = []; + if (preg_match('/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+\/authorizedViews\/[^\/]+)$/', $optionalArgs['authorizedViewName'], $authorizedViewNameMatches)) { + $requestParamHeaders['authorized_view_name'] = $authorizedViewNameMatches['authorized_view_name']; + } + } + if (isset($optionalArgs['appProfileId'])) { $request->setAppProfileId($optionalArgs['appProfileId']); $requestParamHeaders['app_profile_id'] = $optionalArgs['appProfileId']; @@ -752,8 +835,10 @@ public function readChangeStream($tableName, array $optionalArgs = []) * } * ``` * - * @param string $tableName Required. The unique name of the table to which the read/modify/write rules - * should be applied. Values are of the form + * @param string $tableName Optional. The unique name of the table to which the read/modify/write rules + * should be applied. + * + * Values are of the form * `projects//instances//tables/
`. * @param string $rowKey Required. The key of the row to which the read/modify/write rules should be * applied. @@ -763,6 +848,12 @@ public function readChangeStream($tableName, array $optionalArgs = []) * @param array $optionalArgs { * Optional. * + * @type string $authorizedViewName + * Optional. The unique name of the AuthorizedView to which the + * read/modify/write rules should be applied. + * + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. * @type string $appProfileId * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -788,6 +879,14 @@ public function readModifyWriteRow($tableName, $rowKey, $rules, array $optionalA $requestParamHeaders['table_name'] = $tableNameMatches['table_name']; } + if (isset($optionalArgs['authorizedViewName'])) { + $request->setAuthorizedViewName($optionalArgs['authorizedViewName']); + $authorizedViewNameMatches = []; + if (preg_match('/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+\/authorizedViews\/[^\/]+)$/', $optionalArgs['authorizedViewName'], $authorizedViewNameMatches)) { + $requestParamHeaders['authorized_view_name'] = $authorizedViewNameMatches['authorized_view_name']; + } + } + if (isset($optionalArgs['appProfileId'])) { $request->setAppProfileId($optionalArgs['appProfileId']); $requestParamHeaders['app_profile_id'] = $optionalArgs['appProfileId']; @@ -820,12 +919,18 @@ public function readModifyWriteRow($tableName, $rowKey, $rules, array $optionalA * } * ``` * - * @param string $tableName Required. The unique name of the table from which to read. + * @param string $tableName Optional. The unique name of the table from which to read. + * * Values are of the form * `projects//instances//tables/
`. * @param array $optionalArgs { * Optional. * + * @type string $authorizedViewName + * Optional. The unique name of the AuthorizedView from which to read. + * + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. * @type string $appProfileId * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -872,6 +977,14 @@ public function readRows($tableName, array $optionalArgs = []) $requestParamHeaders['table_name'] = $tableNameMatches['table_name']; } + if (isset($optionalArgs['authorizedViewName'])) { + $request->setAuthorizedViewName($optionalArgs['authorizedViewName']); + $authorizedViewNameMatches = []; + if (preg_match('/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+\/authorizedViews\/[^\/]+)$/', $optionalArgs['authorizedViewName'], $authorizedViewNameMatches)) { + $requestParamHeaders['authorized_view_name'] = $authorizedViewNameMatches['authorized_view_name']; + } + } + if (isset($optionalArgs['appProfileId'])) { $request->setAppProfileId($optionalArgs['appProfileId']); $requestParamHeaders['app_profile_id'] = $optionalArgs['appProfileId']; @@ -923,12 +1036,19 @@ public function readRows($tableName, array $optionalArgs = []) * } * ``` * - * @param string $tableName Required. The unique name of the table from which to sample row keys. + * @param string $tableName Optional. The unique name of the table from which to sample row keys. + * * Values are of the form * `projects//instances//tables/
`. * @param array $optionalArgs { * Optional. * + * @type string $authorizedViewName + * Optional. The unique name of the AuthorizedView from which to sample row + * keys. + * + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. * @type string $appProfileId * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -950,6 +1070,14 @@ public function sampleRowKeys($tableName, array $optionalArgs = []) $requestParamHeaders['table_name'] = $tableNameMatches['table_name']; } + if (isset($optionalArgs['authorizedViewName'])) { + $request->setAuthorizedViewName($optionalArgs['authorizedViewName']); + $authorizedViewNameMatches = []; + if (preg_match('/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+\/authorizedViews\/[^\/]+)$/', $optionalArgs['authorizedViewName'], $authorizedViewNameMatches)) { + $requestParamHeaders['authorized_view_name'] = $authorizedViewNameMatches['authorized_view_name']; + } + } + if (isset($optionalArgs['appProfileId'])) { $request->setAppProfileId($optionalArgs['appProfileId']); $requestParamHeaders['app_profile_id'] = $optionalArgs['appProfileId']; diff --git a/Bigtable/src/V2/MutateRowRequest.php b/Bigtable/src/V2/MutateRowRequest.php index e60634cabfaa..e03d01a62110 100644 --- a/Bigtable/src/V2/MutateRowRequest.php +++ b/Bigtable/src/V2/MutateRowRequest.php @@ -16,13 +16,23 @@ class MutateRowRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The unique name of the table to which the mutation should be - * applied. Values are of the form + * Optional. The unique name of the table to which the mutation should be + * applied. + * Values are of the form * `projects//instances//tables/
`. * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { */ private $table_name = ''; + /** + * Optional. The unique name of the AuthorizedView to which the mutation + * should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $authorized_view_name = ''; /** * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -46,8 +56,10 @@ class MutateRowRequest extends \Google\Protobuf\Internal\Message private $mutations; /** - * @param string $tableName Required. The unique name of the table to which the mutation should be - * applied. Values are of the form + * @param string $tableName Optional. The unique name of the table to which the mutation should be + * applied. + * + * Values are of the form * `projects//instances//tables/
`. Please see * {@see BigtableClient::tableName()} for help formatting this field. * @param string $rowKey Required. The key of the row to which the mutation should be applied. @@ -68,8 +80,10 @@ public static function build(string $tableName, string $rowKey, array $mutations } /** - * @param string $tableName Required. The unique name of the table to which the mutation should be - * applied. Values are of the form + * @param string $tableName Optional. The unique name of the table to which the mutation should be + * applied. + * + * Values are of the form * `projects//instances//tables/
`. Please see * {@see BigtableClient::tableName()} for help formatting this field. * @param string $rowKey Required. The key of the row to which the mutation should be applied. @@ -99,9 +113,15 @@ public static function buildFromTableNameRowKeyMutationsAppProfileId(string $tab * Optional. Data for populating the Message object. * * @type string $table_name - * Required. The unique name of the table to which the mutation should be - * applied. Values are of the form + * Optional. The unique name of the table to which the mutation should be + * applied. + * Values are of the form * `projects//instances//tables/
`. + * @type string $authorized_view_name + * Optional. The unique name of the AuthorizedView to which the mutation + * should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. * @type string $app_profile_id * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -119,11 +139,12 @@ public function __construct($data = NULL) { } /** - * Required. The unique name of the table to which the mutation should be - * applied. Values are of the form + * Optional. The unique name of the table to which the mutation should be + * applied. + * Values are of the form * `projects//instances//tables/
`. * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { * @return string */ public function getTableName() @@ -132,11 +153,12 @@ public function getTableName() } /** - * Required. The unique name of the table to which the mutation should be - * applied. Values are of the form + * Optional. The unique name of the table to which the mutation should be + * applied. + * Values are of the form * `projects//instances//tables/
`. * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { * @param string $var * @return $this */ @@ -148,6 +170,38 @@ public function setTableName($var) return $this; } + /** + * Optional. The unique name of the AuthorizedView to which the mutation + * should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getAuthorizedViewName() + { + return $this->authorized_view_name; + } + + /** + * Optional. The unique name of the AuthorizedView to which the mutation + * should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAuthorizedViewName($var) + { + GPBUtil::checkString($var, True); + $this->authorized_view_name = $var; + + return $this; + } + /** * This value specifies routing for replication. If not specified, the * "default" application profile will be used. diff --git a/Bigtable/src/V2/MutateRowsRequest.php b/Bigtable/src/V2/MutateRowsRequest.php index 7546ac9e7b87..8405df53f720 100644 --- a/Bigtable/src/V2/MutateRowsRequest.php +++ b/Bigtable/src/V2/MutateRowsRequest.php @@ -16,12 +16,23 @@ class MutateRowsRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The unique name of the table to which the mutations should be + * Optional. The unique name of the table to which the mutations should be * applied. + * Values are of the form + * `projects//instances//tables/
`. * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { */ private $table_name = ''; + /** + * Optional. The unique name of the AuthorizedView to which the mutations + * should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $authorized_view_name = ''; /** * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -41,8 +52,11 @@ class MutateRowsRequest extends \Google\Protobuf\Internal\Message private $entries; /** - * @param string $tableName Required. The unique name of the table to which the mutations should be - * applied. Please see + * @param string $tableName Optional. The unique name of the table to which the mutations should be + * applied. + * + * Values are of the form + * `projects//instances//tables/
`. Please see * {@see BigtableClient::tableName()} for help formatting this field. * @param \Google\Cloud\Bigtable\V2\MutateRowsRequest\Entry[] $entries Required. The row keys and corresponding mutations to be applied in bulk. * Each entry is applied as an atomic mutation, but the entries may be @@ -62,8 +76,11 @@ public static function build(string $tableName, array $entries): self } /** - * @param string $tableName Required. The unique name of the table to which the mutations should be - * applied. Please see + * @param string $tableName Optional. The unique name of the table to which the mutations should be + * applied. + * + * Values are of the form + * `projects//instances//tables/
`. Please see * {@see BigtableClient::tableName()} for help formatting this field. * @param \Google\Cloud\Bigtable\V2\MutateRowsRequest\Entry[] $entries Required. The row keys and corresponding mutations to be applied in bulk. * Each entry is applied as an atomic mutation, but the entries may be @@ -92,8 +109,15 @@ public static function buildFromTableNameEntriesAppProfileId(string $tableName, * Optional. Data for populating the Message object. * * @type string $table_name - * Required. The unique name of the table to which the mutations should be + * Optional. The unique name of the table to which the mutations should be * applied. + * Values are of the form + * `projects//instances//tables/
`. + * @type string $authorized_view_name + * Optional. The unique name of the AuthorizedView to which the mutations + * should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. * @type string $app_profile_id * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -111,10 +135,12 @@ public function __construct($data = NULL) { } /** - * Required. The unique name of the table to which the mutations should be + * Optional. The unique name of the table to which the mutations should be * applied. + * Values are of the form + * `projects//instances//tables/
`. * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { * @return string */ public function getTableName() @@ -123,10 +149,12 @@ public function getTableName() } /** - * Required. The unique name of the table to which the mutations should be + * Optional. The unique name of the table to which the mutations should be * applied. + * Values are of the form + * `projects//instances//tables/
`. * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { * @param string $var * @return $this */ @@ -138,6 +166,38 @@ public function setTableName($var) return $this; } + /** + * Optional. The unique name of the AuthorizedView to which the mutations + * should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getAuthorizedViewName() + { + return $this->authorized_view_name; + } + + /** + * Optional. The unique name of the AuthorizedView to which the mutations + * should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAuthorizedViewName($var) + { + GPBUtil::checkString($var, True); + $this->authorized_view_name = $var; + + return $this; + } + /** * This value specifies routing for replication. If not specified, the * "default" application profile will be used. diff --git a/Bigtable/src/V2/Mutation.php b/Bigtable/src/V2/Mutation.php index e47fce180c11..fe4ec68925f7 100644 --- a/Bigtable/src/V2/Mutation.php +++ b/Bigtable/src/V2/Mutation.php @@ -25,6 +25,8 @@ class Mutation extends \Google\Protobuf\Internal\Message * * @type \Google\Cloud\Bigtable\V2\Mutation\SetCell $set_cell * Set a cell's value. + * @type \Google\Cloud\Bigtable\V2\Mutation\AddToCell $add_to_cell + * Incrementally updates an `Aggregate` cell. * @type \Google\Cloud\Bigtable\V2\Mutation\DeleteFromColumn $delete_from_column * Deletes cells from a column. * @type \Google\Cloud\Bigtable\V2\Mutation\DeleteFromFamily $delete_from_family @@ -69,6 +71,37 @@ public function setSetCell($var) return $this; } + /** + * Incrementally updates an `Aggregate` cell. + * + * Generated from protobuf field .google.bigtable.v2.Mutation.AddToCell add_to_cell = 5; + * @return \Google\Cloud\Bigtable\V2\Mutation\AddToCell|null + */ + public function getAddToCell() + { + return $this->readOneof(5); + } + + public function hasAddToCell() + { + return $this->hasOneof(5); + } + + /** + * Incrementally updates an `Aggregate` cell. + * + * Generated from protobuf field .google.bigtable.v2.Mutation.AddToCell add_to_cell = 5; + * @param \Google\Cloud\Bigtable\V2\Mutation\AddToCell $var + * @return $this + */ + public function setAddToCell($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Mutation\AddToCell::class); + $this->writeOneof(5, $var); + + return $this; + } + /** * Deletes cells from a column. * diff --git a/Bigtable/src/V2/Mutation/AddToCell.php b/Bigtable/src/V2/Mutation/AddToCell.php new file mode 100644 index 000000000000..beb1e661db2a --- /dev/null +++ b/Bigtable/src/V2/Mutation/AddToCell.php @@ -0,0 +1,222 @@ +google.bigtable.v2.Mutation.AddToCell + */ +class AddToCell extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the `Aggregate` family into which new data should be added. + * This must be a family with a `value_type` of `Aggregate`. + * Format: `[-_.a-zA-Z0-9]+` + * + * Generated from protobuf field string family_name = 1; + */ + private $family_name = ''; + /** + * The qualifier of the column into which new data should be added. This + * must be a `raw_value`. + * + * Generated from protobuf field .google.bigtable.v2.Value column_qualifier = 2; + */ + private $column_qualifier = null; + /** + * The timestamp of the cell to which new data should be added. This must + * be a `raw_timestamp_micros` that matches the table's `granularity`. + * + * Generated from protobuf field .google.bigtable.v2.Value timestamp = 3; + */ + private $timestamp = null; + /** + * The input value to be accumulated into the specified cell. This must be + * compatible with the family's `value_type.input_type`. + * + * Generated from protobuf field .google.bigtable.v2.Value input = 4; + */ + private $input = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $family_name + * The name of the `Aggregate` family into which new data should be added. + * This must be a family with a `value_type` of `Aggregate`. + * Format: `[-_.a-zA-Z0-9]+` + * @type \Google\Cloud\Bigtable\V2\Value $column_qualifier + * The qualifier of the column into which new data should be added. This + * must be a `raw_value`. + * @type \Google\Cloud\Bigtable\V2\Value $timestamp + * The timestamp of the cell to which new data should be added. This must + * be a `raw_timestamp_micros` that matches the table's `granularity`. + * @type \Google\Cloud\Bigtable\V2\Value $input + * The input value to be accumulated into the specified cell. This must be + * compatible with the family's `value_type.input_type`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * The name of the `Aggregate` family into which new data should be added. + * This must be a family with a `value_type` of `Aggregate`. + * Format: `[-_.a-zA-Z0-9]+` + * + * Generated from protobuf field string family_name = 1; + * @return string + */ + public function getFamilyName() + { + return $this->family_name; + } + + /** + * The name of the `Aggregate` family into which new data should be added. + * This must be a family with a `value_type` of `Aggregate`. + * Format: `[-_.a-zA-Z0-9]+` + * + * Generated from protobuf field string family_name = 1; + * @param string $var + * @return $this + */ + public function setFamilyName($var) + { + GPBUtil::checkString($var, True); + $this->family_name = $var; + + return $this; + } + + /** + * The qualifier of the column into which new data should be added. This + * must be a `raw_value`. + * + * Generated from protobuf field .google.bigtable.v2.Value column_qualifier = 2; + * @return \Google\Cloud\Bigtable\V2\Value|null + */ + public function getColumnQualifier() + { + return $this->column_qualifier; + } + + public function hasColumnQualifier() + { + return isset($this->column_qualifier); + } + + public function clearColumnQualifier() + { + unset($this->column_qualifier); + } + + /** + * The qualifier of the column into which new data should be added. This + * must be a `raw_value`. + * + * Generated from protobuf field .google.bigtable.v2.Value column_qualifier = 2; + * @param \Google\Cloud\Bigtable\V2\Value $var + * @return $this + */ + public function setColumnQualifier($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Value::class); + $this->column_qualifier = $var; + + return $this; + } + + /** + * The timestamp of the cell to which new data should be added. This must + * be a `raw_timestamp_micros` that matches the table's `granularity`. + * + * Generated from protobuf field .google.bigtable.v2.Value timestamp = 3; + * @return \Google\Cloud\Bigtable\V2\Value|null + */ + public function getTimestamp() + { + return $this->timestamp; + } + + public function hasTimestamp() + { + return isset($this->timestamp); + } + + public function clearTimestamp() + { + unset($this->timestamp); + } + + /** + * The timestamp of the cell to which new data should be added. This must + * be a `raw_timestamp_micros` that matches the table's `granularity`. + * + * Generated from protobuf field .google.bigtable.v2.Value timestamp = 3; + * @param \Google\Cloud\Bigtable\V2\Value $var + * @return $this + */ + public function setTimestamp($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Value::class); + $this->timestamp = $var; + + return $this; + } + + /** + * The input value to be accumulated into the specified cell. This must be + * compatible with the family's `value_type.input_type`. + * + * Generated from protobuf field .google.bigtable.v2.Value input = 4; + * @return \Google\Cloud\Bigtable\V2\Value|null + */ + public function getInput() + { + return $this->input; + } + + public function hasInput() + { + return isset($this->input); + } + + public function clearInput() + { + unset($this->input); + } + + /** + * The input value to be accumulated into the specified cell. This must be + * compatible with the family's `value_type.input_type`. + * + * Generated from protobuf field .google.bigtable.v2.Value input = 4; + * @param \Google\Cloud\Bigtable\V2\Value $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Value::class); + $this->input = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AddToCell::class, \Google\Cloud\Bigtable\V2\Mutation_AddToCell::class); + diff --git a/Bigtable/src/V2/ReadModifyWriteRowRequest.php b/Bigtable/src/V2/ReadModifyWriteRowRequest.php index 150305f70ba1..d7d0a6df01b8 100644 --- a/Bigtable/src/V2/ReadModifyWriteRowRequest.php +++ b/Bigtable/src/V2/ReadModifyWriteRowRequest.php @@ -16,13 +16,23 @@ class ReadModifyWriteRowRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The unique name of the table to which the read/modify/write rules - * should be applied. Values are of the form + * Optional. The unique name of the table to which the read/modify/write rules + * should be applied. + * Values are of the form * `projects//instances//tables/
`. * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { */ private $table_name = ''; + /** + * Optional. The unique name of the AuthorizedView to which the + * read/modify/write rules should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $authorized_view_name = ''; /** * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -47,8 +57,10 @@ class ReadModifyWriteRowRequest extends \Google\Protobuf\Internal\Message private $rules; /** - * @param string $tableName Required. The unique name of the table to which the read/modify/write rules - * should be applied. Values are of the form + * @param string $tableName Optional. The unique name of the table to which the read/modify/write rules + * should be applied. + * + * Values are of the form * `projects//instances//tables/
`. Please see * {@see BigtableClient::tableName()} for help formatting this field. * @param string $rowKey Required. The key of the row to which the read/modify/write rules should be @@ -70,8 +82,10 @@ public static function build(string $tableName, string $rowKey, array $rules): s } /** - * @param string $tableName Required. The unique name of the table to which the read/modify/write rules - * should be applied. Values are of the form + * @param string $tableName Optional. The unique name of the table to which the read/modify/write rules + * should be applied. + * + * Values are of the form * `projects//instances//tables/
`. Please see * {@see BigtableClient::tableName()} for help formatting this field. * @param string $rowKey Required. The key of the row to which the read/modify/write rules should be @@ -102,9 +116,15 @@ public static function buildFromTableNameRowKeyRulesAppProfileId(string $tableNa * Optional. Data for populating the Message object. * * @type string $table_name - * Required. The unique name of the table to which the read/modify/write rules - * should be applied. Values are of the form + * Optional. The unique name of the table to which the read/modify/write rules + * should be applied. + * Values are of the form * `projects//instances//tables/
`. + * @type string $authorized_view_name + * Optional. The unique name of the AuthorizedView to which the + * read/modify/write rules should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. * @type string $app_profile_id * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -123,11 +143,12 @@ public function __construct($data = NULL) { } /** - * Required. The unique name of the table to which the read/modify/write rules - * should be applied. Values are of the form + * Optional. The unique name of the table to which the read/modify/write rules + * should be applied. + * Values are of the form * `projects//instances//tables/
`. * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { * @return string */ public function getTableName() @@ -136,11 +157,12 @@ public function getTableName() } /** - * Required. The unique name of the table to which the read/modify/write rules - * should be applied. Values are of the form + * Optional. The unique name of the table to which the read/modify/write rules + * should be applied. + * Values are of the form * `projects//instances//tables/
`. * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { * @param string $var * @return $this */ @@ -152,6 +174,38 @@ public function setTableName($var) return $this; } + /** + * Optional. The unique name of the AuthorizedView to which the + * read/modify/write rules should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getAuthorizedViewName() + { + return $this->authorized_view_name; + } + + /** + * Optional. The unique name of the AuthorizedView to which the + * read/modify/write rules should be applied. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAuthorizedViewName($var) + { + GPBUtil::checkString($var, True); + $this->authorized_view_name = $var; + + return $this; + } + /** * This value specifies routing for replication. If not specified, the * "default" application profile will be used. diff --git a/Bigtable/src/V2/ReadRowsRequest.php b/Bigtable/src/V2/ReadRowsRequest.php index 6952ba095bf7..d5821fca7945 100644 --- a/Bigtable/src/V2/ReadRowsRequest.php +++ b/Bigtable/src/V2/ReadRowsRequest.php @@ -16,13 +16,21 @@ class ReadRowsRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The unique name of the table from which to read. + * Optional. The unique name of the table from which to read. * Values are of the form * `projects//instances//tables/
`. * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { */ private $table_name = ''; + /** + * Optional. The unique name of the AuthorizedView from which to read. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $authorized_view_name = ''; /** * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -73,7 +81,8 @@ class ReadRowsRequest extends \Google\Protobuf\Internal\Message private $reversed = false; /** - * @param string $tableName Required. The unique name of the table from which to read. + * @param string $tableName Optional. The unique name of the table from which to read. + * * Values are of the form * `projects//instances//tables/
`. Please see * {@see BigtableClient::tableName()} for help formatting this field. @@ -89,7 +98,8 @@ public static function build(string $tableName): self } /** - * @param string $tableName Required. The unique name of the table from which to read. + * @param string $tableName Optional. The unique name of the table from which to read. + * * Values are of the form * `projects//instances//tables/
`. Please see * {@see BigtableClient::tableName()} for help formatting this field. @@ -114,9 +124,13 @@ public static function buildFromTableNameAppProfileId(string $tableName, string * Optional. Data for populating the Message object. * * @type string $table_name - * Required. The unique name of the table from which to read. + * Optional. The unique name of the table from which to read. * Values are of the form * `projects//instances//tables/
`. + * @type string $authorized_view_name + * Optional. The unique name of the AuthorizedView from which to read. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. * @type string $app_profile_id * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -149,11 +163,11 @@ public function __construct($data = NULL) { } /** - * Required. The unique name of the table from which to read. + * Optional. The unique name of the table from which to read. * Values are of the form * `projects//instances//tables/
`. * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { * @return string */ public function getTableName() @@ -162,11 +176,11 @@ public function getTableName() } /** - * Required. The unique name of the table from which to read. + * Optional. The unique name of the table from which to read. * Values are of the form * `projects//instances//tables/
`. * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { * @param string $var * @return $this */ @@ -178,6 +192,36 @@ public function setTableName($var) return $this; } + /** + * Optional. The unique name of the AuthorizedView from which to read. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getAuthorizedViewName() + { + return $this->authorized_view_name; + } + + /** + * Optional. The unique name of the AuthorizedView from which to read. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAuthorizedViewName($var) + { + GPBUtil::checkString($var, True); + $this->authorized_view_name = $var; + + return $this; + } + /** * This value specifies routing for replication. If not specified, the * "default" application profile will be used. diff --git a/Bigtable/src/V2/SampleRowKeysRequest.php b/Bigtable/src/V2/SampleRowKeysRequest.php index 7c931c379d59..1ca9d18860c0 100644 --- a/Bigtable/src/V2/SampleRowKeysRequest.php +++ b/Bigtable/src/V2/SampleRowKeysRequest.php @@ -16,13 +16,22 @@ class SampleRowKeysRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The unique name of the table from which to sample row keys. + * Optional. The unique name of the table from which to sample row keys. * Values are of the form * `projects//instances//tables/
`. * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { */ private $table_name = ''; + /** + * Optional. The unique name of the AuthorizedView from which to sample row + * keys. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $authorized_view_name = ''; /** * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -32,7 +41,8 @@ class SampleRowKeysRequest extends \Google\Protobuf\Internal\Message private $app_profile_id = ''; /** - * @param string $tableName Required. The unique name of the table from which to sample row keys. + * @param string $tableName Optional. The unique name of the table from which to sample row keys. + * * Values are of the form * `projects//instances//tables/
`. Please see * {@see BigtableClient::tableName()} for help formatting this field. @@ -48,7 +58,8 @@ public static function build(string $tableName): self } /** - * @param string $tableName Required. The unique name of the table from which to sample row keys. + * @param string $tableName Optional. The unique name of the table from which to sample row keys. + * * Values are of the form * `projects//instances//tables/
`. Please see * {@see BigtableClient::tableName()} for help formatting this field. @@ -73,9 +84,14 @@ public static function buildFromTableNameAppProfileId(string $tableName, string * Optional. Data for populating the Message object. * * @type string $table_name - * Required. The unique name of the table from which to sample row keys. + * Optional. The unique name of the table from which to sample row keys. * Values are of the form * `projects//instances//tables/
`. + * @type string $authorized_view_name + * Optional. The unique name of the AuthorizedView from which to sample row + * keys. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. * @type string $app_profile_id * This value specifies routing for replication. If not specified, the * "default" application profile will be used. @@ -87,11 +103,11 @@ public function __construct($data = NULL) { } /** - * Required. The unique name of the table from which to sample row keys. + * Optional. The unique name of the table from which to sample row keys. * Values are of the form * `projects//instances//tables/
`. * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { * @return string */ public function getTableName() @@ -100,11 +116,11 @@ public function getTableName() } /** - * Required. The unique name of the table from which to sample row keys. + * Optional. The unique name of the table from which to sample row keys. * Values are of the form * `projects//instances//tables/
`. * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { * @param string $var * @return $this */ @@ -116,6 +132,38 @@ public function setTableName($var) return $this; } + /** + * Optional. The unique name of the AuthorizedView from which to sample row + * keys. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getAuthorizedViewName() + { + return $this->authorized_view_name; + } + + /** + * Optional. The unique name of the AuthorizedView from which to sample row + * keys. + * Values are of the form + * `projects//instances//tables/
/authorizedViews/`. + * + * Generated from protobuf field string authorized_view_name = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAuthorizedViewName($var) + { + GPBUtil::checkString($var, True); + $this->authorized_view_name = $var; + + return $this; + } + /** * This value specifies routing for replication. If not specified, the * "default" application profile will be used. diff --git a/Bigtable/src/V2/Value.php b/Bigtable/src/V2/Value.php new file mode 100644 index 000000000000..1c91f2d6273b --- /dev/null +++ b/Bigtable/src/V2/Value.php @@ -0,0 +1,153 @@ +google.bigtable.v2.Value + */ +class Value extends \Google\Protobuf\Internal\Message +{ + protected $kind; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $raw_value + * Represents a raw byte sequence with no type information. + * The `type` field must be omitted. + * @type int|string $raw_timestamp_micros + * Represents a raw cell timestamp with no type information. + * The `type` field must be omitted. + * @type int|string $int_value + * Represents a typed value transported as an integer. + * Default type for writes: `Int64` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); + parent::__construct($data); + } + + /** + * Represents a raw byte sequence with no type information. + * The `type` field must be omitted. + * + * Generated from protobuf field bytes raw_value = 8; + * @return string + */ + public function getRawValue() + { + return $this->readOneof(8); + } + + public function hasRawValue() + { + return $this->hasOneof(8); + } + + /** + * Represents a raw byte sequence with no type information. + * The `type` field must be omitted. + * + * Generated from protobuf field bytes raw_value = 8; + * @param string $var + * @return $this + */ + public function setRawValue($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Represents a raw cell timestamp with no type information. + * The `type` field must be omitted. + * + * Generated from protobuf field int64 raw_timestamp_micros = 9; + * @return int|string + */ + public function getRawTimestampMicros() + { + return $this->readOneof(9); + } + + public function hasRawTimestampMicros() + { + return $this->hasOneof(9); + } + + /** + * Represents a raw cell timestamp with no type information. + * The `type` field must be omitted. + * + * Generated from protobuf field int64 raw_timestamp_micros = 9; + * @param int|string $var + * @return $this + */ + public function setRawTimestampMicros($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Represents a typed value transported as an integer. + * Default type for writes: `Int64` + * + * Generated from protobuf field int64 int_value = 6; + * @return int|string + */ + public function getIntValue() + { + return $this->readOneof(6); + } + + public function hasIntValue() + { + return $this->hasOneof(6); + } + + /** + * Represents a typed value transported as an integer. + * Default type for writes: `Int64` + * + * Generated from protobuf field int64 int_value = 6; + * @param int|string $var + * @return $this + */ + public function setIntValue($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getKind() + { + return $this->whichOneof("kind"); + } + +} + diff --git a/Bigtable/src/V2/resources/bigtable_descriptor_config.php b/Bigtable/src/V2/resources/bigtable_descriptor_config.php index 7e237a7eb312..072e59d30db5 100644 --- a/Bigtable/src/V2/resources/bigtable_descriptor_config.php +++ b/Bigtable/src/V2/resources/bigtable_descriptor_config.php @@ -1,4 +1,24 @@ [ @@ -22,6 +42,15 @@ 'getAppProfileId', ], ], + [ + 'keyName' => 'authorized_view_name', + 'fieldAccessors' => [ + 'getAuthorizedViewName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+\/authorizedViews\/[^\/]+)$/', + ], + ], ], ], 'GenerateInitialChangeStreamPartitions' => [ @@ -58,6 +87,15 @@ 'getAppProfileId', ], ], + [ + 'keyName' => 'authorized_view_name', + 'fieldAccessors' => [ + 'getAuthorizedViewName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+\/authorizedViews\/[^\/]+)$/', + ], + ], ], ], 'MutateRows' => [ @@ -82,6 +120,15 @@ 'getAppProfileId', ], ], + [ + 'keyName' => 'authorized_view_name', + 'fieldAccessors' => [ + 'getAuthorizedViewName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+\/authorizedViews\/[^\/]+)$/', + ], + ], ], ], 'PingAndWarm' => [ @@ -139,6 +186,15 @@ 'getAppProfileId', ], ], + [ + 'keyName' => 'authorized_view_name', + 'fieldAccessors' => [ + 'getAuthorizedViewName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+\/authorizedViews\/[^\/]+)$/', + ], + ], ], ], 'ReadRows' => [ @@ -163,6 +219,15 @@ 'getAppProfileId', ], ], + [ + 'keyName' => 'authorized_view_name', + 'fieldAccessors' => [ + 'getAuthorizedViewName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+\/authorizedViews\/[^\/]+)$/', + ], + ], ], ], 'SampleRowKeys' => [ @@ -187,9 +252,19 @@ 'getAppProfileId', ], ], + [ + 'keyName' => 'authorized_view_name', + 'fieldAccessors' => [ + 'getAuthorizedViewName', + ], + 'matchers' => [ + '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+\/authorizedViews\/[^\/]+)$/', + ], + ], ], ], 'templateMap' => [ + 'authorizedView' => 'projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}', 'instance' => 'projects/{project}/instances/{instance}', 'table' => 'projects/{project}/instances/{instance}/tables/{table}', ], diff --git a/Bigtable/src/V2/resources/bigtable_rest_client_config.php b/Bigtable/src/V2/resources/bigtable_rest_client_config.php index d8108bb45931..e19d76ba2bf0 100644 --- a/Bigtable/src/V2/resources/bigtable_rest_client_config.php +++ b/Bigtable/src/V2/resources/bigtable_rest_client_config.php @@ -1,4 +1,24 @@ [ @@ -7,7 +27,19 @@ 'method' => 'post', 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow', 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:checkAndMutateRow', + 'body' => '*', + ], + ], 'placeholders' => [ + 'authorized_view_name' => [ + 'getters' => [ + 'getAuthorizedViewName', + ], + ], 'table_name' => [ 'getters' => [ 'getTableName', @@ -31,7 +63,19 @@ 'method' => 'post', 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:mutateRow', 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRow', + 'body' => '*', + ], + ], 'placeholders' => [ + 'authorized_view_name' => [ + 'getters' => [ + 'getAuthorizedViewName', + ], + ], 'table_name' => [ 'getters' => [ 'getTableName', @@ -43,7 +87,19 @@ 'method' => 'post', 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:mutateRows', 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRows', + 'body' => '*', + ], + ], 'placeholders' => [ + 'authorized_view_name' => [ + 'getters' => [ + 'getAuthorizedViewName', + ], + ], 'table_name' => [ 'getters' => [ 'getTableName', @@ -79,7 +135,19 @@ 'method' => 'post', 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow', 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readModifyWriteRow', + 'body' => '*', + ], + ], 'placeholders' => [ + 'authorized_view_name' => [ + 'getters' => [ + 'getAuthorizedViewName', + ], + ], 'table_name' => [ 'getters' => [ 'getTableName', @@ -91,7 +159,19 @@ 'method' => 'post', 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:readRows', 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readRows', + 'body' => '*', + ], + ], 'placeholders' => [ + 'authorized_view_name' => [ + 'getters' => [ + 'getAuthorizedViewName', + ], + ], 'table_name' => [ 'getters' => [ 'getTableName', @@ -102,7 +182,18 @@ 'SampleRowKeys' => [ 'method' => 'get', 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeys', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:sampleRowKeys', + ], + ], 'placeholders' => [ + 'authorized_view_name' => [ + 'getters' => [ + 'getAuthorizedViewName', + ], + ], 'table_name' => [ 'getters' => [ 'getTableName', diff --git a/Bigtable/tests/Unit/Admin/V2/BigtableTableAdminClientTest.php b/Bigtable/tests/Unit/Admin/V2/BigtableTableAdminClientTest.php index e93f95554837..cc1e86b5c6f3 100644 --- a/Bigtable/tests/Unit/Admin/V2/BigtableTableAdminClientTest.php +++ b/Bigtable/tests/Unit/Admin/V2/BigtableTableAdminClientTest.php @@ -27,10 +27,12 @@ use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; +use Google\Cloud\Bigtable\Admin\V2\AuthorizedView; use Google\Cloud\Bigtable\Admin\V2\Backup; use Google\Cloud\Bigtable\Admin\V2\BigtableTableAdminClient; use Google\Cloud\Bigtable\Admin\V2\CheckConsistencyResponse; use Google\Cloud\Bigtable\Admin\V2\GenerateConsistencyTokenResponse; +use Google\Cloud\Bigtable\Admin\V2\ListAuthorizedViewsResponse; use Google\Cloud\Bigtable\Admin\V2\ListBackupsResponse; use Google\Cloud\Bigtable\Admin\V2\ListSnapshotsResponse; use Google\Cloud\Bigtable\Admin\V2\ListTablesResponse; @@ -277,6 +279,137 @@ public function copyBackupExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } + /** @test */ + public function createAuthorizedViewTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAuthorizedViewTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $etag = 'etag3123477'; + $deletionProtection = true; + $expectedResponse = new AuthorizedView(); + $expectedResponse->setName($name); + $expectedResponse->setEtag($etag); + $expectedResponse->setDeletionProtection($deletionProtection); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAuthorizedViewTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $authorizedViewId = 'authorizedViewId1171901009'; + $authorizedView = new AuthorizedView(); + $response = $gapicClient->createAuthorizedView($formattedParent, $authorizedViewId, $authorizedView); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/CreateAuthorizedView', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAuthorizedViewId(); + $this->assertProtobufEquals($authorizedViewId, $actualValue); + $actualValue = $actualApiRequestObject->getAuthorizedView(); + $this->assertProtobufEquals($authorizedView, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAuthorizedViewTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAuthorizedViewExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAuthorizedViewTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $authorizedViewId = 'authorizedViewId1171901009'; + $authorizedView = new AuthorizedView(); + $response = $gapicClient->createAuthorizedView($formattedParent, $authorizedViewId, $authorizedView); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAuthorizedViewTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + /** @test */ public function createBackupTest() { @@ -617,6 +750,63 @@ public function createTableFromSnapshotExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } + /** @test */ + public function deleteAuthorizedViewTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->authorizedViewName('[PROJECT]', '[INSTANCE]', '[TABLE]', '[AUTHORIZED_VIEW]'); + $gapicClient->deleteAuthorizedView($formattedName); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/DeleteAuthorizedView', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAuthorizedViewExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->authorizedViewName('[PROJECT]', '[INSTANCE]', '[TABLE]', '[AUTHORIZED_VIEW]'); + try { + $gapicClient->deleteAuthorizedView($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function deleteBackupTest() { @@ -905,6 +1095,70 @@ public function generateConsistencyTokenExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function getAuthorizedViewTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $etag = 'etag3123477'; + $deletionProtection = true; + $expectedResponse = new AuthorizedView(); + $expectedResponse->setName($name2); + $expectedResponse->setEtag($etag); + $expectedResponse->setDeletionProtection($deletionProtection); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->authorizedViewName('[PROJECT]', '[INSTANCE]', '[TABLE]', '[AUTHORIZED_VIEW]'); + $response = $gapicClient->getAuthorizedView($formattedName); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/GetAuthorizedView', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAuthorizedViewExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->authorizedViewName('[PROJECT]', '[INSTANCE]', '[TABLE]', '[AUTHORIZED_VIEW]'); + try { + $gapicClient->getAuthorizedView($formattedName); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function getBackupTest() { @@ -1159,6 +1413,74 @@ public function getTableExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function listAuthorizedViewsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $authorizedViewsElement = new AuthorizedView(); + $authorizedViews = [ + $authorizedViewsElement, + ]; + $expectedResponse = new ListAuthorizedViewsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAuthorizedViews($authorizedViews); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $response = $gapicClient->listAuthorizedViews($formattedParent); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAuthorizedViews()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/ListAuthorizedViews', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAuthorizedViewsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + try { + $gapicClient->listAuthorizedViews($formattedParent); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function listBackupsTest() { @@ -1934,6 +2256,129 @@ public function undeleteTableExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } + /** @test */ + public function updateAuthorizedViewTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAuthorizedViewTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $etag = 'etag3123477'; + $deletionProtection = true; + $expectedResponse = new AuthorizedView(); + $expectedResponse->setName($name); + $expectedResponse->setEtag($etag); + $expectedResponse->setDeletionProtection($deletionProtection); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAuthorizedViewTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $authorizedView = new AuthorizedView(); + $response = $gapicClient->updateAuthorizedView($authorizedView); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/UpdateAuthorizedView', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAuthorizedView(); + $this->assertProtobufEquals($authorizedView, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAuthorizedViewTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAuthorizedViewExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAuthorizedViewTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $authorizedView = new AuthorizedView(); + $response = $gapicClient->updateAuthorizedView($authorizedView); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAuthorizedViewTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + /** @test */ public function updateBackupTest() { diff --git a/Bigtable/tests/Unit/Admin/V2/Client/BigtableTableAdminClientTest.php b/Bigtable/tests/Unit/Admin/V2/Client/BigtableTableAdminClientTest.php index ed32edd34f91..b57e6f65fd29 100644 --- a/Bigtable/tests/Unit/Admin/V2/Client/BigtableTableAdminClientTest.php +++ b/Bigtable/tests/Unit/Admin/V2/Client/BigtableTableAdminClientTest.php @@ -27,23 +27,29 @@ use Google\ApiCore\LongRunning\OperationsClient; use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; +use Google\Cloud\Bigtable\Admin\V2\AuthorizedView; use Google\Cloud\Bigtable\Admin\V2\Backup; use Google\Cloud\Bigtable\Admin\V2\CheckConsistencyRequest; use Google\Cloud\Bigtable\Admin\V2\CheckConsistencyResponse; use Google\Cloud\Bigtable\Admin\V2\Client\BigtableTableAdminClient; use Google\Cloud\Bigtable\Admin\V2\CopyBackupRequest; +use Google\Cloud\Bigtable\Admin\V2\CreateAuthorizedViewRequest; use Google\Cloud\Bigtable\Admin\V2\CreateBackupRequest; use Google\Cloud\Bigtable\Admin\V2\CreateTableFromSnapshotRequest; use Google\Cloud\Bigtable\Admin\V2\CreateTableRequest; +use Google\Cloud\Bigtable\Admin\V2\DeleteAuthorizedViewRequest; use Google\Cloud\Bigtable\Admin\V2\DeleteBackupRequest; use Google\Cloud\Bigtable\Admin\V2\DeleteSnapshotRequest; use Google\Cloud\Bigtable\Admin\V2\DeleteTableRequest; use Google\Cloud\Bigtable\Admin\V2\DropRowRangeRequest; use Google\Cloud\Bigtable\Admin\V2\GenerateConsistencyTokenRequest; use Google\Cloud\Bigtable\Admin\V2\GenerateConsistencyTokenResponse; +use Google\Cloud\Bigtable\Admin\V2\GetAuthorizedViewRequest; use Google\Cloud\Bigtable\Admin\V2\GetBackupRequest; use Google\Cloud\Bigtable\Admin\V2\GetSnapshotRequest; use Google\Cloud\Bigtable\Admin\V2\GetTableRequest; +use Google\Cloud\Bigtable\Admin\V2\ListAuthorizedViewsRequest; +use Google\Cloud\Bigtable\Admin\V2\ListAuthorizedViewsResponse; use Google\Cloud\Bigtable\Admin\V2\ListBackupsRequest; use Google\Cloud\Bigtable\Admin\V2\ListBackupsResponse; use Google\Cloud\Bigtable\Admin\V2\ListSnapshotsRequest; @@ -56,6 +62,7 @@ use Google\Cloud\Bigtable\Admin\V2\SnapshotTableRequest; use Google\Cloud\Bigtable\Admin\V2\Table; use Google\Cloud\Bigtable\Admin\V2\UndeleteTableRequest; +use Google\Cloud\Bigtable\Admin\V2\UpdateAuthorizedViewRequest; use Google\Cloud\Bigtable\Admin\V2\UpdateBackupRequest; use Google\Cloud\Bigtable\Admin\V2\UpdateTableRequest; use Google\Cloud\Iam\V1\GetIamPolicyRequest; @@ -318,6 +325,145 @@ public function copyBackupExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } + /** @test */ + public function createAuthorizedViewTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAuthorizedViewTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $etag = 'etag3123477'; + $deletionProtection = true; + $expectedResponse = new AuthorizedView(); + $expectedResponse->setName($name); + $expectedResponse->setEtag($etag); + $expectedResponse->setDeletionProtection($deletionProtection); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAuthorizedViewTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $authorizedViewId = 'authorizedViewId1171901009'; + $authorizedView = new AuthorizedView(); + $request = (new CreateAuthorizedViewRequest()) + ->setParent($formattedParent) + ->setAuthorizedViewId($authorizedViewId) + ->setAuthorizedView($authorizedView); + $response = $gapicClient->createAuthorizedView($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/CreateAuthorizedView', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAuthorizedViewId(); + $this->assertProtobufEquals($authorizedViewId, $actualValue); + $actualValue = $actualApiRequestObject->getAuthorizedView(); + $this->assertProtobufEquals($authorizedView, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAuthorizedViewTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createAuthorizedViewExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createAuthorizedViewTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $authorizedViewId = 'authorizedViewId1171901009'; + $authorizedView = new AuthorizedView(); + $request = (new CreateAuthorizedViewRequest()) + ->setParent($formattedParent) + ->setAuthorizedViewId($authorizedViewId) + ->setAuthorizedView($authorizedView); + $response = $gapicClient->createAuthorizedView($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAuthorizedViewTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + /** @test */ public function createBackupTest() { @@ -682,6 +828,67 @@ public function createTableFromSnapshotExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } + /** @test */ + public function deleteAuthorizedViewTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->authorizedViewName('[PROJECT]', '[INSTANCE]', '[TABLE]', '[AUTHORIZED_VIEW]'); + $request = (new DeleteAuthorizedViewRequest()) + ->setName($formattedName); + $gapicClient->deleteAuthorizedView($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/DeleteAuthorizedView', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAuthorizedViewExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->authorizedViewName('[PROJECT]', '[INSTANCE]', '[TABLE]', '[AUTHORIZED_VIEW]'); + $request = (new DeleteAuthorizedViewRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteAuthorizedView($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function deleteBackupTest() { @@ -990,6 +1197,74 @@ public function generateConsistencyTokenExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function getAuthorizedViewTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $etag = 'etag3123477'; + $deletionProtection = true; + $expectedResponse = new AuthorizedView(); + $expectedResponse->setName($name2); + $expectedResponse->setEtag($etag); + $expectedResponse->setDeletionProtection($deletionProtection); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->authorizedViewName('[PROJECT]', '[INSTANCE]', '[TABLE]', '[AUTHORIZED_VIEW]'); + $request = (new GetAuthorizedViewRequest()) + ->setName($formattedName); + $response = $gapicClient->getAuthorizedView($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/GetAuthorizedView', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAuthorizedViewExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->authorizedViewName('[PROJECT]', '[INSTANCE]', '[TABLE]', '[AUTHORIZED_VIEW]'); + $request = (new GetAuthorizedViewRequest()) + ->setName($formattedName); + try { + $gapicClient->getAuthorizedView($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function getBackupTest() { @@ -1260,6 +1535,78 @@ public function getTableExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function listAuthorizedViewsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $authorizedViewsElement = new AuthorizedView(); + $authorizedViews = [ + $authorizedViewsElement, + ]; + $expectedResponse = new ListAuthorizedViewsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAuthorizedViews($authorizedViews); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $request = (new ListAuthorizedViewsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAuthorizedViews($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAuthorizedViews()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/ListAuthorizedViews', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAuthorizedViewsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); + $request = (new ListAuthorizedViewsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAuthorizedViews($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function listBackupsTest() { @@ -2083,6 +2430,133 @@ public function undeleteTableExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } + /** @test */ + public function updateAuthorizedViewTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAuthorizedViewTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $etag = 'etag3123477'; + $deletionProtection = true; + $expectedResponse = new AuthorizedView(); + $expectedResponse->setName($name); + $expectedResponse->setEtag($etag); + $expectedResponse->setDeletionProtection($deletionProtection); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAuthorizedViewTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $authorizedView = new AuthorizedView(); + $request = (new UpdateAuthorizedViewRequest()) + ->setAuthorizedView($authorizedView); + $response = $gapicClient->updateAuthorizedView($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/UpdateAuthorizedView', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getAuthorizedView(); + $this->assertProtobufEquals($authorizedView, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAuthorizedViewTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateAuthorizedViewExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateAuthorizedViewTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $authorizedView = new AuthorizedView(); + $request = (new UpdateAuthorizedViewRequest()) + ->setAuthorizedView($authorizedView); + $response = $gapicClient->updateAuthorizedView($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAuthorizedViewTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + /** @test */ public function updateBackupTest() { From fae9bd3d5b0ffbcb7fd4bc8c1421bddde4910f09 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 12 Apr 2024 16:38:19 -0700 Subject: [PATCH 30/86] chore(main): release 0.241.0 (#7212) --- Batch/VERSION | 2 +- Bigtable/VERSION | 2 +- Bigtable/src/BigtableClient.php | 2 +- BinaryAuthorization/VERSION | 2 +- CHANGELOG.md | 171 ++++++++++++++++++++++++++++ ContainerAnalysis/VERSION | 2 +- Core/VERSION | 2 +- DiscoveryEngine/VERSION | 2 +- Logging/VERSION | 2 +- Logging/src/LoggingClient.php | 2 +- LongRunning/VERSION | 2 +- LongRunning/composer.json | 2 +- SecretManager/VERSION | 2 +- ShoppingCss/VERSION | 2 +- ShoppingMerchantInventories/VERSION | 2 +- ShoppingMerchantReports/VERSION | 2 +- Spanner/VERSION | 2 +- Spanner/src/SpannerClient.php | 2 +- Storage/VERSION | 2 +- Storage/src/StorageClient.php | 2 +- composer.json | 28 ++--- 21 files changed, 204 insertions(+), 33 deletions(-) diff --git a/Batch/VERSION b/Batch/VERSION index 5f2491c5adca..19270385eaf7 100644 --- a/Batch/VERSION +++ b/Batch/VERSION @@ -1 +1 @@ -0.16.4 +0.16.5 diff --git a/Bigtable/VERSION b/Bigtable/VERSION index b0f33908df16..34aae156b192 100644 --- a/Bigtable/VERSION +++ b/Bigtable/VERSION @@ -1 +1 @@ -1.30.3 +1.31.0 diff --git a/Bigtable/src/BigtableClient.php b/Bigtable/src/BigtableClient.php index e3026eccc0c9..306fb40bcfee 100644 --- a/Bigtable/src/BigtableClient.php +++ b/Bigtable/src/BigtableClient.php @@ -40,7 +40,7 @@ class BigtableClient { use ArrayTrait; - const VERSION = '1.30.3'; + const VERSION = '1.31.0'; /** * @var GapicClient diff --git a/BinaryAuthorization/VERSION b/BinaryAuthorization/VERSION index ee94dd834b53..b60d71966ae9 100644 --- a/BinaryAuthorization/VERSION +++ b/BinaryAuthorization/VERSION @@ -1 +1 @@ -0.8.3 +0.8.4 diff --git a/CHANGELOG.md b/CHANGELOG.md index c0232ac4e476..c5ba1f2de3a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,176 @@ # Changelog +## 0.241.0 + +
google/cloud-batch 0.16.5 + + + +### Documentation + +* Update comments on ServiceAccount email and scopes fields ([#7209](https://github.com/googleapis/google-cloud-php/issues/7209)) ([b053b15](https://github.com/googleapis/google-cloud-php/commit/b053b154a6f843cecf8d9353ffe92337b4f7fffb)) + +
+ +
google/cloud-bigtable 1.31.0 + + + +### Features + +* Add authorized view bindings to Cloud Bigtable data APIs and messages ([e64fcf9](https://github.com/googleapis/google-cloud-php/commit/e64fcf9344377ddfc229ce674d744cbd2bbf0511)) +* Cloud Bigtable Authorized Views admin APIs protos ([e64fcf9](https://github.com/googleapis/google-cloud-php/commit/e64fcf9344377ddfc229ce674d744cbd2bbf0511)) +* Publish Automated Backups protos ([#7118](https://github.com/googleapis/google-cloud-php/issues/7118)) ([e64fcf9](https://github.com/googleapis/google-cloud-php/commit/e64fcf9344377ddfc229ce674d744cbd2bbf0511)) + + +### Documentation + +* The field `table_name` in message `.google.bigtable.v2.CheckAndMutateRowRequest` is changed from required to optional ([e64fcf9](https://github.com/googleapis/google-cloud-php/commit/e64fcf9344377ddfc229ce674d744cbd2bbf0511)) +* The field `table_name` in message `.google.bigtable.v2.MutateRowRequest` is changed from required to optional ([e64fcf9](https://github.com/googleapis/google-cloud-php/commit/e64fcf9344377ddfc229ce674d744cbd2bbf0511)) +* The field `table_name` in message `.google.bigtable.v2.MutateRowsRequest` is changed from required to optional ([e64fcf9](https://github.com/googleapis/google-cloud-php/commit/e64fcf9344377ddfc229ce674d744cbd2bbf0511)) +* The field `table_name` in message `.google.bigtable.v2.ReadModifyWriteRowRequest` is changed from required to optional ([e64fcf9](https://github.com/googleapis/google-cloud-php/commit/e64fcf9344377ddfc229ce674d744cbd2bbf0511)) +* The field `table_name` in message `.google.bigtable.v2.ReadRowsRequest` is changed from required to optional ([e64fcf9](https://github.com/googleapis/google-cloud-php/commit/e64fcf9344377ddfc229ce674d744cbd2bbf0511)) +* The field `table_name` in message `.google.bigtable.v2.SampleRowKeysRequest` is changed from required to optional ([e64fcf9](https://github.com/googleapis/google-cloud-php/commit/e64fcf9344377ddfc229ce674d744cbd2bbf0511)) + +
+ +
google/cloud-binary-authorization 0.8.4 + + + +### Bug Fixes + +* **deps:** Update dependency google/grafeas to ^0.10.0 ([#7192](https://github.com/googleapis/google-cloud-php/issues/7192)) ([11a8069](https://github.com/googleapis/google-cloud-php/commit/11a8069c4f1faa99c350ce690b077d3812f27566)) + +
+ +
google/cloud-container-analysis 0.5.4 + + + +### Bug Fixes + +* **deps:** Update dependency google/grafeas to ^0.10.0 ([#7192](https://github.com/googleapis/google-cloud-php/issues/7192)) ([11a8069](https://github.com/googleapis/google-cloud-php/commit/11a8069c4f1faa99c350ce690b077d3812f27566)) + +
+ +
google/cloud-core 1.57.0 + + + +### Features + +* Add new LongRunning client, rename LongRunning namespace (and add alias for BC) ([#6675](https://github.com/googleapis/google-cloud-php/issues/6675)) ([2fe9eaf](https://github.com/googleapis/google-cloud-php/commit/2fe9eaf0aecc1da7c1ff5d42e4b4bd0030f3cc96)) + +
+ +
google/cloud-discoveryengine 0.11.0 + + + +### Features + +* Add advanced engine model APIs ([0c2ecdb](https://github.com/googleapis/google-cloud-php/commit/0c2ecdb41bf4c917181b0c489cdead319dfd0fde)) +* Add answer generation APIs ([0c2ecdb](https://github.com/googleapis/google-cloud-php/commit/0c2ecdb41bf4c917181b0c489cdead319dfd0fde)) +* Add standalone grounding API ([0c2ecdb](https://github.com/googleapis/google-cloud-php/commit/0c2ecdb41bf4c917181b0c489cdead319dfd0fde)) +* Add standalone ranking API ([0c2ecdb](https://github.com/googleapis/google-cloud-php/commit/0c2ecdb41bf4c917181b0c489cdead319dfd0fde)) +* Promote blending search to v1 ([83c87e2](https://github.com/googleapis/google-cloud-php/commit/83c87e27dcfe04ae197a847d065f38901e74972e)) +* Promote healthcare search to v1 ([83c87e2](https://github.com/googleapis/google-cloud-php/commit/83c87e27dcfe04ae197a847d065f38901e74972e)) +* Promote online chunking search to v1 ([83c87e2](https://github.com/googleapis/google-cloud-php/commit/83c87e27dcfe04ae197a847d065f38901e74972e)) +* Promote recommendation service to v1 ([#7216](https://github.com/googleapis/google-cloud-php/issues/7216)) ([83c87e2](https://github.com/googleapis/google-cloud-php/commit/83c87e27dcfe04ae197a847d065f38901e74972e)) +* Support advanced search boosting ([0c2ecdb](https://github.com/googleapis/google-cloud-php/commit/0c2ecdb41bf4c917181b0c489cdead319dfd0fde)) +* Support boost/bury on multi-turn search ([83c87e2](https://github.com/googleapis/google-cloud-php/commit/83c87e27dcfe04ae197a847d065f38901e74972e)) +* Support import data from Cloud Spanner, BigTable, SQL and Firestore ([83c87e2](https://github.com/googleapis/google-cloud-php/commit/83c87e27dcfe04ae197a847d065f38901e74972e)) +* Support import data from Cloud Spanner, BigTable, SQL and Firestore ([#7211](https://github.com/googleapis/google-cloud-php/issues/7211)) ([0c2ecdb](https://github.com/googleapis/google-cloud-php/commit/0c2ecdb41bf4c917181b0c489cdead319dfd0fde)) + + +### Documentation + +* Keep the API doc up-to-date with recent changes ([83c87e2](https://github.com/googleapis/google-cloud-php/commit/83c87e27dcfe04ae197a847d065f38901e74972e)) +* Keep the API doc up-to-date with recent changes ([0c2ecdb](https://github.com/googleapis/google-cloud-php/commit/0c2ecdb41bf4c917181b0c489cdead319dfd0fde)) + +
+ +
google/cloud-logging 1.29.4 + + + +
+ +
google/longrunning 0.4.0 + + + +### Features + +* Add new LongRunning client, rename LongRunning namespace (and add alias for BC) ([#6675](https://github.com/googleapis/google-cloud-php/issues/6675)) ([2fe9eaf](https://github.com/googleapis/google-cloud-php/commit/2fe9eaf0aecc1da7c1ff5d42e4b4bd0030f3cc96)) + +
+ +
google/cloud-secret-manager 1.14.1 + + + +
+ +
google/shopping-css 0.2.3 + + + +### Bug Fixes + +* **deps:** Update dependency google/shopping-common-protos to ^0.3.0 ([#7221](https://github.com/googleapis/google-cloud-php/issues/7221)) ([0fcd580](https://github.com/googleapis/google-cloud-php/commit/0fcd58035e4706e4d3505d2489f51f25ad082c52)) + +
+ +
google/shopping-merchant-inventories 0.4.0 + + + +### Features + +* Fix inventories sub-API publication by adding correct child_type in the API proto ([#7214](https://github.com/googleapis/google-cloud-php/issues/7214)) ([d537750](https://github.com/googleapis/google-cloud-php/commit/d537750244c7783b4845bfcdd7d158d74b1a5852)) + + +### Bug Fixes + +* **deps:** Update dependency google/shopping-common-protos to ^0.3.0 ([#7221](https://github.com/googleapis/google-cloud-php/issues/7221)) ([0fcd580](https://github.com/googleapis/google-cloud-php/commit/0fcd58035e4706e4d3505d2489f51f25ad082c52)) + + +### Documentation + +* A comment for field `region` in message `.google.shopping.merchant.inventories.v1beta.RegionalInventory` is changed ([d537750](https://github.com/googleapis/google-cloud-php/commit/d537750244c7783b4845bfcdd7d158d74b1a5852)) +* A comment for field `store_code` in message `.google.shopping.merchant.inventories.v1beta.LocalInventory` is changed ([d537750](https://github.com/googleapis/google-cloud-php/commit/d537750244c7783b4845bfcdd7d158d74b1a5852)) + +
+ +
google/shopping-merchant-reports 0.7.0 + + + +### Features + +* Add click potential to Reports sub-API publication ([#7208](https://github.com/googleapis/google-cloud-php/issues/7208)) ([4932980](https://github.com/googleapis/google-cloud-php/commit/4932980eca54d99baf0563c1058e64e2ccb5fa56)) + + +### Bug Fixes + +* **deps:** Update dependency google/shopping-common-protos to ^0.3.0 ([#7221](https://github.com/googleapis/google-cloud-php/issues/7221)) ([0fcd580](https://github.com/googleapis/google-cloud-php/commit/0fcd58035e4706e4d3505d2489f51f25ad082c52)) + +
+ +
google/cloud-spanner 1.75.1 + + + +
+ +
google/cloud-storage 1.41.2 + + + +
+ ## 0.240.0
google/cloud-advisorynotifications 0.8.0 diff --git a/ContainerAnalysis/VERSION b/ContainerAnalysis/VERSION index be14282b7fff..7d8568351b4f 100644 --- a/ContainerAnalysis/VERSION +++ b/ContainerAnalysis/VERSION @@ -1 +1 @@ -0.5.3 +0.5.4 diff --git a/Core/VERSION b/Core/VERSION index dad6e3a55a4d..373aea97570a 100644 --- a/Core/VERSION +++ b/Core/VERSION @@ -1 +1 @@ -1.56.2 +1.57.0 diff --git a/DiscoveryEngine/VERSION b/DiscoveryEngine/VERSION index 78bc1abd14f2..d9df1bbc0c7b 100644 --- a/DiscoveryEngine/VERSION +++ b/DiscoveryEngine/VERSION @@ -1 +1 @@ -0.10.0 +0.11.0 diff --git a/Logging/VERSION b/Logging/VERSION index cad6e08a257b..93f9beed36e7 100644 --- a/Logging/VERSION +++ b/Logging/VERSION @@ -1 +1 @@ -1.29.3 +1.29.4 diff --git a/Logging/src/LoggingClient.php b/Logging/src/LoggingClient.php index 985c48683735..4431a271a48d 100644 --- a/Logging/src/LoggingClient.php +++ b/Logging/src/LoggingClient.php @@ -70,7 +70,7 @@ class LoggingClient use ArrayTrait; use ClientTrait; - const VERSION = '1.29.3'; + const VERSION = '1.29.4'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/logging.admin'; const READ_ONLY_SCOPE = 'https://www.googleapis.com/auth/logging.read'; diff --git a/LongRunning/VERSION b/LongRunning/VERSION index 9e11b32fcaa9..1d0ba9ea182b 100644 --- a/LongRunning/VERSION +++ b/LongRunning/VERSION @@ -1 +1 @@ -0.3.1 +0.4.0 diff --git a/LongRunning/composer.json b/LongRunning/composer.json index f1a44afce2d6..8a7dae7bae9e 100644 --- a/LongRunning/composer.json +++ b/LongRunning/composer.json @@ -3,7 +3,7 @@ "description": "Google LongRunning Client for PHP", "license": "Apache-2.0", "minimum-stability": "stable", - "version": "0.3.1", + "version": "0.4.0", "autoload": { "psr-4": { "Google\\ApiCore\\LongRunning\\": "src/ApiCore/LongRunning", diff --git a/SecretManager/VERSION b/SecretManager/VERSION index 850e742404bb..63e799cf451b 100644 --- a/SecretManager/VERSION +++ b/SecretManager/VERSION @@ -1 +1 @@ -1.14.0 +1.14.1 diff --git a/ShoppingCss/VERSION b/ShoppingCss/VERSION index ee1372d33a29..7179039691ce 100644 --- a/ShoppingCss/VERSION +++ b/ShoppingCss/VERSION @@ -1 +1 @@ -0.2.2 +0.2.3 diff --git a/ShoppingMerchantInventories/VERSION b/ShoppingMerchantInventories/VERSION index d15723fbe8de..1d0ba9ea182b 100644 --- a/ShoppingMerchantInventories/VERSION +++ b/ShoppingMerchantInventories/VERSION @@ -1 +1 @@ -0.3.2 +0.4.0 diff --git a/ShoppingMerchantReports/VERSION b/ShoppingMerchantReports/VERSION index b6160487433b..faef31a4357c 100644 --- a/ShoppingMerchantReports/VERSION +++ b/ShoppingMerchantReports/VERSION @@ -1 +1 @@ -0.6.2 +0.7.0 diff --git a/Spanner/VERSION b/Spanner/VERSION index 7c7053aa2388..e1e86acb2353 100644 --- a/Spanner/VERSION +++ b/Spanner/VERSION @@ -1 +1 @@ -1.75.0 +1.75.1 diff --git a/Spanner/src/SpannerClient.php b/Spanner/src/SpannerClient.php index fbe4b1539d49..3a00bdabf911 100644 --- a/Spanner/src/SpannerClient.php +++ b/Spanner/src/SpannerClient.php @@ -120,7 +120,7 @@ class SpannerClient use LROTrait; use ValidateTrait; - const VERSION = '1.75.0'; + const VERSION = '1.75.1'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/spanner.data'; const ADMIN_SCOPE = 'https://www.googleapis.com/auth/spanner.admin'; diff --git a/Storage/VERSION b/Storage/VERSION index f86fb9cbcf1c..5f24410720f5 100644 --- a/Storage/VERSION +++ b/Storage/VERSION @@ -1 +1 @@ -1.41.1 +1.41.2 diff --git a/Storage/src/StorageClient.php b/Storage/src/StorageClient.php index 797b7fe029d2..d82b9c6a2c2c 100644 --- a/Storage/src/StorageClient.php +++ b/Storage/src/StorageClient.php @@ -47,7 +47,7 @@ class StorageClient use ArrayTrait; use ClientTrait; - const VERSION = '1.41.1'; + const VERSION = '1.41.2'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/devstorage.full_control'; const READ_ONLY_SCOPE = 'https://www.googleapis.com/auth/devstorage.read_only'; diff --git a/composer.json b/composer.json index 7c936f7989eb..1030316b57ec 100644 --- a/composer.json +++ b/composer.json @@ -90,7 +90,7 @@ "google/cloud-assured-workloads": "0.11.2", "google/cloud-automl": "1.6.2", "google/cloud-bare-metal-solution": "0.6.2", - "google/cloud-batch": "0.16.4", + "google/cloud-batch": "0.16.5", "google/cloud-beyondcorp-appconnections": "0.4.2", "google/cloud-beyondcorp-appconnectors": "0.4.2", "google/cloud-beyondcorp-appgateways": "0.4.2", @@ -105,10 +105,10 @@ "google/cloud-bigquery-reservation": "1.3.2", "google/cloud-bigquery-storage": "1.10.1", "google/cloud-bigquerydatatransfer": "1.8.2", - "google/cloud-bigtable": "1.30.3", + "google/cloud-bigtable": "1.31.0", "google/cloud-billing": "1.9.4", "google/cloud-billing-budgets": "1.4.2", - "google/cloud-binary-authorization": "0.8.3", + "google/cloud-binary-authorization": "0.8.4", "google/cloud-build": "0.16.0", "google/cloud-certificate-manager": "0.7.0", "google/cloud-channel": "1.9.2", @@ -120,8 +120,8 @@ "google/cloud-config": "0.4.0", "google/cloud-contact-center-insights": "1.9.2", "google/cloud-container": "1.30.0", - "google/cloud-container-analysis": "0.5.3", - "google/cloud-core": "1.56.2", + "google/cloud-container-analysis": "0.5.4", + "google/cloud-core": "1.57.0", "google/cloud-data-catalog": "1.10.0", "google/cloud-data-fusion": "0.6.2", "google/cloud-datacatalog-lineage": "0.5.2", @@ -138,7 +138,7 @@ "google/cloud-deploy": "0.17.2", "google/cloud-dialogflow": "1.12.0", "google/cloud-dialogflow-cx": "0.3.1", - "google/cloud-discoveryengine": "0.10.0", + "google/cloud-discoveryengine": "0.11.0", "google/cloud-dlp": "1.13.0", "google/cloud-dms": "1.5.2", "google/cloud-document-ai": "1.11.1", @@ -166,7 +166,7 @@ "google/cloud-kms-inventory": "0.4.2", "google/cloud-language": "0.32.3", "google/cloud-life-sciences": "0.6.2", - "google/cloud-logging": "1.29.3", + "google/cloud-logging": "1.29.4", "google/cloud-managed-identities": "1.3.2", "google/cloud-media-translation": "0.4.1", "google/cloud-memcache": "1.3.2", @@ -201,7 +201,7 @@ "google/cloud-retail": "1.6.1", "google/cloud-run": "0.9.0", "google/cloud-scheduler": "1.10.2", - "google/cloud-secret-manager": "1.14.0", + "google/cloud-secret-manager": "1.14.1", "google/cloud-securesourcemanager": "0.2.2", "google/cloud-security-center": "1.27.0", "google/cloud-security-private-ca": "1.7.0", @@ -213,10 +213,10 @@ "google/cloud-service-usage": "1.3.1", "google/cloud-servicehealth": "0.1.3", "google/cloud-shell": "1.3.2", - "google/cloud-spanner": "1.75.0", + "google/cloud-spanner": "1.75.1", "google/cloud-speech": "1.18.0", "google/cloud-sql-admin": "0.16.0", - "google/cloud-storage": "1.41.1", + "google/cloud-storage": "1.41.2", "google/cloud-storage-transfer": "1.4.2", "google/cloud-storageinsights": "0.3.2", "google/cloud-support": "0.2.2", @@ -239,12 +239,12 @@ "google/cloud-web-security-scanner": "0.8.2", "google/cloud-workflows": "0.5.2", "google/grafeas": "0.10.0", - "google/longrunning": "0.3.1", + "google/longrunning": "0.4.0", "google/shopping-common-protos": "0.3.0", - "google/shopping-css": "0.2.2", - "google/shopping-merchant-inventories": "0.3.2", + "google/shopping-css": "0.2.3", + "google/shopping-merchant-inventories": "0.4.0", "google/shopping-merchant-quota": "0.1.0", - "google/shopping-merchant-reports": "0.6.2" + "google/shopping-merchant-reports": "0.7.0" }, "suggest": { "opis/closure": "May be used to serialize closures to process jobs in the batch daemon. Please require version ^3.", From 2060f2df4a4fc57d94d00acb274fcc2a9d75952c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 13 Apr 2024 00:28:04 +0000 Subject: [PATCH 31/86] chore: add license and generated code headers to generated resource files (#7222) docs: Various updates PiperOrigin-RevId: 624233552 Source-Link: https://github.com/googleapis/googleapis/commit/1413b13ee1741183772b57481d5f9a99c9bdc129 Source-Link: https://github.com/googleapis/googleapis-gen/commit/fa02723cdbcf0db44ebdfe41858d0fe4100945ad Copy-Tag: eyJwIjoiTW9uaXRvcmluZy8uT3dsQm90LnlhbWwiLCJoIjoiZmEwMjcyM2NkYmNmMGRiNDRlYmRmZTQxODU4ZDBmZTQxMDA5NDVhZCJ9 docs: updated comments PiperOrigin-RevId: 624277410 Source-Link: https://github.com/googleapis/googleapis/commit/2d881be8c566e4c374061248dd205efd72b7ef4f Source-Link: https://github.com/googleapis/googleapis-gen/commit/1d063f9353aeffb9a968f1a00f1d105b0c14a42d Copy-Tag: eyJwIjoiTW9uaXRvcmluZy8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 --- Monitoring/metadata/V3/QueryService.php | 4 +- .../V3/GroupServiceClient/create_group.php | 5 +- .../V3/GroupServiceClient/list_groups.php | 5 +- .../create_metric_descriptor.php | 10 +- .../create_service_time_series.php | 5 +- .../create_time_series.php | 8 +- .../delete_metric_descriptor.php | 3 +- .../get_metric_descriptor.php | 5 +- .../get_monitored_resource_descriptor.php | 2 +- .../list_metric_descriptors.php | 7 +- .../list_monitored_resource_descriptors.php | 7 +- .../MetricServiceClient/list_time_series.php | 14 +- .../QueryServiceClient/query_time_series.php | 7 +- .../create_service.php | 5 +- .../delete_service_level_objective.php | 3 +- .../get_service_level_objective.php | 3 +- .../list_service_level_objectives.php | 2 +- .../list_services.php | 8 +- .../AlertPolicy/Condition/MetricThreshold.php | 12 +- .../src/V3/AlertPolicy/Documentation.php | 4 +- .../src/V3/Client/MetricServiceClient.php | 18 +- .../src/V3/Client/QueryServiceClient.php | 4 +- .../Client/ServiceMonitoringServiceClient.php | 8 +- Monitoring/src/V3/CreateGroupRequest.php | 45 ++--- .../src/V3/CreateMetricDescriptorRequest.php | 45 ++--- .../V3/CreateServiceLevelObjectiveRequest.php | 8 +- Monitoring/src/V3/CreateServiceRequest.php | 25 +-- Monitoring/src/V3/CreateTimeSeriesRequest.php | 25 +-- .../src/V3/DeleteMetricDescriptorRequest.php | 15 +- .../V3/DeleteServiceLevelObjectiveRequest.php | 15 +- .../src/V3/Gapic/GroupServiceGapicClient.php | 19 +- .../src/V3/Gapic/MetricServiceGapicClient.php | 71 ++++---- .../src/V3/Gapic/QueryServiceGapicClient.php | 9 +- .../ServiceMonitoringServiceGapicClient.php | 66 +++---- .../src/V3/GetMetricDescriptorRequest.php | 15 +- .../V3/GetServiceLevelObjectiveRequest.php | 15 +- Monitoring/src/V3/ListGroupsRequest.php | 25 +-- .../src/V3/ListMetricDescriptorsRequest.php | 41 +++-- ...istMonitoredResourceDescriptorsRequest.php | 25 +-- .../V3/ListServiceLevelObjectivesRequest.php | 10 +- Monitoring/src/V3/ListServicesRequest.php | 162 +++++++++--------- Monitoring/src/V3/ListTimeSeriesRequest.php | 90 +++++----- .../ListTimeSeriesRequest/TimeSeriesView.php | 2 +- Monitoring/src/V3/QueryTimeSeriesRequest.php | 20 ++- Monitoring/src/V3/ServiceTier.php | 12 +- Monitoring/src/V3/TimeInterval.php | 61 ++++--- Monitoring/src/V3/UpdateGroupRequest.php | 25 +-- ...alert_policy_service_descriptor_config.php | 20 +++ ...lert_policy_service_rest_client_config.php | 20 +++ .../group_service_descriptor_config.php | 20 +++ .../group_service_rest_client_config.php | 20 +++ .../metric_service_descriptor_config.php | 20 +++ .../metric_service_rest_client_config.php | 20 +++ ...tion_channel_service_descriptor_config.php | 20 +++ ...ion_channel_service_rest_client_config.php | 20 +++ .../query_service_descriptor_config.php | 20 +++ .../query_service_rest_client_config.php | 20 +++ ...e_monitoring_service_descriptor_config.php | 20 +++ ..._monitoring_service_rest_client_config.php | 20 +++ .../snooze_service_descriptor_config.php | 20 +++ .../snooze_service_rest_client_config.php | 20 +++ ...uptime_check_service_descriptor_config.php | 20 +++ ...ptime_check_service_rest_client_config.php | 20 +++ 63 files changed, 886 insertions(+), 429 deletions(-) diff --git a/Monitoring/metadata/V3/QueryService.php b/Monitoring/metadata/V3/QueryService.php index 9c53d1193e14..fb4ffd3bc28d 100644 --- a/Monitoring/metadata/V3/QueryService.php +++ b/Monitoring/metadata/V3/QueryService.php @@ -15,12 +15,12 @@ public static function initOnce() { return; } \GPBMetadata\Google\Api\Annotations::initOnce(); - \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); \GPBMetadata\Google\Api\Client::initOnce(); + \GPBMetadata\Google\Monitoring\V3\MetricService::initOnce(); $pool->internalAddGeneratedFile( ' ¼ -(google/monitoring/v3/query_service.protogoogle.monitoring.v3)google/monitoring/v3/metric_service.protogoogle/api/client.proto2Þ +(google/monitoring/v3/query_service.protogoogle.monitoring.v3google/api/client.proto)google/monitoring/v3/metric_service.proto2Þ QueryService¡ QueryTimeSeries,.google.monitoring.v3.QueryTimeSeriesRequest-.google.monitoring.v3.QueryTimeSeriesResponse"1‚Óä“+"&/v3/{name=projects/*}/timeSeries:query:*©ÊAmonitoring.googleapis.comÒA‰https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/monitoring,https://www.googleapis.com/auth/monitoring.readBÌ com.google.monitoring.v3BQueryServiceProtoPZAcloud.google.com/go/monitoring/apiv3/v2/monitoringpb;monitoringpbªGoogle.Cloud.Monitoring.V3ÊGoogle\\Cloud\\Monitoring\\V3êGoogle::Cloud::Monitoring::V3bproto3' diff --git a/Monitoring/samples/V3/GroupServiceClient/create_group.php b/Monitoring/samples/V3/GroupServiceClient/create_group.php index 4953ccecd48b..8a1a90022d25 100644 --- a/Monitoring/samples/V3/GroupServiceClient/create_group.php +++ b/Monitoring/samples/V3/GroupServiceClient/create_group.php @@ -31,8 +31,9 @@ /** * Creates a new group. * - * @param string $name The [project](https://cloud.google.com/monitoring/api/v3#project_name) in - * which to create the group. The format is: + * @param string $name The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * to create the group. The format is: * * projects/[PROJECT_ID_OR_NUMBER] */ diff --git a/Monitoring/samples/V3/GroupServiceClient/list_groups.php b/Monitoring/samples/V3/GroupServiceClient/list_groups.php index a3163d527f75..9824913c1906 100644 --- a/Monitoring/samples/V3/GroupServiceClient/list_groups.php +++ b/Monitoring/samples/V3/GroupServiceClient/list_groups.php @@ -32,8 +32,9 @@ /** * Lists the existing groups. * - * @param string $name The [project](https://cloud.google.com/monitoring/api/v3#project_name) - * whose groups are to be listed. The format is: + * @param string $name The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * groups are to be listed. The format is: * * projects/[PROJECT_ID_OR_NUMBER] */ diff --git a/Monitoring/samples/V3/MetricServiceClient/create_metric_descriptor.php b/Monitoring/samples/V3/MetricServiceClient/create_metric_descriptor.php index eb3f9be5c9a1..6bd13a39d0f9 100644 --- a/Monitoring/samples/V3/MetricServiceClient/create_metric_descriptor.php +++ b/Monitoring/samples/V3/MetricServiceClient/create_metric_descriptor.php @@ -30,13 +30,15 @@ /** * Creates a new metric descriptor. - * The creation is executed asynchronously and callers may check the returned - * operation to track its progress. + * The creation is executed asynchronously. * User-created metric descriptors define * [custom metrics](https://cloud.google.com/monitoring/custom-metrics). + * The metric descriptor is updated if it already exists, + * except that metric labels are never removed. * - * @param string $name The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * @param string $name The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * 4 * projects/[PROJECT_ID_OR_NUMBER] */ diff --git a/Monitoring/samples/V3/MetricServiceClient/create_service_time_series.php b/Monitoring/samples/V3/MetricServiceClient/create_service_time_series.php index db344b7c17e7..598599ca2956 100644 --- a/Monitoring/samples/V3/MetricServiceClient/create_service_time_series.php +++ b/Monitoring/samples/V3/MetricServiceClient/create_service_time_series.php @@ -39,8 +39,9 @@ * [projects.timeSeries.create][google.monitoring.v3.MetricService.CreateTimeSeries] * instead. * - * @param string $formattedName The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * @param string $formattedName The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * * projects/[PROJECT_ID_OR_NUMBER] * Please see {@see MetricServiceClient::projectName()} for help formatting this field. diff --git a/Monitoring/samples/V3/MetricServiceClient/create_time_series.php b/Monitoring/samples/V3/MetricServiceClient/create_time_series.php index 530044e80e9c..419488c9c128 100644 --- a/Monitoring/samples/V3/MetricServiceClient/create_time_series.php +++ b/Monitoring/samples/V3/MetricServiceClient/create_time_series.php @@ -33,9 +33,13 @@ * The response is empty if all time series in the request were written. * If any time series could not be written, a corresponding failure message is * included in the error response. + * This method does not support + * [resource locations constraint of an organization + * policy](https://cloud.google.com/resource-manager/docs/organization-policy/defining-locations#setting_the_organization_policy). * - * @param string $formattedName The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * @param string $formattedName The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * * projects/[PROJECT_ID_OR_NUMBER] * Please see {@see MetricServiceClient::projectName()} for help formatting this field. diff --git a/Monitoring/samples/V3/MetricServiceClient/delete_metric_descriptor.php b/Monitoring/samples/V3/MetricServiceClient/delete_metric_descriptor.php index 30db5fe24e7b..538faf02b3b3 100644 --- a/Monitoring/samples/V3/MetricServiceClient/delete_metric_descriptor.php +++ b/Monitoring/samples/V3/MetricServiceClient/delete_metric_descriptor.php @@ -32,7 +32,8 @@ * [custom metrics](https://cloud.google.com/monitoring/custom-metrics) can be * deleted. * - * @param string $formattedName The metric descriptor on which to execute the request. The format is: + * @param string $formattedName The metric descriptor on which to execute the request. The format + * is: * * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] * diff --git a/Monitoring/samples/V3/MetricServiceClient/get_metric_descriptor.php b/Monitoring/samples/V3/MetricServiceClient/get_metric_descriptor.php index ffc75671b31e..4913db2b07bd 100644 --- a/Monitoring/samples/V3/MetricServiceClient/get_metric_descriptor.php +++ b/Monitoring/samples/V3/MetricServiceClient/get_metric_descriptor.php @@ -29,9 +29,10 @@ use Google\Cloud\Monitoring\V3\GetMetricDescriptorRequest; /** - * Gets a single metric descriptor. This method does not require a Workspace. + * Gets a single metric descriptor. * - * @param string $formattedName The metric descriptor on which to execute the request. The format is: + * @param string $formattedName The metric descriptor on which to execute the request. The format + * is: * * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] * diff --git a/Monitoring/samples/V3/MetricServiceClient/get_monitored_resource_descriptor.php b/Monitoring/samples/V3/MetricServiceClient/get_monitored_resource_descriptor.php index d4a3b1b36b6e..05b69a6ca05c 100644 --- a/Monitoring/samples/V3/MetricServiceClient/get_monitored_resource_descriptor.php +++ b/Monitoring/samples/V3/MetricServiceClient/get_monitored_resource_descriptor.php @@ -29,7 +29,7 @@ use Google\Cloud\Monitoring\V3\GetMonitoredResourceDescriptorRequest; /** - * Gets a single monitored resource descriptor. This method does not require a Workspace. + * Gets a single monitored resource descriptor. * * @param string $formattedName The monitored resource descriptor to get. The format is: * diff --git a/Monitoring/samples/V3/MetricServiceClient/list_metric_descriptors.php b/Monitoring/samples/V3/MetricServiceClient/list_metric_descriptors.php index 26d849faaa28..476bec0cbdca 100644 --- a/Monitoring/samples/V3/MetricServiceClient/list_metric_descriptors.php +++ b/Monitoring/samples/V3/MetricServiceClient/list_metric_descriptors.php @@ -30,10 +30,11 @@ use Google\Cloud\Monitoring\V3\ListMetricDescriptorsRequest; /** - * Lists metric descriptors that match a filter. This method does not require a Workspace. + * Lists metric descriptors that match a filter. * - * @param string $name The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * @param string $name The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * * projects/[PROJECT_ID_OR_NUMBER] */ diff --git a/Monitoring/samples/V3/MetricServiceClient/list_monitored_resource_descriptors.php b/Monitoring/samples/V3/MetricServiceClient/list_monitored_resource_descriptors.php index a36f8135a3cd..f4e75cb9811d 100644 --- a/Monitoring/samples/V3/MetricServiceClient/list_monitored_resource_descriptors.php +++ b/Monitoring/samples/V3/MetricServiceClient/list_monitored_resource_descriptors.php @@ -30,10 +30,11 @@ use Google\Cloud\Monitoring\V3\ListMonitoredResourceDescriptorsRequest; /** - * Lists monitored resource descriptors that match a filter. This method does not require a Workspace. + * Lists monitored resource descriptors that match a filter. * - * @param string $name The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * @param string $name The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * * projects/[PROJECT_ID_OR_NUMBER] */ diff --git a/Monitoring/samples/V3/MetricServiceClient/list_time_series.php b/Monitoring/samples/V3/MetricServiceClient/list_time_series.php index 5e2f4c21d744..83960d35fa49 100644 --- a/Monitoring/samples/V3/MetricServiceClient/list_time_series.php +++ b/Monitoring/samples/V3/MetricServiceClient/list_time_series.php @@ -32,19 +32,21 @@ use Google\Cloud\Monitoring\V3\TimeSeries; /** - * Lists time series that match a filter. This method does not require a Workspace. + * Lists time series that match a filter. * - * @param string $formattedName The [project](https://cloud.google.com/monitoring/api/v3#project_name), + * @param string $formattedName The + * [project](https://cloud.google.com/monitoring/api/v3#project_name), * organization or folder on which to execute the request. The format is: * * projects/[PROJECT_ID_OR_NUMBER] * organizations/[ORGANIZATION_ID] * folders/[FOLDER_ID] * Please see {@see MetricServiceClient::workspaceName()} for help formatting this field. - * @param string $filter A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * that specifies which time series should be returned. The filter must - * specify a single metric type, and can additionally specify metric labels - * and other information. For example: + * @param string $filter A [monitoring + * filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies + * which time series should be returned. The filter must specify a single + * metric type, and can additionally specify metric labels and other + * information. For example: * * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND * metric.labels.instance_name = "my-instance-name" diff --git a/Monitoring/samples/V3/QueryServiceClient/query_time_series.php b/Monitoring/samples/V3/QueryServiceClient/query_time_series.php index e3db84e1685b..3f8272a75e9b 100644 --- a/Monitoring/samples/V3/QueryServiceClient/query_time_series.php +++ b/Monitoring/samples/V3/QueryServiceClient/query_time_series.php @@ -30,10 +30,11 @@ use Google\Cloud\Monitoring\V3\TimeSeriesData; /** - * Queries time series using Monitoring Query Language. This method does not require a Workspace. + * Queries time series using Monitoring Query Language. * - * @param string $name The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * @param string $name The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * * projects/[PROJECT_ID_OR_NUMBER] * @param string $query The query in the [Monitoring Query diff --git a/Monitoring/samples/V3/ServiceMonitoringServiceClient/create_service.php b/Monitoring/samples/V3/ServiceMonitoringServiceClient/create_service.php index 92d46e77dc16..8add387c880a 100644 --- a/Monitoring/samples/V3/ServiceMonitoringServiceClient/create_service.php +++ b/Monitoring/samples/V3/ServiceMonitoringServiceClient/create_service.php @@ -31,8 +31,9 @@ /** * Create a `Service`. * - * @param string $parent Resource [name](https://cloud.google.com/monitoring/api/v3#project_name) of - * the parent workspace. The format is: + * @param string $parent Resource + * [name](https://cloud.google.com/monitoring/api/v3#project_name) of the + * parent Metrics Scope. The format is: * * projects/[PROJECT_ID_OR_NUMBER] */ diff --git a/Monitoring/samples/V3/ServiceMonitoringServiceClient/delete_service_level_objective.php b/Monitoring/samples/V3/ServiceMonitoringServiceClient/delete_service_level_objective.php index 764eb5e72d05..739ce6177f4f 100644 --- a/Monitoring/samples/V3/ServiceMonitoringServiceClient/delete_service_level_objective.php +++ b/Monitoring/samples/V3/ServiceMonitoringServiceClient/delete_service_level_objective.php @@ -30,7 +30,8 @@ /** * Delete the given `ServiceLevelObjective`. * - * @param string $formattedName Resource name of the `ServiceLevelObjective` to delete. The format is: + * @param string $formattedName Resource name of the `ServiceLevelObjective` to delete. The + * format is: * * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] * Please see {@see ServiceMonitoringServiceClient::serviceLevelObjectiveName()} for help formatting this field. diff --git a/Monitoring/samples/V3/ServiceMonitoringServiceClient/get_service_level_objective.php b/Monitoring/samples/V3/ServiceMonitoringServiceClient/get_service_level_objective.php index eceb135a0533..e2ec5ada72ce 100644 --- a/Monitoring/samples/V3/ServiceMonitoringServiceClient/get_service_level_objective.php +++ b/Monitoring/samples/V3/ServiceMonitoringServiceClient/get_service_level_objective.php @@ -31,7 +31,8 @@ /** * Get a `ServiceLevelObjective` by name. * - * @param string $formattedName Resource name of the `ServiceLevelObjective` to get. The format is: + * @param string $formattedName Resource name of the `ServiceLevelObjective` to get. The format + * is: * * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] * Please see {@see ServiceMonitoringServiceClient::serviceLevelObjectiveName()} for help formatting this field. diff --git a/Monitoring/samples/V3/ServiceMonitoringServiceClient/list_service_level_objectives.php b/Monitoring/samples/V3/ServiceMonitoringServiceClient/list_service_level_objectives.php index 493891218a90..7ae396e0621f 100644 --- a/Monitoring/samples/V3/ServiceMonitoringServiceClient/list_service_level_objectives.php +++ b/Monitoring/samples/V3/ServiceMonitoringServiceClient/list_service_level_objectives.php @@ -33,7 +33,7 @@ * List the `ServiceLevelObjective`s for the given `Service`. * * @param string $formattedParent Resource name of the parent containing the listed SLOs, either a - * project or a Monitoring Workspace. The formats are: + * project or a Monitoring Metrics Scope. The formats are: * * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] * workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- diff --git a/Monitoring/samples/V3/ServiceMonitoringServiceClient/list_services.php b/Monitoring/samples/V3/ServiceMonitoringServiceClient/list_services.php index 71537bd274ba..3fdc2d333216 100644 --- a/Monitoring/samples/V3/ServiceMonitoringServiceClient/list_services.php +++ b/Monitoring/samples/V3/ServiceMonitoringServiceClient/list_services.php @@ -30,11 +30,11 @@ use Google\Cloud\Monitoring\V3\Service; /** - * List `Service`s for this workspace. + * List `Service`s for this Metrics Scope. * - * @param string $parent Resource name of the parent containing the listed services, either a - * [project](https://cloud.google.com/monitoring/api/v3#project_name) or a - * Monitoring Workspace. The formats are: + * @param string $parent Resource name of the parent containing the listed services, + * either a [project](https://cloud.google.com/monitoring/api/v3#project_name) + * or a Monitoring Metrics Scope. The formats are: * * projects/[PROJECT_ID_OR_NUMBER] * workspaces/[HOST_PROJECT_ID_OR_NUMBER] diff --git a/Monitoring/src/V3/AlertPolicy/Condition/MetricThreshold.php b/Monitoring/src/V3/AlertPolicy/Condition/MetricThreshold.php index 4669c0e483cd..24a90b27adea 100644 --- a/Monitoring/src/V3/AlertPolicy/Condition/MetricThreshold.php +++ b/Monitoring/src/V3/AlertPolicy/Condition/MetricThreshold.php @@ -127,7 +127,8 @@ class MetricThreshold extends \Google\Protobuf\Internal\Message private $trigger = null; /** * A condition control that determines how metric-threshold conditions - * are evaluated when data stops arriving. + * are evaluated when data stops arriving. To use this control, the value + * of the `duration` field must be greater than or equal to 60 seconds. * * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 11; */ @@ -214,7 +215,8 @@ class MetricThreshold extends \Google\Protobuf\Internal\Message * are specified. * @type int $evaluation_missing_data * A condition control that determines how metric-threshold conditions - * are evaluated when data stops arriving. + * are evaluated when data stops arriving. To use this control, the value + * of the `duration` field must be greater than or equal to 60 seconds. * } */ public function __construct($data = NULL) { @@ -598,7 +600,8 @@ public function setTrigger($var) /** * A condition control that determines how metric-threshold conditions - * are evaluated when data stops arriving. + * are evaluated when data stops arriving. To use this control, the value + * of the `duration` field must be greater than or equal to 60 seconds. * * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 11; * @return int @@ -610,7 +613,8 @@ public function getEvaluationMissingData() /** * A condition control that determines how metric-threshold conditions - * are evaluated when data stops arriving. + * are evaluated when data stops arriving. To use this control, the value + * of the `duration` field must be greater than or equal to 60 seconds. * * Generated from protobuf field .google.monitoring.v3.AlertPolicy.Condition.EvaluationMissingData evaluation_missing_data = 11; * @param int $var diff --git a/Monitoring/src/V3/AlertPolicy/Documentation.php b/Monitoring/src/V3/AlertPolicy/Documentation.php index b76d3a9d11f5..f5ee62c1c8e2 100644 --- a/Monitoring/src/V3/AlertPolicy/Documentation.php +++ b/Monitoring/src/V3/AlertPolicy/Documentation.php @@ -9,8 +9,8 @@ use Google\Protobuf\Internal\GPBUtil; /** - * A content string and a MIME type that describes the content string's - * format. + * Documentation that is included in the notifications and incidents + * pertaining to this policy. * * Generated from protobuf message google.monitoring.v3.AlertPolicy.Documentation */ diff --git a/Monitoring/src/V3/Client/MetricServiceClient.php b/Monitoring/src/V3/Client/MetricServiceClient.php index 545fc28600b3..768b64becf4d 100644 --- a/Monitoring/src/V3/Client/MetricServiceClient.php +++ b/Monitoring/src/V3/Client/MetricServiceClient.php @@ -423,10 +423,11 @@ public function __call($method, $args) /** * Creates a new metric descriptor. - * The creation is executed asynchronously and callers may check the returned - * operation to track its progress. + * The creation is executed asynchronously. * User-created metric descriptors define * [custom metrics](https://cloud.google.com/monitoring/custom-metrics). + * The metric descriptor is updated if it already exists, + * except that metric labels are never removed. * * The async variant is {@see MetricServiceClient::createMetricDescriptorAsync()} . * @@ -489,6 +490,9 @@ public function createServiceTimeSeries(CreateTimeSeriesRequest $request, array * The response is empty if all time series in the request were written. * If any time series could not be written, a corresponding failure message is * included in the error response. + * This method does not support + * [resource locations constraint of an organization + * policy](https://cloud.google.com/resource-manager/docs/organization-policy/defining-locations#setting_the_organization_policy). * * The async variant is {@see MetricServiceClient::createTimeSeriesAsync()} . * @@ -538,7 +542,7 @@ public function deleteMetricDescriptor(DeleteMetricDescriptorRequest $request, a } /** - * Gets a single metric descriptor. This method does not require a Workspace. + * Gets a single metric descriptor. * * The async variant is {@see MetricServiceClient::getMetricDescriptorAsync()} . * @@ -564,7 +568,7 @@ public function getMetricDescriptor(GetMetricDescriptorRequest $request, array $ } /** - * Gets a single monitored resource descriptor. This method does not require a Workspace. + * Gets a single monitored resource descriptor. * * The async variant is * {@see MetricServiceClient::getMonitoredResourceDescriptorAsync()} . @@ -591,7 +595,7 @@ public function getMonitoredResourceDescriptor(GetMonitoredResourceDescriptorReq } /** - * Lists metric descriptors that match a filter. This method does not require a Workspace. + * Lists metric descriptors that match a filter. * * The async variant is {@see MetricServiceClient::listMetricDescriptorsAsync()} . * @@ -617,7 +621,7 @@ public function listMetricDescriptors(ListMetricDescriptorsRequest $request, arr } /** - * Lists monitored resource descriptors that match a filter. This method does not require a Workspace. + * Lists monitored resource descriptors that match a filter. * * The async variant is * {@see MetricServiceClient::listMonitoredResourceDescriptorsAsync()} . @@ -644,7 +648,7 @@ public function listMonitoredResourceDescriptors(ListMonitoredResourceDescriptor } /** - * Lists time series that match a filter. This method does not require a Workspace. + * Lists time series that match a filter. * * The async variant is {@see MetricServiceClient::listTimeSeriesAsync()} . * diff --git a/Monitoring/src/V3/Client/QueryServiceClient.php b/Monitoring/src/V3/Client/QueryServiceClient.php index eaf902d1ac70..747ac7297018 100644 --- a/Monitoring/src/V3/Client/QueryServiceClient.php +++ b/Monitoring/src/V3/Client/QueryServiceClient.php @@ -36,7 +36,7 @@ use GuzzleHttp\Promise\PromiseInterface; /** - * Service Description: The QueryService API is used to manage time series data in Stackdriver + * Service Description: The QueryService API is used to manage time series data in Cloud * Monitoring. Time series data is a collection of data points that describes * the time-varying values of a metric. * @@ -166,7 +166,7 @@ public function __call($method, $args) } /** - * Queries time series using Monitoring Query Language. This method does not require a Workspace. + * Queries time series using Monitoring Query Language. * * The async variant is {@see QueryServiceClient::queryTimeSeriesAsync()} . * diff --git a/Monitoring/src/V3/Client/ServiceMonitoringServiceClient.php b/Monitoring/src/V3/Client/ServiceMonitoringServiceClient.php index 67cafe33953b..d45da317e3a0 100644 --- a/Monitoring/src/V3/Client/ServiceMonitoringServiceClient.php +++ b/Monitoring/src/V3/Client/ServiceMonitoringServiceClient.php @@ -49,9 +49,9 @@ /** * Service Description: The Cloud Monitoring Service-Oriented Monitoring API has endpoints for - * managing and querying aspects of a workspace's services. These include the - * `Service`'s monitored resources, its Service-Level Objectives, and a taxonomy - * of categorized Health Metrics. + * managing and querying aspects of a Metrics Scope's services. These include + * the `Service`'s monitored resources, its Service-Level Objectives, and a + * taxonomy of categorized Health Metrics. * * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. @@ -553,7 +553,7 @@ public function listServiceLevelObjectives(ListServiceLevelObjectivesRequest $re } /** - * List `Service`s for this workspace. + * List `Service`s for this Metrics Scope. * * The async variant is {@see ServiceMonitoringServiceClient::listServicesAsync()} * . diff --git a/Monitoring/src/V3/CreateGroupRequest.php b/Monitoring/src/V3/CreateGroupRequest.php index 5ddfdf2983b6..da3b15c245e6 100644 --- a/Monitoring/src/V3/CreateGroupRequest.php +++ b/Monitoring/src/V3/CreateGroupRequest.php @@ -16,16 +16,17 @@ class CreateGroupRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) in - * which to create the group. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * to create the group. The format is: * projects/[PROJECT_ID_OR_NUMBER] * * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ private $name = ''; /** - * Required. A group definition. It is an error to define the `name` field because - * the system assigns the name. + * Required. A group definition. It is an error to define the `name` field + * because the system assigns the name. * * Generated from protobuf field .google.monitoring.v3.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; */ @@ -38,12 +39,13 @@ class CreateGroupRequest extends \Google\Protobuf\Internal\Message private $validate_only = false; /** - * @param string $name Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) in - * which to create the group. The format is: + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * to create the group. The format is: * * projects/[PROJECT_ID_OR_NUMBER] - * @param \Google\Cloud\Monitoring\V3\Group $group Required. A group definition. It is an error to define the `name` field because - * the system assigns the name. + * @param \Google\Cloud\Monitoring\V3\Group $group Required. A group definition. It is an error to define the `name` field + * because the system assigns the name. * * @return \Google\Cloud\Monitoring\V3\CreateGroupRequest * @@ -63,12 +65,13 @@ public static function build(string $name, \Google\Cloud\Monitoring\V3\Group $gr * Optional. Data for populating the Message object. * * @type string $name - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) in - * which to create the group. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * to create the group. The format is: * projects/[PROJECT_ID_OR_NUMBER] * @type \Google\Cloud\Monitoring\V3\Group $group - * Required. A group definition. It is an error to define the `name` field because - * the system assigns the name. + * Required. A group definition. It is an error to define the `name` field + * because the system assigns the name. * @type bool $validate_only * If true, validate this request but do not create the group. * } @@ -79,8 +82,9 @@ public function __construct($data = NULL) { } /** - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) in - * which to create the group. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * to create the group. The format is: * projects/[PROJECT_ID_OR_NUMBER] * * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -92,8 +96,9 @@ public function getName() } /** - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) in - * which to create the group. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * to create the group. The format is: * projects/[PROJECT_ID_OR_NUMBER] * * Generated from protobuf field string name = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -109,8 +114,8 @@ public function setName($var) } /** - * Required. A group definition. It is an error to define the `name` field because - * the system assigns the name. + * Required. A group definition. It is an error to define the `name` field + * because the system assigns the name. * * Generated from protobuf field .google.monitoring.v3.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Cloud\Monitoring\V3\Group|null @@ -131,8 +136,8 @@ public function clearGroup() } /** - * Required. A group definition. It is an error to define the `name` field because - * the system assigns the name. + * Required. A group definition. It is an error to define the `name` field + * because the system assigns the name. * * Generated from protobuf field .google.monitoring.v3.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Cloud\Monitoring\V3\Group $var diff --git a/Monitoring/src/V3/CreateMetricDescriptorRequest.php b/Monitoring/src/V3/CreateMetricDescriptorRequest.php index 050fa446956e..7fc72af2e7df 100644 --- a/Monitoring/src/V3/CreateMetricDescriptorRequest.php +++ b/Monitoring/src/V3/CreateMetricDescriptorRequest.php @@ -16,8 +16,9 @@ class CreateMetricDescriptorRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * 4 * projects/[PROJECT_ID_OR_NUMBER] * @@ -25,20 +26,21 @@ class CreateMetricDescriptorRequest extends \Google\Protobuf\Internal\Message */ private $name = ''; /** - * Required. The new [custom metric](https://cloud.google.com/monitoring/custom-metrics) - * descriptor. + * Required. The new [custom + * metric](https://cloud.google.com/monitoring/custom-metrics) descriptor. * * Generated from protobuf field .google.api.MetricDescriptor metric_descriptor = 2 [(.google.api.field_behavior) = REQUIRED]; */ private $metric_descriptor = null; /** - * @param string $name Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * 4 * projects/[PROJECT_ID_OR_NUMBER] - * @param \Google\Api\MetricDescriptor $metricDescriptor Required. The new [custom metric](https://cloud.google.com/monitoring/custom-metrics) - * descriptor. + * @param \Google\Api\MetricDescriptor $metricDescriptor Required. The new [custom + * metric](https://cloud.google.com/monitoring/custom-metrics) descriptor. * * @return \Google\Cloud\Monitoring\V3\CreateMetricDescriptorRequest * @@ -58,13 +60,14 @@ public static function build(string $name, \Google\Api\MetricDescriptor $metricD * Optional. Data for populating the Message object. * * @type string $name - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * 4 * projects/[PROJECT_ID_OR_NUMBER] * @type \Google\Api\MetricDescriptor $metric_descriptor - * Required. The new [custom metric](https://cloud.google.com/monitoring/custom-metrics) - * descriptor. + * Required. The new [custom + * metric](https://cloud.google.com/monitoring/custom-metrics) descriptor. * } */ public function __construct($data = NULL) { @@ -73,8 +76,9 @@ public function __construct($data = NULL) { } /** - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * 4 * projects/[PROJECT_ID_OR_NUMBER] * @@ -87,8 +91,9 @@ public function getName() } /** - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * 4 * projects/[PROJECT_ID_OR_NUMBER] * @@ -105,8 +110,8 @@ public function setName($var) } /** - * Required. The new [custom metric](https://cloud.google.com/monitoring/custom-metrics) - * descriptor. + * Required. The new [custom + * metric](https://cloud.google.com/monitoring/custom-metrics) descriptor. * * Generated from protobuf field .google.api.MetricDescriptor metric_descriptor = 2 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Api\MetricDescriptor|null @@ -127,8 +132,8 @@ public function clearMetricDescriptor() } /** - * Required. The new [custom metric](https://cloud.google.com/monitoring/custom-metrics) - * descriptor. + * Required. The new [custom + * metric](https://cloud.google.com/monitoring/custom-metrics) descriptor. * * Generated from protobuf field .google.api.MetricDescriptor metric_descriptor = 2 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Api\MetricDescriptor $var diff --git a/Monitoring/src/V3/CreateServiceLevelObjectiveRequest.php b/Monitoring/src/V3/CreateServiceLevelObjectiveRequest.php index da1d61558c40..5a1e46c56934 100644 --- a/Monitoring/src/V3/CreateServiceLevelObjectiveRequest.php +++ b/Monitoring/src/V3/CreateServiceLevelObjectiveRequest.php @@ -25,7 +25,7 @@ class CreateServiceLevelObjectiveRequest extends \Google\Protobuf\Internal\Messa /** * Optional. The ServiceLevelObjective id to use for this * ServiceLevelObjective. If omitted, an id will be generated instead. Must - * match the pattern `[a-z0-9\-]+` + * match the pattern `^[a-zA-Z0-9-_:.]+$` * * Generated from protobuf field string service_level_objective_id = 3; */ @@ -71,7 +71,7 @@ public static function build(string $parent, \Google\Cloud\Monitoring\V3\Service * @type string $service_level_objective_id * Optional. The ServiceLevelObjective id to use for this * ServiceLevelObjective. If omitted, an id will be generated instead. Must - * match the pattern `[a-z0-9\-]+` + * match the pattern `^[a-zA-Z0-9-_:.]+$` * @type \Google\Cloud\Monitoring\V3\ServiceLevelObjective $service_level_objective * Required. The `ServiceLevelObjective` to create. * The provided `name` will be respected if no `ServiceLevelObjective` exists @@ -114,7 +114,7 @@ public function setParent($var) /** * Optional. The ServiceLevelObjective id to use for this * ServiceLevelObjective. If omitted, an id will be generated instead. Must - * match the pattern `[a-z0-9\-]+` + * match the pattern `^[a-zA-Z0-9-_:.]+$` * * Generated from protobuf field string service_level_objective_id = 3; * @return string @@ -127,7 +127,7 @@ public function getServiceLevelObjectiveId() /** * Optional. The ServiceLevelObjective id to use for this * ServiceLevelObjective. If omitted, an id will be generated instead. Must - * match the pattern `[a-z0-9\-]+` + * match the pattern `^[a-zA-Z0-9-_:.]+$` * * Generated from protobuf field string service_level_objective_id = 3; * @param string $var diff --git a/Monitoring/src/V3/CreateServiceRequest.php b/Monitoring/src/V3/CreateServiceRequest.php index 97d782da716d..de39b2357f38 100644 --- a/Monitoring/src/V3/CreateServiceRequest.php +++ b/Monitoring/src/V3/CreateServiceRequest.php @@ -16,8 +16,9 @@ class CreateServiceRequest extends \Google\Protobuf\Internal\Message { /** - * Required. Resource [name](https://cloud.google.com/monitoring/api/v3#project_name) of - * the parent workspace. The format is: + * Required. Resource + * [name](https://cloud.google.com/monitoring/api/v3#project_name) of the + * parent Metrics Scope. The format is: * projects/[PROJECT_ID_OR_NUMBER] * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -38,8 +39,9 @@ class CreateServiceRequest extends \Google\Protobuf\Internal\Message private $service = null; /** - * @param string $parent Required. Resource [name](https://cloud.google.com/monitoring/api/v3#project_name) of - * the parent workspace. The format is: + * @param string $parent Required. Resource + * [name](https://cloud.google.com/monitoring/api/v3#project_name) of the + * parent Metrics Scope. The format is: * * projects/[PROJECT_ID_OR_NUMBER] * @param \Google\Cloud\Monitoring\V3\Service $service Required. The `Service` to create. @@ -62,8 +64,9 @@ public static function build(string $parent, \Google\Cloud\Monitoring\V3\Service * Optional. Data for populating the Message object. * * @type string $parent - * Required. Resource [name](https://cloud.google.com/monitoring/api/v3#project_name) of - * the parent workspace. The format is: + * Required. Resource + * [name](https://cloud.google.com/monitoring/api/v3#project_name) of the + * parent Metrics Scope. The format is: * projects/[PROJECT_ID_OR_NUMBER] * @type string $service_id * Optional. The Service id to use for this Service. If omitted, an id will be @@ -78,8 +81,9 @@ public function __construct($data = NULL) { } /** - * Required. Resource [name](https://cloud.google.com/monitoring/api/v3#project_name) of - * the parent workspace. The format is: + * Required. Resource + * [name](https://cloud.google.com/monitoring/api/v3#project_name) of the + * parent Metrics Scope. The format is: * projects/[PROJECT_ID_OR_NUMBER] * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -91,8 +95,9 @@ public function getParent() } /** - * Required. Resource [name](https://cloud.google.com/monitoring/api/v3#project_name) of - * the parent workspace. The format is: + * Required. Resource + * [name](https://cloud.google.com/monitoring/api/v3#project_name) of the + * parent Metrics Scope. The format is: * projects/[PROJECT_ID_OR_NUMBER] * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { diff --git a/Monitoring/src/V3/CreateTimeSeriesRequest.php b/Monitoring/src/V3/CreateTimeSeriesRequest.php index 1da2e80f2aa5..783056dd8aa6 100644 --- a/Monitoring/src/V3/CreateTimeSeriesRequest.php +++ b/Monitoring/src/V3/CreateTimeSeriesRequest.php @@ -16,8 +16,9 @@ class CreateTimeSeriesRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * projects/[PROJECT_ID_OR_NUMBER] * * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -36,8 +37,9 @@ class CreateTimeSeriesRequest extends \Google\Protobuf\Internal\Message private $time_series; /** - * @param string $name Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * * projects/[PROJECT_ID_OR_NUMBER] * Please see {@see MetricServiceClient::projectName()} for help formatting this field. @@ -67,8 +69,9 @@ public static function build(string $name, array $timeSeries): self * Optional. Data for populating the Message object. * * @type string $name - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * projects/[PROJECT_ID_OR_NUMBER] * @type array<\Google\Cloud\Monitoring\V3\TimeSeries>|\Google\Protobuf\Internal\RepeatedField $time_series * Required. The new data to be added to a list of time series. @@ -85,8 +88,9 @@ public function __construct($data = NULL) { } /** - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * projects/[PROJECT_ID_OR_NUMBER] * * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -98,8 +102,9 @@ public function getName() } /** - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * projects/[PROJECT_ID_OR_NUMBER] * * Generated from protobuf field string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { diff --git a/Monitoring/src/V3/DeleteMetricDescriptorRequest.php b/Monitoring/src/V3/DeleteMetricDescriptorRequest.php index e77fea1c80ab..3073c5261b98 100644 --- a/Monitoring/src/V3/DeleteMetricDescriptorRequest.php +++ b/Monitoring/src/V3/DeleteMetricDescriptorRequest.php @@ -16,7 +16,8 @@ class DeleteMetricDescriptorRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The metric descriptor on which to execute the request. The format is: + * Required. The metric descriptor on which to execute the request. The format + * is: * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] * An example of `[METRIC_ID]` is: * `"custom.googleapis.com/my_test_metric"`. @@ -26,7 +27,8 @@ class DeleteMetricDescriptorRequest extends \Google\Protobuf\Internal\Message private $name = ''; /** - * @param string $name Required. The metric descriptor on which to execute the request. The format is: + * @param string $name Required. The metric descriptor on which to execute the request. The format + * is: * * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] * @@ -51,7 +53,8 @@ public static function build(string $name): self * Optional. Data for populating the Message object. * * @type string $name - * Required. The metric descriptor on which to execute the request. The format is: + * Required. The metric descriptor on which to execute the request. The format + * is: * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] * An example of `[METRIC_ID]` is: * `"custom.googleapis.com/my_test_metric"`. @@ -63,7 +66,8 @@ public function __construct($data = NULL) { } /** - * Required. The metric descriptor on which to execute the request. The format is: + * Required. The metric descriptor on which to execute the request. The format + * is: * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] * An example of `[METRIC_ID]` is: * `"custom.googleapis.com/my_test_metric"`. @@ -77,7 +81,8 @@ public function getName() } /** - * Required. The metric descriptor on which to execute the request. The format is: + * Required. The metric descriptor on which to execute the request. The format + * is: * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] * An example of `[METRIC_ID]` is: * `"custom.googleapis.com/my_test_metric"`. diff --git a/Monitoring/src/V3/DeleteServiceLevelObjectiveRequest.php b/Monitoring/src/V3/DeleteServiceLevelObjectiveRequest.php index 42450ed2b8c0..8f402e110815 100644 --- a/Monitoring/src/V3/DeleteServiceLevelObjectiveRequest.php +++ b/Monitoring/src/V3/DeleteServiceLevelObjectiveRequest.php @@ -16,7 +16,8 @@ class DeleteServiceLevelObjectiveRequest extends \Google\Protobuf\Internal\Message { /** - * Required. Resource name of the `ServiceLevelObjective` to delete. The format is: + * Required. Resource name of the `ServiceLevelObjective` to delete. The + * format is: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -24,7 +25,8 @@ class DeleteServiceLevelObjectiveRequest extends \Google\Protobuf\Internal\Messa private $name = ''; /** - * @param string $name Required. Resource name of the `ServiceLevelObjective` to delete. The format is: + * @param string $name Required. Resource name of the `ServiceLevelObjective` to delete. The + * format is: * * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] * Please see {@see ServiceMonitoringServiceClient::serviceLevelObjectiveName()} for help formatting this field. @@ -46,7 +48,8 @@ public static function build(string $name): self * Optional. Data for populating the Message object. * * @type string $name - * Required. Resource name of the `ServiceLevelObjective` to delete. The format is: + * Required. Resource name of the `ServiceLevelObjective` to delete. The + * format is: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] * } */ @@ -56,7 +59,8 @@ public function __construct($data = NULL) { } /** - * Required. Resource name of the `ServiceLevelObjective` to delete. The format is: + * Required. Resource name of the `ServiceLevelObjective` to delete. The + * format is: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -68,7 +72,8 @@ public function getName() } /** - * Required. Resource name of the `ServiceLevelObjective` to delete. The format is: + * Required. Resource name of the `ServiceLevelObjective` to delete. The + * format is: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { diff --git a/Monitoring/src/V3/Gapic/GroupServiceGapicClient.php b/Monitoring/src/V3/Gapic/GroupServiceGapicClient.php index b5c257d69f46..3cef0b7effc8 100644 --- a/Monitoring/src/V3/Gapic/GroupServiceGapicClient.php +++ b/Monitoring/src/V3/Gapic/GroupServiceGapicClient.php @@ -376,12 +376,13 @@ public function __construct(array $options = []) * } * ``` * - * @param string $name Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) in - * which to create the group. The format is: + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) in which + * to create the group. The format is: * * projects/[PROJECT_ID_OR_NUMBER] - * @param Group $group Required. A group definition. It is an error to define the `name` field because - * the system assigns the name. + * @param Group $group Required. A group definition. It is an error to define the `name` field + * because the system assigns the name. * @param array $optionalArgs { * Optional. * @@ -619,8 +620,9 @@ public function listGroupMembers($name, array $optionalArgs = []) * } * ``` * - * @param string $name Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) - * whose groups are to be listed. The format is: + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * groups are to be listed. The format is: * * projects/[PROJECT_ID_OR_NUMBER] * @param array $optionalArgs { @@ -715,8 +717,9 @@ public function listGroups($name, array $optionalArgs = []) * } * ``` * - * @param Group $group Required. The new definition of the group. All fields of the existing group, - * excepting `name`, are replaced with the corresponding fields of this group. + * @param Group $group Required. The new definition of the group. All fields of the existing + * group, excepting `name`, are replaced with the corresponding fields of this + * group. * @param array $optionalArgs { * Optional. * diff --git a/Monitoring/src/V3/Gapic/MetricServiceGapicClient.php b/Monitoring/src/V3/Gapic/MetricServiceGapicClient.php index 47049fc615da..00bf31992651 100644 --- a/Monitoring/src/V3/Gapic/MetricServiceGapicClient.php +++ b/Monitoring/src/V3/Gapic/MetricServiceGapicClient.php @@ -593,10 +593,11 @@ public function __construct(array $options = []) /** * Creates a new metric descriptor. - * The creation is executed asynchronously and callers may check the returned - * operation to track its progress. + * The creation is executed asynchronously. * User-created metric descriptors define * [custom metrics](https://cloud.google.com/monitoring/custom-metrics). + * The metric descriptor is updated if it already exists, + * except that metric labels are never removed. * * Sample code: * ``` @@ -610,12 +611,13 @@ public function __construct(array $options = []) * } * ``` * - * @param string $name Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * 4 * projects/[PROJECT_ID_OR_NUMBER] - * @param MetricDescriptor $metricDescriptor Required. The new [custom metric](https://cloud.google.com/monitoring/custom-metrics) - * descriptor. + * @param MetricDescriptor $metricDescriptor Required. The new [custom + * metric](https://cloud.google.com/monitoring/custom-metrics) descriptor. * @param array $optionalArgs { * Optional. * @@ -664,8 +666,9 @@ public function createMetricDescriptor($name, $metricDescriptor, array $optional * } * ``` * - * @param string $name Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * * projects/[PROJECT_ID_OR_NUMBER] * @param TimeSeries[] $timeSeries Required. The new data to be added to a list of time series. @@ -703,6 +706,9 @@ public function createServiceTimeSeries($name, $timeSeries, array $optionalArgs * The response is empty if all time series in the request were written. * If any time series could not be written, a corresponding failure message is * included in the error response. + * This method does not support + * [resource locations constraint of an organization + * policy](https://cloud.google.com/resource-manager/docs/organization-policy/defining-locations#setting_the_organization_policy). * * Sample code: * ``` @@ -716,8 +722,9 @@ public function createServiceTimeSeries($name, $timeSeries, array $optionalArgs * } * ``` * - * @param string $name Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * * projects/[PROJECT_ID_OR_NUMBER] * @param TimeSeries[] $timeSeries Required. The new data to be added to a list of time series. @@ -766,7 +773,8 @@ public function createTimeSeries($name, $timeSeries, array $optionalArgs = []) * } * ``` * - * @param string $name Required. The metric descriptor on which to execute the request. The format is: + * @param string $name Required. The metric descriptor on which to execute the request. The format + * is: * * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] * @@ -795,7 +803,7 @@ public function deleteMetricDescriptor($name, array $optionalArgs = []) } /** - * Gets a single metric descriptor. This method does not require a Workspace. + * Gets a single metric descriptor. * * Sample code: * ``` @@ -808,7 +816,8 @@ public function deleteMetricDescriptor($name, array $optionalArgs = []) * } * ``` * - * @param string $name Required. The metric descriptor on which to execute the request. The format is: + * @param string $name Required. The metric descriptor on which to execute the request. The format + * is: * * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] * @@ -839,7 +848,7 @@ public function getMetricDescriptor($name, array $optionalArgs = []) } /** - * Gets a single monitored resource descriptor. This method does not require a Workspace. + * Gets a single monitored resource descriptor. * * Sample code: * ``` @@ -883,7 +892,7 @@ public function getMonitoredResourceDescriptor($name, array $optionalArgs = []) } /** - * Lists metric descriptors that match a filter. This method does not require a Workspace. + * Lists metric descriptors that match a filter. * * Sample code: * ``` @@ -908,8 +917,9 @@ public function getMonitoredResourceDescriptor($name, array $optionalArgs = []) * } * ``` * - * @param string $name Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * * projects/[PROJECT_ID_OR_NUMBER] * @param array $optionalArgs { @@ -967,7 +977,7 @@ public function listMetricDescriptors($name, array $optionalArgs = []) } /** - * Lists monitored resource descriptors that match a filter. This method does not require a Workspace. + * Lists monitored resource descriptors that match a filter. * * Sample code: * ``` @@ -992,8 +1002,9 @@ public function listMetricDescriptors($name, array $optionalArgs = []) * } * ``` * - * @param string $name Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * * projects/[PROJECT_ID_OR_NUMBER] * @param array $optionalArgs { @@ -1049,7 +1060,7 @@ public function listMonitoredResourceDescriptors($name, array $optionalArgs = [] } /** - * Lists time series that match a filter. This method does not require a Workspace. + * Lists time series that match a filter. * * Sample code: * ``` @@ -1077,22 +1088,24 @@ public function listMonitoredResourceDescriptors($name, array $optionalArgs = [] * } * ``` * - * @param string $name Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name), + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name), * organization or folder on which to execute the request. The format is: * * projects/[PROJECT_ID_OR_NUMBER] * organizations/[ORGANIZATION_ID] * folders/[FOLDER_ID] - * @param string $filter Required. A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * that specifies which time series should be returned. The filter must - * specify a single metric type, and can additionally specify metric labels - * and other information. For example: + * @param string $filter Required. A [monitoring + * filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies + * which time series should be returned. The filter must specify a single + * metric type, and can additionally specify metric labels and other + * information. For example: * * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND * metric.labels.instance_name = "my-instance-name" - * @param TimeInterval $interval Required. The time interval for which results should be returned. Only time series - * that contain data points in the specified interval are included - * in the response. + * @param TimeInterval $interval Required. The time interval for which results should be returned. Only time + * series that contain data points in the specified interval are included in + * the response. * @param int $view Required. Specifies which information is returned about the time series. * For allowed values, use constants defined on {@see \Google\Cloud\Monitoring\V3\ListTimeSeriesRequest\TimeSeriesView} * @param array $optionalArgs { diff --git a/Monitoring/src/V3/Gapic/QueryServiceGapicClient.php b/Monitoring/src/V3/Gapic/QueryServiceGapicClient.php index 225861575f43..cd386575a623 100644 --- a/Monitoring/src/V3/Gapic/QueryServiceGapicClient.php +++ b/Monitoring/src/V3/Gapic/QueryServiceGapicClient.php @@ -36,7 +36,7 @@ use Google\Cloud\Monitoring\V3\QueryTimeSeriesResponse; /** - * Service Description: The QueryService API is used to manage time series data in Stackdriver + * Service Description: The QueryService API is used to manage time series data in Cloud * Monitoring. Time series data is a collection of data points that describes * the time-varying values of a metric. * @@ -178,7 +178,7 @@ public function __construct(array $options = []) } /** - * Queries time series using Monitoring Query Language. This method does not require a Workspace. + * Queries time series using Monitoring Query Language. * * Sample code: * ``` @@ -204,8 +204,9 @@ public function __construct(array $options = []) * } * ``` * - * @param string $name Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * * projects/[PROJECT_ID_OR_NUMBER] * @param string $query Required. The query in the [Monitoring Query diff --git a/Monitoring/src/V3/Gapic/ServiceMonitoringServiceGapicClient.php b/Monitoring/src/V3/Gapic/ServiceMonitoringServiceGapicClient.php index d837f556bc80..cbcf467f943b 100644 --- a/Monitoring/src/V3/Gapic/ServiceMonitoringServiceGapicClient.php +++ b/Monitoring/src/V3/Gapic/ServiceMonitoringServiceGapicClient.php @@ -53,9 +53,9 @@ /** * Service Description: The Cloud Monitoring Service-Oriented Monitoring API has endpoints for - * managing and querying aspects of a workspace's services. These include the - * `Service`'s monitored resources, its Service-Level Objectives, and a taxonomy - * of categorized Health Metrics. + * managing and querying aspects of a Metrics Scope's services. These include + * the `Service`'s monitored resources, its Service-Level Objectives, and a + * taxonomy of categorized Health Metrics. * * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: @@ -502,8 +502,9 @@ public function __construct(array $options = []) * } * ``` * - * @param string $parent Required. Resource [name](https://cloud.google.com/monitoring/api/v3#project_name) of - * the parent workspace. The format is: + * @param string $parent Required. Resource + * [name](https://cloud.google.com/monitoring/api/v3#project_name) of the + * parent Metrics Scope. The format is: * * projects/[PROJECT_ID_OR_NUMBER] * @param Service $service Required. The `Service` to create. @@ -566,7 +567,7 @@ public function createService($parent, $service, array $optionalArgs = []) * @type string $serviceLevelObjectiveId * Optional. The ServiceLevelObjective id to use for this * ServiceLevelObjective. If omitted, an id will be generated instead. Must - * match the pattern `[a-z0-9\-]+` + * match the pattern `^[a-zA-Z0-9-_:.]+$` * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on @@ -646,7 +647,8 @@ public function deleteService($name, array $optionalArgs = []) * } * ``` * - * @param string $name Required. Resource name of the `ServiceLevelObjective` to delete. The format is: + * @param string $name Required. Resource name of the `ServiceLevelObjective` to delete. The + * format is: * * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] * @param array $optionalArgs { @@ -726,7 +728,8 @@ public function getService($name, array $optionalArgs = []) * } * ``` * - * @param string $name Required. Resource name of the `ServiceLevelObjective` to get. The format is: + * @param string $name Required. Resource name of the `ServiceLevelObjective` to get. The format + * is: * * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] * @param array $optionalArgs { @@ -790,7 +793,7 @@ public function getServiceLevelObjective($name, array $optionalArgs = []) * ``` * * @param string $parent Required. Resource name of the parent containing the listed SLOs, either a - * project or a Monitoring Workspace. The formats are: + * project or a Monitoring Metrics Scope. The formats are: * * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] * workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- @@ -852,7 +855,7 @@ public function listServiceLevelObjectives($parent, array $optionalArgs = []) } /** - * List `Service`s for this workspace. + * List `Service`s for this Metrics Scope. * * Sample code: * ``` @@ -877,9 +880,9 @@ public function listServiceLevelObjectives($parent, array $optionalArgs = []) * } * ``` * - * @param string $parent Required. Resource name of the parent containing the listed services, either a - * [project](https://cloud.google.com/monitoring/api/v3#project_name) or a - * Monitoring Workspace. The formats are: + * @param string $parent Required. Resource name of the parent containing the listed services, + * either a [project](https://cloud.google.com/monitoring/api/v3#project_name) + * or a Monitoring Metrics Scope. The formats are: * * projects/[PROJECT_ID_OR_NUMBER] * workspaces/[HOST_PROJECT_ID_OR_NUMBER] @@ -887,25 +890,24 @@ public function listServiceLevelObjectives($parent, array $optionalArgs = []) * Optional. * * @type string $filter - * A filter specifying what `Service`s to return. The filter currently - * supports the following fields: - * - * - `identifier_case` - * - `app_engine.module_id` - * - `cloud_endpoints.service` (reserved for future use) - * - `mesh_istio.mesh_uid` - * - `mesh_istio.service_namespace` - * - `mesh_istio.service_name` - * - `cluster_istio.location` (deprecated) - * - `cluster_istio.cluster_name` (deprecated) - * - `cluster_istio.service_namespace` (deprecated) - * - `cluster_istio.service_name` (deprecated) - * - * `identifier_case` refers to which option in the identifier oneof is - * populated. For example, the filter `identifier_case = "CUSTOM"` would match - * all services with a value for the `custom` field. Valid options are - * "CUSTOM", "APP_ENGINE", "MESH_ISTIO", plus "CLUSTER_ISTIO" (deprecated) - * and "CLOUD_ENDPOINTS" (reserved for future use). + * A filter specifying what `Service`s to return. The filter supports + * filtering on a particular service-identifier type or one of its attributes. + * + * To filter on a particular service-identifier type, the `identifier_case` + * refers to which option in the `identifier` field is populated. For example, + * the filter `identifier_case = "CUSTOM"` would match all services with a + * value for the `custom` field. Valid options include "CUSTOM", "APP_ENGINE", + * "MESH_ISTIO", and the other options listed at + * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service + * + * To filter on an attribute of a service-identifier type, apply the filter + * name by using the snake case of the service-identifier type and the + * attribute of that service-identifier type, and join the two with a period. + * For example, to filter by the `meshUid` field of the `MeshIstio` + * service-identifier type, you must filter on `mesh_istio.mesh_uid = + * "123"` to match all services with mesh UID "123". Service-identifier types + * and their attributes are described at + * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service * @type int $pageSize * The maximum number of resources contained in the underlying API * response. The API may return fewer values in a page, even if diff --git a/Monitoring/src/V3/GetMetricDescriptorRequest.php b/Monitoring/src/V3/GetMetricDescriptorRequest.php index c4113dd41daa..d079c76ee2c6 100644 --- a/Monitoring/src/V3/GetMetricDescriptorRequest.php +++ b/Monitoring/src/V3/GetMetricDescriptorRequest.php @@ -16,7 +16,8 @@ class GetMetricDescriptorRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The metric descriptor on which to execute the request. The format is: + * Required. The metric descriptor on which to execute the request. The format + * is: * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] * An example value of `[METRIC_ID]` is * `"compute.googleapis.com/instance/disk/read_bytes_count"`. @@ -26,7 +27,8 @@ class GetMetricDescriptorRequest extends \Google\Protobuf\Internal\Message private $name = ''; /** - * @param string $name Required. The metric descriptor on which to execute the request. The format is: + * @param string $name Required. The metric descriptor on which to execute the request. The format + * is: * * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] * @@ -51,7 +53,8 @@ public static function build(string $name): self * Optional. Data for populating the Message object. * * @type string $name - * Required. The metric descriptor on which to execute the request. The format is: + * Required. The metric descriptor on which to execute the request. The format + * is: * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] * An example value of `[METRIC_ID]` is * `"compute.googleapis.com/instance/disk/read_bytes_count"`. @@ -63,7 +66,8 @@ public function __construct($data = NULL) { } /** - * Required. The metric descriptor on which to execute the request. The format is: + * Required. The metric descriptor on which to execute the request. The format + * is: * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] * An example value of `[METRIC_ID]` is * `"compute.googleapis.com/instance/disk/read_bytes_count"`. @@ -77,7 +81,8 @@ public function getName() } /** - * Required. The metric descriptor on which to execute the request. The format is: + * Required. The metric descriptor on which to execute the request. The format + * is: * projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] * An example value of `[METRIC_ID]` is * `"compute.googleapis.com/instance/disk/read_bytes_count"`. diff --git a/Monitoring/src/V3/GetServiceLevelObjectiveRequest.php b/Monitoring/src/V3/GetServiceLevelObjectiveRequest.php index ac5f7784e21a..aec4619ddfaa 100644 --- a/Monitoring/src/V3/GetServiceLevelObjectiveRequest.php +++ b/Monitoring/src/V3/GetServiceLevelObjectiveRequest.php @@ -16,7 +16,8 @@ class GetServiceLevelObjectiveRequest extends \Google\Protobuf\Internal\Message { /** - * Required. Resource name of the `ServiceLevelObjective` to get. The format is: + * Required. Resource name of the `ServiceLevelObjective` to get. The format + * is: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -33,7 +34,8 @@ class GetServiceLevelObjectiveRequest extends \Google\Protobuf\Internal\Message private $view = 0; /** - * @param string $name Required. Resource name of the `ServiceLevelObjective` to get. The format is: + * @param string $name Required. Resource name of the `ServiceLevelObjective` to get. The format + * is: * * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] * Please see {@see ServiceMonitoringServiceClient::serviceLevelObjectiveName()} for help formatting this field. @@ -55,7 +57,8 @@ public static function build(string $name): self * Optional. Data for populating the Message object. * * @type string $name - * Required. Resource name of the `ServiceLevelObjective` to get. The format is: + * Required. Resource name of the `ServiceLevelObjective` to get. The format + * is: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] * @type int $view * View of the `ServiceLevelObjective` to return. If `DEFAULT`, return the @@ -70,7 +73,8 @@ public function __construct($data = NULL) { } /** - * Required. Resource name of the `ServiceLevelObjective` to get. The format is: + * Required. Resource name of the `ServiceLevelObjective` to get. The format + * is: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -82,7 +86,8 @@ public function getName() } /** - * Required. Resource name of the `ServiceLevelObjective` to get. The format is: + * Required. Resource name of the `ServiceLevelObjective` to get. The format + * is: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { diff --git a/Monitoring/src/V3/ListGroupsRequest.php b/Monitoring/src/V3/ListGroupsRequest.php index ec98c867f53b..0e3a7bd47bd6 100644 --- a/Monitoring/src/V3/ListGroupsRequest.php +++ b/Monitoring/src/V3/ListGroupsRequest.php @@ -16,8 +16,9 @@ class ListGroupsRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) - * whose groups are to be listed. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * groups are to be listed. The format is: * projects/[PROJECT_ID_OR_NUMBER] * * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -40,8 +41,9 @@ class ListGroupsRequest extends \Google\Protobuf\Internal\Message protected $filter; /** - * @param string $name Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) - * whose groups are to be listed. The format is: + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * groups are to be listed. The format is: * * projects/[PROJECT_ID_OR_NUMBER] * @@ -62,8 +64,9 @@ public static function build(string $name): self * Optional. Data for populating the Message object. * * @type string $name - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) - * whose groups are to be listed. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * groups are to be listed. The format is: * projects/[PROJECT_ID_OR_NUMBER] * @type string $children_of_group * A group name. The format is: @@ -97,8 +100,9 @@ public function __construct($data = NULL) { } /** - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) - * whose groups are to be listed. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * groups are to be listed. The format is: * projects/[PROJECT_ID_OR_NUMBER] * * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -110,8 +114,9 @@ public function getName() } /** - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) - * whose groups are to be listed. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) whose + * groups are to be listed. The format is: * projects/[PROJECT_ID_OR_NUMBER] * * Generated from protobuf field string name = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { diff --git a/Monitoring/src/V3/ListMetricDescriptorsRequest.php b/Monitoring/src/V3/ListMetricDescriptorsRequest.php index 12386c8e8543..50cd5a457517 100644 --- a/Monitoring/src/V3/ListMetricDescriptorsRequest.php +++ b/Monitoring/src/V3/ListMetricDescriptorsRequest.php @@ -16,8 +16,9 @@ class ListMetricDescriptorsRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * projects/[PROJECT_ID_OR_NUMBER] * * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -36,7 +37,9 @@ class ListMetricDescriptorsRequest extends \Google\Protobuf\Internal\Message */ private $filter = ''; /** - * A positive number that is the maximum number of results to return. + * A positive number that is the maximum number of results to return. The + * default and maximum value is 10,000. If a page_size <= 0 or > 10,000 is + * submitted, will instead return a maximum of 10,000 results. * * Generated from protobuf field int32 page_size = 3; */ @@ -51,8 +54,9 @@ class ListMetricDescriptorsRequest extends \Google\Protobuf\Internal\Message private $page_token = ''; /** - * @param string $name Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * * projects/[PROJECT_ID_OR_NUMBER] * @@ -73,8 +77,9 @@ public static function build(string $name): self * Optional. Data for populating the Message object. * * @type string $name - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * projects/[PROJECT_ID_OR_NUMBER] * @type string $filter * If this field is empty, all custom and @@ -85,7 +90,9 @@ public static function build(string $name): self * [custom metrics](https://cloud.google.com/monitoring/custom-metrics): * metric.type = starts_with("custom.googleapis.com/") * @type int $page_size - * A positive number that is the maximum number of results to return. + * A positive number that is the maximum number of results to return. The + * default and maximum value is 10,000. If a page_size <= 0 or > 10,000 is + * submitted, will instead return a maximum of 10,000 results. * @type string $page_token * If this field is not empty then it must contain the `nextPageToken` value * returned by a previous call to this method. Using this field causes the @@ -98,8 +105,9 @@ public function __construct($data = NULL) { } /** - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * projects/[PROJECT_ID_OR_NUMBER] * * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -111,8 +119,9 @@ public function getName() } /** - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * projects/[PROJECT_ID_OR_NUMBER] * * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -166,7 +175,9 @@ public function setFilter($var) } /** - * A positive number that is the maximum number of results to return. + * A positive number that is the maximum number of results to return. The + * default and maximum value is 10,000. If a page_size <= 0 or > 10,000 is + * submitted, will instead return a maximum of 10,000 results. * * Generated from protobuf field int32 page_size = 3; * @return int @@ -177,7 +188,9 @@ public function getPageSize() } /** - * A positive number that is the maximum number of results to return. + * A positive number that is the maximum number of results to return. The + * default and maximum value is 10,000. If a page_size <= 0 or > 10,000 is + * submitted, will instead return a maximum of 10,000 results. * * Generated from protobuf field int32 page_size = 3; * @param int $var diff --git a/Monitoring/src/V3/ListMonitoredResourceDescriptorsRequest.php b/Monitoring/src/V3/ListMonitoredResourceDescriptorsRequest.php index 598c01dc32ca..7df803eb2d82 100644 --- a/Monitoring/src/V3/ListMonitoredResourceDescriptorsRequest.php +++ b/Monitoring/src/V3/ListMonitoredResourceDescriptorsRequest.php @@ -16,8 +16,9 @@ class ListMonitoredResourceDescriptorsRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * projects/[PROJECT_ID_OR_NUMBER] * * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -49,8 +50,9 @@ class ListMonitoredResourceDescriptorsRequest extends \Google\Protobuf\Internal\ private $page_token = ''; /** - * @param string $name Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * * projects/[PROJECT_ID_OR_NUMBER] * @@ -71,8 +73,9 @@ public static function build(string $name): self * Optional. Data for populating the Message object. * * @type string $name - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * projects/[PROJECT_ID_OR_NUMBER] * @type string $filter * An optional [filter](https://cloud.google.com/monitoring/api/v3/filters) @@ -94,8 +97,9 @@ public function __construct($data = NULL) { } /** - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * projects/[PROJECT_ID_OR_NUMBER] * * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -107,8 +111,9 @@ public function getName() } /** - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * projects/[PROJECT_ID_OR_NUMBER] * * Generated from protobuf field string name = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { diff --git a/Monitoring/src/V3/ListServiceLevelObjectivesRequest.php b/Monitoring/src/V3/ListServiceLevelObjectivesRequest.php index 9dbc95acf9fc..5dd4cf9d214e 100644 --- a/Monitoring/src/V3/ListServiceLevelObjectivesRequest.php +++ b/Monitoring/src/V3/ListServiceLevelObjectivesRequest.php @@ -17,7 +17,7 @@ class ListServiceLevelObjectivesRequest extends \Google\Protobuf\Internal\Messag { /** * Required. Resource name of the parent containing the listed SLOs, either a - * project or a Monitoring Workspace. The formats are: + * project or a Monitoring Metrics Scope. The formats are: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] * workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- * @@ -57,7 +57,7 @@ class ListServiceLevelObjectivesRequest extends \Google\Protobuf\Internal\Messag /** * @param string $parent Required. Resource name of the parent containing the listed SLOs, either a - * project or a Monitoring Workspace. The formats are: + * project or a Monitoring Metrics Scope. The formats are: * * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] * workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- @@ -81,7 +81,7 @@ public static function build(string $parent): self * * @type string $parent * Required. Resource name of the parent containing the listed SLOs, either a - * project or a Monitoring Workspace. The formats are: + * project or a Monitoring Metrics Scope. The formats are: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] * workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- * @type string $filter @@ -107,7 +107,7 @@ public function __construct($data = NULL) { /** * Required. Resource name of the parent containing the listed SLOs, either a - * project or a Monitoring Workspace. The formats are: + * project or a Monitoring Metrics Scope. The formats are: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] * workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- * @@ -121,7 +121,7 @@ public function getParent() /** * Required. Resource name of the parent containing the listed SLOs, either a - * project or a Monitoring Workspace. The formats are: + * project or a Monitoring Metrics Scope. The formats are: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] * workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- * diff --git a/Monitoring/src/V3/ListServicesRequest.php b/Monitoring/src/V3/ListServicesRequest.php index a533582545c0..89af60783741 100644 --- a/Monitoring/src/V3/ListServicesRequest.php +++ b/Monitoring/src/V3/ListServicesRequest.php @@ -16,9 +16,9 @@ class ListServicesRequest extends \Google\Protobuf\Internal\Message { /** - * Required. Resource name of the parent containing the listed services, either a - * [project](https://cloud.google.com/monitoring/api/v3#project_name) or a - * Monitoring Workspace. The formats are: + * Required. Resource name of the parent containing the listed services, + * either a [project](https://cloud.google.com/monitoring/api/v3#project_name) + * or a Monitoring Metrics Scope. The formats are: * projects/[PROJECT_ID_OR_NUMBER] * workspaces/[HOST_PROJECT_ID_OR_NUMBER] * @@ -26,23 +26,22 @@ class ListServicesRequest extends \Google\Protobuf\Internal\Message */ private $parent = ''; /** - * A filter specifying what `Service`s to return. The filter currently - * supports the following fields: - * - `identifier_case` - * - `app_engine.module_id` - * - `cloud_endpoints.service` (reserved for future use) - * - `mesh_istio.mesh_uid` - * - `mesh_istio.service_namespace` - * - `mesh_istio.service_name` - * - `cluster_istio.location` (deprecated) - * - `cluster_istio.cluster_name` (deprecated) - * - `cluster_istio.service_namespace` (deprecated) - * - `cluster_istio.service_name` (deprecated) - * `identifier_case` refers to which option in the identifier oneof is - * populated. For example, the filter `identifier_case = "CUSTOM"` would match - * all services with a value for the `custom` field. Valid options are - * "CUSTOM", "APP_ENGINE", "MESH_ISTIO", plus "CLUSTER_ISTIO" (deprecated) - * and "CLOUD_ENDPOINTS" (reserved for future use). + * A filter specifying what `Service`s to return. The filter supports + * filtering on a particular service-identifier type or one of its attributes. + * To filter on a particular service-identifier type, the `identifier_case` + * refers to which option in the `identifier` field is populated. For example, + * the filter `identifier_case = "CUSTOM"` would match all services with a + * value for the `custom` field. Valid options include "CUSTOM", "APP_ENGINE", + * "MESH_ISTIO", and the other options listed at + * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service + * To filter on an attribute of a service-identifier type, apply the filter + * name by using the snake case of the service-identifier type and the + * attribute of that service-identifier type, and join the two with a period. + * For example, to filter by the `meshUid` field of the `MeshIstio` + * service-identifier type, you must filter on `mesh_istio.mesh_uid = + * "123"` to match all services with mesh UID "123". Service-identifier types + * and their attributes are described at + * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service * * Generated from protobuf field string filter = 2; */ @@ -64,9 +63,9 @@ class ListServicesRequest extends \Google\Protobuf\Internal\Message private $page_token = ''; /** - * @param string $parent Required. Resource name of the parent containing the listed services, either a - * [project](https://cloud.google.com/monitoring/api/v3#project_name) or a - * Monitoring Workspace. The formats are: + * @param string $parent Required. Resource name of the parent containing the listed services, + * either a [project](https://cloud.google.com/monitoring/api/v3#project_name) + * or a Monitoring Metrics Scope. The formats are: * * projects/[PROJECT_ID_OR_NUMBER] * workspaces/[HOST_PROJECT_ID_OR_NUMBER] @@ -88,29 +87,28 @@ public static function build(string $parent): self * Optional. Data for populating the Message object. * * @type string $parent - * Required. Resource name of the parent containing the listed services, either a - * [project](https://cloud.google.com/monitoring/api/v3#project_name) or a - * Monitoring Workspace. The formats are: + * Required. Resource name of the parent containing the listed services, + * either a [project](https://cloud.google.com/monitoring/api/v3#project_name) + * or a Monitoring Metrics Scope. The formats are: * projects/[PROJECT_ID_OR_NUMBER] * workspaces/[HOST_PROJECT_ID_OR_NUMBER] * @type string $filter - * A filter specifying what `Service`s to return. The filter currently - * supports the following fields: - * - `identifier_case` - * - `app_engine.module_id` - * - `cloud_endpoints.service` (reserved for future use) - * - `mesh_istio.mesh_uid` - * - `mesh_istio.service_namespace` - * - `mesh_istio.service_name` - * - `cluster_istio.location` (deprecated) - * - `cluster_istio.cluster_name` (deprecated) - * - `cluster_istio.service_namespace` (deprecated) - * - `cluster_istio.service_name` (deprecated) - * `identifier_case` refers to which option in the identifier oneof is - * populated. For example, the filter `identifier_case = "CUSTOM"` would match - * all services with a value for the `custom` field. Valid options are - * "CUSTOM", "APP_ENGINE", "MESH_ISTIO", plus "CLUSTER_ISTIO" (deprecated) - * and "CLOUD_ENDPOINTS" (reserved for future use). + * A filter specifying what `Service`s to return. The filter supports + * filtering on a particular service-identifier type or one of its attributes. + * To filter on a particular service-identifier type, the `identifier_case` + * refers to which option in the `identifier` field is populated. For example, + * the filter `identifier_case = "CUSTOM"` would match all services with a + * value for the `custom` field. Valid options include "CUSTOM", "APP_ENGINE", + * "MESH_ISTIO", and the other options listed at + * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service + * To filter on an attribute of a service-identifier type, apply the filter + * name by using the snake case of the service-identifier type and the + * attribute of that service-identifier type, and join the two with a period. + * For example, to filter by the `meshUid` field of the `MeshIstio` + * service-identifier type, you must filter on `mesh_istio.mesh_uid = + * "123"` to match all services with mesh UID "123". Service-identifier types + * and their attributes are described at + * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service * @type int $page_size * A non-negative number that is the maximum number of results to return. * When 0, use default page size. @@ -126,9 +124,9 @@ public function __construct($data = NULL) { } /** - * Required. Resource name of the parent containing the listed services, either a - * [project](https://cloud.google.com/monitoring/api/v3#project_name) or a - * Monitoring Workspace. The formats are: + * Required. Resource name of the parent containing the listed services, + * either a [project](https://cloud.google.com/monitoring/api/v3#project_name) + * or a Monitoring Metrics Scope. The formats are: * projects/[PROJECT_ID_OR_NUMBER] * workspaces/[HOST_PROJECT_ID_OR_NUMBER] * @@ -141,9 +139,9 @@ public function getParent() } /** - * Required. Resource name of the parent containing the listed services, either a - * [project](https://cloud.google.com/monitoring/api/v3#project_name) or a - * Monitoring Workspace. The formats are: + * Required. Resource name of the parent containing the listed services, + * either a [project](https://cloud.google.com/monitoring/api/v3#project_name) + * or a Monitoring Metrics Scope. The formats are: * projects/[PROJECT_ID_OR_NUMBER] * workspaces/[HOST_PROJECT_ID_OR_NUMBER] * @@ -160,23 +158,22 @@ public function setParent($var) } /** - * A filter specifying what `Service`s to return. The filter currently - * supports the following fields: - * - `identifier_case` - * - `app_engine.module_id` - * - `cloud_endpoints.service` (reserved for future use) - * - `mesh_istio.mesh_uid` - * - `mesh_istio.service_namespace` - * - `mesh_istio.service_name` - * - `cluster_istio.location` (deprecated) - * - `cluster_istio.cluster_name` (deprecated) - * - `cluster_istio.service_namespace` (deprecated) - * - `cluster_istio.service_name` (deprecated) - * `identifier_case` refers to which option in the identifier oneof is - * populated. For example, the filter `identifier_case = "CUSTOM"` would match - * all services with a value for the `custom` field. Valid options are - * "CUSTOM", "APP_ENGINE", "MESH_ISTIO", plus "CLUSTER_ISTIO" (deprecated) - * and "CLOUD_ENDPOINTS" (reserved for future use). + * A filter specifying what `Service`s to return. The filter supports + * filtering on a particular service-identifier type or one of its attributes. + * To filter on a particular service-identifier type, the `identifier_case` + * refers to which option in the `identifier` field is populated. For example, + * the filter `identifier_case = "CUSTOM"` would match all services with a + * value for the `custom` field. Valid options include "CUSTOM", "APP_ENGINE", + * "MESH_ISTIO", and the other options listed at + * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service + * To filter on an attribute of a service-identifier type, apply the filter + * name by using the snake case of the service-identifier type and the + * attribute of that service-identifier type, and join the two with a period. + * For example, to filter by the `meshUid` field of the `MeshIstio` + * service-identifier type, you must filter on `mesh_istio.mesh_uid = + * "123"` to match all services with mesh UID "123". Service-identifier types + * and their attributes are described at + * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service * * Generated from protobuf field string filter = 2; * @return string @@ -187,23 +184,22 @@ public function getFilter() } /** - * A filter specifying what `Service`s to return. The filter currently - * supports the following fields: - * - `identifier_case` - * - `app_engine.module_id` - * - `cloud_endpoints.service` (reserved for future use) - * - `mesh_istio.mesh_uid` - * - `mesh_istio.service_namespace` - * - `mesh_istio.service_name` - * - `cluster_istio.location` (deprecated) - * - `cluster_istio.cluster_name` (deprecated) - * - `cluster_istio.service_namespace` (deprecated) - * - `cluster_istio.service_name` (deprecated) - * `identifier_case` refers to which option in the identifier oneof is - * populated. For example, the filter `identifier_case = "CUSTOM"` would match - * all services with a value for the `custom` field. Valid options are - * "CUSTOM", "APP_ENGINE", "MESH_ISTIO", plus "CLUSTER_ISTIO" (deprecated) - * and "CLOUD_ENDPOINTS" (reserved for future use). + * A filter specifying what `Service`s to return. The filter supports + * filtering on a particular service-identifier type or one of its attributes. + * To filter on a particular service-identifier type, the `identifier_case` + * refers to which option in the `identifier` field is populated. For example, + * the filter `identifier_case = "CUSTOM"` would match all services with a + * value for the `custom` field. Valid options include "CUSTOM", "APP_ENGINE", + * "MESH_ISTIO", and the other options listed at + * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service + * To filter on an attribute of a service-identifier type, apply the filter + * name by using the snake case of the service-identifier type and the + * attribute of that service-identifier type, and join the two with a period. + * For example, to filter by the `meshUid` field of the `MeshIstio` + * service-identifier type, you must filter on `mesh_istio.mesh_uid = + * "123"` to match all services with mesh UID "123". Service-identifier types + * and their attributes are described at + * https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service * * Generated from protobuf field string filter = 2; * @param string $var diff --git a/Monitoring/src/V3/ListTimeSeriesRequest.php b/Monitoring/src/V3/ListTimeSeriesRequest.php index 6bbd831a415c..ca008690aa8d 100644 --- a/Monitoring/src/V3/ListTimeSeriesRequest.php +++ b/Monitoring/src/V3/ListTimeSeriesRequest.php @@ -16,7 +16,8 @@ class ListTimeSeriesRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name), + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name), * organization or folder on which to execute the request. The format is: * projects/[PROJECT_ID_OR_NUMBER] * organizations/[ORGANIZATION_ID] @@ -26,10 +27,11 @@ class ListTimeSeriesRequest extends \Google\Protobuf\Internal\Message */ private $name = ''; /** - * Required. A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * that specifies which time series should be returned. The filter must - * specify a single metric type, and can additionally specify metric labels - * and other information. For example: + * Required. A [monitoring + * filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies + * which time series should be returned. The filter must specify a single + * metric type, and can additionally specify metric labels and other + * information. For example: * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND * metric.labels.instance_name = "my-instance-name" * @@ -37,9 +39,9 @@ class ListTimeSeriesRequest extends \Google\Protobuf\Internal\Message */ private $filter = ''; /** - * Required. The time interval for which results should be returned. Only time series - * that contain data points in the specified interval are included - * in the response. + * Required. The time interval for which results should be returned. Only time + * series that contain data points in the specified interval are included in + * the response. * * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 4 [(.google.api.field_behavior) = REQUIRED]; */ @@ -93,23 +95,25 @@ class ListTimeSeriesRequest extends \Google\Protobuf\Internal\Message private $page_token = ''; /** - * @param string $name Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name), + * @param string $name Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name), * organization or folder on which to execute the request. The format is: * * projects/[PROJECT_ID_OR_NUMBER] * organizations/[ORGANIZATION_ID] * folders/[FOLDER_ID] * Please see {@see MetricServiceClient::workspaceName()} for help formatting this field. - * @param string $filter Required. A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * that specifies which time series should be returned. The filter must - * specify a single metric type, and can additionally specify metric labels - * and other information. For example: + * @param string $filter Required. A [monitoring + * filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies + * which time series should be returned. The filter must specify a single + * metric type, and can additionally specify metric labels and other + * information. For example: * * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND * metric.labels.instance_name = "my-instance-name" - * @param \Google\Cloud\Monitoring\V3\TimeInterval $interval Required. The time interval for which results should be returned. Only time series - * that contain data points in the specified interval are included - * in the response. + * @param \Google\Cloud\Monitoring\V3\TimeInterval $interval Required. The time interval for which results should be returned. Only time + * series that contain data points in the specified interval are included in + * the response. * @param int $view Required. Specifies which information is returned about the time series. * For allowed values, use constants defined on {@see \Google\Cloud\Monitoring\V3\ListTimeSeriesRequest\TimeSeriesView} * @@ -133,22 +137,24 @@ public static function build(string $name, string $filter, \Google\Cloud\Monitor * Optional. Data for populating the Message object. * * @type string $name - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name), + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name), * organization or folder on which to execute the request. The format is: * projects/[PROJECT_ID_OR_NUMBER] * organizations/[ORGANIZATION_ID] * folders/[FOLDER_ID] * @type string $filter - * Required. A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * that specifies which time series should be returned. The filter must - * specify a single metric type, and can additionally specify metric labels - * and other information. For example: + * Required. A [monitoring + * filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies + * which time series should be returned. The filter must specify a single + * metric type, and can additionally specify metric labels and other + * information. For example: * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND * metric.labels.instance_name = "my-instance-name" * @type \Google\Cloud\Monitoring\V3\TimeInterval $interval - * Required. The time interval for which results should be returned. Only time series - * that contain data points in the specified interval are included - * in the response. + * Required. The time interval for which results should be returned. Only time + * series that contain data points in the specified interval are included in + * the response. * @type \Google\Cloud\Monitoring\V3\Aggregation $aggregation * Specifies the alignment of data points in individual time series as * well as how to combine the retrieved time series across specified labels. @@ -180,7 +186,8 @@ public function __construct($data = NULL) { } /** - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name), + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name), * organization or folder on which to execute the request. The format is: * projects/[PROJECT_ID_OR_NUMBER] * organizations/[ORGANIZATION_ID] @@ -195,7 +202,8 @@ public function getName() } /** - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name), + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name), * organization or folder on which to execute the request. The format is: * projects/[PROJECT_ID_OR_NUMBER] * organizations/[ORGANIZATION_ID] @@ -214,10 +222,11 @@ public function setName($var) } /** - * Required. A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * that specifies which time series should be returned. The filter must - * specify a single metric type, and can additionally specify metric labels - * and other information. For example: + * Required. A [monitoring + * filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies + * which time series should be returned. The filter must specify a single + * metric type, and can additionally specify metric labels and other + * information. For example: * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND * metric.labels.instance_name = "my-instance-name" * @@ -230,10 +239,11 @@ public function getFilter() } /** - * Required. A [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters) - * that specifies which time series should be returned. The filter must - * specify a single metric type, and can additionally specify metric labels - * and other information. For example: + * Required. A [monitoring + * filter](https://cloud.google.com/monitoring/api/v3/filters) that specifies + * which time series should be returned. The filter must specify a single + * metric type, and can additionally specify metric labels and other + * information. For example: * metric.type = "compute.googleapis.com/instance/cpu/usage_time" AND * metric.labels.instance_name = "my-instance-name" * @@ -250,9 +260,9 @@ public function setFilter($var) } /** - * Required. The time interval for which results should be returned. Only time series - * that contain data points in the specified interval are included - * in the response. + * Required. The time interval for which results should be returned. Only time + * series that contain data points in the specified interval are included in + * the response. * * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 4 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Cloud\Monitoring\V3\TimeInterval|null @@ -273,9 +283,9 @@ public function clearInterval() } /** - * Required. The time interval for which results should be returned. Only time series - * that contain data points in the specified interval are included - * in the response. + * Required. The time interval for which results should be returned. Only time + * series that contain data points in the specified interval are included in + * the response. * * Generated from protobuf field .google.monitoring.v3.TimeInterval interval = 4 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Cloud\Monitoring\V3\TimeInterval $var diff --git a/Monitoring/src/V3/ListTimeSeriesRequest/TimeSeriesView.php b/Monitoring/src/V3/ListTimeSeriesRequest/TimeSeriesView.php index 4055777eb6db..cd4d2c1bcc55 100644 --- a/Monitoring/src/V3/ListTimeSeriesRequest/TimeSeriesView.php +++ b/Monitoring/src/V3/ListTimeSeriesRequest/TimeSeriesView.php @@ -7,7 +7,7 @@ use UnexpectedValueException; /** - * Controls which fields are returned by `ListTimeSeries`. + * Controls which fields are returned by `ListTimeSeries*`. * * Protobuf type google.monitoring.v3.ListTimeSeriesRequest.TimeSeriesView */ diff --git a/Monitoring/src/V3/QueryTimeSeriesRequest.php b/Monitoring/src/V3/QueryTimeSeriesRequest.php index 9e1e3bcf747d..1c2545b7a036 100644 --- a/Monitoring/src/V3/QueryTimeSeriesRequest.php +++ b/Monitoring/src/V3/QueryTimeSeriesRequest.php @@ -16,8 +16,9 @@ class QueryTimeSeriesRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * projects/[PROJECT_ID_OR_NUMBER] * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -53,8 +54,9 @@ class QueryTimeSeriesRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * projects/[PROJECT_ID_OR_NUMBER] * @type string $query * Required. The query in the [Monitoring Query @@ -74,8 +76,9 @@ public function __construct($data = NULL) { } /** - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * projects/[PROJECT_ID_OR_NUMBER] * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -87,8 +90,9 @@ public function getName() } /** - * Required. The [project](https://cloud.google.com/monitoring/api/v3#project_name) on - * which to execute the request. The format is: + * Required. The + * [project](https://cloud.google.com/monitoring/api/v3#project_name) on which + * to execute the request. The format is: * projects/[PROJECT_ID_OR_NUMBER] * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; diff --git a/Monitoring/src/V3/ServiceTier.php b/Monitoring/src/V3/ServiceTier.php index 928b55ace91d..906682308486 100644 --- a/Monitoring/src/V3/ServiceTier.php +++ b/Monitoring/src/V3/ServiceTier.php @@ -8,7 +8,7 @@ /** * @deprecated - * The tier of service for a Workspace. Please see the + * The tier of service for a Metrics Scope. Please see the * [service tiers * documentation](https://cloud.google.com/monitoring/workspaces/tiers) for more * details. @@ -25,7 +25,7 @@ class ServiceTier */ const SERVICE_TIER_UNSPECIFIED = 0; /** - * The Stackdriver Basic tier, a free tier of service that provides basic + * The Cloud Monitoring Basic tier, a free tier of service that provides basic * features, a moderate allotment of logs, and access to built-in metrics. * A number of features are not available in this tier. For more details, * see [the service tiers @@ -35,10 +35,10 @@ class ServiceTier */ const SERVICE_TIER_BASIC = 1; /** - * The Stackdriver Premium tier, a higher, more expensive tier of service - * that provides access to all Stackdriver features, lets you use Stackdriver - * with AWS accounts, and has a larger allotments for logs and metrics. For - * more details, see [the service tiers + * The Cloud Monitoring Premium tier, a higher, more expensive tier of service + * that provides access to all Cloud Monitoring features, lets you use Cloud + * Monitoring with AWS accounts, and has a larger allotments for logs and + * metrics. For more details, see [the service tiers * documentation](https://cloud.google.com/monitoring/workspaces/tiers). * * Generated from protobuf enum SERVICE_TIER_PREMIUM = 2; diff --git a/Monitoring/src/V3/TimeInterval.php b/Monitoring/src/V3/TimeInterval.php index 532a64739b00..f22cbd83de14 100644 --- a/Monitoring/src/V3/TimeInterval.php +++ b/Monitoring/src/V3/TimeInterval.php @@ -9,30 +9,43 @@ use Google\Protobuf\Internal\GPBUtil; /** - * A closed time interval. It extends from the start time to the end time, and includes both: `[startTime, endTime]`. Valid time intervals depend on the [`MetricKind`](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors#MetricKind) of the metric value. The end time must not be earlier than the start time. When writing data points, the start time must not be more than 25 hours in the past and the end time must not be more than five minutes in the future. - * * For `GAUGE` metrics, the `startTime` value is technically optional; if - * no value is specified, the start time defaults to the value of the - * end time, and the interval represents a single point in time. If both - * start and end times are specified, they must be identical. Such an - * interval is valid only for `GAUGE` metrics, which are point-in-time - * measurements. The end time of a new interval must be at least a - * millisecond after the end time of the previous interval. - * * For `DELTA` metrics, the start time and end time must specify a - * non-zero interval, with subsequent points specifying contiguous and - * non-overlapping intervals. For `DELTA` metrics, the start time of - * the next interval must be at least a millisecond after the end time - * of the previous interval. - * * For `CUMULATIVE` metrics, the start time and end time must specify a - * non-zero interval, with subsequent points specifying the same - * start time and increasing end times, until an event resets the - * cumulative value to zero and sets a new start time for the following - * points. The new start time must be at least a millisecond after the - * end time of the previous interval. - * * The start time of a new interval must be at least a millisecond after the - * end time of the previous interval because intervals are closed. If the - * start time of a new interval is the same as the end time of the previous - * interval, then data written at the new start time could overwrite data - * written at the previous end time. + * Describes a time interval: + * * Reads: A half-open time interval. It includes the end time but + * excludes the start time: `(startTime, endTime]`. The start time + * must be specified, must be earlier than the end time, and should be + * no older than the data retention period for the metric. + * * Writes: A closed time interval. It extends from the start time to the end + * time, + * and includes both: `[startTime, endTime]`. Valid time intervals + * depend on the + * [`MetricKind`](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors#MetricKind) + * of the metric value. The end time must not be earlier than the start + * time, and the end time must not be more than 25 hours in the past or more + * than five minutes in the future. + * * For `GAUGE` metrics, the `startTime` value is technically optional; if + * no value is specified, the start time defaults to the value of the + * end time, and the interval represents a single point in time. If both + * start and end times are specified, they must be identical. Such an + * interval is valid only for `GAUGE` metrics, which are point-in-time + * measurements. The end time of a new interval must be at least a + * millisecond after the end time of the previous interval. + * * For `DELTA` metrics, the start time and end time must specify a + * non-zero interval, with subsequent points specifying contiguous and + * non-overlapping intervals. For `DELTA` metrics, the start time of + * the next interval must be at least a millisecond after the end time + * of the previous interval. + * * For `CUMULATIVE` metrics, the start time and end time must specify a + * non-zero interval, with subsequent points specifying the same + * start time and increasing end times, until an event resets the + * cumulative value to zero and sets a new start time for the following + * points. The new start time must be at least a millisecond after the + * end time of the previous interval. + * * The start time of a new interval must be at least a millisecond after + * the + * end time of the previous interval because intervals are closed. If the + * start time of a new interval is the same as the end time of the + * previous interval, then data written at the new start time could + * overwrite data written at the previous end time. * * Generated from protobuf message google.monitoring.v3.TimeInterval */ diff --git a/Monitoring/src/V3/UpdateGroupRequest.php b/Monitoring/src/V3/UpdateGroupRequest.php index 0efe302c2d4f..9a41bfe72392 100644 --- a/Monitoring/src/V3/UpdateGroupRequest.php +++ b/Monitoring/src/V3/UpdateGroupRequest.php @@ -16,8 +16,9 @@ class UpdateGroupRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The new definition of the group. All fields of the existing group, - * excepting `name`, are replaced with the corresponding fields of this group. + * Required. The new definition of the group. All fields of the existing + * group, excepting `name`, are replaced with the corresponding fields of this + * group. * * Generated from protobuf field .google.monitoring.v3.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; */ @@ -30,8 +31,9 @@ class UpdateGroupRequest extends \Google\Protobuf\Internal\Message private $validate_only = false; /** - * @param \Google\Cloud\Monitoring\V3\Group $group Required. The new definition of the group. All fields of the existing group, - * excepting `name`, are replaced with the corresponding fields of this group. + * @param \Google\Cloud\Monitoring\V3\Group $group Required. The new definition of the group. All fields of the existing + * group, excepting `name`, are replaced with the corresponding fields of this + * group. * * @return \Google\Cloud\Monitoring\V3\UpdateGroupRequest * @@ -50,8 +52,9 @@ public static function build(\Google\Cloud\Monitoring\V3\Group $group): self * Optional. Data for populating the Message object. * * @type \Google\Cloud\Monitoring\V3\Group $group - * Required. The new definition of the group. All fields of the existing group, - * excepting `name`, are replaced with the corresponding fields of this group. + * Required. The new definition of the group. All fields of the existing + * group, excepting `name`, are replaced with the corresponding fields of this + * group. * @type bool $validate_only * If true, validate this request but do not update the existing group. * } @@ -62,8 +65,9 @@ public function __construct($data = NULL) { } /** - * Required. The new definition of the group. All fields of the existing group, - * excepting `name`, are replaced with the corresponding fields of this group. + * Required. The new definition of the group. All fields of the existing + * group, excepting `name`, are replaced with the corresponding fields of this + * group. * * Generated from protobuf field .google.monitoring.v3.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; * @return \Google\Cloud\Monitoring\V3\Group|null @@ -84,8 +88,9 @@ public function clearGroup() } /** - * Required. The new definition of the group. All fields of the existing group, - * excepting `name`, are replaced with the corresponding fields of this group. + * Required. The new definition of the group. All fields of the existing + * group, excepting `name`, are replaced with the corresponding fields of this + * group. * * Generated from protobuf field .google.monitoring.v3.Group group = 2 [(.google.api.field_behavior) = REQUIRED]; * @param \Google\Cloud\Monitoring\V3\Group $var diff --git a/Monitoring/src/V3/resources/alert_policy_service_descriptor_config.php b/Monitoring/src/V3/resources/alert_policy_service_descriptor_config.php index bb7fe884827d..995f07d75413 100644 --- a/Monitoring/src/V3/resources/alert_policy_service_descriptor_config.php +++ b/Monitoring/src/V3/resources/alert_policy_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Monitoring/src/V3/resources/alert_policy_service_rest_client_config.php b/Monitoring/src/V3/resources/alert_policy_service_rest_client_config.php index dffb1c026b48..bb65ee95b1d7 100644 --- a/Monitoring/src/V3/resources/alert_policy_service_rest_client_config.php +++ b/Monitoring/src/V3/resources/alert_policy_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Monitoring/src/V3/resources/group_service_descriptor_config.php b/Monitoring/src/V3/resources/group_service_descriptor_config.php index ff6efe326c8f..dba3498cf7f6 100644 --- a/Monitoring/src/V3/resources/group_service_descriptor_config.php +++ b/Monitoring/src/V3/resources/group_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Monitoring/src/V3/resources/group_service_rest_client_config.php b/Monitoring/src/V3/resources/group_service_rest_client_config.php index 2d4763692def..1ec3e238ee16 100644 --- a/Monitoring/src/V3/resources/group_service_rest_client_config.php +++ b/Monitoring/src/V3/resources/group_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Monitoring/src/V3/resources/metric_service_descriptor_config.php b/Monitoring/src/V3/resources/metric_service_descriptor_config.php index 537f2edc969b..7b8896801ebc 100644 --- a/Monitoring/src/V3/resources/metric_service_descriptor_config.php +++ b/Monitoring/src/V3/resources/metric_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Monitoring/src/V3/resources/metric_service_rest_client_config.php b/Monitoring/src/V3/resources/metric_service_rest_client_config.php index 741468a73ec1..0367626add51 100644 --- a/Monitoring/src/V3/resources/metric_service_rest_client_config.php +++ b/Monitoring/src/V3/resources/metric_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Monitoring/src/V3/resources/notification_channel_service_descriptor_config.php b/Monitoring/src/V3/resources/notification_channel_service_descriptor_config.php index 212e17ef7469..6088b2f89bf7 100644 --- a/Monitoring/src/V3/resources/notification_channel_service_descriptor_config.php +++ b/Monitoring/src/V3/resources/notification_channel_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Monitoring/src/V3/resources/notification_channel_service_rest_client_config.php b/Monitoring/src/V3/resources/notification_channel_service_rest_client_config.php index 3c782d2b3a64..822c7ebc9340 100644 --- a/Monitoring/src/V3/resources/notification_channel_service_rest_client_config.php +++ b/Monitoring/src/V3/resources/notification_channel_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Monitoring/src/V3/resources/query_service_descriptor_config.php b/Monitoring/src/V3/resources/query_service_descriptor_config.php index a3c68187c231..4b6dc680ebc6 100644 --- a/Monitoring/src/V3/resources/query_service_descriptor_config.php +++ b/Monitoring/src/V3/resources/query_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Monitoring/src/V3/resources/query_service_rest_client_config.php b/Monitoring/src/V3/resources/query_service_rest_client_config.php index f258f2c56388..38b688dbab52 100644 --- a/Monitoring/src/V3/resources/query_service_rest_client_config.php +++ b/Monitoring/src/V3/resources/query_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Monitoring/src/V3/resources/service_monitoring_service_descriptor_config.php b/Monitoring/src/V3/resources/service_monitoring_service_descriptor_config.php index ab57f32e711c..739ca8709340 100644 --- a/Monitoring/src/V3/resources/service_monitoring_service_descriptor_config.php +++ b/Monitoring/src/V3/resources/service_monitoring_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Monitoring/src/V3/resources/service_monitoring_service_rest_client_config.php b/Monitoring/src/V3/resources/service_monitoring_service_rest_client_config.php index ddefc86e0a72..f7ca03dded7a 100644 --- a/Monitoring/src/V3/resources/service_monitoring_service_rest_client_config.php +++ b/Monitoring/src/V3/resources/service_monitoring_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Monitoring/src/V3/resources/snooze_service_descriptor_config.php b/Monitoring/src/V3/resources/snooze_service_descriptor_config.php index a476bb046700..57e5c8ab3863 100644 --- a/Monitoring/src/V3/resources/snooze_service_descriptor_config.php +++ b/Monitoring/src/V3/resources/snooze_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Monitoring/src/V3/resources/snooze_service_rest_client_config.php b/Monitoring/src/V3/resources/snooze_service_rest_client_config.php index de2890fcd300..a3b5e3574b8e 100644 --- a/Monitoring/src/V3/resources/snooze_service_rest_client_config.php +++ b/Monitoring/src/V3/resources/snooze_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Monitoring/src/V3/resources/uptime_check_service_descriptor_config.php b/Monitoring/src/V3/resources/uptime_check_service_descriptor_config.php index f69c027e8c7b..a9dbc7aa7817 100644 --- a/Monitoring/src/V3/resources/uptime_check_service_descriptor_config.php +++ b/Monitoring/src/V3/resources/uptime_check_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Monitoring/src/V3/resources/uptime_check_service_rest_client_config.php b/Monitoring/src/V3/resources/uptime_check_service_rest_client_config.php index 48eea72dcebf..4c50c3cd46b1 100644 --- a/Monitoring/src/V3/resources/uptime_check_service_rest_client_config.php +++ b/Monitoring/src/V3/resources/uptime_check_service_rest_client_config.php @@ -1,4 +1,24 @@ [ From b2e2eb340bee9d08485ce45372547a46a4026b97 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 09:10:21 -0700 Subject: [PATCH 32/86] chore: add license and generated code headers to generated resource files (#7225) PiperOrigin-RevId: 624277410 Source-Link: https://github.com/googleapis/googleapis/commit/2d881be8c566e4c374061248dd205efd72b7ef4f Source-Link: https://github.com/googleapis/googleapis-gen/commit/1d063f9353aeffb9a968f1a00f1d105b0c14a42d Copy-Tag: eyJwIjoiQWNjZXNzQXBwcm92YWwvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiQWNjZXNzQ29udGV4dE1hbmFnZXIvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiQWR2aXNvcnlOb3RpZmljYXRpb25zLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiQWlQbGF0Zm9ybS8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiQWxsb3lEYi8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiQW5hbHl0aWNzQWRtaW4vLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiQW5hbHl0aWNzRGF0YS8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiQXBpR2F0ZXdheS8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiQXBpS2V5cy8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiQXBpZ2VlQ29ubmVjdC8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiQXBpZ2VlUmVnaXN0cnkvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiQXBwRW5naW5lQWRtaW4vLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiQXBwSHViLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiQXBwc0V2ZW50c1N1YnNjcmlwdGlvbnMvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiQXBwc01lZXQvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiQXJ0aWZhY3RSZWdpc3RyeS8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiQXNzZXQvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiQXNzdXJlZFdvcmtsb2Fkcy8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiQXV0b01sLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiQmFyZU1ldGFsU29sdXRpb24vLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== --- .../access_approval_descriptor_config.php | 20 +++++++++++++++++++ .../access_approval_rest_client_config.php | 20 +++++++++++++++++++ ...cess_context_manager_descriptor_config.php | 20 +++++++++++++++++++ ...ess_context_manager_rest_client_config.php | 20 +++++++++++++++++++ ...otifications_service_descriptor_config.php | 20 +++++++++++++++++++ ...tifications_service_rest_client_config.php | 20 +++++++++++++++++++ .../dataset_service_descriptor_config.php | 20 +++++++++++++++++++ .../dataset_service_rest_client_config.php | 20 +++++++++++++++++++ ...esource_pool_service_descriptor_config.php | 20 +++++++++++++++++++ ...source_pool_service_rest_client_config.php | 20 +++++++++++++++++++ .../endpoint_service_descriptor_config.php | 20 +++++++++++++++++++ .../endpoint_service_rest_client_config.php | 20 +++++++++++++++++++ ..._store_admin_service_descriptor_config.php | 20 +++++++++++++++++++ ...store_admin_service_rest_client_config.php | 20 +++++++++++++++++++ ...online_store_service_descriptor_config.php | 20 +++++++++++++++++++ ...nline_store_service_rest_client_config.php | 20 +++++++++++++++++++ ...ure_registry_service_descriptor_config.php | 20 +++++++++++++++++++ ...re_registry_service_rest_client_config.php | 20 +++++++++++++++++++ ...line_serving_service_descriptor_config.php | 20 +++++++++++++++++++ ...ine_serving_service_rest_client_config.php | 20 +++++++++++++++++++ ...featurestore_service_descriptor_config.php | 20 +++++++++++++++++++ ...eaturestore_service_rest_client_config.php | 20 +++++++++++++++++++ ...en_ai_tuning_service_descriptor_config.php | 20 +++++++++++++++++++ ...n_ai_tuning_service_rest_client_config.php | 20 +++++++++++++++++++ ...dex_endpoint_service_descriptor_config.php | 20 +++++++++++++++++++ ...ex_endpoint_service_rest_client_config.php | 20 +++++++++++++++++++ .../index_service_descriptor_config.php | 20 +++++++++++++++++++ .../index_service_rest_client_config.php | 20 +++++++++++++++++++ .../job_service_descriptor_config.php | 20 +++++++++++++++++++ .../job_service_rest_client_config.php | 20 +++++++++++++++++++ .../llm_utility_service_descriptor_config.php | 20 +++++++++++++++++++ ...llm_utility_service_rest_client_config.php | 20 +++++++++++++++++++ .../match_service_descriptor_config.php | 20 +++++++++++++++++++ .../match_service_rest_client_config.php | 20 +++++++++++++++++++ .../metadata_service_descriptor_config.php | 20 +++++++++++++++++++ .../metadata_service_rest_client_config.php | 20 +++++++++++++++++++ .../migration_service_descriptor_config.php | 20 +++++++++++++++++++ .../migration_service_rest_client_config.php | 20 +++++++++++++++++++ ...model_garden_service_descriptor_config.php | 20 +++++++++++++++++++ ...odel_garden_service_rest_client_config.php | 20 +++++++++++++++++++ .../model_service_descriptor_config.php | 20 +++++++++++++++++++ .../model_service_rest_client_config.php | 20 +++++++++++++++++++ .../notebook_service_descriptor_config.php | 20 +++++++++++++++++++ .../notebook_service_rest_client_config.php | 20 +++++++++++++++++++ ...ent_resource_service_descriptor_config.php | 20 +++++++++++++++++++ ...nt_resource_service_rest_client_config.php | 20 +++++++++++++++++++ .../pipeline_service_descriptor_config.php | 20 +++++++++++++++++++ .../pipeline_service_rest_client_config.php | 20 +++++++++++++++++++ .../prediction_service_descriptor_config.php | 20 +++++++++++++++++++ .../prediction_service_rest_client_config.php | 20 +++++++++++++++++++ .../schedule_service_descriptor_config.php | 20 +++++++++++++++++++ .../schedule_service_rest_client_config.php | 20 +++++++++++++++++++ ...cialist_pool_service_descriptor_config.php | 20 +++++++++++++++++++ ...ialist_pool_service_rest_client_config.php | 20 +++++++++++++++++++ .../tensorboard_service_descriptor_config.php | 20 +++++++++++++++++++ ...tensorboard_service_rest_client_config.php | 20 +++++++++++++++++++ .../vizier_service_descriptor_config.php | 20 +++++++++++++++++++ .../vizier_service_rest_client_config.php | 20 +++++++++++++++++++ .../alloy_db_admin_descriptor_config.php | 20 +++++++++++++++++++ .../alloy_db_admin_rest_client_config.php | 20 +++++++++++++++++++ .../alloy_db_admin_descriptor_config.php | 20 +++++++++++++++++++ .../alloy_db_admin_rest_client_config.php | 20 +++++++++++++++++++ .../alloy_db_admin_descriptor_config.php | 20 +++++++++++++++++++ .../alloy_db_admin_rest_client_config.php | 20 +++++++++++++++++++ ...lytics_admin_service_descriptor_config.php | 20 +++++++++++++++++++ ...ytics_admin_service_rest_client_config.php | 20 +++++++++++++++++++ ...lytics_admin_service_descriptor_config.php | 20 +++++++++++++++++++ ...ytics_admin_service_rest_client_config.php | 20 +++++++++++++++++++ ...alpha_analytics_data_descriptor_config.php | 20 +++++++++++++++++++ ...lpha_analytics_data_rest_client_config.php | 20 +++++++++++++++++++ .../beta_analytics_data_descriptor_config.php | 20 +++++++++++++++++++ ...beta_analytics_data_rest_client_config.php | 20 +++++++++++++++++++ .../api_gateway_service_descriptor_config.php | 20 +++++++++++++++++++ ...api_gateway_service_rest_client_config.php | 20 +++++++++++++++++++ .../resources/api_keys_descriptor_config.php | 20 +++++++++++++++++++ .../resources/api_keys_rest_client_config.php | 20 +++++++++++++++++++ .../connection_service_descriptor_config.php | 20 +++++++++++++++++++ .../connection_service_rest_client_config.php | 20 +++++++++++++++++++ .../V1/resources/tether_descriptor_config.php | 20 +++++++++++++++++++ .../resources/tether_rest_client_config.php | 20 +++++++++++++++++++ .../provisioning_descriptor_config.php | 20 +++++++++++++++++++ .../provisioning_rest_client_config.php | 20 +++++++++++++++++++ .../resources/registry_descriptor_config.php | 20 +++++++++++++++++++ .../resources/registry_rest_client_config.php | 20 +++++++++++++++++++ .../applications_descriptor_config.php | 20 +++++++++++++++++++ .../applications_rest_client_config.php | 20 +++++++++++++++++++ ...horized_certificates_descriptor_config.php | 20 +++++++++++++++++++ ...orized_certificates_rest_client_config.php | 20 +++++++++++++++++++ .../authorized_domains_descriptor_config.php | 20 +++++++++++++++++++ .../authorized_domains_rest_client_config.php | 20 +++++++++++++++++++ .../domain_mappings_descriptor_config.php | 20 +++++++++++++++++++ .../domain_mappings_rest_client_config.php | 20 +++++++++++++++++++ .../resources/firewall_descriptor_config.php | 20 +++++++++++++++++++ .../resources/firewall_rest_client_config.php | 20 +++++++++++++++++++ .../resources/instances_descriptor_config.php | 20 +++++++++++++++++++ .../instances_rest_client_config.php | 20 +++++++++++++++++++ .../resources/services_descriptor_config.php | 20 +++++++++++++++++++ .../resources/services_rest_client_config.php | 20 +++++++++++++++++++ .../resources/versions_descriptor_config.php | 20 +++++++++++++++++++ .../resources/versions_rest_client_config.php | 20 +++++++++++++++++++ .../resources/app_hub_descriptor_config.php | 20 +++++++++++++++++++ .../resources/app_hub_rest_client_config.php | 20 +++++++++++++++++++ ...ubscriptions_service_descriptor_config.php | 20 +++++++++++++++++++ ...bscriptions_service_rest_client_config.php | 20 +++++++++++++++++++ ...ence_records_service_descriptor_config.php | 20 +++++++++++++++++++ ...nce_records_service_rest_client_config.php | 20 +++++++++++++++++++ .../spaces_service_descriptor_config.php | 20 +++++++++++++++++++ .../spaces_service_rest_client_config.php | 20 +++++++++++++++++++ ...ence_records_service_descriptor_config.php | 20 +++++++++++++++++++ ...nce_records_service_rest_client_config.php | 20 +++++++++++++++++++ .../spaces_service_descriptor_config.php | 20 +++++++++++++++++++ .../spaces_service_rest_client_config.php | 20 +++++++++++++++++++ .../artifact_registry_descriptor_config.php | 20 +++++++++++++++++++ .../artifact_registry_rest_client_config.php | 20 +++++++++++++++++++ .../artifact_registry_descriptor_config.php | 20 +++++++++++++++++++ .../artifact_registry_rest_client_config.php | 20 +++++++++++++++++++ .../asset_service_descriptor_config.php | 20 +++++++++++++++++++ .../asset_service_rest_client_config.php | 20 +++++++++++++++++++ ...ed_workloads_service_descriptor_config.php | 20 +++++++++++++++++++ ...d_workloads_service_rest_client_config.php | 20 +++++++++++++++++++ ...ed_workloads_service_descriptor_config.php | 20 +++++++++++++++++++ ...d_workloads_service_rest_client_config.php | 20 +++++++++++++++++++ .../resources/auto_ml_descriptor_config.php | 20 +++++++++++++++++++ .../resources/auto_ml_rest_client_config.php | 20 +++++++++++++++++++ .../prediction_service_descriptor_config.php | 20 +++++++++++++++++++ .../prediction_service_rest_client_config.php | 20 +++++++++++++++++++ .../resources/auto_ml_descriptor_config.php | 20 +++++++++++++++++++ .../resources/auto_ml_rest_client_config.php | 20 +++++++++++++++++++ .../prediction_service_descriptor_config.php | 20 +++++++++++++++++++ .../prediction_service_rest_client_config.php | 20 +++++++++++++++++++ .../bare_metal_solution_descriptor_config.php | 20 +++++++++++++++++++ ...bare_metal_solution_rest_client_config.php | 20 +++++++++++++++++++ 132 files changed, 2640 insertions(+) diff --git a/AccessApproval/src/V1/resources/access_approval_descriptor_config.php b/AccessApproval/src/V1/resources/access_approval_descriptor_config.php index 2e1eea78176a..ee598408eae8 100644 --- a/AccessApproval/src/V1/resources/access_approval_descriptor_config.php +++ b/AccessApproval/src/V1/resources/access_approval_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AccessApproval/src/V1/resources/access_approval_rest_client_config.php b/AccessApproval/src/V1/resources/access_approval_rest_client_config.php index df20af0770ad..b6de73248524 100644 --- a/AccessApproval/src/V1/resources/access_approval_rest_client_config.php +++ b/AccessApproval/src/V1/resources/access_approval_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AccessContextManager/src/V1/resources/access_context_manager_descriptor_config.php b/AccessContextManager/src/V1/resources/access_context_manager_descriptor_config.php index 8d683f587b00..ef0360386e08 100644 --- a/AccessContextManager/src/V1/resources/access_context_manager_descriptor_config.php +++ b/AccessContextManager/src/V1/resources/access_context_manager_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AccessContextManager/src/V1/resources/access_context_manager_rest_client_config.php b/AccessContextManager/src/V1/resources/access_context_manager_rest_client_config.php index d0532c25d3ac..882136ccb86d 100644 --- a/AccessContextManager/src/V1/resources/access_context_manager_rest_client_config.php +++ b/AccessContextManager/src/V1/resources/access_context_manager_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AdvisoryNotifications/src/V1/resources/advisory_notifications_service_descriptor_config.php b/AdvisoryNotifications/src/V1/resources/advisory_notifications_service_descriptor_config.php index 50647237c0f0..19358649e519 100644 --- a/AdvisoryNotifications/src/V1/resources/advisory_notifications_service_descriptor_config.php +++ b/AdvisoryNotifications/src/V1/resources/advisory_notifications_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AdvisoryNotifications/src/V1/resources/advisory_notifications_service_rest_client_config.php b/AdvisoryNotifications/src/V1/resources/advisory_notifications_service_rest_client_config.php index bfa0527efbf6..ad365a145fc0 100644 --- a/AdvisoryNotifications/src/V1/resources/advisory_notifications_service_rest_client_config.php +++ b/AdvisoryNotifications/src/V1/resources/advisory_notifications_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/dataset_service_descriptor_config.php b/AiPlatform/src/V1/resources/dataset_service_descriptor_config.php index d3a2854f250b..886d56c6fbd0 100644 --- a/AiPlatform/src/V1/resources/dataset_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/dataset_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/dataset_service_rest_client_config.php b/AiPlatform/src/V1/resources/dataset_service_rest_client_config.php index eb0337f8bc7b..11e21abad0d1 100644 --- a/AiPlatform/src/V1/resources/dataset_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/dataset_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/deployment_resource_pool_service_descriptor_config.php b/AiPlatform/src/V1/resources/deployment_resource_pool_service_descriptor_config.php index e60a825a6de1..00fecfcfc640 100644 --- a/AiPlatform/src/V1/resources/deployment_resource_pool_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/deployment_resource_pool_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/deployment_resource_pool_service_rest_client_config.php b/AiPlatform/src/V1/resources/deployment_resource_pool_service_rest_client_config.php index e2336ab7d857..3e4bf8bbe78a 100644 --- a/AiPlatform/src/V1/resources/deployment_resource_pool_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/deployment_resource_pool_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/endpoint_service_descriptor_config.php b/AiPlatform/src/V1/resources/endpoint_service_descriptor_config.php index 9fc4b674f998..2c47c113c222 100644 --- a/AiPlatform/src/V1/resources/endpoint_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/endpoint_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/endpoint_service_rest_client_config.php b/AiPlatform/src/V1/resources/endpoint_service_rest_client_config.php index 252c2cf4a962..a1ce269a0d90 100644 --- a/AiPlatform/src/V1/resources/endpoint_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/endpoint_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/feature_online_store_admin_service_descriptor_config.php b/AiPlatform/src/V1/resources/feature_online_store_admin_service_descriptor_config.php index 116db4848555..150854f38650 100644 --- a/AiPlatform/src/V1/resources/feature_online_store_admin_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/feature_online_store_admin_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/feature_online_store_admin_service_rest_client_config.php b/AiPlatform/src/V1/resources/feature_online_store_admin_service_rest_client_config.php index 81cf661cd2f5..15f14f1c340f 100644 --- a/AiPlatform/src/V1/resources/feature_online_store_admin_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/feature_online_store_admin_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/feature_online_store_service_descriptor_config.php b/AiPlatform/src/V1/resources/feature_online_store_service_descriptor_config.php index b4ce1ddb3457..e49d8951ae24 100644 --- a/AiPlatform/src/V1/resources/feature_online_store_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/feature_online_store_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/feature_online_store_service_rest_client_config.php b/AiPlatform/src/V1/resources/feature_online_store_service_rest_client_config.php index 029d5f37440a..b164a2bf4012 100644 --- a/AiPlatform/src/V1/resources/feature_online_store_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/feature_online_store_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/feature_registry_service_descriptor_config.php b/AiPlatform/src/V1/resources/feature_registry_service_descriptor_config.php index f1508e1fa287..50e8960d13ae 100644 --- a/AiPlatform/src/V1/resources/feature_registry_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/feature_registry_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/feature_registry_service_rest_client_config.php b/AiPlatform/src/V1/resources/feature_registry_service_rest_client_config.php index 2044587f1e1f..88687e5e3173 100644 --- a/AiPlatform/src/V1/resources/feature_registry_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/feature_registry_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/featurestore_online_serving_service_descriptor_config.php b/AiPlatform/src/V1/resources/featurestore_online_serving_service_descriptor_config.php index 39748a4c8738..1fff70c4b168 100644 --- a/AiPlatform/src/V1/resources/featurestore_online_serving_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/featurestore_online_serving_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/featurestore_online_serving_service_rest_client_config.php b/AiPlatform/src/V1/resources/featurestore_online_serving_service_rest_client_config.php index 035f78dbf4cb..7b69b757554f 100644 --- a/AiPlatform/src/V1/resources/featurestore_online_serving_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/featurestore_online_serving_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/featurestore_service_descriptor_config.php b/AiPlatform/src/V1/resources/featurestore_service_descriptor_config.php index babe61a68274..e6ab15a47aab 100644 --- a/AiPlatform/src/V1/resources/featurestore_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/featurestore_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/featurestore_service_rest_client_config.php b/AiPlatform/src/V1/resources/featurestore_service_rest_client_config.php index 621167288dd3..47f5a60820a3 100644 --- a/AiPlatform/src/V1/resources/featurestore_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/featurestore_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/gen_ai_tuning_service_descriptor_config.php b/AiPlatform/src/V1/resources/gen_ai_tuning_service_descriptor_config.php index 5bd48fc3f48b..5a2bd932cc3b 100644 --- a/AiPlatform/src/V1/resources/gen_ai_tuning_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/gen_ai_tuning_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/gen_ai_tuning_service_rest_client_config.php b/AiPlatform/src/V1/resources/gen_ai_tuning_service_rest_client_config.php index 2811ac79f8fc..2bb864d8d182 100644 --- a/AiPlatform/src/V1/resources/gen_ai_tuning_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/gen_ai_tuning_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/index_endpoint_service_descriptor_config.php b/AiPlatform/src/V1/resources/index_endpoint_service_descriptor_config.php index 81cb935d1090..1dcf7f8004ff 100644 --- a/AiPlatform/src/V1/resources/index_endpoint_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/index_endpoint_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/index_endpoint_service_rest_client_config.php b/AiPlatform/src/V1/resources/index_endpoint_service_rest_client_config.php index 56cac3dfc035..43df1a4a494b 100644 --- a/AiPlatform/src/V1/resources/index_endpoint_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/index_endpoint_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/index_service_descriptor_config.php b/AiPlatform/src/V1/resources/index_service_descriptor_config.php index df65fb48b191..90b454892f4b 100644 --- a/AiPlatform/src/V1/resources/index_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/index_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/index_service_rest_client_config.php b/AiPlatform/src/V1/resources/index_service_rest_client_config.php index e7c23502e98f..5b6d0d17f18e 100644 --- a/AiPlatform/src/V1/resources/index_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/index_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/job_service_descriptor_config.php b/AiPlatform/src/V1/resources/job_service_descriptor_config.php index 3935337c5c86..72fda4a1dd79 100644 --- a/AiPlatform/src/V1/resources/job_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/job_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/job_service_rest_client_config.php b/AiPlatform/src/V1/resources/job_service_rest_client_config.php index 6b07399a5b75..bb5f3227dbe9 100644 --- a/AiPlatform/src/V1/resources/job_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/job_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/llm_utility_service_descriptor_config.php b/AiPlatform/src/V1/resources/llm_utility_service_descriptor_config.php index 1712bf92a976..762bd6bb20d1 100644 --- a/AiPlatform/src/V1/resources/llm_utility_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/llm_utility_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/llm_utility_service_rest_client_config.php b/AiPlatform/src/V1/resources/llm_utility_service_rest_client_config.php index 3215271a92b4..a86ce86a4b06 100644 --- a/AiPlatform/src/V1/resources/llm_utility_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/llm_utility_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/match_service_descriptor_config.php b/AiPlatform/src/V1/resources/match_service_descriptor_config.php index 5f0b8c5e46f8..33660aa68ba3 100644 --- a/AiPlatform/src/V1/resources/match_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/match_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/match_service_rest_client_config.php b/AiPlatform/src/V1/resources/match_service_rest_client_config.php index 33ee5bea6603..1762bf680174 100644 --- a/AiPlatform/src/V1/resources/match_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/match_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/metadata_service_descriptor_config.php b/AiPlatform/src/V1/resources/metadata_service_descriptor_config.php index 74c3083a88ab..e3fcd759cfe9 100644 --- a/AiPlatform/src/V1/resources/metadata_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/metadata_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/metadata_service_rest_client_config.php b/AiPlatform/src/V1/resources/metadata_service_rest_client_config.php index 25139594a8c9..ba387c35bc17 100644 --- a/AiPlatform/src/V1/resources/metadata_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/metadata_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/migration_service_descriptor_config.php b/AiPlatform/src/V1/resources/migration_service_descriptor_config.php index f2ee608ad743..121f56540368 100644 --- a/AiPlatform/src/V1/resources/migration_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/migration_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/migration_service_rest_client_config.php b/AiPlatform/src/V1/resources/migration_service_rest_client_config.php index 22719fcb8377..c2d8f89d909e 100644 --- a/AiPlatform/src/V1/resources/migration_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/migration_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/model_garden_service_descriptor_config.php b/AiPlatform/src/V1/resources/model_garden_service_descriptor_config.php index b27b9b273df3..20822a5b1b2d 100644 --- a/AiPlatform/src/V1/resources/model_garden_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/model_garden_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/model_garden_service_rest_client_config.php b/AiPlatform/src/V1/resources/model_garden_service_rest_client_config.php index f8ae19bc0a27..1541f49d832b 100644 --- a/AiPlatform/src/V1/resources/model_garden_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/model_garden_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/model_service_descriptor_config.php b/AiPlatform/src/V1/resources/model_service_descriptor_config.php index 58679cca5169..5477c3e70cc9 100644 --- a/AiPlatform/src/V1/resources/model_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/model_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/model_service_rest_client_config.php b/AiPlatform/src/V1/resources/model_service_rest_client_config.php index c5cba83a41be..f77ef30f63ad 100644 --- a/AiPlatform/src/V1/resources/model_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/model_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/notebook_service_descriptor_config.php b/AiPlatform/src/V1/resources/notebook_service_descriptor_config.php index b49834ef76ee..5200333d88ae 100644 --- a/AiPlatform/src/V1/resources/notebook_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/notebook_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/notebook_service_rest_client_config.php b/AiPlatform/src/V1/resources/notebook_service_rest_client_config.php index b7916496d0aa..4ed3225fe459 100644 --- a/AiPlatform/src/V1/resources/notebook_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/notebook_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/persistent_resource_service_descriptor_config.php b/AiPlatform/src/V1/resources/persistent_resource_service_descriptor_config.php index 0496c2c2a2c8..40f0f3b98b95 100644 --- a/AiPlatform/src/V1/resources/persistent_resource_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/persistent_resource_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/persistent_resource_service_rest_client_config.php b/AiPlatform/src/V1/resources/persistent_resource_service_rest_client_config.php index 716615d8efa0..1ff1bac709d7 100644 --- a/AiPlatform/src/V1/resources/persistent_resource_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/persistent_resource_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/pipeline_service_descriptor_config.php b/AiPlatform/src/V1/resources/pipeline_service_descriptor_config.php index 7898eb1e6247..654b3040be0d 100644 --- a/AiPlatform/src/V1/resources/pipeline_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/pipeline_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/pipeline_service_rest_client_config.php b/AiPlatform/src/V1/resources/pipeline_service_rest_client_config.php index b21773b52342..ecb44727c70f 100644 --- a/AiPlatform/src/V1/resources/pipeline_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/pipeline_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/prediction_service_descriptor_config.php b/AiPlatform/src/V1/resources/prediction_service_descriptor_config.php index 17f73b6070a6..17b7e796d03f 100644 --- a/AiPlatform/src/V1/resources/prediction_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/prediction_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/prediction_service_rest_client_config.php b/AiPlatform/src/V1/resources/prediction_service_rest_client_config.php index 8c58de98e899..d2f8ea697d52 100644 --- a/AiPlatform/src/V1/resources/prediction_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/prediction_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/schedule_service_descriptor_config.php b/AiPlatform/src/V1/resources/schedule_service_descriptor_config.php index b12c87a7e3e9..6ba56d41b8a5 100644 --- a/AiPlatform/src/V1/resources/schedule_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/schedule_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/schedule_service_rest_client_config.php b/AiPlatform/src/V1/resources/schedule_service_rest_client_config.php index c0601f0f3a39..d907c2d1c0ae 100644 --- a/AiPlatform/src/V1/resources/schedule_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/schedule_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/specialist_pool_service_descriptor_config.php b/AiPlatform/src/V1/resources/specialist_pool_service_descriptor_config.php index e4fa9494cca8..ff6ded519125 100644 --- a/AiPlatform/src/V1/resources/specialist_pool_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/specialist_pool_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/specialist_pool_service_rest_client_config.php b/AiPlatform/src/V1/resources/specialist_pool_service_rest_client_config.php index 9603c57f0911..c976096ab75e 100644 --- a/AiPlatform/src/V1/resources/specialist_pool_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/specialist_pool_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/tensorboard_service_descriptor_config.php b/AiPlatform/src/V1/resources/tensorboard_service_descriptor_config.php index 67791b3dab84..2dd392f49c1b 100644 --- a/AiPlatform/src/V1/resources/tensorboard_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/tensorboard_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/tensorboard_service_rest_client_config.php b/AiPlatform/src/V1/resources/tensorboard_service_rest_client_config.php index bf21c1e216b3..6a3ac034263c 100644 --- a/AiPlatform/src/V1/resources/tensorboard_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/tensorboard_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/vizier_service_descriptor_config.php b/AiPlatform/src/V1/resources/vizier_service_descriptor_config.php index fd787014a56f..b585912986f2 100644 --- a/AiPlatform/src/V1/resources/vizier_service_descriptor_config.php +++ b/AiPlatform/src/V1/resources/vizier_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AiPlatform/src/V1/resources/vizier_service_rest_client_config.php b/AiPlatform/src/V1/resources/vizier_service_rest_client_config.php index a6b50e18323e..024f1623034f 100644 --- a/AiPlatform/src/V1/resources/vizier_service_rest_client_config.php +++ b/AiPlatform/src/V1/resources/vizier_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AlloyDb/src/V1/resources/alloy_db_admin_descriptor_config.php b/AlloyDb/src/V1/resources/alloy_db_admin_descriptor_config.php index 4bf356dc4b3c..14f17c2c70d3 100644 --- a/AlloyDb/src/V1/resources/alloy_db_admin_descriptor_config.php +++ b/AlloyDb/src/V1/resources/alloy_db_admin_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AlloyDb/src/V1/resources/alloy_db_admin_rest_client_config.php b/AlloyDb/src/V1/resources/alloy_db_admin_rest_client_config.php index a37ac074be16..06450b4dfd5b 100644 --- a/AlloyDb/src/V1/resources/alloy_db_admin_rest_client_config.php +++ b/AlloyDb/src/V1/resources/alloy_db_admin_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AlloyDb/src/V1alpha/resources/alloy_db_admin_descriptor_config.php b/AlloyDb/src/V1alpha/resources/alloy_db_admin_descriptor_config.php index 273474d1cd5c..f31507ad8a0a 100644 --- a/AlloyDb/src/V1alpha/resources/alloy_db_admin_descriptor_config.php +++ b/AlloyDb/src/V1alpha/resources/alloy_db_admin_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AlloyDb/src/V1alpha/resources/alloy_db_admin_rest_client_config.php b/AlloyDb/src/V1alpha/resources/alloy_db_admin_rest_client_config.php index df2ea1e5916c..320978598736 100644 --- a/AlloyDb/src/V1alpha/resources/alloy_db_admin_rest_client_config.php +++ b/AlloyDb/src/V1alpha/resources/alloy_db_admin_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AlloyDb/src/V1beta/resources/alloy_db_admin_descriptor_config.php b/AlloyDb/src/V1beta/resources/alloy_db_admin_descriptor_config.php index 2c1abfb845f4..17992db0a59e 100644 --- a/AlloyDb/src/V1beta/resources/alloy_db_admin_descriptor_config.php +++ b/AlloyDb/src/V1beta/resources/alloy_db_admin_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AlloyDb/src/V1beta/resources/alloy_db_admin_rest_client_config.php b/AlloyDb/src/V1beta/resources/alloy_db_admin_rest_client_config.php index 615a9e2a55df..24863f906ac5 100644 --- a/AlloyDb/src/V1beta/resources/alloy_db_admin_rest_client_config.php +++ b/AlloyDb/src/V1beta/resources/alloy_db_admin_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AnalyticsAdmin/src/V1alpha/resources/analytics_admin_service_descriptor_config.php b/AnalyticsAdmin/src/V1alpha/resources/analytics_admin_service_descriptor_config.php index 8b2e551bbc4b..79743c274eaa 100644 --- a/AnalyticsAdmin/src/V1alpha/resources/analytics_admin_service_descriptor_config.php +++ b/AnalyticsAdmin/src/V1alpha/resources/analytics_admin_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AnalyticsAdmin/src/V1alpha/resources/analytics_admin_service_rest_client_config.php b/AnalyticsAdmin/src/V1alpha/resources/analytics_admin_service_rest_client_config.php index a143ff7e2880..457a88c619ac 100644 --- a/AnalyticsAdmin/src/V1alpha/resources/analytics_admin_service_rest_client_config.php +++ b/AnalyticsAdmin/src/V1alpha/resources/analytics_admin_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AnalyticsAdmin/src/V1beta/resources/analytics_admin_service_descriptor_config.php b/AnalyticsAdmin/src/V1beta/resources/analytics_admin_service_descriptor_config.php index da5caf42f1e7..2154e952b08f 100644 --- a/AnalyticsAdmin/src/V1beta/resources/analytics_admin_service_descriptor_config.php +++ b/AnalyticsAdmin/src/V1beta/resources/analytics_admin_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AnalyticsAdmin/src/V1beta/resources/analytics_admin_service_rest_client_config.php b/AnalyticsAdmin/src/V1beta/resources/analytics_admin_service_rest_client_config.php index 096d5c5eea1b..e399e20438f3 100644 --- a/AnalyticsAdmin/src/V1beta/resources/analytics_admin_service_rest_client_config.php +++ b/AnalyticsAdmin/src/V1beta/resources/analytics_admin_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AnalyticsData/src/V1alpha/resources/alpha_analytics_data_descriptor_config.php b/AnalyticsData/src/V1alpha/resources/alpha_analytics_data_descriptor_config.php index 916f87554157..2dd5ef0502ab 100644 --- a/AnalyticsData/src/V1alpha/resources/alpha_analytics_data_descriptor_config.php +++ b/AnalyticsData/src/V1alpha/resources/alpha_analytics_data_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AnalyticsData/src/V1alpha/resources/alpha_analytics_data_rest_client_config.php b/AnalyticsData/src/V1alpha/resources/alpha_analytics_data_rest_client_config.php index d21df48ab679..73859d059df6 100644 --- a/AnalyticsData/src/V1alpha/resources/alpha_analytics_data_rest_client_config.php +++ b/AnalyticsData/src/V1alpha/resources/alpha_analytics_data_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AnalyticsData/src/V1beta/resources/beta_analytics_data_descriptor_config.php b/AnalyticsData/src/V1beta/resources/beta_analytics_data_descriptor_config.php index 16d6aa042a10..d98545e85788 100644 --- a/AnalyticsData/src/V1beta/resources/beta_analytics_data_descriptor_config.php +++ b/AnalyticsData/src/V1beta/resources/beta_analytics_data_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AnalyticsData/src/V1beta/resources/beta_analytics_data_rest_client_config.php b/AnalyticsData/src/V1beta/resources/beta_analytics_data_rest_client_config.php index 5fbae0dd9d8f..d4183f113c4d 100644 --- a/AnalyticsData/src/V1beta/resources/beta_analytics_data_rest_client_config.php +++ b/AnalyticsData/src/V1beta/resources/beta_analytics_data_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ApiGateway/src/V1/resources/api_gateway_service_descriptor_config.php b/ApiGateway/src/V1/resources/api_gateway_service_descriptor_config.php index ae3aee9b8596..8b878536b7de 100644 --- a/ApiGateway/src/V1/resources/api_gateway_service_descriptor_config.php +++ b/ApiGateway/src/V1/resources/api_gateway_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ApiGateway/src/V1/resources/api_gateway_service_rest_client_config.php b/ApiGateway/src/V1/resources/api_gateway_service_rest_client_config.php index efacec0cefc8..ca6d22872a76 100644 --- a/ApiGateway/src/V1/resources/api_gateway_service_rest_client_config.php +++ b/ApiGateway/src/V1/resources/api_gateway_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ApiKeys/src/V2/resources/api_keys_descriptor_config.php b/ApiKeys/src/V2/resources/api_keys_descriptor_config.php index cfdbad576236..324a29669953 100644 --- a/ApiKeys/src/V2/resources/api_keys_descriptor_config.php +++ b/ApiKeys/src/V2/resources/api_keys_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ApiKeys/src/V2/resources/api_keys_rest_client_config.php b/ApiKeys/src/V2/resources/api_keys_rest_client_config.php index 8a6b2ba0f2e9..718af4409ea4 100644 --- a/ApiKeys/src/V2/resources/api_keys_rest_client_config.php +++ b/ApiKeys/src/V2/resources/api_keys_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ApigeeConnect/src/V1/resources/connection_service_descriptor_config.php b/ApigeeConnect/src/V1/resources/connection_service_descriptor_config.php index a6f115f924bf..b71cd9a09e7c 100644 --- a/ApigeeConnect/src/V1/resources/connection_service_descriptor_config.php +++ b/ApigeeConnect/src/V1/resources/connection_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ApigeeConnect/src/V1/resources/connection_service_rest_client_config.php b/ApigeeConnect/src/V1/resources/connection_service_rest_client_config.php index 9e83bee656f7..bf69949de167 100644 --- a/ApigeeConnect/src/V1/resources/connection_service_rest_client_config.php +++ b/ApigeeConnect/src/V1/resources/connection_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ApigeeConnect/src/V1/resources/tether_descriptor_config.php b/ApigeeConnect/src/V1/resources/tether_descriptor_config.php index 1b3e3b52e154..8275e8b8958b 100644 --- a/ApigeeConnect/src/V1/resources/tether_descriptor_config.php +++ b/ApigeeConnect/src/V1/resources/tether_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ApigeeConnect/src/V1/resources/tether_rest_client_config.php b/ApigeeConnect/src/V1/resources/tether_rest_client_config.php index 180f8ce91961..b33f57959be3 100644 --- a/ApigeeConnect/src/V1/resources/tether_rest_client_config.php +++ b/ApigeeConnect/src/V1/resources/tether_rest_client_config.php @@ -1,4 +1,24 @@ [], diff --git a/ApigeeRegistry/src/V1/resources/provisioning_descriptor_config.php b/ApigeeRegistry/src/V1/resources/provisioning_descriptor_config.php index 2bffad392f97..9274a17b2b72 100644 --- a/ApigeeRegistry/src/V1/resources/provisioning_descriptor_config.php +++ b/ApigeeRegistry/src/V1/resources/provisioning_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ApigeeRegistry/src/V1/resources/provisioning_rest_client_config.php b/ApigeeRegistry/src/V1/resources/provisioning_rest_client_config.php index 4c802901d908..fa39c5fb7545 100644 --- a/ApigeeRegistry/src/V1/resources/provisioning_rest_client_config.php +++ b/ApigeeRegistry/src/V1/resources/provisioning_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ApigeeRegistry/src/V1/resources/registry_descriptor_config.php b/ApigeeRegistry/src/V1/resources/registry_descriptor_config.php index 7d53a500a7e2..f1503efab2af 100644 --- a/ApigeeRegistry/src/V1/resources/registry_descriptor_config.php +++ b/ApigeeRegistry/src/V1/resources/registry_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ApigeeRegistry/src/V1/resources/registry_rest_client_config.php b/ApigeeRegistry/src/V1/resources/registry_rest_client_config.php index a9f49918eb33..c9206bb8fe9e 100644 --- a/ApigeeRegistry/src/V1/resources/registry_rest_client_config.php +++ b/ApigeeRegistry/src/V1/resources/registry_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppEngineAdmin/src/V1/resources/applications_descriptor_config.php b/AppEngineAdmin/src/V1/resources/applications_descriptor_config.php index 758af1fef935..51f18ca13cfe 100644 --- a/AppEngineAdmin/src/V1/resources/applications_descriptor_config.php +++ b/AppEngineAdmin/src/V1/resources/applications_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppEngineAdmin/src/V1/resources/applications_rest_client_config.php b/AppEngineAdmin/src/V1/resources/applications_rest_client_config.php index 9607d4e3ac6e..dbce0ad31d58 100644 --- a/AppEngineAdmin/src/V1/resources/applications_rest_client_config.php +++ b/AppEngineAdmin/src/V1/resources/applications_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppEngineAdmin/src/V1/resources/authorized_certificates_descriptor_config.php b/AppEngineAdmin/src/V1/resources/authorized_certificates_descriptor_config.php index e5532cc73096..6ece424ef35b 100644 --- a/AppEngineAdmin/src/V1/resources/authorized_certificates_descriptor_config.php +++ b/AppEngineAdmin/src/V1/resources/authorized_certificates_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppEngineAdmin/src/V1/resources/authorized_certificates_rest_client_config.php b/AppEngineAdmin/src/V1/resources/authorized_certificates_rest_client_config.php index e4e9b270b246..c410bbf4ee5f 100644 --- a/AppEngineAdmin/src/V1/resources/authorized_certificates_rest_client_config.php +++ b/AppEngineAdmin/src/V1/resources/authorized_certificates_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppEngineAdmin/src/V1/resources/authorized_domains_descriptor_config.php b/AppEngineAdmin/src/V1/resources/authorized_domains_descriptor_config.php index 0bb7884280e9..233e6c55fda3 100644 --- a/AppEngineAdmin/src/V1/resources/authorized_domains_descriptor_config.php +++ b/AppEngineAdmin/src/V1/resources/authorized_domains_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppEngineAdmin/src/V1/resources/authorized_domains_rest_client_config.php b/AppEngineAdmin/src/V1/resources/authorized_domains_rest_client_config.php index e681c7cf56c2..0953fe164775 100644 --- a/AppEngineAdmin/src/V1/resources/authorized_domains_rest_client_config.php +++ b/AppEngineAdmin/src/V1/resources/authorized_domains_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppEngineAdmin/src/V1/resources/domain_mappings_descriptor_config.php b/AppEngineAdmin/src/V1/resources/domain_mappings_descriptor_config.php index d29baa48b5b0..64a4a2b3c373 100644 --- a/AppEngineAdmin/src/V1/resources/domain_mappings_descriptor_config.php +++ b/AppEngineAdmin/src/V1/resources/domain_mappings_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppEngineAdmin/src/V1/resources/domain_mappings_rest_client_config.php b/AppEngineAdmin/src/V1/resources/domain_mappings_rest_client_config.php index 8a66489c0cc5..8fd15c30a939 100644 --- a/AppEngineAdmin/src/V1/resources/domain_mappings_rest_client_config.php +++ b/AppEngineAdmin/src/V1/resources/domain_mappings_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppEngineAdmin/src/V1/resources/firewall_descriptor_config.php b/AppEngineAdmin/src/V1/resources/firewall_descriptor_config.php index 4f3676761bb6..089c98f6aa48 100644 --- a/AppEngineAdmin/src/V1/resources/firewall_descriptor_config.php +++ b/AppEngineAdmin/src/V1/resources/firewall_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppEngineAdmin/src/V1/resources/firewall_rest_client_config.php b/AppEngineAdmin/src/V1/resources/firewall_rest_client_config.php index f48c545b121f..5f9008663200 100644 --- a/AppEngineAdmin/src/V1/resources/firewall_rest_client_config.php +++ b/AppEngineAdmin/src/V1/resources/firewall_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppEngineAdmin/src/V1/resources/instances_descriptor_config.php b/AppEngineAdmin/src/V1/resources/instances_descriptor_config.php index 22f458e5d7de..d852db5a94c9 100644 --- a/AppEngineAdmin/src/V1/resources/instances_descriptor_config.php +++ b/AppEngineAdmin/src/V1/resources/instances_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppEngineAdmin/src/V1/resources/instances_rest_client_config.php b/AppEngineAdmin/src/V1/resources/instances_rest_client_config.php index f8d13edde85f..48939f9d582a 100644 --- a/AppEngineAdmin/src/V1/resources/instances_rest_client_config.php +++ b/AppEngineAdmin/src/V1/resources/instances_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppEngineAdmin/src/V1/resources/services_descriptor_config.php b/AppEngineAdmin/src/V1/resources/services_descriptor_config.php index 204ef6439e9e..80a1755d41e1 100644 --- a/AppEngineAdmin/src/V1/resources/services_descriptor_config.php +++ b/AppEngineAdmin/src/V1/resources/services_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppEngineAdmin/src/V1/resources/services_rest_client_config.php b/AppEngineAdmin/src/V1/resources/services_rest_client_config.php index 6636de3cac00..035f11399eb0 100644 --- a/AppEngineAdmin/src/V1/resources/services_rest_client_config.php +++ b/AppEngineAdmin/src/V1/resources/services_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppEngineAdmin/src/V1/resources/versions_descriptor_config.php b/AppEngineAdmin/src/V1/resources/versions_descriptor_config.php index ffe635b9e0a9..a673822bcd8e 100644 --- a/AppEngineAdmin/src/V1/resources/versions_descriptor_config.php +++ b/AppEngineAdmin/src/V1/resources/versions_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppEngineAdmin/src/V1/resources/versions_rest_client_config.php b/AppEngineAdmin/src/V1/resources/versions_rest_client_config.php index fb38b5a51c0d..b5e675c6d60a 100644 --- a/AppEngineAdmin/src/V1/resources/versions_rest_client_config.php +++ b/AppEngineAdmin/src/V1/resources/versions_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppHub/src/V1/resources/app_hub_descriptor_config.php b/AppHub/src/V1/resources/app_hub_descriptor_config.php index 582bad9bc236..d0234e911973 100644 --- a/AppHub/src/V1/resources/app_hub_descriptor_config.php +++ b/AppHub/src/V1/resources/app_hub_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppHub/src/V1/resources/app_hub_rest_client_config.php b/AppHub/src/V1/resources/app_hub_rest_client_config.php index 8ac92701a4d3..b00dce3f170c 100644 --- a/AppHub/src/V1/resources/app_hub_rest_client_config.php +++ b/AppHub/src/V1/resources/app_hub_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppsEventsSubscriptions/src/V1/resources/subscriptions_service_descriptor_config.php b/AppsEventsSubscriptions/src/V1/resources/subscriptions_service_descriptor_config.php index bee3307222d7..fac23b06d796 100644 --- a/AppsEventsSubscriptions/src/V1/resources/subscriptions_service_descriptor_config.php +++ b/AppsEventsSubscriptions/src/V1/resources/subscriptions_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppsEventsSubscriptions/src/V1/resources/subscriptions_service_rest_client_config.php b/AppsEventsSubscriptions/src/V1/resources/subscriptions_service_rest_client_config.php index b30502cfd272..427302f6dff1 100644 --- a/AppsEventsSubscriptions/src/V1/resources/subscriptions_service_rest_client_config.php +++ b/AppsEventsSubscriptions/src/V1/resources/subscriptions_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppsMeet/src/V2/resources/conference_records_service_descriptor_config.php b/AppsMeet/src/V2/resources/conference_records_service_descriptor_config.php index a0e840b329b3..3efbcfb4523a 100644 --- a/AppsMeet/src/V2/resources/conference_records_service_descriptor_config.php +++ b/AppsMeet/src/V2/resources/conference_records_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppsMeet/src/V2/resources/conference_records_service_rest_client_config.php b/AppsMeet/src/V2/resources/conference_records_service_rest_client_config.php index 94d206093ef8..585fcfc631cd 100644 --- a/AppsMeet/src/V2/resources/conference_records_service_rest_client_config.php +++ b/AppsMeet/src/V2/resources/conference_records_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppsMeet/src/V2/resources/spaces_service_descriptor_config.php b/AppsMeet/src/V2/resources/spaces_service_descriptor_config.php index b4be613d067a..145927fac3a8 100644 --- a/AppsMeet/src/V2/resources/spaces_service_descriptor_config.php +++ b/AppsMeet/src/V2/resources/spaces_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppsMeet/src/V2/resources/spaces_service_rest_client_config.php b/AppsMeet/src/V2/resources/spaces_service_rest_client_config.php index bc49aea29a41..e60c71a3cba7 100644 --- a/AppsMeet/src/V2/resources/spaces_service_rest_client_config.php +++ b/AppsMeet/src/V2/resources/spaces_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppsMeet/src/V2beta/resources/conference_records_service_descriptor_config.php b/AppsMeet/src/V2beta/resources/conference_records_service_descriptor_config.php index 2ebd332b7f53..a1e72585d3fa 100644 --- a/AppsMeet/src/V2beta/resources/conference_records_service_descriptor_config.php +++ b/AppsMeet/src/V2beta/resources/conference_records_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppsMeet/src/V2beta/resources/conference_records_service_rest_client_config.php b/AppsMeet/src/V2beta/resources/conference_records_service_rest_client_config.php index a7718d5925a1..7420251c88a8 100644 --- a/AppsMeet/src/V2beta/resources/conference_records_service_rest_client_config.php +++ b/AppsMeet/src/V2beta/resources/conference_records_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppsMeet/src/V2beta/resources/spaces_service_descriptor_config.php b/AppsMeet/src/V2beta/resources/spaces_service_descriptor_config.php index 270e892fe547..69cf8a993e6d 100644 --- a/AppsMeet/src/V2beta/resources/spaces_service_descriptor_config.php +++ b/AppsMeet/src/V2beta/resources/spaces_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AppsMeet/src/V2beta/resources/spaces_service_rest_client_config.php b/AppsMeet/src/V2beta/resources/spaces_service_rest_client_config.php index 2c5f23224fb3..698dc3ace024 100644 --- a/AppsMeet/src/V2beta/resources/spaces_service_rest_client_config.php +++ b/AppsMeet/src/V2beta/resources/spaces_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ArtifactRegistry/src/V1/resources/artifact_registry_descriptor_config.php b/ArtifactRegistry/src/V1/resources/artifact_registry_descriptor_config.php index 5b1678ac1d00..277b58a2606b 100644 --- a/ArtifactRegistry/src/V1/resources/artifact_registry_descriptor_config.php +++ b/ArtifactRegistry/src/V1/resources/artifact_registry_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ArtifactRegistry/src/V1/resources/artifact_registry_rest_client_config.php b/ArtifactRegistry/src/V1/resources/artifact_registry_rest_client_config.php index 021aebb55aff..bc592c9417dc 100644 --- a/ArtifactRegistry/src/V1/resources/artifact_registry_rest_client_config.php +++ b/ArtifactRegistry/src/V1/resources/artifact_registry_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ArtifactRegistry/src/V1beta2/resources/artifact_registry_descriptor_config.php b/ArtifactRegistry/src/V1beta2/resources/artifact_registry_descriptor_config.php index 067ac34fefc9..f881ba7ad7df 100644 --- a/ArtifactRegistry/src/V1beta2/resources/artifact_registry_descriptor_config.php +++ b/ArtifactRegistry/src/V1beta2/resources/artifact_registry_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ArtifactRegistry/src/V1beta2/resources/artifact_registry_rest_client_config.php b/ArtifactRegistry/src/V1beta2/resources/artifact_registry_rest_client_config.php index ec08229babc9..9e1bfa389e17 100644 --- a/ArtifactRegistry/src/V1beta2/resources/artifact_registry_rest_client_config.php +++ b/ArtifactRegistry/src/V1beta2/resources/artifact_registry_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Asset/src/V1/resources/asset_service_descriptor_config.php b/Asset/src/V1/resources/asset_service_descriptor_config.php index a51ade35e2bf..964b0a52ce33 100644 --- a/Asset/src/V1/resources/asset_service_descriptor_config.php +++ b/Asset/src/V1/resources/asset_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Asset/src/V1/resources/asset_service_rest_client_config.php b/Asset/src/V1/resources/asset_service_rest_client_config.php index 6d9906b26f21..fd1b7fd66247 100644 --- a/Asset/src/V1/resources/asset_service_rest_client_config.php +++ b/Asset/src/V1/resources/asset_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AssuredWorkloads/src/V1/resources/assured_workloads_service_descriptor_config.php b/AssuredWorkloads/src/V1/resources/assured_workloads_service_descriptor_config.php index 706f9cdbfc5b..add3dde579db 100644 --- a/AssuredWorkloads/src/V1/resources/assured_workloads_service_descriptor_config.php +++ b/AssuredWorkloads/src/V1/resources/assured_workloads_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AssuredWorkloads/src/V1/resources/assured_workloads_service_rest_client_config.php b/AssuredWorkloads/src/V1/resources/assured_workloads_service_rest_client_config.php index 49f02d22d570..ad506b048711 100644 --- a/AssuredWorkloads/src/V1/resources/assured_workloads_service_rest_client_config.php +++ b/AssuredWorkloads/src/V1/resources/assured_workloads_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AssuredWorkloads/src/V1beta1/resources/assured_workloads_service_descriptor_config.php b/AssuredWorkloads/src/V1beta1/resources/assured_workloads_service_descriptor_config.php index f7c43441098b..3f94bc7c768f 100644 --- a/AssuredWorkloads/src/V1beta1/resources/assured_workloads_service_descriptor_config.php +++ b/AssuredWorkloads/src/V1beta1/resources/assured_workloads_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AssuredWorkloads/src/V1beta1/resources/assured_workloads_service_rest_client_config.php b/AssuredWorkloads/src/V1beta1/resources/assured_workloads_service_rest_client_config.php index 513bfcd23321..2148a2339c57 100644 --- a/AssuredWorkloads/src/V1beta1/resources/assured_workloads_service_rest_client_config.php +++ b/AssuredWorkloads/src/V1beta1/resources/assured_workloads_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AutoMl/src/V1/resources/auto_ml_descriptor_config.php b/AutoMl/src/V1/resources/auto_ml_descriptor_config.php index d255edf78368..2f2030959022 100644 --- a/AutoMl/src/V1/resources/auto_ml_descriptor_config.php +++ b/AutoMl/src/V1/resources/auto_ml_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AutoMl/src/V1/resources/auto_ml_rest_client_config.php b/AutoMl/src/V1/resources/auto_ml_rest_client_config.php index aa38c00cefe6..bbff0ff1693d 100644 --- a/AutoMl/src/V1/resources/auto_ml_rest_client_config.php +++ b/AutoMl/src/V1/resources/auto_ml_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AutoMl/src/V1/resources/prediction_service_descriptor_config.php b/AutoMl/src/V1/resources/prediction_service_descriptor_config.php index 74b4d6c2320a..df0456c861c3 100644 --- a/AutoMl/src/V1/resources/prediction_service_descriptor_config.php +++ b/AutoMl/src/V1/resources/prediction_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AutoMl/src/V1/resources/prediction_service_rest_client_config.php b/AutoMl/src/V1/resources/prediction_service_rest_client_config.php index 32381e5b7225..e4707be02c0e 100644 --- a/AutoMl/src/V1/resources/prediction_service_rest_client_config.php +++ b/AutoMl/src/V1/resources/prediction_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AutoMl/src/V1beta1/resources/auto_ml_descriptor_config.php b/AutoMl/src/V1beta1/resources/auto_ml_descriptor_config.php index adfb9b80fd38..028dbad6b685 100644 --- a/AutoMl/src/V1beta1/resources/auto_ml_descriptor_config.php +++ b/AutoMl/src/V1beta1/resources/auto_ml_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AutoMl/src/V1beta1/resources/auto_ml_rest_client_config.php b/AutoMl/src/V1beta1/resources/auto_ml_rest_client_config.php index 86f2c7258c3e..776b5509a64b 100644 --- a/AutoMl/src/V1beta1/resources/auto_ml_rest_client_config.php +++ b/AutoMl/src/V1beta1/resources/auto_ml_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/AutoMl/src/V1beta1/resources/prediction_service_descriptor_config.php b/AutoMl/src/V1beta1/resources/prediction_service_descriptor_config.php index 652550b4ac6f..47e50d575903 100644 --- a/AutoMl/src/V1beta1/resources/prediction_service_descriptor_config.php +++ b/AutoMl/src/V1beta1/resources/prediction_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/AutoMl/src/V1beta1/resources/prediction_service_rest_client_config.php b/AutoMl/src/V1beta1/resources/prediction_service_rest_client_config.php index 0dc92edcc953..b7400c24e5eb 100644 --- a/AutoMl/src/V1beta1/resources/prediction_service_rest_client_config.php +++ b/AutoMl/src/V1beta1/resources/prediction_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/BareMetalSolution/src/V2/resources/bare_metal_solution_descriptor_config.php b/BareMetalSolution/src/V2/resources/bare_metal_solution_descriptor_config.php index 1f2d1a8e7dc9..343411549094 100644 --- a/BareMetalSolution/src/V2/resources/bare_metal_solution_descriptor_config.php +++ b/BareMetalSolution/src/V2/resources/bare_metal_solution_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/BareMetalSolution/src/V2/resources/bare_metal_solution_rest_client_config.php b/BareMetalSolution/src/V2/resources/bare_metal_solution_rest_client_config.php index e4cdd03654c3..38b7716b99b6 100644 --- a/BareMetalSolution/src/V2/resources/bare_metal_solution_rest_client_config.php +++ b/BareMetalSolution/src/V2/resources/bare_metal_solution_rest_client_config.php @@ -1,4 +1,24 @@ [ From 796b8b0246984d04e09fae341df61d0393334e2e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 09:10:50 -0700 Subject: [PATCH 33/86] chore: add license and generated code headers to generated resource files (#7228) PiperOrigin-RevId: 624277410 Source-Link: https://github.com/googleapis/googleapis/commit/2d881be8c566e4c374061248dd205efd72b7ef4f Source-Link: https://github.com/googleapis/googleapis-gen/commit/1d063f9353aeffb9a968f1a00f1d105b0c14a42d Copy-Tag: eyJwIjoiRGF0YXN0cmVhbS8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiRGVidWdnZXIvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiRGVwbG95Ly5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiRGlhbG9nZmxvdy8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiRGlhbG9nZmxvd0N4Ly5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiRGlzY292ZXJ5RW5naW5lLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiRGxwLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiRG1zLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiRG9jdW1lbnRBaS8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiRG9tYWlucy8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiRWRnZU5ldHdvcmsvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiRXJyb3JSZXBvcnRpbmcvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiRXNzZW50aWFsQ29udGFjdHMvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiRXZlbnRhcmMvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiRXZlbnRhcmNQdWJsaXNoaW5nLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiRmlsZXN0b3JlLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiRmlyZXN0b3JlLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiRnVuY3Rpb25zLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiR1N1aXRlQWRkT25zLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiR2tlQmFja3VwLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= --- .../datastream_descriptor_config.php | 20 +++++++++++++++++++ .../datastream_rest_client_config.php | 20 +++++++++++++++++++ .../controller2_descriptor_config.php | 20 +++++++++++++++++++ .../controller2_rest_client_config.php | 20 +++++++++++++++++++ .../resources/debugger2_descriptor_config.php | 20 +++++++++++++++++++ .../debugger2_rest_client_config.php | 20 +++++++++++++++++++ .../cloud_deploy_descriptor_config.php | 20 +++++++++++++++++++ .../cloud_deploy_rest_client_config.php | 20 +++++++++++++++++++ .../V2/resources/agents_descriptor_config.php | 20 +++++++++++++++++++ .../resources/agents_rest_client_config.php | 20 +++++++++++++++++++ .../answer_records_descriptor_config.php | 20 +++++++++++++++++++ .../answer_records_rest_client_config.php | 20 +++++++++++++++++++ .../resources/contexts_descriptor_config.php | 20 +++++++++++++++++++ .../resources/contexts_rest_client_config.php | 20 +++++++++++++++++++ ...onversation_datasets_descriptor_config.php | 20 +++++++++++++++++++ ...nversation_datasets_rest_client_config.php | 20 +++++++++++++++++++ .../conversation_models_descriptor_config.php | 20 +++++++++++++++++++ ...conversation_models_rest_client_config.php | 20 +++++++++++++++++++ ...onversation_profiles_descriptor_config.php | 20 +++++++++++++++++++ ...nversation_profiles_rest_client_config.php | 20 +++++++++++++++++++ .../conversations_descriptor_config.php | 20 +++++++++++++++++++ .../conversations_rest_client_config.php | 20 +++++++++++++++++++ .../resources/documents_descriptor_config.php | 20 +++++++++++++++++++ .../documents_rest_client_config.php | 20 +++++++++++++++++++ .../entity_types_descriptor_config.php | 20 +++++++++++++++++++ .../entity_types_rest_client_config.php | 20 +++++++++++++++++++ .../environments_descriptor_config.php | 20 +++++++++++++++++++ .../environments_rest_client_config.php | 20 +++++++++++++++++++ .../fulfillments_descriptor_config.php | 20 +++++++++++++++++++ .../fulfillments_rest_client_config.php | 20 +++++++++++++++++++ .../resources/intents_descriptor_config.php | 20 +++++++++++++++++++ .../resources/intents_rest_client_config.php | 20 +++++++++++++++++++ .../knowledge_bases_descriptor_config.php | 20 +++++++++++++++++++ .../knowledge_bases_rest_client_config.php | 20 +++++++++++++++++++ .../participants_descriptor_config.php | 20 +++++++++++++++++++ .../participants_rest_client_config.php | 20 +++++++++++++++++++ ...session_entity_types_descriptor_config.php | 20 +++++++++++++++++++ ...ession_entity_types_rest_client_config.php | 20 +++++++++++++++++++ .../resources/sessions_descriptor_config.php | 20 +++++++++++++++++++ .../resources/sessions_rest_client_config.php | 20 +++++++++++++++++++ .../resources/versions_descriptor_config.php | 20 +++++++++++++++++++ .../resources/versions_rest_client_config.php | 20 +++++++++++++++++++ .../V3/resources/agents_descriptor_config.php | 20 +++++++++++++++++++ .../resources/agents_rest_client_config.php | 20 +++++++++++++++++++ .../changelogs_descriptor_config.php | 20 +++++++++++++++++++ .../changelogs_rest_client_config.php | 20 +++++++++++++++++++ .../deployments_descriptor_config.php | 20 +++++++++++++++++++ .../deployments_rest_client_config.php | 20 +++++++++++++++++++ .../entity_types_descriptor_config.php | 20 +++++++++++++++++++ .../entity_types_rest_client_config.php | 20 +++++++++++++++++++ .../environments_descriptor_config.php | 20 +++++++++++++++++++ .../environments_rest_client_config.php | 20 +++++++++++++++++++ .../experiments_descriptor_config.php | 20 +++++++++++++++++++ .../experiments_rest_client_config.php | 20 +++++++++++++++++++ .../V3/resources/flows_descriptor_config.php | 20 +++++++++++++++++++ .../V3/resources/flows_rest_client_config.php | 20 +++++++++++++++++++ .../generators_descriptor_config.php | 20 +++++++++++++++++++ .../generators_rest_client_config.php | 20 +++++++++++++++++++ .../resources/intents_descriptor_config.php | 20 +++++++++++++++++++ .../resources/intents_rest_client_config.php | 20 +++++++++++++++++++ .../V3/resources/pages_descriptor_config.php | 20 +++++++++++++++++++ .../V3/resources/pages_rest_client_config.php | 20 +++++++++++++++++++ ...ity_settings_service_descriptor_config.php | 20 +++++++++++++++++++ ...ty_settings_service_rest_client_config.php | 20 +++++++++++++++++++ ...session_entity_types_descriptor_config.php | 20 +++++++++++++++++++ ...ession_entity_types_rest_client_config.php | 20 +++++++++++++++++++ .../resources/sessions_descriptor_config.php | 20 +++++++++++++++++++ .../resources/sessions_rest_client_config.php | 20 +++++++++++++++++++ .../test_cases_descriptor_config.php | 20 +++++++++++++++++++ .../test_cases_rest_client_config.php | 20 +++++++++++++++++++ ...nsition_route_groups_descriptor_config.php | 20 +++++++++++++++++++ ...sition_route_groups_rest_client_config.php | 20 +++++++++++++++++++ .../resources/versions_descriptor_config.php | 20 +++++++++++++++++++ .../resources/versions_rest_client_config.php | 20 +++++++++++++++++++ .../resources/webhooks_descriptor_config.php | 20 +++++++++++++++++++ .../resources/webhooks_rest_client_config.php | 20 +++++++++++++++++++ .../completion_service_descriptor_config.php | 20 +++++++++++++++++++ .../completion_service_rest_client_config.php | 20 +++++++++++++++++++ ...ional_search_service_descriptor_config.php | 20 +++++++++++++++++++ ...onal_search_service_rest_client_config.php | 20 +++++++++++++++++++ .../data_store_service_descriptor_config.php | 20 +++++++++++++++++++ .../data_store_service_rest_client_config.php | 20 +++++++++++++++++++ .../document_service_descriptor_config.php | 20 +++++++++++++++++++ .../document_service_rest_client_config.php | 20 +++++++++++++++++++ .../engine_service_descriptor_config.php | 20 +++++++++++++++++++ .../engine_service_rest_client_config.php | 20 +++++++++++++++++++ ...commendation_service_descriptor_config.php | 20 +++++++++++++++++++ ...ommendation_service_rest_client_config.php | 20 +++++++++++++++++++ .../schema_service_descriptor_config.php | 20 +++++++++++++++++++ .../schema_service_rest_client_config.php | 20 +++++++++++++++++++ .../search_service_descriptor_config.php | 20 +++++++++++++++++++ .../search_service_rest_client_config.php | 20 +++++++++++++++++++ ...earch_engine_service_descriptor_config.php | 20 +++++++++++++++++++ ...arch_engine_service_rest_client_config.php | 20 +++++++++++++++++++ .../user_event_service_descriptor_config.php | 20 +++++++++++++++++++ .../user_event_service_rest_client_config.php | 20 +++++++++++++++++++ .../completion_service_descriptor_config.php | 20 +++++++++++++++++++ .../completion_service_rest_client_config.php | 20 +++++++++++++++++++ ...ional_search_service_descriptor_config.php | 20 +++++++++++++++++++ ...onal_search_service_rest_client_config.php | 20 +++++++++++++++++++ .../data_store_service_descriptor_config.php | 20 +++++++++++++++++++ .../data_store_service_rest_client_config.php | 20 +++++++++++++++++++ .../document_service_descriptor_config.php | 20 +++++++++++++++++++ .../document_service_rest_client_config.php | 20 +++++++++++++++++++ .../engine_service_descriptor_config.php | 20 +++++++++++++++++++ .../engine_service_rest_client_config.php | 20 +++++++++++++++++++ ...d_generation_service_descriptor_config.php | 20 +++++++++++++++++++ ..._generation_service_rest_client_config.php | 20 +++++++++++++++++++ .../rank_service_descriptor_config.php | 20 +++++++++++++++++++ .../rank_service_rest_client_config.php | 20 +++++++++++++++++++ ...commendation_service_descriptor_config.php | 20 +++++++++++++++++++ ...ommendation_service_rest_client_config.php | 20 +++++++++++++++++++ .../schema_service_descriptor_config.php | 20 +++++++++++++++++++ .../schema_service_rest_client_config.php | 20 +++++++++++++++++++ .../search_service_descriptor_config.php | 20 +++++++++++++++++++ .../search_service_rest_client_config.php | 20 +++++++++++++++++++ ...earch_tuning_service_descriptor_config.php | 20 +++++++++++++++++++ ...arch_tuning_service_rest_client_config.php | 20 +++++++++++++++++++ ...rving_config_service_descriptor_config.php | 20 +++++++++++++++++++ ...ving_config_service_rest_client_config.php | 20 +++++++++++++++++++ ...earch_engine_service_descriptor_config.php | 20 +++++++++++++++++++ ...arch_engine_service_rest_client_config.php | 20 +++++++++++++++++++ .../user_event_service_descriptor_config.php | 20 +++++++++++++++++++ .../user_event_service_rest_client_config.php | 20 +++++++++++++++++++ .../dlp_service_descriptor_config.php | 20 +++++++++++++++++++ .../dlp_service_rest_client_config.php | 20 +++++++++++++++++++ ...ta_migration_service_descriptor_config.php | 20 +++++++++++++++++++ ...a_migration_service_rest_client_config.php | 20 +++++++++++++++++++ ...nt_processor_service_descriptor_config.php | 20 +++++++++++++++++++ ...t_processor_service_rest_client_config.php | 20 +++++++++++++++++++ .../resources/domains_descriptor_config.php | 20 +++++++++++++++++++ .../resources/domains_rest_client_config.php | 20 +++++++++++++++++++ .../resources/domains_descriptor_config.php | 20 +++++++++++++++++++ .../resources/domains_rest_client_config.php | 20 +++++++++++++++++++ .../resources/domains_descriptor_config.php | 20 +++++++++++++++++++ .../resources/domains_rest_client_config.php | 20 +++++++++++++++++++ .../edge_network_descriptor_config.php | 20 +++++++++++++++++++ .../edge_network_rest_client_config.php | 20 +++++++++++++++++++ .../error_group_service_descriptor_config.php | 20 +++++++++++++++++++ ...error_group_service_rest_client_config.php | 20 +++++++++++++++++++ .../error_stats_service_descriptor_config.php | 20 +++++++++++++++++++ ...error_stats_service_rest_client_config.php | 20 +++++++++++++++++++ ...eport_errors_service_descriptor_config.php | 20 +++++++++++++++++++ ...port_errors_service_rest_client_config.php | 20 +++++++++++++++++++ ...ial_contacts_service_descriptor_config.php | 20 +++++++++++++++++++ ...al_contacts_service_rest_client_config.php | 20 +++++++++++++++++++ .../resources/eventarc_descriptor_config.php | 20 +++++++++++++++++++ .../resources/eventarc_rest_client_config.php | 20 +++++++++++++++++++ .../resources/publisher_descriptor_config.php | 20 +++++++++++++++++++ .../publisher_rest_client_config.php | 20 +++++++++++++++++++ ...ud_filestore_manager_descriptor_config.php | 20 +++++++++++++++++++ ...d_filestore_manager_rest_client_config.php | 20 +++++++++++++++++++ .../firestore_admin_descriptor_config.php | 20 +++++++++++++++++++ .../firestore_admin_rest_client_config.php | 20 +++++++++++++++++++ .../resources/firestore_descriptor_config.php | 20 +++++++++++++++++++ .../firestore_rest_client_config.php | 20 +++++++++++++++++++ ...ud_functions_service_descriptor_config.php | 20 +++++++++++++++++++ ...d_functions_service_rest_client_config.php | 20 +++++++++++++++++++ .../function_service_descriptor_config.php | 20 +++++++++++++++++++ .../function_service_rest_client_config.php | 20 +++++++++++++++++++ .../g_suite_add_ons_descriptor_config.php | 20 +++++++++++++++++++ .../g_suite_add_ons_rest_client_config.php | 20 +++++++++++++++++++ .../backup_for_gke_descriptor_config.php | 20 +++++++++++++++++++ .../backup_for_gke_rest_client_config.php | 20 +++++++++++++++++++ 164 files changed, 3280 insertions(+) diff --git a/Datastream/src/V1/resources/datastream_descriptor_config.php b/Datastream/src/V1/resources/datastream_descriptor_config.php index b81c66f95591..afce2976857c 100644 --- a/Datastream/src/V1/resources/datastream_descriptor_config.php +++ b/Datastream/src/V1/resources/datastream_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Datastream/src/V1/resources/datastream_rest_client_config.php b/Datastream/src/V1/resources/datastream_rest_client_config.php index 8b7c4ceca03d..124388a78721 100644 --- a/Datastream/src/V1/resources/datastream_rest_client_config.php +++ b/Datastream/src/V1/resources/datastream_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Debugger/src/V2/resources/controller2_descriptor_config.php b/Debugger/src/V2/resources/controller2_descriptor_config.php index f2012cc60ac0..49819ecc8316 100644 --- a/Debugger/src/V2/resources/controller2_descriptor_config.php +++ b/Debugger/src/V2/resources/controller2_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Debugger/src/V2/resources/controller2_rest_client_config.php b/Debugger/src/V2/resources/controller2_rest_client_config.php index 09514d495e40..7ec2797d0957 100644 --- a/Debugger/src/V2/resources/controller2_rest_client_config.php +++ b/Debugger/src/V2/resources/controller2_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Debugger/src/V2/resources/debugger2_descriptor_config.php b/Debugger/src/V2/resources/debugger2_descriptor_config.php index 87ed685973bb..eabff40bca70 100644 --- a/Debugger/src/V2/resources/debugger2_descriptor_config.php +++ b/Debugger/src/V2/resources/debugger2_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Debugger/src/V2/resources/debugger2_rest_client_config.php b/Debugger/src/V2/resources/debugger2_rest_client_config.php index c6ad7cb51bf9..de4456585cef 100644 --- a/Debugger/src/V2/resources/debugger2_rest_client_config.php +++ b/Debugger/src/V2/resources/debugger2_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Deploy/src/V1/resources/cloud_deploy_descriptor_config.php b/Deploy/src/V1/resources/cloud_deploy_descriptor_config.php index 4138796da081..159ec0077d96 100644 --- a/Deploy/src/V1/resources/cloud_deploy_descriptor_config.php +++ b/Deploy/src/V1/resources/cloud_deploy_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Deploy/src/V1/resources/cloud_deploy_rest_client_config.php b/Deploy/src/V1/resources/cloud_deploy_rest_client_config.php index d9198a7fb308..0efb87a7775f 100644 --- a/Deploy/src/V1/resources/cloud_deploy_rest_client_config.php +++ b/Deploy/src/V1/resources/cloud_deploy_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/agents_descriptor_config.php b/Dialogflow/src/V2/resources/agents_descriptor_config.php index 07cc718e4a67..6130aa71ba92 100644 --- a/Dialogflow/src/V2/resources/agents_descriptor_config.php +++ b/Dialogflow/src/V2/resources/agents_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/agents_rest_client_config.php b/Dialogflow/src/V2/resources/agents_rest_client_config.php index 1212b8a0f942..a9de4eed6e81 100644 --- a/Dialogflow/src/V2/resources/agents_rest_client_config.php +++ b/Dialogflow/src/V2/resources/agents_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/answer_records_descriptor_config.php b/Dialogflow/src/V2/resources/answer_records_descriptor_config.php index d9b9e6832309..6b5eec4ed91a 100644 --- a/Dialogflow/src/V2/resources/answer_records_descriptor_config.php +++ b/Dialogflow/src/V2/resources/answer_records_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/answer_records_rest_client_config.php b/Dialogflow/src/V2/resources/answer_records_rest_client_config.php index be58c5eb38bf..2e82c58294e8 100644 --- a/Dialogflow/src/V2/resources/answer_records_rest_client_config.php +++ b/Dialogflow/src/V2/resources/answer_records_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/contexts_descriptor_config.php b/Dialogflow/src/V2/resources/contexts_descriptor_config.php index e66161c355f7..a11b9c5d3e3d 100644 --- a/Dialogflow/src/V2/resources/contexts_descriptor_config.php +++ b/Dialogflow/src/V2/resources/contexts_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/contexts_rest_client_config.php b/Dialogflow/src/V2/resources/contexts_rest_client_config.php index 5aa624661cfd..756ffcc0e54c 100644 --- a/Dialogflow/src/V2/resources/contexts_rest_client_config.php +++ b/Dialogflow/src/V2/resources/contexts_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/conversation_datasets_descriptor_config.php b/Dialogflow/src/V2/resources/conversation_datasets_descriptor_config.php index ee1643d94e3f..7bbe37ad295a 100644 --- a/Dialogflow/src/V2/resources/conversation_datasets_descriptor_config.php +++ b/Dialogflow/src/V2/resources/conversation_datasets_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/conversation_datasets_rest_client_config.php b/Dialogflow/src/V2/resources/conversation_datasets_rest_client_config.php index 762313f329f2..e94c777201ed 100644 --- a/Dialogflow/src/V2/resources/conversation_datasets_rest_client_config.php +++ b/Dialogflow/src/V2/resources/conversation_datasets_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/conversation_models_descriptor_config.php b/Dialogflow/src/V2/resources/conversation_models_descriptor_config.php index b783cf57c9e6..fa73ebcd2d73 100644 --- a/Dialogflow/src/V2/resources/conversation_models_descriptor_config.php +++ b/Dialogflow/src/V2/resources/conversation_models_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/conversation_models_rest_client_config.php b/Dialogflow/src/V2/resources/conversation_models_rest_client_config.php index 88d3051f1cbc..b05e879c10ca 100644 --- a/Dialogflow/src/V2/resources/conversation_models_rest_client_config.php +++ b/Dialogflow/src/V2/resources/conversation_models_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/conversation_profiles_descriptor_config.php b/Dialogflow/src/V2/resources/conversation_profiles_descriptor_config.php index 9b6a76ea2095..44ac7257824f 100644 --- a/Dialogflow/src/V2/resources/conversation_profiles_descriptor_config.php +++ b/Dialogflow/src/V2/resources/conversation_profiles_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/conversation_profiles_rest_client_config.php b/Dialogflow/src/V2/resources/conversation_profiles_rest_client_config.php index 332fc52eec04..9c3334ecb6b2 100644 --- a/Dialogflow/src/V2/resources/conversation_profiles_rest_client_config.php +++ b/Dialogflow/src/V2/resources/conversation_profiles_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/conversations_descriptor_config.php b/Dialogflow/src/V2/resources/conversations_descriptor_config.php index b9755e76dca1..b5a5a7a3d45e 100644 --- a/Dialogflow/src/V2/resources/conversations_descriptor_config.php +++ b/Dialogflow/src/V2/resources/conversations_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/conversations_rest_client_config.php b/Dialogflow/src/V2/resources/conversations_rest_client_config.php index 8030f085600f..ac696f75ea02 100644 --- a/Dialogflow/src/V2/resources/conversations_rest_client_config.php +++ b/Dialogflow/src/V2/resources/conversations_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/documents_descriptor_config.php b/Dialogflow/src/V2/resources/documents_descriptor_config.php index 93f28e5e2941..ddeba0eff1ea 100644 --- a/Dialogflow/src/V2/resources/documents_descriptor_config.php +++ b/Dialogflow/src/V2/resources/documents_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/documents_rest_client_config.php b/Dialogflow/src/V2/resources/documents_rest_client_config.php index f8d1387de2f2..22061213478a 100644 --- a/Dialogflow/src/V2/resources/documents_rest_client_config.php +++ b/Dialogflow/src/V2/resources/documents_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/entity_types_descriptor_config.php b/Dialogflow/src/V2/resources/entity_types_descriptor_config.php index 75818f2640bd..d9bd29f20e61 100644 --- a/Dialogflow/src/V2/resources/entity_types_descriptor_config.php +++ b/Dialogflow/src/V2/resources/entity_types_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/entity_types_rest_client_config.php b/Dialogflow/src/V2/resources/entity_types_rest_client_config.php index 76dd3e467342..1742fe996aa5 100644 --- a/Dialogflow/src/V2/resources/entity_types_rest_client_config.php +++ b/Dialogflow/src/V2/resources/entity_types_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/environments_descriptor_config.php b/Dialogflow/src/V2/resources/environments_descriptor_config.php index 5fc9e95edee2..18a5fd82ab95 100644 --- a/Dialogflow/src/V2/resources/environments_descriptor_config.php +++ b/Dialogflow/src/V2/resources/environments_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/environments_rest_client_config.php b/Dialogflow/src/V2/resources/environments_rest_client_config.php index 5953798d6344..2b1284121a19 100644 --- a/Dialogflow/src/V2/resources/environments_rest_client_config.php +++ b/Dialogflow/src/V2/resources/environments_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/fulfillments_descriptor_config.php b/Dialogflow/src/V2/resources/fulfillments_descriptor_config.php index 093e1dd5bc8f..934288f83f2a 100644 --- a/Dialogflow/src/V2/resources/fulfillments_descriptor_config.php +++ b/Dialogflow/src/V2/resources/fulfillments_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/fulfillments_rest_client_config.php b/Dialogflow/src/V2/resources/fulfillments_rest_client_config.php index 272e028f1c81..3ea8dacb34df 100644 --- a/Dialogflow/src/V2/resources/fulfillments_rest_client_config.php +++ b/Dialogflow/src/V2/resources/fulfillments_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/intents_descriptor_config.php b/Dialogflow/src/V2/resources/intents_descriptor_config.php index 9d492795e280..d43f5884a84a 100644 --- a/Dialogflow/src/V2/resources/intents_descriptor_config.php +++ b/Dialogflow/src/V2/resources/intents_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/intents_rest_client_config.php b/Dialogflow/src/V2/resources/intents_rest_client_config.php index 6c5df8324599..c6f9537e7696 100644 --- a/Dialogflow/src/V2/resources/intents_rest_client_config.php +++ b/Dialogflow/src/V2/resources/intents_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/knowledge_bases_descriptor_config.php b/Dialogflow/src/V2/resources/knowledge_bases_descriptor_config.php index ce33699d01b7..9844957becbc 100644 --- a/Dialogflow/src/V2/resources/knowledge_bases_descriptor_config.php +++ b/Dialogflow/src/V2/resources/knowledge_bases_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/knowledge_bases_rest_client_config.php b/Dialogflow/src/V2/resources/knowledge_bases_rest_client_config.php index c801f5cd5963..0c7772592b29 100644 --- a/Dialogflow/src/V2/resources/knowledge_bases_rest_client_config.php +++ b/Dialogflow/src/V2/resources/knowledge_bases_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/participants_descriptor_config.php b/Dialogflow/src/V2/resources/participants_descriptor_config.php index bedebe92aa35..1f56c042957d 100644 --- a/Dialogflow/src/V2/resources/participants_descriptor_config.php +++ b/Dialogflow/src/V2/resources/participants_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/participants_rest_client_config.php b/Dialogflow/src/V2/resources/participants_rest_client_config.php index 29293e1cf8ba..6bf7112a3f41 100644 --- a/Dialogflow/src/V2/resources/participants_rest_client_config.php +++ b/Dialogflow/src/V2/resources/participants_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/session_entity_types_descriptor_config.php b/Dialogflow/src/V2/resources/session_entity_types_descriptor_config.php index f0908f053be9..4a3ab70206be 100644 --- a/Dialogflow/src/V2/resources/session_entity_types_descriptor_config.php +++ b/Dialogflow/src/V2/resources/session_entity_types_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/session_entity_types_rest_client_config.php b/Dialogflow/src/V2/resources/session_entity_types_rest_client_config.php index b2cf293b33a8..ab800d609729 100644 --- a/Dialogflow/src/V2/resources/session_entity_types_rest_client_config.php +++ b/Dialogflow/src/V2/resources/session_entity_types_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/sessions_descriptor_config.php b/Dialogflow/src/V2/resources/sessions_descriptor_config.php index 0b18316632c7..9841d3d32655 100644 --- a/Dialogflow/src/V2/resources/sessions_descriptor_config.php +++ b/Dialogflow/src/V2/resources/sessions_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/sessions_rest_client_config.php b/Dialogflow/src/V2/resources/sessions_rest_client_config.php index b7cba0ec4c2e..cb68ff256c1b 100644 --- a/Dialogflow/src/V2/resources/sessions_rest_client_config.php +++ b/Dialogflow/src/V2/resources/sessions_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/versions_descriptor_config.php b/Dialogflow/src/V2/resources/versions_descriptor_config.php index 06f584f447f3..9d7753d6ddbf 100644 --- a/Dialogflow/src/V2/resources/versions_descriptor_config.php +++ b/Dialogflow/src/V2/resources/versions_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dialogflow/src/V2/resources/versions_rest_client_config.php b/Dialogflow/src/V2/resources/versions_rest_client_config.php index 0fce60904b1d..d10527947441 100644 --- a/Dialogflow/src/V2/resources/versions_rest_client_config.php +++ b/Dialogflow/src/V2/resources/versions_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/agents_descriptor_config.php b/DialogflowCx/src/V3/resources/agents_descriptor_config.php index 59015969da68..01c52ab6a00d 100644 --- a/DialogflowCx/src/V3/resources/agents_descriptor_config.php +++ b/DialogflowCx/src/V3/resources/agents_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/agents_rest_client_config.php b/DialogflowCx/src/V3/resources/agents_rest_client_config.php index 38f14d48cb53..3b2ae95d937d 100644 --- a/DialogflowCx/src/V3/resources/agents_rest_client_config.php +++ b/DialogflowCx/src/V3/resources/agents_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/changelogs_descriptor_config.php b/DialogflowCx/src/V3/resources/changelogs_descriptor_config.php index 1cc1746815ac..996d46b23885 100644 --- a/DialogflowCx/src/V3/resources/changelogs_descriptor_config.php +++ b/DialogflowCx/src/V3/resources/changelogs_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/changelogs_rest_client_config.php b/DialogflowCx/src/V3/resources/changelogs_rest_client_config.php index 76b34eb09a16..13411d34841f 100644 --- a/DialogflowCx/src/V3/resources/changelogs_rest_client_config.php +++ b/DialogflowCx/src/V3/resources/changelogs_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/deployments_descriptor_config.php b/DialogflowCx/src/V3/resources/deployments_descriptor_config.php index e20287f99c98..1eed3c57c6cf 100644 --- a/DialogflowCx/src/V3/resources/deployments_descriptor_config.php +++ b/DialogflowCx/src/V3/resources/deployments_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/deployments_rest_client_config.php b/DialogflowCx/src/V3/resources/deployments_rest_client_config.php index a824a537e5b3..9c0d91dd4226 100644 --- a/DialogflowCx/src/V3/resources/deployments_rest_client_config.php +++ b/DialogflowCx/src/V3/resources/deployments_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/entity_types_descriptor_config.php b/DialogflowCx/src/V3/resources/entity_types_descriptor_config.php index c6cf237e1468..6864c5b8f787 100644 --- a/DialogflowCx/src/V3/resources/entity_types_descriptor_config.php +++ b/DialogflowCx/src/V3/resources/entity_types_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/entity_types_rest_client_config.php b/DialogflowCx/src/V3/resources/entity_types_rest_client_config.php index 4fab734bfaf1..0f19e8874ab3 100644 --- a/DialogflowCx/src/V3/resources/entity_types_rest_client_config.php +++ b/DialogflowCx/src/V3/resources/entity_types_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/environments_descriptor_config.php b/DialogflowCx/src/V3/resources/environments_descriptor_config.php index b2ed48fd868b..32c276badbdc 100644 --- a/DialogflowCx/src/V3/resources/environments_descriptor_config.php +++ b/DialogflowCx/src/V3/resources/environments_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/environments_rest_client_config.php b/DialogflowCx/src/V3/resources/environments_rest_client_config.php index 5920aef13af9..562a19b54286 100644 --- a/DialogflowCx/src/V3/resources/environments_rest_client_config.php +++ b/DialogflowCx/src/V3/resources/environments_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/experiments_descriptor_config.php b/DialogflowCx/src/V3/resources/experiments_descriptor_config.php index a3961da02b10..afb23ff07051 100644 --- a/DialogflowCx/src/V3/resources/experiments_descriptor_config.php +++ b/DialogflowCx/src/V3/resources/experiments_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/experiments_rest_client_config.php b/DialogflowCx/src/V3/resources/experiments_rest_client_config.php index 4fa9616e9eda..2b290b4a5276 100644 --- a/DialogflowCx/src/V3/resources/experiments_rest_client_config.php +++ b/DialogflowCx/src/V3/resources/experiments_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/flows_descriptor_config.php b/DialogflowCx/src/V3/resources/flows_descriptor_config.php index 757185974c34..10f3566f6294 100644 --- a/DialogflowCx/src/V3/resources/flows_descriptor_config.php +++ b/DialogflowCx/src/V3/resources/flows_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/flows_rest_client_config.php b/DialogflowCx/src/V3/resources/flows_rest_client_config.php index 37f315791a35..122073aa35bd 100644 --- a/DialogflowCx/src/V3/resources/flows_rest_client_config.php +++ b/DialogflowCx/src/V3/resources/flows_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/generators_descriptor_config.php b/DialogflowCx/src/V3/resources/generators_descriptor_config.php index 3b3eebb40634..f3d0a8783636 100644 --- a/DialogflowCx/src/V3/resources/generators_descriptor_config.php +++ b/DialogflowCx/src/V3/resources/generators_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/generators_rest_client_config.php b/DialogflowCx/src/V3/resources/generators_rest_client_config.php index de0883d2fda5..a3b22b61f765 100644 --- a/DialogflowCx/src/V3/resources/generators_rest_client_config.php +++ b/DialogflowCx/src/V3/resources/generators_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/intents_descriptor_config.php b/DialogflowCx/src/V3/resources/intents_descriptor_config.php index dba9dfca420e..7ea461fcc2c5 100644 --- a/DialogflowCx/src/V3/resources/intents_descriptor_config.php +++ b/DialogflowCx/src/V3/resources/intents_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/intents_rest_client_config.php b/DialogflowCx/src/V3/resources/intents_rest_client_config.php index 3d0ccb60ada0..36dfb1254393 100644 --- a/DialogflowCx/src/V3/resources/intents_rest_client_config.php +++ b/DialogflowCx/src/V3/resources/intents_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/pages_descriptor_config.php b/DialogflowCx/src/V3/resources/pages_descriptor_config.php index c20869166a1e..e61c7a7196f3 100644 --- a/DialogflowCx/src/V3/resources/pages_descriptor_config.php +++ b/DialogflowCx/src/V3/resources/pages_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/pages_rest_client_config.php b/DialogflowCx/src/V3/resources/pages_rest_client_config.php index 91179dd585c2..ecf2d6af367b 100644 --- a/DialogflowCx/src/V3/resources/pages_rest_client_config.php +++ b/DialogflowCx/src/V3/resources/pages_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/security_settings_service_descriptor_config.php b/DialogflowCx/src/V3/resources/security_settings_service_descriptor_config.php index a5927cfa3f7f..29fb1e96ef38 100644 --- a/DialogflowCx/src/V3/resources/security_settings_service_descriptor_config.php +++ b/DialogflowCx/src/V3/resources/security_settings_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/security_settings_service_rest_client_config.php b/DialogflowCx/src/V3/resources/security_settings_service_rest_client_config.php index deb56ccb322c..bf56f2c70e14 100644 --- a/DialogflowCx/src/V3/resources/security_settings_service_rest_client_config.php +++ b/DialogflowCx/src/V3/resources/security_settings_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/session_entity_types_descriptor_config.php b/DialogflowCx/src/V3/resources/session_entity_types_descriptor_config.php index 44f086ca6889..03816980790e 100644 --- a/DialogflowCx/src/V3/resources/session_entity_types_descriptor_config.php +++ b/DialogflowCx/src/V3/resources/session_entity_types_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/session_entity_types_rest_client_config.php b/DialogflowCx/src/V3/resources/session_entity_types_rest_client_config.php index a59e3ce87631..7a7d848b9d45 100644 --- a/DialogflowCx/src/V3/resources/session_entity_types_rest_client_config.php +++ b/DialogflowCx/src/V3/resources/session_entity_types_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/sessions_descriptor_config.php b/DialogflowCx/src/V3/resources/sessions_descriptor_config.php index 4f35c46a13af..4908acbc03d5 100644 --- a/DialogflowCx/src/V3/resources/sessions_descriptor_config.php +++ b/DialogflowCx/src/V3/resources/sessions_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/sessions_rest_client_config.php b/DialogflowCx/src/V3/resources/sessions_rest_client_config.php index 487c314fe6c5..cfff3c4babf9 100644 --- a/DialogflowCx/src/V3/resources/sessions_rest_client_config.php +++ b/DialogflowCx/src/V3/resources/sessions_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/test_cases_descriptor_config.php b/DialogflowCx/src/V3/resources/test_cases_descriptor_config.php index 0234231b2429..dd3089f3aa04 100644 --- a/DialogflowCx/src/V3/resources/test_cases_descriptor_config.php +++ b/DialogflowCx/src/V3/resources/test_cases_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/test_cases_rest_client_config.php b/DialogflowCx/src/V3/resources/test_cases_rest_client_config.php index c8519d2c1a85..9ceecadbc297 100644 --- a/DialogflowCx/src/V3/resources/test_cases_rest_client_config.php +++ b/DialogflowCx/src/V3/resources/test_cases_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/transition_route_groups_descriptor_config.php b/DialogflowCx/src/V3/resources/transition_route_groups_descriptor_config.php index 17e42b8a540a..9f11b36be092 100644 --- a/DialogflowCx/src/V3/resources/transition_route_groups_descriptor_config.php +++ b/DialogflowCx/src/V3/resources/transition_route_groups_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/transition_route_groups_rest_client_config.php b/DialogflowCx/src/V3/resources/transition_route_groups_rest_client_config.php index 271d873f4a5c..95590ceb9b20 100644 --- a/DialogflowCx/src/V3/resources/transition_route_groups_rest_client_config.php +++ b/DialogflowCx/src/V3/resources/transition_route_groups_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/versions_descriptor_config.php b/DialogflowCx/src/V3/resources/versions_descriptor_config.php index a6194d47bf78..864c747d7944 100644 --- a/DialogflowCx/src/V3/resources/versions_descriptor_config.php +++ b/DialogflowCx/src/V3/resources/versions_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/versions_rest_client_config.php b/DialogflowCx/src/V3/resources/versions_rest_client_config.php index 8e892fecf53a..735fbe2c975f 100644 --- a/DialogflowCx/src/V3/resources/versions_rest_client_config.php +++ b/DialogflowCx/src/V3/resources/versions_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/webhooks_descriptor_config.php b/DialogflowCx/src/V3/resources/webhooks_descriptor_config.php index 232a880bf66b..ef3fcadb9034 100644 --- a/DialogflowCx/src/V3/resources/webhooks_descriptor_config.php +++ b/DialogflowCx/src/V3/resources/webhooks_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DialogflowCx/src/V3/resources/webhooks_rest_client_config.php b/DialogflowCx/src/V3/resources/webhooks_rest_client_config.php index 8a71886919de..54dbb0c6840f 100644 --- a/DialogflowCx/src/V3/resources/webhooks_rest_client_config.php +++ b/DialogflowCx/src/V3/resources/webhooks_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1/resources/completion_service_descriptor_config.php b/DiscoveryEngine/src/V1/resources/completion_service_descriptor_config.php index 3cfa01d1fa7a..25b58e822e28 100644 --- a/DiscoveryEngine/src/V1/resources/completion_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1/resources/completion_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1/resources/completion_service_rest_client_config.php b/DiscoveryEngine/src/V1/resources/completion_service_rest_client_config.php index 3613024393c7..6b9858e46dc9 100644 --- a/DiscoveryEngine/src/V1/resources/completion_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1/resources/completion_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1/resources/conversational_search_service_descriptor_config.php b/DiscoveryEngine/src/V1/resources/conversational_search_service_descriptor_config.php index a676d7678019..fa82542ea810 100644 --- a/DiscoveryEngine/src/V1/resources/conversational_search_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1/resources/conversational_search_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1/resources/conversational_search_service_rest_client_config.php b/DiscoveryEngine/src/V1/resources/conversational_search_service_rest_client_config.php index 7d287db857f3..8c4fc636e456 100644 --- a/DiscoveryEngine/src/V1/resources/conversational_search_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1/resources/conversational_search_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1/resources/data_store_service_descriptor_config.php b/DiscoveryEngine/src/V1/resources/data_store_service_descriptor_config.php index 66a49fb98a54..dff90f8a0b30 100644 --- a/DiscoveryEngine/src/V1/resources/data_store_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1/resources/data_store_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1/resources/data_store_service_rest_client_config.php b/DiscoveryEngine/src/V1/resources/data_store_service_rest_client_config.php index 42cfdc59dd4e..9776ad0cc278 100644 --- a/DiscoveryEngine/src/V1/resources/data_store_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1/resources/data_store_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1/resources/document_service_descriptor_config.php b/DiscoveryEngine/src/V1/resources/document_service_descriptor_config.php index 689949e5c846..f3e65135d076 100644 --- a/DiscoveryEngine/src/V1/resources/document_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1/resources/document_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1/resources/document_service_rest_client_config.php b/DiscoveryEngine/src/V1/resources/document_service_rest_client_config.php index 4ee740834d58..f7db09107acb 100644 --- a/DiscoveryEngine/src/V1/resources/document_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1/resources/document_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1/resources/engine_service_descriptor_config.php b/DiscoveryEngine/src/V1/resources/engine_service_descriptor_config.php index 1758f0ce0f97..004daa47b2e4 100644 --- a/DiscoveryEngine/src/V1/resources/engine_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1/resources/engine_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1/resources/engine_service_rest_client_config.php b/DiscoveryEngine/src/V1/resources/engine_service_rest_client_config.php index 2ca85461374b..16e20b986339 100644 --- a/DiscoveryEngine/src/V1/resources/engine_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1/resources/engine_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1/resources/recommendation_service_descriptor_config.php b/DiscoveryEngine/src/V1/resources/recommendation_service_descriptor_config.php index eb05e94eaa98..463f52dd0264 100644 --- a/DiscoveryEngine/src/V1/resources/recommendation_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1/resources/recommendation_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1/resources/recommendation_service_rest_client_config.php b/DiscoveryEngine/src/V1/resources/recommendation_service_rest_client_config.php index d1270915f0d1..c0c54df4f420 100644 --- a/DiscoveryEngine/src/V1/resources/recommendation_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1/resources/recommendation_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1/resources/schema_service_descriptor_config.php b/DiscoveryEngine/src/V1/resources/schema_service_descriptor_config.php index 88a83b955135..235a2c1ade96 100644 --- a/DiscoveryEngine/src/V1/resources/schema_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1/resources/schema_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1/resources/schema_service_rest_client_config.php b/DiscoveryEngine/src/V1/resources/schema_service_rest_client_config.php index 62fdab826dba..2c993d0fdda4 100644 --- a/DiscoveryEngine/src/V1/resources/schema_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1/resources/schema_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1/resources/search_service_descriptor_config.php b/DiscoveryEngine/src/V1/resources/search_service_descriptor_config.php index 06c8c9c6b7ec..733f6f50a7ef 100644 --- a/DiscoveryEngine/src/V1/resources/search_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1/resources/search_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1/resources/search_service_rest_client_config.php b/DiscoveryEngine/src/V1/resources/search_service_rest_client_config.php index d7be9b54b965..a7c365492eff 100644 --- a/DiscoveryEngine/src/V1/resources/search_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1/resources/search_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1/resources/site_search_engine_service_descriptor_config.php b/DiscoveryEngine/src/V1/resources/site_search_engine_service_descriptor_config.php index 8c5f0fe0393e..a33ba3031299 100644 --- a/DiscoveryEngine/src/V1/resources/site_search_engine_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1/resources/site_search_engine_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1/resources/site_search_engine_service_rest_client_config.php b/DiscoveryEngine/src/V1/resources/site_search_engine_service_rest_client_config.php index 2ae22da5d35a..ffb91db39940 100644 --- a/DiscoveryEngine/src/V1/resources/site_search_engine_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1/resources/site_search_engine_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1/resources/user_event_service_descriptor_config.php b/DiscoveryEngine/src/V1/resources/user_event_service_descriptor_config.php index a69ef38de65c..8fbb8bc7adbc 100644 --- a/DiscoveryEngine/src/V1/resources/user_event_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1/resources/user_event_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1/resources/user_event_service_rest_client_config.php b/DiscoveryEngine/src/V1/resources/user_event_service_rest_client_config.php index 38f9f96f3001..5f219ac9cece 100644 --- a/DiscoveryEngine/src/V1/resources/user_event_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1/resources/user_event_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/completion_service_descriptor_config.php b/DiscoveryEngine/src/V1beta/resources/completion_service_descriptor_config.php index 6bcff350b0ac..6ea3016efd3b 100644 --- a/DiscoveryEngine/src/V1beta/resources/completion_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1beta/resources/completion_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/completion_service_rest_client_config.php b/DiscoveryEngine/src/V1beta/resources/completion_service_rest_client_config.php index 1d80e4a48c42..4eb0fc578bb1 100644 --- a/DiscoveryEngine/src/V1beta/resources/completion_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1beta/resources/completion_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/conversational_search_service_descriptor_config.php b/DiscoveryEngine/src/V1beta/resources/conversational_search_service_descriptor_config.php index 412cf19f4087..26dfc3419f66 100644 --- a/DiscoveryEngine/src/V1beta/resources/conversational_search_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1beta/resources/conversational_search_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/conversational_search_service_rest_client_config.php b/DiscoveryEngine/src/V1beta/resources/conversational_search_service_rest_client_config.php index 68d54c88178c..20ac75a47360 100644 --- a/DiscoveryEngine/src/V1beta/resources/conversational_search_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1beta/resources/conversational_search_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/data_store_service_descriptor_config.php b/DiscoveryEngine/src/V1beta/resources/data_store_service_descriptor_config.php index fdd0595c7a07..66cc50f45913 100644 --- a/DiscoveryEngine/src/V1beta/resources/data_store_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1beta/resources/data_store_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/data_store_service_rest_client_config.php b/DiscoveryEngine/src/V1beta/resources/data_store_service_rest_client_config.php index 6f11d39b5b0a..c975924a1762 100644 --- a/DiscoveryEngine/src/V1beta/resources/data_store_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1beta/resources/data_store_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/document_service_descriptor_config.php b/DiscoveryEngine/src/V1beta/resources/document_service_descriptor_config.php index 3e12383407af..1e5abdc3e95d 100644 --- a/DiscoveryEngine/src/V1beta/resources/document_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1beta/resources/document_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/document_service_rest_client_config.php b/DiscoveryEngine/src/V1beta/resources/document_service_rest_client_config.php index 742d845dca30..8cc929b2bd24 100644 --- a/DiscoveryEngine/src/V1beta/resources/document_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1beta/resources/document_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/engine_service_descriptor_config.php b/DiscoveryEngine/src/V1beta/resources/engine_service_descriptor_config.php index 8b663cad10fa..0aae0fb7a8aa 100644 --- a/DiscoveryEngine/src/V1beta/resources/engine_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1beta/resources/engine_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/engine_service_rest_client_config.php b/DiscoveryEngine/src/V1beta/resources/engine_service_rest_client_config.php index 64262b3b19b5..912b5384b6da 100644 --- a/DiscoveryEngine/src/V1beta/resources/engine_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1beta/resources/engine_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/grounded_generation_service_descriptor_config.php b/DiscoveryEngine/src/V1beta/resources/grounded_generation_service_descriptor_config.php index 49743f4bd724..9373fd37e76c 100644 --- a/DiscoveryEngine/src/V1beta/resources/grounded_generation_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1beta/resources/grounded_generation_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/grounded_generation_service_rest_client_config.php b/DiscoveryEngine/src/V1beta/resources/grounded_generation_service_rest_client_config.php index 865df46ca8c4..5434dbaa465c 100644 --- a/DiscoveryEngine/src/V1beta/resources/grounded_generation_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1beta/resources/grounded_generation_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/rank_service_descriptor_config.php b/DiscoveryEngine/src/V1beta/resources/rank_service_descriptor_config.php index 8d93108507ae..d86cc6ddcc33 100644 --- a/DiscoveryEngine/src/V1beta/resources/rank_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1beta/resources/rank_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/rank_service_rest_client_config.php b/DiscoveryEngine/src/V1beta/resources/rank_service_rest_client_config.php index 519e7c81766c..d1fb2b57af1d 100644 --- a/DiscoveryEngine/src/V1beta/resources/rank_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1beta/resources/rank_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/recommendation_service_descriptor_config.php b/DiscoveryEngine/src/V1beta/resources/recommendation_service_descriptor_config.php index 288fc148da83..16943254074a 100644 --- a/DiscoveryEngine/src/V1beta/resources/recommendation_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1beta/resources/recommendation_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/recommendation_service_rest_client_config.php b/DiscoveryEngine/src/V1beta/resources/recommendation_service_rest_client_config.php index cd53ec1c2517..f1659c9d6283 100644 --- a/DiscoveryEngine/src/V1beta/resources/recommendation_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1beta/resources/recommendation_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/schema_service_descriptor_config.php b/DiscoveryEngine/src/V1beta/resources/schema_service_descriptor_config.php index 190825f414a2..cc9784d8e80a 100644 --- a/DiscoveryEngine/src/V1beta/resources/schema_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1beta/resources/schema_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/schema_service_rest_client_config.php b/DiscoveryEngine/src/V1beta/resources/schema_service_rest_client_config.php index 0475fee0dc48..d31a6cca3f49 100644 --- a/DiscoveryEngine/src/V1beta/resources/schema_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1beta/resources/schema_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/search_service_descriptor_config.php b/DiscoveryEngine/src/V1beta/resources/search_service_descriptor_config.php index b010c4b1c765..d6b7bce5c2f2 100644 --- a/DiscoveryEngine/src/V1beta/resources/search_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1beta/resources/search_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/search_service_rest_client_config.php b/DiscoveryEngine/src/V1beta/resources/search_service_rest_client_config.php index 9ee682b18b7f..2697aaedd145 100644 --- a/DiscoveryEngine/src/V1beta/resources/search_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1beta/resources/search_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/search_tuning_service_descriptor_config.php b/DiscoveryEngine/src/V1beta/resources/search_tuning_service_descriptor_config.php index 191a73d28d52..f299636d2ed1 100644 --- a/DiscoveryEngine/src/V1beta/resources/search_tuning_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1beta/resources/search_tuning_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/search_tuning_service_rest_client_config.php b/DiscoveryEngine/src/V1beta/resources/search_tuning_service_rest_client_config.php index ca3fc616f52c..1d840bc5cbe1 100644 --- a/DiscoveryEngine/src/V1beta/resources/search_tuning_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1beta/resources/search_tuning_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/serving_config_service_descriptor_config.php b/DiscoveryEngine/src/V1beta/resources/serving_config_service_descriptor_config.php index 3a0e717939dc..10e002407700 100644 --- a/DiscoveryEngine/src/V1beta/resources/serving_config_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1beta/resources/serving_config_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/serving_config_service_rest_client_config.php b/DiscoveryEngine/src/V1beta/resources/serving_config_service_rest_client_config.php index b2cb71a24db9..8d4f817eea64 100644 --- a/DiscoveryEngine/src/V1beta/resources/serving_config_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1beta/resources/serving_config_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/site_search_engine_service_descriptor_config.php b/DiscoveryEngine/src/V1beta/resources/site_search_engine_service_descriptor_config.php index 09233c5d96ad..ff2f50a8d3ce 100644 --- a/DiscoveryEngine/src/V1beta/resources/site_search_engine_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1beta/resources/site_search_engine_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/site_search_engine_service_rest_client_config.php b/DiscoveryEngine/src/V1beta/resources/site_search_engine_service_rest_client_config.php index 03bd5adacb88..4b661385a6bf 100644 --- a/DiscoveryEngine/src/V1beta/resources/site_search_engine_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1beta/resources/site_search_engine_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/user_event_service_descriptor_config.php b/DiscoveryEngine/src/V1beta/resources/user_event_service_descriptor_config.php index 2cb4429f2d60..535ecc8a474b 100644 --- a/DiscoveryEngine/src/V1beta/resources/user_event_service_descriptor_config.php +++ b/DiscoveryEngine/src/V1beta/resources/user_event_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DiscoveryEngine/src/V1beta/resources/user_event_service_rest_client_config.php b/DiscoveryEngine/src/V1beta/resources/user_event_service_rest_client_config.php index 5dc8691a64e4..18e119a11b38 100644 --- a/DiscoveryEngine/src/V1beta/resources/user_event_service_rest_client_config.php +++ b/DiscoveryEngine/src/V1beta/resources/user_event_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dlp/src/V2/resources/dlp_service_descriptor_config.php b/Dlp/src/V2/resources/dlp_service_descriptor_config.php index 839349b73ace..515aea5bc9a7 100644 --- a/Dlp/src/V2/resources/dlp_service_descriptor_config.php +++ b/Dlp/src/V2/resources/dlp_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dlp/src/V2/resources/dlp_service_rest_client_config.php b/Dlp/src/V2/resources/dlp_service_rest_client_config.php index fbcc1f0c0693..fe53b1b2fad3 100644 --- a/Dlp/src/V2/resources/dlp_service_rest_client_config.php +++ b/Dlp/src/V2/resources/dlp_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dms/src/V1/resources/data_migration_service_descriptor_config.php b/Dms/src/V1/resources/data_migration_service_descriptor_config.php index 0ee23d196cc0..96222e469b5d 100644 --- a/Dms/src/V1/resources/data_migration_service_descriptor_config.php +++ b/Dms/src/V1/resources/data_migration_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dms/src/V1/resources/data_migration_service_rest_client_config.php b/Dms/src/V1/resources/data_migration_service_rest_client_config.php index 9404f44356ac..cc2d98ea46c0 100644 --- a/Dms/src/V1/resources/data_migration_service_rest_client_config.php +++ b/Dms/src/V1/resources/data_migration_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DocumentAi/src/V1/resources/document_processor_service_descriptor_config.php b/DocumentAi/src/V1/resources/document_processor_service_descriptor_config.php index 02419d079216..961e12f940bc 100644 --- a/DocumentAi/src/V1/resources/document_processor_service_descriptor_config.php +++ b/DocumentAi/src/V1/resources/document_processor_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DocumentAi/src/V1/resources/document_processor_service_rest_client_config.php b/DocumentAi/src/V1/resources/document_processor_service_rest_client_config.php index 3d47d46a5bc8..7634fa638b42 100644 --- a/DocumentAi/src/V1/resources/document_processor_service_rest_client_config.php +++ b/DocumentAi/src/V1/resources/document_processor_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Domains/src/V1/resources/domains_descriptor_config.php b/Domains/src/V1/resources/domains_descriptor_config.php index 00f4d0b46fb0..5d662988f1e2 100644 --- a/Domains/src/V1/resources/domains_descriptor_config.php +++ b/Domains/src/V1/resources/domains_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Domains/src/V1/resources/domains_rest_client_config.php b/Domains/src/V1/resources/domains_rest_client_config.php index 1a86e86545d2..52bd5773353d 100644 --- a/Domains/src/V1/resources/domains_rest_client_config.php +++ b/Domains/src/V1/resources/domains_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Domains/src/V1alpha2/resources/domains_descriptor_config.php b/Domains/src/V1alpha2/resources/domains_descriptor_config.php index 2adf181e173d..25bcc7c267dd 100644 --- a/Domains/src/V1alpha2/resources/domains_descriptor_config.php +++ b/Domains/src/V1alpha2/resources/domains_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Domains/src/V1alpha2/resources/domains_rest_client_config.php b/Domains/src/V1alpha2/resources/domains_rest_client_config.php index a9a9f76ad3c4..3374f7ee582e 100644 --- a/Domains/src/V1alpha2/resources/domains_rest_client_config.php +++ b/Domains/src/V1alpha2/resources/domains_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Domains/src/V1beta1/resources/domains_descriptor_config.php b/Domains/src/V1beta1/resources/domains_descriptor_config.php index e243d0114897..56492017cd6c 100644 --- a/Domains/src/V1beta1/resources/domains_descriptor_config.php +++ b/Domains/src/V1beta1/resources/domains_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Domains/src/V1beta1/resources/domains_rest_client_config.php b/Domains/src/V1beta1/resources/domains_rest_client_config.php index 0d8c43034439..cf57e38bcbd0 100644 --- a/Domains/src/V1beta1/resources/domains_rest_client_config.php +++ b/Domains/src/V1beta1/resources/domains_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/EdgeNetwork/src/V1/resources/edge_network_descriptor_config.php b/EdgeNetwork/src/V1/resources/edge_network_descriptor_config.php index 8b4460362287..c646f29b1cd8 100644 --- a/EdgeNetwork/src/V1/resources/edge_network_descriptor_config.php +++ b/EdgeNetwork/src/V1/resources/edge_network_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/EdgeNetwork/src/V1/resources/edge_network_rest_client_config.php b/EdgeNetwork/src/V1/resources/edge_network_rest_client_config.php index 0bab94514eae..d0fd42485045 100644 --- a/EdgeNetwork/src/V1/resources/edge_network_rest_client_config.php +++ b/EdgeNetwork/src/V1/resources/edge_network_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ErrorReporting/src/V1beta1/resources/error_group_service_descriptor_config.php b/ErrorReporting/src/V1beta1/resources/error_group_service_descriptor_config.php index 97a6cb868f05..75cdf96a897e 100644 --- a/ErrorReporting/src/V1beta1/resources/error_group_service_descriptor_config.php +++ b/ErrorReporting/src/V1beta1/resources/error_group_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ErrorReporting/src/V1beta1/resources/error_group_service_rest_client_config.php b/ErrorReporting/src/V1beta1/resources/error_group_service_rest_client_config.php index e967a41f87ee..41becf6ef0e2 100644 --- a/ErrorReporting/src/V1beta1/resources/error_group_service_rest_client_config.php +++ b/ErrorReporting/src/V1beta1/resources/error_group_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ErrorReporting/src/V1beta1/resources/error_stats_service_descriptor_config.php b/ErrorReporting/src/V1beta1/resources/error_stats_service_descriptor_config.php index 43712e675c86..9676fb120ec2 100644 --- a/ErrorReporting/src/V1beta1/resources/error_stats_service_descriptor_config.php +++ b/ErrorReporting/src/V1beta1/resources/error_stats_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ErrorReporting/src/V1beta1/resources/error_stats_service_rest_client_config.php b/ErrorReporting/src/V1beta1/resources/error_stats_service_rest_client_config.php index 8b9bb159bcb1..1ee1c58198cc 100644 --- a/ErrorReporting/src/V1beta1/resources/error_stats_service_rest_client_config.php +++ b/ErrorReporting/src/V1beta1/resources/error_stats_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ErrorReporting/src/V1beta1/resources/report_errors_service_descriptor_config.php b/ErrorReporting/src/V1beta1/resources/report_errors_service_descriptor_config.php index d95e271868e2..9d9ca105faaf 100644 --- a/ErrorReporting/src/V1beta1/resources/report_errors_service_descriptor_config.php +++ b/ErrorReporting/src/V1beta1/resources/report_errors_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ErrorReporting/src/V1beta1/resources/report_errors_service_rest_client_config.php b/ErrorReporting/src/V1beta1/resources/report_errors_service_rest_client_config.php index c7565d89467b..d13830718190 100644 --- a/ErrorReporting/src/V1beta1/resources/report_errors_service_rest_client_config.php +++ b/ErrorReporting/src/V1beta1/resources/report_errors_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/EssentialContacts/src/V1/resources/essential_contacts_service_descriptor_config.php b/EssentialContacts/src/V1/resources/essential_contacts_service_descriptor_config.php index fffc2713f526..67ffbf8c75a4 100644 --- a/EssentialContacts/src/V1/resources/essential_contacts_service_descriptor_config.php +++ b/EssentialContacts/src/V1/resources/essential_contacts_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/EssentialContacts/src/V1/resources/essential_contacts_service_rest_client_config.php b/EssentialContacts/src/V1/resources/essential_contacts_service_rest_client_config.php index 04bf88c1516f..2109acd4a5bf 100644 --- a/EssentialContacts/src/V1/resources/essential_contacts_service_rest_client_config.php +++ b/EssentialContacts/src/V1/resources/essential_contacts_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Eventarc/src/V1/resources/eventarc_descriptor_config.php b/Eventarc/src/V1/resources/eventarc_descriptor_config.php index ebab603300bc..54f8e9ee8eb1 100644 --- a/Eventarc/src/V1/resources/eventarc_descriptor_config.php +++ b/Eventarc/src/V1/resources/eventarc_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Eventarc/src/V1/resources/eventarc_rest_client_config.php b/Eventarc/src/V1/resources/eventarc_rest_client_config.php index 1618910026c6..7a534674fed2 100644 --- a/Eventarc/src/V1/resources/eventarc_rest_client_config.php +++ b/Eventarc/src/V1/resources/eventarc_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/EventarcPublishing/src/V1/resources/publisher_descriptor_config.php b/EventarcPublishing/src/V1/resources/publisher_descriptor_config.php index 40ab08ee9329..ebce97ea4ab1 100644 --- a/EventarcPublishing/src/V1/resources/publisher_descriptor_config.php +++ b/EventarcPublishing/src/V1/resources/publisher_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/EventarcPublishing/src/V1/resources/publisher_rest_client_config.php b/EventarcPublishing/src/V1/resources/publisher_rest_client_config.php index 2c4ad8b6ef1c..8922a23ca60d 100644 --- a/EventarcPublishing/src/V1/resources/publisher_rest_client_config.php +++ b/EventarcPublishing/src/V1/resources/publisher_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Filestore/src/V1/resources/cloud_filestore_manager_descriptor_config.php b/Filestore/src/V1/resources/cloud_filestore_manager_descriptor_config.php index ffbce121629c..880722cf3201 100644 --- a/Filestore/src/V1/resources/cloud_filestore_manager_descriptor_config.php +++ b/Filestore/src/V1/resources/cloud_filestore_manager_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Filestore/src/V1/resources/cloud_filestore_manager_rest_client_config.php b/Filestore/src/V1/resources/cloud_filestore_manager_rest_client_config.php index d6f04a22aaf5..d54edee24228 100644 --- a/Filestore/src/V1/resources/cloud_filestore_manager_rest_client_config.php +++ b/Filestore/src/V1/resources/cloud_filestore_manager_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Firestore/src/Admin/V1/resources/firestore_admin_descriptor_config.php b/Firestore/src/Admin/V1/resources/firestore_admin_descriptor_config.php index 5e6d0f3dd02f..e5992eb3c3f8 100644 --- a/Firestore/src/Admin/V1/resources/firestore_admin_descriptor_config.php +++ b/Firestore/src/Admin/V1/resources/firestore_admin_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Firestore/src/Admin/V1/resources/firestore_admin_rest_client_config.php b/Firestore/src/Admin/V1/resources/firestore_admin_rest_client_config.php index 9272832a09ce..b2d683f8e599 100644 --- a/Firestore/src/Admin/V1/resources/firestore_admin_rest_client_config.php +++ b/Firestore/src/Admin/V1/resources/firestore_admin_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Firestore/src/V1/resources/firestore_descriptor_config.php b/Firestore/src/V1/resources/firestore_descriptor_config.php index 7d2b1c57c94f..4fff43f18ee9 100644 --- a/Firestore/src/V1/resources/firestore_descriptor_config.php +++ b/Firestore/src/V1/resources/firestore_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Firestore/src/V1/resources/firestore_rest_client_config.php b/Firestore/src/V1/resources/firestore_rest_client_config.php index 984cef14a450..054730f1901a 100644 --- a/Firestore/src/V1/resources/firestore_rest_client_config.php +++ b/Firestore/src/V1/resources/firestore_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Functions/src/V1/resources/cloud_functions_service_descriptor_config.php b/Functions/src/V1/resources/cloud_functions_service_descriptor_config.php index 9f874b5bbb75..0fa06f2e23bd 100644 --- a/Functions/src/V1/resources/cloud_functions_service_descriptor_config.php +++ b/Functions/src/V1/resources/cloud_functions_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Functions/src/V1/resources/cloud_functions_service_rest_client_config.php b/Functions/src/V1/resources/cloud_functions_service_rest_client_config.php index 4ccbce38fd50..5cbbcec88874 100644 --- a/Functions/src/V1/resources/cloud_functions_service_rest_client_config.php +++ b/Functions/src/V1/resources/cloud_functions_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Functions/src/V2/resources/function_service_descriptor_config.php b/Functions/src/V2/resources/function_service_descriptor_config.php index c7e5d08250ae..b0f8d88bbb90 100644 --- a/Functions/src/V2/resources/function_service_descriptor_config.php +++ b/Functions/src/V2/resources/function_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Functions/src/V2/resources/function_service_rest_client_config.php b/Functions/src/V2/resources/function_service_rest_client_config.php index 07539b7883bc..44d8f539758e 100644 --- a/Functions/src/V2/resources/function_service_rest_client_config.php +++ b/Functions/src/V2/resources/function_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/GSuiteAddOns/src/V1/resources/g_suite_add_ons_descriptor_config.php b/GSuiteAddOns/src/V1/resources/g_suite_add_ons_descriptor_config.php index 324f1a563071..f85736b5ac05 100644 --- a/GSuiteAddOns/src/V1/resources/g_suite_add_ons_descriptor_config.php +++ b/GSuiteAddOns/src/V1/resources/g_suite_add_ons_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/GSuiteAddOns/src/V1/resources/g_suite_add_ons_rest_client_config.php b/GSuiteAddOns/src/V1/resources/g_suite_add_ons_rest_client_config.php index 38e022bdead8..17fbcad14628 100644 --- a/GSuiteAddOns/src/V1/resources/g_suite_add_ons_rest_client_config.php +++ b/GSuiteAddOns/src/V1/resources/g_suite_add_ons_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/GkeBackup/src/V1/resources/backup_for_gke_descriptor_config.php b/GkeBackup/src/V1/resources/backup_for_gke_descriptor_config.php index d9791f6c3b9f..8b4932b4baf8 100644 --- a/GkeBackup/src/V1/resources/backup_for_gke_descriptor_config.php +++ b/GkeBackup/src/V1/resources/backup_for_gke_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/GkeBackup/src/V1/resources/backup_for_gke_rest_client_config.php b/GkeBackup/src/V1/resources/backup_for_gke_rest_client_config.php index f35ff0dd33d0..2da9a805e611 100644 --- a/GkeBackup/src/V1/resources/backup_for_gke_rest_client_config.php +++ b/GkeBackup/src/V1/resources/backup_for_gke_rest_client_config.php @@ -1,4 +1,24 @@ [ From 0c42bebe4da11b8b4a99665068aed8e644ccbd58 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 09:11:40 -0700 Subject: [PATCH 34/86] chore: add license and generated code headers to generated resource files (#7231) PiperOrigin-RevId: 624277410 Source-Link: https://github.com/googleapis/googleapis/commit/2d881be8c566e4c374061248dd205efd72b7ef4f Source-Link: https://github.com/googleapis/googleapis-gen/commit/1d063f9353aeffb9a968f1a00f1d105b0c14a42d Copy-Tag: eyJwIjoiUmVjb21tZW5kZXIvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiUmVkaXMvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiUmVkaXNDbHVzdGVyLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiUmVzb3VyY2VNYW5hZ2VyLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiUmVzb3VyY2VTZXR0aW5ncy8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiUmV0YWlsLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiUnVuLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiU2NoZWR1bGVyLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiU2VjcmV0TWFuYWdlci8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiU2VjdXJlU291cmNlTWFuYWdlci8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiU2VjdXJpdHlDZW50ZXIvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiU2VjdXJpdHlDZW50ZXJNYW5hZ2VtZW50Ly5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiU2VjdXJpdHlQcml2YXRlQ2EvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiU2VjdXJpdHlQdWJsaWNDQS8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiU2VydmljZUNvbnRyb2wvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiU2VydmljZURpcmVjdG9yeS8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiU2VydmljZUhlYWx0aC8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiU2VydmljZU1hbmFnZW1lbnQvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiU2VydmljZVVzYWdlLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiU2hlbGwvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== --- .../recommender_descriptor_config.php | 20 ++++++++++++++++++ .../recommender_rest_client_config.php | 20 ++++++++++++++++++ .../cloud_redis_descriptor_config.php | 20 ++++++++++++++++++ .../cloud_redis_rest_client_config.php | 20 ++++++++++++++++++ .../cloud_redis_descriptor_config.php | 20 ++++++++++++++++++ .../cloud_redis_rest_client_config.php | 20 ++++++++++++++++++ .../cloud_redis_cluster_descriptor_config.php | 20 ++++++++++++++++++ ...cloud_redis_cluster_rest_client_config.php | 20 ++++++++++++++++++ .../resources/folders_descriptor_config.php | 20 ++++++++++++++++++ .../resources/folders_rest_client_config.php | 20 ++++++++++++++++++ .../organizations_descriptor_config.php | 20 ++++++++++++++++++ .../organizations_rest_client_config.php | 20 ++++++++++++++++++ .../resources/projects_descriptor_config.php | 20 ++++++++++++++++++ .../resources/projects_rest_client_config.php | 20 ++++++++++++++++++ .../tag_bindings_descriptor_config.php | 20 ++++++++++++++++++ .../tag_bindings_rest_client_config.php | 20 ++++++++++++++++++ .../resources/tag_holds_descriptor_config.php | 20 ++++++++++++++++++ .../tag_holds_rest_client_config.php | 20 ++++++++++++++++++ .../resources/tag_keys_descriptor_config.php | 20 ++++++++++++++++++ .../resources/tag_keys_rest_client_config.php | 20 ++++++++++++++++++ .../tag_values_descriptor_config.php | 20 ++++++++++++++++++ .../tag_values_rest_client_config.php | 20 ++++++++++++++++++ ...rce_settings_service_descriptor_config.php | 20 ++++++++++++++++++ ...ce_settings_service_rest_client_config.php | 20 ++++++++++++++++++ .../analytics_service_descriptor_config.php | 20 ++++++++++++++++++ .../analytics_service_rest_client_config.php | 20 ++++++++++++++++++ .../catalog_service_descriptor_config.php | 20 ++++++++++++++++++ .../catalog_service_rest_client_config.php | 20 ++++++++++++++++++ .../completion_service_descriptor_config.php | 20 ++++++++++++++++++ .../completion_service_rest_client_config.php | 20 ++++++++++++++++++ .../control_service_descriptor_config.php | 20 ++++++++++++++++++ .../control_service_rest_client_config.php | 20 ++++++++++++++++++ .../model_service_descriptor_config.php | 20 ++++++++++++++++++ .../model_service_rest_client_config.php | 20 ++++++++++++++++++ .../prediction_service_descriptor_config.php | 20 ++++++++++++++++++ .../prediction_service_rest_client_config.php | 20 ++++++++++++++++++ .../product_service_descriptor_config.php | 20 ++++++++++++++++++ .../product_service_rest_client_config.php | 20 ++++++++++++++++++ .../search_service_descriptor_config.php | 20 ++++++++++++++++++ .../search_service_rest_client_config.php | 20 ++++++++++++++++++ ...rving_config_service_descriptor_config.php | 20 ++++++++++++++++++ ...ving_config_service_rest_client_config.php | 20 ++++++++++++++++++ .../user_event_service_descriptor_config.php | 20 ++++++++++++++++++ .../user_event_service_rest_client_config.php | 20 ++++++++++++++++++ .../executions_descriptor_config.php | 20 ++++++++++++++++++ .../executions_rest_client_config.php | 20 ++++++++++++++++++ .../V2/resources/jobs_descriptor_config.php | 20 ++++++++++++++++++ .../V2/resources/jobs_rest_client_config.php | 20 ++++++++++++++++++ .../resources/revisions_descriptor_config.php | 20 ++++++++++++++++++ .../revisions_rest_client_config.php | 20 ++++++++++++++++++ .../resources/services_descriptor_config.php | 20 ++++++++++++++++++ .../resources/services_rest_client_config.php | 20 ++++++++++++++++++ .../V2/resources/tasks_descriptor_config.php | 20 ++++++++++++++++++ .../V2/resources/tasks_rest_client_config.php | 20 ++++++++++++++++++ .../cloud_scheduler_descriptor_config.php | 20 ++++++++++++++++++ .../cloud_scheduler_rest_client_config.php | 20 ++++++++++++++++++ .../cloud_scheduler_descriptor_config.php | 20 ++++++++++++++++++ .../cloud_scheduler_rest_client_config.php | 20 ++++++++++++++++++ ...cret_manager_service_descriptor_config.php | 20 ++++++++++++++++++ ...ret_manager_service_rest_client_config.php | 20 ++++++++++++++++++ ...cret_manager_service_descriptor_config.php | 20 ++++++++++++++++++ ...ret_manager_service_rest_client_config.php | 20 ++++++++++++++++++ ...cret_manager_service_descriptor_config.php | 20 ++++++++++++++++++ ...ret_manager_service_rest_client_config.php | 20 ++++++++++++++++++ ...ecure_source_manager_descriptor_config.php | 20 ++++++++++++++++++ ...cure_source_manager_rest_client_config.php | 20 ++++++++++++++++++ .../security_center_descriptor_config.php | 20 ++++++++++++++++++ .../security_center_rest_client_config.php | 20 ++++++++++++++++++ .../security_center_descriptor_config.php | 20 ++++++++++++++++++ .../security_center_rest_client_config.php | 20 ++++++++++++++++++ .../security_center_descriptor_config.php | 20 ++++++++++++++++++ .../security_center_rest_client_config.php | 20 ++++++++++++++++++ ...ty_center_management_descriptor_config.php | 20 ++++++++++++++++++ ...y_center_management_rest_client_config.php | 20 ++++++++++++++++++ ...te_authority_service_descriptor_config.php | 20 ++++++++++++++++++ ...e_authority_service_rest_client_config.php | 20 ++++++++++++++++++ ...te_authority_service_descriptor_config.php | 20 ++++++++++++++++++ ...e_authority_service_rest_client_config.php | 20 ++++++++++++++++++ ...te_authority_service_descriptor_config.php | 20 ++++++++++++++++++ ...e_authority_service_rest_client_config.php | 20 ++++++++++++++++++ .../quota_controller_descriptor_config.php | 20 ++++++++++++++++++ .../quota_controller_rest_client_config.php | 20 ++++++++++++++++++ .../service_controller_descriptor_config.php | 20 ++++++++++++++++++ .../service_controller_rest_client_config.php | 20 ++++++++++++++++++ .../lookup_service_descriptor_config.php | 20 ++++++++++++++++++ .../lookup_service_rest_client_config.php | 20 ++++++++++++++++++ ...registration_service_descriptor_config.php | 20 ++++++++++++++++++ ...egistration_service_rest_client_config.php | 20 ++++++++++++++++++ .../lookup_service_descriptor_config.php | 20 ++++++++++++++++++ .../lookup_service_rest_client_config.php | 20 ++++++++++++++++++ ...registration_service_descriptor_config.php | 20 ++++++++++++++++++ ...egistration_service_rest_client_config.php | 20 ++++++++++++++++++ .../service_health_descriptor_config.php | 20 ++++++++++++++++++ .../service_health_rest_client_config.php | 20 ++++++++++++++++++ .../service_manager_descriptor_config.php | 20 ++++++++++++++++++ .../service_manager_rest_client_config.php | 20 ++++++++++++++++++ ServiceUsage/metadata/V1/Serviceusage.php | Bin 3627 -> 3627 bytes .../service_usage_descriptor_config.php | 20 ++++++++++++++++++ .../service_usage_rest_client_config.php | 20 ++++++++++++++++++ .../cloud_shell_service_descriptor_config.php | 20 ++++++++++++++++++ ...cloud_shell_service_rest_client_config.php | 20 ++++++++++++++++++ 101 files changed, 2000 insertions(+) diff --git a/Recommender/src/V1/resources/recommender_descriptor_config.php b/Recommender/src/V1/resources/recommender_descriptor_config.php index 1d9df094d68e..f3a5d812aa47 100644 --- a/Recommender/src/V1/resources/recommender_descriptor_config.php +++ b/Recommender/src/V1/resources/recommender_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Recommender/src/V1/resources/recommender_rest_client_config.php b/Recommender/src/V1/resources/recommender_rest_client_config.php index 99442217b5f0..ee41be2d932d 100644 --- a/Recommender/src/V1/resources/recommender_rest_client_config.php +++ b/Recommender/src/V1/resources/recommender_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Redis/src/V1/resources/cloud_redis_descriptor_config.php b/Redis/src/V1/resources/cloud_redis_descriptor_config.php index a8f84d15b49d..17c14a91b86b 100644 --- a/Redis/src/V1/resources/cloud_redis_descriptor_config.php +++ b/Redis/src/V1/resources/cloud_redis_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Redis/src/V1/resources/cloud_redis_rest_client_config.php b/Redis/src/V1/resources/cloud_redis_rest_client_config.php index 0f95aee78ac5..2eb88bbbd4f6 100644 --- a/Redis/src/V1/resources/cloud_redis_rest_client_config.php +++ b/Redis/src/V1/resources/cloud_redis_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Redis/src/V1beta1/resources/cloud_redis_descriptor_config.php b/Redis/src/V1beta1/resources/cloud_redis_descriptor_config.php index fb4ff0bf1ae5..19ee509f4bea 100644 --- a/Redis/src/V1beta1/resources/cloud_redis_descriptor_config.php +++ b/Redis/src/V1beta1/resources/cloud_redis_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Redis/src/V1beta1/resources/cloud_redis_rest_client_config.php b/Redis/src/V1beta1/resources/cloud_redis_rest_client_config.php index fd7d214a91cf..8f0ea058d31e 100644 --- a/Redis/src/V1beta1/resources/cloud_redis_rest_client_config.php +++ b/Redis/src/V1beta1/resources/cloud_redis_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/RedisCluster/src/V1/resources/cloud_redis_cluster_descriptor_config.php b/RedisCluster/src/V1/resources/cloud_redis_cluster_descriptor_config.php index a52d9fcb9920..e5d8665a28fc 100644 --- a/RedisCluster/src/V1/resources/cloud_redis_cluster_descriptor_config.php +++ b/RedisCluster/src/V1/resources/cloud_redis_cluster_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/RedisCluster/src/V1/resources/cloud_redis_cluster_rest_client_config.php b/RedisCluster/src/V1/resources/cloud_redis_cluster_rest_client_config.php index ac5087079537..115039ea6b92 100644 --- a/RedisCluster/src/V1/resources/cloud_redis_cluster_rest_client_config.php +++ b/RedisCluster/src/V1/resources/cloud_redis_cluster_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ResourceManager/src/V3/resources/folders_descriptor_config.php b/ResourceManager/src/V3/resources/folders_descriptor_config.php index e4c3bd76be75..f3c92fc6037f 100644 --- a/ResourceManager/src/V3/resources/folders_descriptor_config.php +++ b/ResourceManager/src/V3/resources/folders_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ResourceManager/src/V3/resources/folders_rest_client_config.php b/ResourceManager/src/V3/resources/folders_rest_client_config.php index 207e25e6815d..94bf6dd06068 100644 --- a/ResourceManager/src/V3/resources/folders_rest_client_config.php +++ b/ResourceManager/src/V3/resources/folders_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ResourceManager/src/V3/resources/organizations_descriptor_config.php b/ResourceManager/src/V3/resources/organizations_descriptor_config.php index 78dd5042dd02..7a585fc164c0 100644 --- a/ResourceManager/src/V3/resources/organizations_descriptor_config.php +++ b/ResourceManager/src/V3/resources/organizations_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ResourceManager/src/V3/resources/organizations_rest_client_config.php b/ResourceManager/src/V3/resources/organizations_rest_client_config.php index ac91964986fa..b1c01902a190 100644 --- a/ResourceManager/src/V3/resources/organizations_rest_client_config.php +++ b/ResourceManager/src/V3/resources/organizations_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ResourceManager/src/V3/resources/projects_descriptor_config.php b/ResourceManager/src/V3/resources/projects_descriptor_config.php index ad80435b422f..4452903d703c 100644 --- a/ResourceManager/src/V3/resources/projects_descriptor_config.php +++ b/ResourceManager/src/V3/resources/projects_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ResourceManager/src/V3/resources/projects_rest_client_config.php b/ResourceManager/src/V3/resources/projects_rest_client_config.php index 0683b4473a2a..7a584fdaf5c2 100644 --- a/ResourceManager/src/V3/resources/projects_rest_client_config.php +++ b/ResourceManager/src/V3/resources/projects_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ResourceManager/src/V3/resources/tag_bindings_descriptor_config.php b/ResourceManager/src/V3/resources/tag_bindings_descriptor_config.php index 1614f5336c74..696b63047a83 100644 --- a/ResourceManager/src/V3/resources/tag_bindings_descriptor_config.php +++ b/ResourceManager/src/V3/resources/tag_bindings_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ResourceManager/src/V3/resources/tag_bindings_rest_client_config.php b/ResourceManager/src/V3/resources/tag_bindings_rest_client_config.php index f7a37f80d839..dfe8673c3295 100644 --- a/ResourceManager/src/V3/resources/tag_bindings_rest_client_config.php +++ b/ResourceManager/src/V3/resources/tag_bindings_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ResourceManager/src/V3/resources/tag_holds_descriptor_config.php b/ResourceManager/src/V3/resources/tag_holds_descriptor_config.php index 4f43098bce33..197711c58ffb 100644 --- a/ResourceManager/src/V3/resources/tag_holds_descriptor_config.php +++ b/ResourceManager/src/V3/resources/tag_holds_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ResourceManager/src/V3/resources/tag_holds_rest_client_config.php b/ResourceManager/src/V3/resources/tag_holds_rest_client_config.php index 8f1a1fbafe66..9615ac90f61a 100644 --- a/ResourceManager/src/V3/resources/tag_holds_rest_client_config.php +++ b/ResourceManager/src/V3/resources/tag_holds_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ResourceManager/src/V3/resources/tag_keys_descriptor_config.php b/ResourceManager/src/V3/resources/tag_keys_descriptor_config.php index a1a78baeb784..47f923596525 100644 --- a/ResourceManager/src/V3/resources/tag_keys_descriptor_config.php +++ b/ResourceManager/src/V3/resources/tag_keys_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ResourceManager/src/V3/resources/tag_keys_rest_client_config.php b/ResourceManager/src/V3/resources/tag_keys_rest_client_config.php index 969c16663c34..92b3ead1458e 100644 --- a/ResourceManager/src/V3/resources/tag_keys_rest_client_config.php +++ b/ResourceManager/src/V3/resources/tag_keys_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ResourceManager/src/V3/resources/tag_values_descriptor_config.php b/ResourceManager/src/V3/resources/tag_values_descriptor_config.php index ed3a5434f2ba..6cc049800ae1 100644 --- a/ResourceManager/src/V3/resources/tag_values_descriptor_config.php +++ b/ResourceManager/src/V3/resources/tag_values_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ResourceManager/src/V3/resources/tag_values_rest_client_config.php b/ResourceManager/src/V3/resources/tag_values_rest_client_config.php index bacaedd72e94..ab34cd4357b4 100644 --- a/ResourceManager/src/V3/resources/tag_values_rest_client_config.php +++ b/ResourceManager/src/V3/resources/tag_values_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ResourceSettings/src/V1/resources/resource_settings_service_descriptor_config.php b/ResourceSettings/src/V1/resources/resource_settings_service_descriptor_config.php index 82c40ef6c164..1a389b803c1e 100644 --- a/ResourceSettings/src/V1/resources/resource_settings_service_descriptor_config.php +++ b/ResourceSettings/src/V1/resources/resource_settings_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ResourceSettings/src/V1/resources/resource_settings_service_rest_client_config.php b/ResourceSettings/src/V1/resources/resource_settings_service_rest_client_config.php index 6c6b5833463a..af1aea760155 100644 --- a/ResourceSettings/src/V1/resources/resource_settings_service_rest_client_config.php +++ b/ResourceSettings/src/V1/resources/resource_settings_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Retail/src/V2/resources/analytics_service_descriptor_config.php b/Retail/src/V2/resources/analytics_service_descriptor_config.php index d5797c7abd9e..c0885c7d5739 100644 --- a/Retail/src/V2/resources/analytics_service_descriptor_config.php +++ b/Retail/src/V2/resources/analytics_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Retail/src/V2/resources/analytics_service_rest_client_config.php b/Retail/src/V2/resources/analytics_service_rest_client_config.php index 002ae0c99efb..f15d33d89d33 100644 --- a/Retail/src/V2/resources/analytics_service_rest_client_config.php +++ b/Retail/src/V2/resources/analytics_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Retail/src/V2/resources/catalog_service_descriptor_config.php b/Retail/src/V2/resources/catalog_service_descriptor_config.php index 61de19c5fe6c..fc8dc2fece6f 100644 --- a/Retail/src/V2/resources/catalog_service_descriptor_config.php +++ b/Retail/src/V2/resources/catalog_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Retail/src/V2/resources/catalog_service_rest_client_config.php b/Retail/src/V2/resources/catalog_service_rest_client_config.php index 2963e594633e..b0bb0fa62cd9 100644 --- a/Retail/src/V2/resources/catalog_service_rest_client_config.php +++ b/Retail/src/V2/resources/catalog_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Retail/src/V2/resources/completion_service_descriptor_config.php b/Retail/src/V2/resources/completion_service_descriptor_config.php index 2a5af3219202..09de7c3e4674 100644 --- a/Retail/src/V2/resources/completion_service_descriptor_config.php +++ b/Retail/src/V2/resources/completion_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Retail/src/V2/resources/completion_service_rest_client_config.php b/Retail/src/V2/resources/completion_service_rest_client_config.php index 25fc8ec8bef3..da7514c18385 100644 --- a/Retail/src/V2/resources/completion_service_rest_client_config.php +++ b/Retail/src/V2/resources/completion_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Retail/src/V2/resources/control_service_descriptor_config.php b/Retail/src/V2/resources/control_service_descriptor_config.php index 1c69dbcf259e..56d55d390070 100644 --- a/Retail/src/V2/resources/control_service_descriptor_config.php +++ b/Retail/src/V2/resources/control_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Retail/src/V2/resources/control_service_rest_client_config.php b/Retail/src/V2/resources/control_service_rest_client_config.php index ab914eb7181b..3c7844395f6c 100644 --- a/Retail/src/V2/resources/control_service_rest_client_config.php +++ b/Retail/src/V2/resources/control_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Retail/src/V2/resources/model_service_descriptor_config.php b/Retail/src/V2/resources/model_service_descriptor_config.php index 6ee7fa7c6c79..6171fd3a107d 100644 --- a/Retail/src/V2/resources/model_service_descriptor_config.php +++ b/Retail/src/V2/resources/model_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Retail/src/V2/resources/model_service_rest_client_config.php b/Retail/src/V2/resources/model_service_rest_client_config.php index 7551c7e724fe..98c6f0e7d572 100644 --- a/Retail/src/V2/resources/model_service_rest_client_config.php +++ b/Retail/src/V2/resources/model_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Retail/src/V2/resources/prediction_service_descriptor_config.php b/Retail/src/V2/resources/prediction_service_descriptor_config.php index 6b69cc2740ea..628c060ff11e 100644 --- a/Retail/src/V2/resources/prediction_service_descriptor_config.php +++ b/Retail/src/V2/resources/prediction_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Retail/src/V2/resources/prediction_service_rest_client_config.php b/Retail/src/V2/resources/prediction_service_rest_client_config.php index d0ebf31ff53e..5a66073b4f00 100644 --- a/Retail/src/V2/resources/prediction_service_rest_client_config.php +++ b/Retail/src/V2/resources/prediction_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Retail/src/V2/resources/product_service_descriptor_config.php b/Retail/src/V2/resources/product_service_descriptor_config.php index e9bd15aa52d8..a64d175f1efd 100644 --- a/Retail/src/V2/resources/product_service_descriptor_config.php +++ b/Retail/src/V2/resources/product_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Retail/src/V2/resources/product_service_rest_client_config.php b/Retail/src/V2/resources/product_service_rest_client_config.php index 11e7dbaf281c..e896c5dba858 100644 --- a/Retail/src/V2/resources/product_service_rest_client_config.php +++ b/Retail/src/V2/resources/product_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Retail/src/V2/resources/search_service_descriptor_config.php b/Retail/src/V2/resources/search_service_descriptor_config.php index 4363f03828b5..051351283f4b 100644 --- a/Retail/src/V2/resources/search_service_descriptor_config.php +++ b/Retail/src/V2/resources/search_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Retail/src/V2/resources/search_service_rest_client_config.php b/Retail/src/V2/resources/search_service_rest_client_config.php index 20b8e69fb776..8e70173e2f4c 100644 --- a/Retail/src/V2/resources/search_service_rest_client_config.php +++ b/Retail/src/V2/resources/search_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Retail/src/V2/resources/serving_config_service_descriptor_config.php b/Retail/src/V2/resources/serving_config_service_descriptor_config.php index f511c326ea1e..a1058834d03b 100644 --- a/Retail/src/V2/resources/serving_config_service_descriptor_config.php +++ b/Retail/src/V2/resources/serving_config_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Retail/src/V2/resources/serving_config_service_rest_client_config.php b/Retail/src/V2/resources/serving_config_service_rest_client_config.php index 90fd661ab23f..c7021c644b24 100644 --- a/Retail/src/V2/resources/serving_config_service_rest_client_config.php +++ b/Retail/src/V2/resources/serving_config_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Retail/src/V2/resources/user_event_service_descriptor_config.php b/Retail/src/V2/resources/user_event_service_descriptor_config.php index c1ef10ee84c5..d5aee057f1ac 100644 --- a/Retail/src/V2/resources/user_event_service_descriptor_config.php +++ b/Retail/src/V2/resources/user_event_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Retail/src/V2/resources/user_event_service_rest_client_config.php b/Retail/src/V2/resources/user_event_service_rest_client_config.php index 3bf6445f59a9..8693b90c34d7 100644 --- a/Retail/src/V2/resources/user_event_service_rest_client_config.php +++ b/Retail/src/V2/resources/user_event_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Run/src/V2/resources/executions_descriptor_config.php b/Run/src/V2/resources/executions_descriptor_config.php index 159b74c63fd5..eef9c8872f7b 100644 --- a/Run/src/V2/resources/executions_descriptor_config.php +++ b/Run/src/V2/resources/executions_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Run/src/V2/resources/executions_rest_client_config.php b/Run/src/V2/resources/executions_rest_client_config.php index 8f198d1bf4e2..d057b806912f 100644 --- a/Run/src/V2/resources/executions_rest_client_config.php +++ b/Run/src/V2/resources/executions_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Run/src/V2/resources/jobs_descriptor_config.php b/Run/src/V2/resources/jobs_descriptor_config.php index 1b8e3723d455..33bd0d89d3f4 100644 --- a/Run/src/V2/resources/jobs_descriptor_config.php +++ b/Run/src/V2/resources/jobs_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Run/src/V2/resources/jobs_rest_client_config.php b/Run/src/V2/resources/jobs_rest_client_config.php index 4376c4a015b3..51959869ee19 100644 --- a/Run/src/V2/resources/jobs_rest_client_config.php +++ b/Run/src/V2/resources/jobs_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Run/src/V2/resources/revisions_descriptor_config.php b/Run/src/V2/resources/revisions_descriptor_config.php index bea3f234a4a7..a2b139922fc9 100644 --- a/Run/src/V2/resources/revisions_descriptor_config.php +++ b/Run/src/V2/resources/revisions_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Run/src/V2/resources/revisions_rest_client_config.php b/Run/src/V2/resources/revisions_rest_client_config.php index a92b5f18665e..525cc8b31399 100644 --- a/Run/src/V2/resources/revisions_rest_client_config.php +++ b/Run/src/V2/resources/revisions_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Run/src/V2/resources/services_descriptor_config.php b/Run/src/V2/resources/services_descriptor_config.php index df4517da0d0c..82c5c01c31d6 100644 --- a/Run/src/V2/resources/services_descriptor_config.php +++ b/Run/src/V2/resources/services_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Run/src/V2/resources/services_rest_client_config.php b/Run/src/V2/resources/services_rest_client_config.php index 9a0c8164e907..4ab42dd22480 100644 --- a/Run/src/V2/resources/services_rest_client_config.php +++ b/Run/src/V2/resources/services_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Run/src/V2/resources/tasks_descriptor_config.php b/Run/src/V2/resources/tasks_descriptor_config.php index dce4691d1ab2..4a057bedbd7f 100644 --- a/Run/src/V2/resources/tasks_descriptor_config.php +++ b/Run/src/V2/resources/tasks_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Run/src/V2/resources/tasks_rest_client_config.php b/Run/src/V2/resources/tasks_rest_client_config.php index e41c1330959c..b822ceb44355 100644 --- a/Run/src/V2/resources/tasks_rest_client_config.php +++ b/Run/src/V2/resources/tasks_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Scheduler/src/V1/resources/cloud_scheduler_descriptor_config.php b/Scheduler/src/V1/resources/cloud_scheduler_descriptor_config.php index 5cf4acffc858..0306dcf2405c 100644 --- a/Scheduler/src/V1/resources/cloud_scheduler_descriptor_config.php +++ b/Scheduler/src/V1/resources/cloud_scheduler_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Scheduler/src/V1/resources/cloud_scheduler_rest_client_config.php b/Scheduler/src/V1/resources/cloud_scheduler_rest_client_config.php index aa15725d7b85..5f7e537c2c47 100644 --- a/Scheduler/src/V1/resources/cloud_scheduler_rest_client_config.php +++ b/Scheduler/src/V1/resources/cloud_scheduler_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Scheduler/src/V1beta1/resources/cloud_scheduler_descriptor_config.php b/Scheduler/src/V1beta1/resources/cloud_scheduler_descriptor_config.php index e674bc5d758f..49d3f613e726 100644 --- a/Scheduler/src/V1beta1/resources/cloud_scheduler_descriptor_config.php +++ b/Scheduler/src/V1beta1/resources/cloud_scheduler_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Scheduler/src/V1beta1/resources/cloud_scheduler_rest_client_config.php b/Scheduler/src/V1beta1/resources/cloud_scheduler_rest_client_config.php index 3b2ef17783aa..6ef19cbf91d6 100644 --- a/Scheduler/src/V1beta1/resources/cloud_scheduler_rest_client_config.php +++ b/Scheduler/src/V1beta1/resources/cloud_scheduler_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SecretManager/src/V1/resources/secret_manager_service_descriptor_config.php b/SecretManager/src/V1/resources/secret_manager_service_descriptor_config.php index e4f002f02175..fc12f035380c 100644 --- a/SecretManager/src/V1/resources/secret_manager_service_descriptor_config.php +++ b/SecretManager/src/V1/resources/secret_manager_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SecretManager/src/V1/resources/secret_manager_service_rest_client_config.php b/SecretManager/src/V1/resources/secret_manager_service_rest_client_config.php index dd81b1ade7e8..02f86aaecf44 100644 --- a/SecretManager/src/V1/resources/secret_manager_service_rest_client_config.php +++ b/SecretManager/src/V1/resources/secret_manager_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SecretManager/src/V1beta1/resources/secret_manager_service_descriptor_config.php b/SecretManager/src/V1beta1/resources/secret_manager_service_descriptor_config.php index b0e875f243ee..6b9a823d29af 100644 --- a/SecretManager/src/V1beta1/resources/secret_manager_service_descriptor_config.php +++ b/SecretManager/src/V1beta1/resources/secret_manager_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SecretManager/src/V1beta1/resources/secret_manager_service_rest_client_config.php b/SecretManager/src/V1beta1/resources/secret_manager_service_rest_client_config.php index 3d967e4e535b..bd8084dc3df3 100644 --- a/SecretManager/src/V1beta1/resources/secret_manager_service_rest_client_config.php +++ b/SecretManager/src/V1beta1/resources/secret_manager_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SecretManager/src/V1beta2/resources/secret_manager_service_descriptor_config.php b/SecretManager/src/V1beta2/resources/secret_manager_service_descriptor_config.php index 6b5a6dbd9e0c..57f3bca6a719 100644 --- a/SecretManager/src/V1beta2/resources/secret_manager_service_descriptor_config.php +++ b/SecretManager/src/V1beta2/resources/secret_manager_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SecretManager/src/V1beta2/resources/secret_manager_service_rest_client_config.php b/SecretManager/src/V1beta2/resources/secret_manager_service_rest_client_config.php index 5b2a95af9781..80ef97b21eb6 100644 --- a/SecretManager/src/V1beta2/resources/secret_manager_service_rest_client_config.php +++ b/SecretManager/src/V1beta2/resources/secret_manager_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SecureSourceManager/src/V1/resources/secure_source_manager_descriptor_config.php b/SecureSourceManager/src/V1/resources/secure_source_manager_descriptor_config.php index 612672a39b30..9755bb111258 100644 --- a/SecureSourceManager/src/V1/resources/secure_source_manager_descriptor_config.php +++ b/SecureSourceManager/src/V1/resources/secure_source_manager_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SecureSourceManager/src/V1/resources/secure_source_manager_rest_client_config.php b/SecureSourceManager/src/V1/resources/secure_source_manager_rest_client_config.php index 2e0089dc7db1..75f081095832 100644 --- a/SecureSourceManager/src/V1/resources/secure_source_manager_rest_client_config.php +++ b/SecureSourceManager/src/V1/resources/secure_source_manager_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SecurityCenter/src/V1/resources/security_center_descriptor_config.php b/SecurityCenter/src/V1/resources/security_center_descriptor_config.php index 9d2bb302b009..cff968ca4ca3 100644 --- a/SecurityCenter/src/V1/resources/security_center_descriptor_config.php +++ b/SecurityCenter/src/V1/resources/security_center_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SecurityCenter/src/V1/resources/security_center_rest_client_config.php b/SecurityCenter/src/V1/resources/security_center_rest_client_config.php index 298fac30f6cf..4968eb9f6970 100644 --- a/SecurityCenter/src/V1/resources/security_center_rest_client_config.php +++ b/SecurityCenter/src/V1/resources/security_center_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SecurityCenter/src/V1p1beta1/resources/security_center_descriptor_config.php b/SecurityCenter/src/V1p1beta1/resources/security_center_descriptor_config.php index 226c4dc027e9..877a336a214e 100644 --- a/SecurityCenter/src/V1p1beta1/resources/security_center_descriptor_config.php +++ b/SecurityCenter/src/V1p1beta1/resources/security_center_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SecurityCenter/src/V1p1beta1/resources/security_center_rest_client_config.php b/SecurityCenter/src/V1p1beta1/resources/security_center_rest_client_config.php index f6c1499e95f3..13e18b62b348 100644 --- a/SecurityCenter/src/V1p1beta1/resources/security_center_rest_client_config.php +++ b/SecurityCenter/src/V1p1beta1/resources/security_center_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SecurityCenter/src/V2/resources/security_center_descriptor_config.php b/SecurityCenter/src/V2/resources/security_center_descriptor_config.php index ed3d1d8ea6f8..c6c32ab3fce2 100644 --- a/SecurityCenter/src/V2/resources/security_center_descriptor_config.php +++ b/SecurityCenter/src/V2/resources/security_center_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SecurityCenter/src/V2/resources/security_center_rest_client_config.php b/SecurityCenter/src/V2/resources/security_center_rest_client_config.php index 92aa6cfa62dc..61e7d9d2b9db 100644 --- a/SecurityCenter/src/V2/resources/security_center_rest_client_config.php +++ b/SecurityCenter/src/V2/resources/security_center_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SecurityCenterManagement/src/V1/resources/security_center_management_descriptor_config.php b/SecurityCenterManagement/src/V1/resources/security_center_management_descriptor_config.php index c860c72e76f8..1e8bae692e00 100644 --- a/SecurityCenterManagement/src/V1/resources/security_center_management_descriptor_config.php +++ b/SecurityCenterManagement/src/V1/resources/security_center_management_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SecurityCenterManagement/src/V1/resources/security_center_management_rest_client_config.php b/SecurityCenterManagement/src/V1/resources/security_center_management_rest_client_config.php index 594cfa4bfafc..a3546e1c6148 100644 --- a/SecurityCenterManagement/src/V1/resources/security_center_management_rest_client_config.php +++ b/SecurityCenterManagement/src/V1/resources/security_center_management_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SecurityPrivateCa/src/V1/resources/certificate_authority_service_descriptor_config.php b/SecurityPrivateCa/src/V1/resources/certificate_authority_service_descriptor_config.php index 8b4afcefef56..5ec63ea4548a 100644 --- a/SecurityPrivateCa/src/V1/resources/certificate_authority_service_descriptor_config.php +++ b/SecurityPrivateCa/src/V1/resources/certificate_authority_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SecurityPrivateCa/src/V1/resources/certificate_authority_service_rest_client_config.php b/SecurityPrivateCa/src/V1/resources/certificate_authority_service_rest_client_config.php index 077088f24e8b..ba587d29a73a 100644 --- a/SecurityPrivateCa/src/V1/resources/certificate_authority_service_rest_client_config.php +++ b/SecurityPrivateCa/src/V1/resources/certificate_authority_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SecurityPrivateCa/src/V1beta1/resources/certificate_authority_service_descriptor_config.php b/SecurityPrivateCa/src/V1beta1/resources/certificate_authority_service_descriptor_config.php index c02e013c3b74..3c0d53b87ce6 100644 --- a/SecurityPrivateCa/src/V1beta1/resources/certificate_authority_service_descriptor_config.php +++ b/SecurityPrivateCa/src/V1beta1/resources/certificate_authority_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SecurityPrivateCa/src/V1beta1/resources/certificate_authority_service_rest_client_config.php b/SecurityPrivateCa/src/V1beta1/resources/certificate_authority_service_rest_client_config.php index 301c541a136c..3741f603234e 100644 --- a/SecurityPrivateCa/src/V1beta1/resources/certificate_authority_service_rest_client_config.php +++ b/SecurityPrivateCa/src/V1beta1/resources/certificate_authority_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SecurityPublicCA/src/V1beta1/resources/public_certificate_authority_service_descriptor_config.php b/SecurityPublicCA/src/V1beta1/resources/public_certificate_authority_service_descriptor_config.php index 5f6ea79e4908..9b38b36ef7f4 100644 --- a/SecurityPublicCA/src/V1beta1/resources/public_certificate_authority_service_descriptor_config.php +++ b/SecurityPublicCA/src/V1beta1/resources/public_certificate_authority_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SecurityPublicCA/src/V1beta1/resources/public_certificate_authority_service_rest_client_config.php b/SecurityPublicCA/src/V1beta1/resources/public_certificate_authority_service_rest_client_config.php index 86e8d47a0f78..8ccd467556ca 100644 --- a/SecurityPublicCA/src/V1beta1/resources/public_certificate_authority_service_rest_client_config.php +++ b/SecurityPublicCA/src/V1beta1/resources/public_certificate_authority_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ServiceControl/src/V1/resources/quota_controller_descriptor_config.php b/ServiceControl/src/V1/resources/quota_controller_descriptor_config.php index da37c483e952..eb36eb76df70 100644 --- a/ServiceControl/src/V1/resources/quota_controller_descriptor_config.php +++ b/ServiceControl/src/V1/resources/quota_controller_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ServiceControl/src/V1/resources/quota_controller_rest_client_config.php b/ServiceControl/src/V1/resources/quota_controller_rest_client_config.php index 7a1af7084110..7540461109e7 100644 --- a/ServiceControl/src/V1/resources/quota_controller_rest_client_config.php +++ b/ServiceControl/src/V1/resources/quota_controller_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ServiceControl/src/V1/resources/service_controller_descriptor_config.php b/ServiceControl/src/V1/resources/service_controller_descriptor_config.php index 5b8c75ce90c5..6808a2c120b7 100644 --- a/ServiceControl/src/V1/resources/service_controller_descriptor_config.php +++ b/ServiceControl/src/V1/resources/service_controller_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ServiceControl/src/V1/resources/service_controller_rest_client_config.php b/ServiceControl/src/V1/resources/service_controller_rest_client_config.php index 8c6198bfcead..19e0f2520b57 100644 --- a/ServiceControl/src/V1/resources/service_controller_rest_client_config.php +++ b/ServiceControl/src/V1/resources/service_controller_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ServiceDirectory/src/V1/resources/lookup_service_descriptor_config.php b/ServiceDirectory/src/V1/resources/lookup_service_descriptor_config.php index cd70e2e27a6c..d7e0fd0f1019 100644 --- a/ServiceDirectory/src/V1/resources/lookup_service_descriptor_config.php +++ b/ServiceDirectory/src/V1/resources/lookup_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ServiceDirectory/src/V1/resources/lookup_service_rest_client_config.php b/ServiceDirectory/src/V1/resources/lookup_service_rest_client_config.php index d4b279dd3b5d..e9a229e89a76 100644 --- a/ServiceDirectory/src/V1/resources/lookup_service_rest_client_config.php +++ b/ServiceDirectory/src/V1/resources/lookup_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ServiceDirectory/src/V1/resources/registration_service_descriptor_config.php b/ServiceDirectory/src/V1/resources/registration_service_descriptor_config.php index 860ab2d79c1a..bbf3b9e95fef 100644 --- a/ServiceDirectory/src/V1/resources/registration_service_descriptor_config.php +++ b/ServiceDirectory/src/V1/resources/registration_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ServiceDirectory/src/V1/resources/registration_service_rest_client_config.php b/ServiceDirectory/src/V1/resources/registration_service_rest_client_config.php index 9d81e0c9fc07..775af6255c9e 100644 --- a/ServiceDirectory/src/V1/resources/registration_service_rest_client_config.php +++ b/ServiceDirectory/src/V1/resources/registration_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ServiceDirectory/src/V1beta1/resources/lookup_service_descriptor_config.php b/ServiceDirectory/src/V1beta1/resources/lookup_service_descriptor_config.php index 893e28dc2e34..1ca3b04df82e 100644 --- a/ServiceDirectory/src/V1beta1/resources/lookup_service_descriptor_config.php +++ b/ServiceDirectory/src/V1beta1/resources/lookup_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ServiceDirectory/src/V1beta1/resources/lookup_service_rest_client_config.php b/ServiceDirectory/src/V1beta1/resources/lookup_service_rest_client_config.php index c72aa8fc1ef4..ffb58f08cec4 100644 --- a/ServiceDirectory/src/V1beta1/resources/lookup_service_rest_client_config.php +++ b/ServiceDirectory/src/V1beta1/resources/lookup_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ServiceDirectory/src/V1beta1/resources/registration_service_descriptor_config.php b/ServiceDirectory/src/V1beta1/resources/registration_service_descriptor_config.php index 57d31357db07..2386b43b52fe 100644 --- a/ServiceDirectory/src/V1beta1/resources/registration_service_descriptor_config.php +++ b/ServiceDirectory/src/V1beta1/resources/registration_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ServiceDirectory/src/V1beta1/resources/registration_service_rest_client_config.php b/ServiceDirectory/src/V1beta1/resources/registration_service_rest_client_config.php index d9a4440f356b..7943d7c78f14 100644 --- a/ServiceDirectory/src/V1beta1/resources/registration_service_rest_client_config.php +++ b/ServiceDirectory/src/V1beta1/resources/registration_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ServiceHealth/src/V1/resources/service_health_descriptor_config.php b/ServiceHealth/src/V1/resources/service_health_descriptor_config.php index 16625345b20e..8fe43a3ff078 100644 --- a/ServiceHealth/src/V1/resources/service_health_descriptor_config.php +++ b/ServiceHealth/src/V1/resources/service_health_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ServiceHealth/src/V1/resources/service_health_rest_client_config.php b/ServiceHealth/src/V1/resources/service_health_rest_client_config.php index a7b8255058af..536ed3492f3d 100644 --- a/ServiceHealth/src/V1/resources/service_health_rest_client_config.php +++ b/ServiceHealth/src/V1/resources/service_health_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ServiceManagement/src/V1/resources/service_manager_descriptor_config.php b/ServiceManagement/src/V1/resources/service_manager_descriptor_config.php index 6255ffb8b7d2..00d6c1150024 100644 --- a/ServiceManagement/src/V1/resources/service_manager_descriptor_config.php +++ b/ServiceManagement/src/V1/resources/service_manager_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ServiceManagement/src/V1/resources/service_manager_rest_client_config.php b/ServiceManagement/src/V1/resources/service_manager_rest_client_config.php index 8ed98eba6d13..faf04115ebb5 100644 --- a/ServiceManagement/src/V1/resources/service_manager_rest_client_config.php +++ b/ServiceManagement/src/V1/resources/service_manager_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ServiceUsage/metadata/V1/Serviceusage.php b/ServiceUsage/metadata/V1/Serviceusage.php index e72dd380b08e72439c454c4aa90122896a6eb83f..a9000aa9ce5734dfd633b54392a6df77ff87a0d5 100644 GIT binary patch delta 81 zcmV-X0IvV59IG6#hzJMDK`IIrMQ)RO2_}<>2rHA|2xkMzK`WCU1sRi%2@(i`)8vx^ nCL$q|kO&$IWNC9@Vr*qP0V=bh3624iUkfvnFAFfUk_(vvPBt1^ delta 112 zcmZ22vsz|D2M0&f [ diff --git a/ServiceUsage/src/V1/resources/service_usage_rest_client_config.php b/ServiceUsage/src/V1/resources/service_usage_rest_client_config.php index 6037b9a44c2f..45f4f2d36a0a 100644 --- a/ServiceUsage/src/V1/resources/service_usage_rest_client_config.php +++ b/ServiceUsage/src/V1/resources/service_usage_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Shell/src/V1/resources/cloud_shell_service_descriptor_config.php b/Shell/src/V1/resources/cloud_shell_service_descriptor_config.php index 10007e238408..daf03beb05dc 100644 --- a/Shell/src/V1/resources/cloud_shell_service_descriptor_config.php +++ b/Shell/src/V1/resources/cloud_shell_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Shell/src/V1/resources/cloud_shell_service_rest_client_config.php b/Shell/src/V1/resources/cloud_shell_service_rest_client_config.php index ca891cd92732..431c041b0b1e 100644 --- a/Shell/src/V1/resources/cloud_shell_service_rest_client_config.php +++ b/Shell/src/V1/resources/cloud_shell_service_rest_client_config.php @@ -1,4 +1,24 @@ [ From df4b7bb32f3f45976b503bea60657a6fc15e580b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 09:11:54 -0700 Subject: [PATCH 35/86] chore: add license and generated code headers to generated resource files (#7229) PiperOrigin-RevId: 624277410 Source-Link: https://github.com/googleapis/googleapis/commit/2d881be8c566e4c374061248dd205efd72b7ef4f Source-Link: https://github.com/googleapis/googleapis-gen/commit/1d063f9353aeffb9a968f1a00f1d105b0c14a42d Copy-Tag: eyJwIjoiR2tlQ29ubmVjdEdhdGV3YXkvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiR2tlSHViLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiR2tlTXVsdGlDbG91ZC8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiR3JhZmVhcy8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiSWFtLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiSWFtQ3JlZGVudGlhbHMvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiSWFwLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiSWRzLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiSW90Ly5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiS21zLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiS21zSW52ZW50b3J5Ly5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiTGFuZ3VhZ2UvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiTGlmZVNjaWVuY2VzLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiTG9nZ2luZy8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiTG9uZ1J1bm5pbmcvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiTWFuYWdlZElkZW50aXRpZXMvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiTWVkaWFUcmFuc2xhdGlvbi8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiTWVtY2FjaGUvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiTWlncmF0aW9uQ2VudGVyLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiTmV0QXBwLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= --- .../gateway_service_descriptor_config.php | 20 +++++++++++++++++++ .../gateway_service_rest_client_config.php | 20 +++++++++++++++++++ .../resources/gke_hub_descriptor_config.php | 20 +++++++++++++++++++ .../resources/gke_hub_rest_client_config.php | 20 +++++++++++++++++++ ...b_membership_service_descriptor_config.php | 20 +++++++++++++++++++ ..._membership_service_rest_client_config.php | 20 +++++++++++++++++++ .../attached_clusters_descriptor_config.php | 20 +++++++++++++++++++ .../attached_clusters_rest_client_config.php | 20 +++++++++++++++++++ .../aws_clusters_descriptor_config.php | 20 +++++++++++++++++++ .../aws_clusters_rest_client_config.php | 20 +++++++++++++++++++ .../azure_clusters_descriptor_config.php | 20 +++++++++++++++++++ .../azure_clusters_rest_client_config.php | 20 +++++++++++++++++++ .../resources/grafeas_descriptor_config.php | 20 +++++++++++++++++++ .../resources/grafeas_rest_client_config.php | 20 +++++++++++++++++++ .../resources/policies_descriptor_config.php | 20 +++++++++++++++++++ .../resources/policies_rest_client_config.php | 20 +++++++++++++++++++ .../iam_credentials_descriptor_config.php | 20 +++++++++++++++++++ .../iam_credentials_rest_client_config.php | 20 +++++++++++++++++++ ..._proxy_admin_service_descriptor_config.php | 20 +++++++++++++++++++ ...proxy_admin_service_rest_client_config.php | 20 +++++++++++++++++++ ...proxy_o_auth_service_descriptor_config.php | 20 +++++++++++++++++++ ...roxy_o_auth_service_rest_client_config.php | 20 +++++++++++++++++++ .../V1/resources/ids_descriptor_config.php | 20 +++++++++++++++++++ .../V1/resources/ids_rest_client_config.php | 20 +++++++++++++++++++ .../device_manager_descriptor_config.php | 20 +++++++++++++++++++ .../device_manager_rest_client_config.php | 20 +++++++++++++++++++ .../ekm_service_descriptor_config.php | 20 +++++++++++++++++++ .../ekm_service_rest_client_config.php | 20 +++++++++++++++++++ ...y_management_service_descriptor_config.php | 20 +++++++++++++++++++ ..._management_service_rest_client_config.php | 20 +++++++++++++++++++ ...ey_dashboard_service_descriptor_config.php | 20 +++++++++++++++++++ ...y_dashboard_service_rest_client_config.php | 20 +++++++++++++++++++ ...key_tracking_service_descriptor_config.php | 20 +++++++++++++++++++ ...ey_tracking_service_rest_client_config.php | 20 +++++++++++++++++++ .../language_service_descriptor_config.php | 20 +++++++++++++++++++ .../language_service_rest_client_config.php | 20 +++++++++++++++++++ .../language_service_descriptor_config.php | 20 +++++++++++++++++++ .../language_service_rest_client_config.php | 20 +++++++++++++++++++ .../language_service_descriptor_config.php | 20 +++++++++++++++++++ .../language_service_rest_client_config.php | 20 +++++++++++++++++++ ...lows_service_v2_beta_descriptor_config.php | 20 +++++++++++++++++++ ...ows_service_v2_beta_rest_client_config.php | 20 +++++++++++++++++++ .../config_service_v2_descriptor_config.php | 20 +++++++++++++++++++ .../config_service_v2_rest_client_config.php | 20 +++++++++++++++++++ .../logging_service_v2_descriptor_config.php | 20 +++++++++++++++++++ .../logging_service_v2_rest_client_config.php | 20 +++++++++++++++++++ .../metrics_service_v2_descriptor_config.php | 20 +++++++++++++++++++ .../metrics_service_v2_rest_client_config.php | 20 +++++++++++++++++++ .../operations_descriptor_config.php | 20 +++++++++++++++++++ .../operations_rest_client_config.php | 20 +++++++++++++++++++ ...d_identities_service_descriptor_config.php | 20 +++++++++++++++++++ ..._identities_service_rest_client_config.php | 20 +++++++++++++++++++ ...d_identities_service_descriptor_config.php | 20 +++++++++++++++++++ ..._identities_service_rest_client_config.php | 20 +++++++++++++++++++ ..._translation_service_descriptor_config.php | 20 +++++++++++++++++++ ...translation_service_rest_client_config.php | 20 +++++++++++++++++++ .../cloud_memcache_descriptor_config.php | 20 +++++++++++++++++++ .../cloud_memcache_rest_client_config.php | 20 +++++++++++++++++++ .../cloud_memcache_descriptor_config.php | 20 +++++++++++++++++++ .../cloud_memcache_rest_client_config.php | 20 +++++++++++++++++++ .../migration_center_descriptor_config.php | 20 +++++++++++++++++++ .../migration_center_rest_client_config.php | 20 +++++++++++++++++++ .../resources/net_app_descriptor_config.php | 20 +++++++++++++++++++ .../resources/net_app_rest_client_config.php | 20 +++++++++++++++++++ 64 files changed, 1280 insertions(+) diff --git a/GkeConnectGateway/src/V1beta1/resources/gateway_service_descriptor_config.php b/GkeConnectGateway/src/V1beta1/resources/gateway_service_descriptor_config.php index a73fa9d2cad9..22a649faec87 100644 --- a/GkeConnectGateway/src/V1beta1/resources/gateway_service_descriptor_config.php +++ b/GkeConnectGateway/src/V1beta1/resources/gateway_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/GkeConnectGateway/src/V1beta1/resources/gateway_service_rest_client_config.php b/GkeConnectGateway/src/V1beta1/resources/gateway_service_rest_client_config.php index ebf22f1abe05..5794acf31f5d 100644 --- a/GkeConnectGateway/src/V1beta1/resources/gateway_service_rest_client_config.php +++ b/GkeConnectGateway/src/V1beta1/resources/gateway_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/GkeHub/src/V1/resources/gke_hub_descriptor_config.php b/GkeHub/src/V1/resources/gke_hub_descriptor_config.php index a7466d795788..490753e5428b 100644 --- a/GkeHub/src/V1/resources/gke_hub_descriptor_config.php +++ b/GkeHub/src/V1/resources/gke_hub_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/GkeHub/src/V1/resources/gke_hub_rest_client_config.php b/GkeHub/src/V1/resources/gke_hub_rest_client_config.php index da0240b0869d..3b91c2de285d 100644 --- a/GkeHub/src/V1/resources/gke_hub_rest_client_config.php +++ b/GkeHub/src/V1/resources/gke_hub_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/GkeHub/src/V1beta1/resources/gke_hub_membership_service_descriptor_config.php b/GkeHub/src/V1beta1/resources/gke_hub_membership_service_descriptor_config.php index 3ad23cc77366..627541c9f8ea 100644 --- a/GkeHub/src/V1beta1/resources/gke_hub_membership_service_descriptor_config.php +++ b/GkeHub/src/V1beta1/resources/gke_hub_membership_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/GkeHub/src/V1beta1/resources/gke_hub_membership_service_rest_client_config.php b/GkeHub/src/V1beta1/resources/gke_hub_membership_service_rest_client_config.php index 837fb971ce08..0ee7dfdd5677 100644 --- a/GkeHub/src/V1beta1/resources/gke_hub_membership_service_rest_client_config.php +++ b/GkeHub/src/V1beta1/resources/gke_hub_membership_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/GkeMultiCloud/src/V1/resources/attached_clusters_descriptor_config.php b/GkeMultiCloud/src/V1/resources/attached_clusters_descriptor_config.php index a128879d6ff7..885a056af3ed 100644 --- a/GkeMultiCloud/src/V1/resources/attached_clusters_descriptor_config.php +++ b/GkeMultiCloud/src/V1/resources/attached_clusters_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/GkeMultiCloud/src/V1/resources/attached_clusters_rest_client_config.php b/GkeMultiCloud/src/V1/resources/attached_clusters_rest_client_config.php index 364619157fb7..417a9fc013cb 100644 --- a/GkeMultiCloud/src/V1/resources/attached_clusters_rest_client_config.php +++ b/GkeMultiCloud/src/V1/resources/attached_clusters_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/GkeMultiCloud/src/V1/resources/aws_clusters_descriptor_config.php b/GkeMultiCloud/src/V1/resources/aws_clusters_descriptor_config.php index 03604870910b..a171b39f6a19 100644 --- a/GkeMultiCloud/src/V1/resources/aws_clusters_descriptor_config.php +++ b/GkeMultiCloud/src/V1/resources/aws_clusters_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/GkeMultiCloud/src/V1/resources/aws_clusters_rest_client_config.php b/GkeMultiCloud/src/V1/resources/aws_clusters_rest_client_config.php index 282fd1407fc1..77f73b4d1ef6 100644 --- a/GkeMultiCloud/src/V1/resources/aws_clusters_rest_client_config.php +++ b/GkeMultiCloud/src/V1/resources/aws_clusters_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/GkeMultiCloud/src/V1/resources/azure_clusters_descriptor_config.php b/GkeMultiCloud/src/V1/resources/azure_clusters_descriptor_config.php index e50260fa88ca..60c660c2ae54 100644 --- a/GkeMultiCloud/src/V1/resources/azure_clusters_descriptor_config.php +++ b/GkeMultiCloud/src/V1/resources/azure_clusters_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/GkeMultiCloud/src/V1/resources/azure_clusters_rest_client_config.php b/GkeMultiCloud/src/V1/resources/azure_clusters_rest_client_config.php index 69cbb41b0927..73a101620a07 100644 --- a/GkeMultiCloud/src/V1/resources/azure_clusters_rest_client_config.php +++ b/GkeMultiCloud/src/V1/resources/azure_clusters_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Grafeas/src/V1/resources/grafeas_descriptor_config.php b/Grafeas/src/V1/resources/grafeas_descriptor_config.php index 369d068e7af9..af5136b942c8 100644 --- a/Grafeas/src/V1/resources/grafeas_descriptor_config.php +++ b/Grafeas/src/V1/resources/grafeas_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Grafeas/src/V1/resources/grafeas_rest_client_config.php b/Grafeas/src/V1/resources/grafeas_rest_client_config.php index 89aefc3cf807..887e6505cfe3 100644 --- a/Grafeas/src/V1/resources/grafeas_rest_client_config.php +++ b/Grafeas/src/V1/resources/grafeas_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Iam/src/V2/resources/policies_descriptor_config.php b/Iam/src/V2/resources/policies_descriptor_config.php index 35249a924525..e42aa7f01836 100644 --- a/Iam/src/V2/resources/policies_descriptor_config.php +++ b/Iam/src/V2/resources/policies_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Iam/src/V2/resources/policies_rest_client_config.php b/Iam/src/V2/resources/policies_rest_client_config.php index 37374681f440..68eb8b51b229 100644 --- a/Iam/src/V2/resources/policies_rest_client_config.php +++ b/Iam/src/V2/resources/policies_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/IamCredentials/src/V1/resources/iam_credentials_descriptor_config.php b/IamCredentials/src/V1/resources/iam_credentials_descriptor_config.php index 3b52d014d99f..66b7383f2c8b 100644 --- a/IamCredentials/src/V1/resources/iam_credentials_descriptor_config.php +++ b/IamCredentials/src/V1/resources/iam_credentials_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/IamCredentials/src/V1/resources/iam_credentials_rest_client_config.php b/IamCredentials/src/V1/resources/iam_credentials_rest_client_config.php index e4c5263da78c..f857a1d60dd3 100644 --- a/IamCredentials/src/V1/resources/iam_credentials_rest_client_config.php +++ b/IamCredentials/src/V1/resources/iam_credentials_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Iap/src/V1/resources/identity_aware_proxy_admin_service_descriptor_config.php b/Iap/src/V1/resources/identity_aware_proxy_admin_service_descriptor_config.php index 4f03f0a71ee3..cbe96ef6c7a4 100644 --- a/Iap/src/V1/resources/identity_aware_proxy_admin_service_descriptor_config.php +++ b/Iap/src/V1/resources/identity_aware_proxy_admin_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Iap/src/V1/resources/identity_aware_proxy_admin_service_rest_client_config.php b/Iap/src/V1/resources/identity_aware_proxy_admin_service_rest_client_config.php index c49e6cb53acc..023bff66e5d6 100644 --- a/Iap/src/V1/resources/identity_aware_proxy_admin_service_rest_client_config.php +++ b/Iap/src/V1/resources/identity_aware_proxy_admin_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Iap/src/V1/resources/identity_aware_proxy_o_auth_service_descriptor_config.php b/Iap/src/V1/resources/identity_aware_proxy_o_auth_service_descriptor_config.php index 883f5deac9fb..f745af37b455 100644 --- a/Iap/src/V1/resources/identity_aware_proxy_o_auth_service_descriptor_config.php +++ b/Iap/src/V1/resources/identity_aware_proxy_o_auth_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Iap/src/V1/resources/identity_aware_proxy_o_auth_service_rest_client_config.php b/Iap/src/V1/resources/identity_aware_proxy_o_auth_service_rest_client_config.php index 0e5faa00e399..45a273f7fe9e 100644 --- a/Iap/src/V1/resources/identity_aware_proxy_o_auth_service_rest_client_config.php +++ b/Iap/src/V1/resources/identity_aware_proxy_o_auth_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Ids/src/V1/resources/ids_descriptor_config.php b/Ids/src/V1/resources/ids_descriptor_config.php index d5d1d3ca9a98..e93f62df9064 100644 --- a/Ids/src/V1/resources/ids_descriptor_config.php +++ b/Ids/src/V1/resources/ids_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Ids/src/V1/resources/ids_rest_client_config.php b/Ids/src/V1/resources/ids_rest_client_config.php index e81293b497d7..52814abdc81a 100644 --- a/Ids/src/V1/resources/ids_rest_client_config.php +++ b/Ids/src/V1/resources/ids_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Iot/src/V1/resources/device_manager_descriptor_config.php b/Iot/src/V1/resources/device_manager_descriptor_config.php index a4a3bff9b2ee..d2c0129adef8 100644 --- a/Iot/src/V1/resources/device_manager_descriptor_config.php +++ b/Iot/src/V1/resources/device_manager_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Iot/src/V1/resources/device_manager_rest_client_config.php b/Iot/src/V1/resources/device_manager_rest_client_config.php index dbf0bf784afc..f371095d4020 100644 --- a/Iot/src/V1/resources/device_manager_rest_client_config.php +++ b/Iot/src/V1/resources/device_manager_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Kms/src/V1/resources/ekm_service_descriptor_config.php b/Kms/src/V1/resources/ekm_service_descriptor_config.php index 7d0e379e325d..bb7c6839d8fa 100644 --- a/Kms/src/V1/resources/ekm_service_descriptor_config.php +++ b/Kms/src/V1/resources/ekm_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Kms/src/V1/resources/ekm_service_rest_client_config.php b/Kms/src/V1/resources/ekm_service_rest_client_config.php index 9e03659edb79..d727cf9dbad7 100644 --- a/Kms/src/V1/resources/ekm_service_rest_client_config.php +++ b/Kms/src/V1/resources/ekm_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Kms/src/V1/resources/key_management_service_descriptor_config.php b/Kms/src/V1/resources/key_management_service_descriptor_config.php index c4d66b6a99d1..841c9a29088a 100644 --- a/Kms/src/V1/resources/key_management_service_descriptor_config.php +++ b/Kms/src/V1/resources/key_management_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Kms/src/V1/resources/key_management_service_rest_client_config.php b/Kms/src/V1/resources/key_management_service_rest_client_config.php index bc3d10d057dc..fb7c434b4e71 100644 --- a/Kms/src/V1/resources/key_management_service_rest_client_config.php +++ b/Kms/src/V1/resources/key_management_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/KmsInventory/src/V1/resources/key_dashboard_service_descriptor_config.php b/KmsInventory/src/V1/resources/key_dashboard_service_descriptor_config.php index ffe421a44094..895a524b43fa 100644 --- a/KmsInventory/src/V1/resources/key_dashboard_service_descriptor_config.php +++ b/KmsInventory/src/V1/resources/key_dashboard_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/KmsInventory/src/V1/resources/key_dashboard_service_rest_client_config.php b/KmsInventory/src/V1/resources/key_dashboard_service_rest_client_config.php index 274fe7cfe3c4..f6923d447c85 100644 --- a/KmsInventory/src/V1/resources/key_dashboard_service_rest_client_config.php +++ b/KmsInventory/src/V1/resources/key_dashboard_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/KmsInventory/src/V1/resources/key_tracking_service_descriptor_config.php b/KmsInventory/src/V1/resources/key_tracking_service_descriptor_config.php index 307849943e35..7eff8a30e2e8 100644 --- a/KmsInventory/src/V1/resources/key_tracking_service_descriptor_config.php +++ b/KmsInventory/src/V1/resources/key_tracking_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/KmsInventory/src/V1/resources/key_tracking_service_rest_client_config.php b/KmsInventory/src/V1/resources/key_tracking_service_rest_client_config.php index 08261eceedea..3ab9ce3b17fc 100644 --- a/KmsInventory/src/V1/resources/key_tracking_service_rest_client_config.php +++ b/KmsInventory/src/V1/resources/key_tracking_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Language/src/V1/resources/language_service_descriptor_config.php b/Language/src/V1/resources/language_service_descriptor_config.php index 155b021580c4..4a7cca2c9d02 100644 --- a/Language/src/V1/resources/language_service_descriptor_config.php +++ b/Language/src/V1/resources/language_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Language/src/V1/resources/language_service_rest_client_config.php b/Language/src/V1/resources/language_service_rest_client_config.php index 6c0108749840..e616a1719cce 100644 --- a/Language/src/V1/resources/language_service_rest_client_config.php +++ b/Language/src/V1/resources/language_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Language/src/V1beta2/resources/language_service_descriptor_config.php b/Language/src/V1beta2/resources/language_service_descriptor_config.php index a500b8723972..748ed652ec98 100644 --- a/Language/src/V1beta2/resources/language_service_descriptor_config.php +++ b/Language/src/V1beta2/resources/language_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Language/src/V1beta2/resources/language_service_rest_client_config.php b/Language/src/V1beta2/resources/language_service_rest_client_config.php index c46ae3ca3960..99ccfe4ee080 100644 --- a/Language/src/V1beta2/resources/language_service_rest_client_config.php +++ b/Language/src/V1beta2/resources/language_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Language/src/V2/resources/language_service_descriptor_config.php b/Language/src/V2/resources/language_service_descriptor_config.php index a89fa3964c09..30d7f3e157c9 100644 --- a/Language/src/V2/resources/language_service_descriptor_config.php +++ b/Language/src/V2/resources/language_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Language/src/V2/resources/language_service_rest_client_config.php b/Language/src/V2/resources/language_service_rest_client_config.php index 6331e33c260c..fefa2cfbac7c 100644 --- a/Language/src/V2/resources/language_service_rest_client_config.php +++ b/Language/src/V2/resources/language_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/LifeSciences/src/V2beta/resources/workflows_service_v2_beta_descriptor_config.php b/LifeSciences/src/V2beta/resources/workflows_service_v2_beta_descriptor_config.php index df31f6c5de57..79e5514c9311 100644 --- a/LifeSciences/src/V2beta/resources/workflows_service_v2_beta_descriptor_config.php +++ b/LifeSciences/src/V2beta/resources/workflows_service_v2_beta_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/LifeSciences/src/V2beta/resources/workflows_service_v2_beta_rest_client_config.php b/LifeSciences/src/V2beta/resources/workflows_service_v2_beta_rest_client_config.php index b41759c0aab6..1d308717cd6c 100644 --- a/LifeSciences/src/V2beta/resources/workflows_service_v2_beta_rest_client_config.php +++ b/LifeSciences/src/V2beta/resources/workflows_service_v2_beta_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Logging/src/V2/resources/config_service_v2_descriptor_config.php b/Logging/src/V2/resources/config_service_v2_descriptor_config.php index ecbb5531cf5f..a9ca981d5c1a 100644 --- a/Logging/src/V2/resources/config_service_v2_descriptor_config.php +++ b/Logging/src/V2/resources/config_service_v2_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Logging/src/V2/resources/config_service_v2_rest_client_config.php b/Logging/src/V2/resources/config_service_v2_rest_client_config.php index dac023f81c6c..9e22a4861b9a 100644 --- a/Logging/src/V2/resources/config_service_v2_rest_client_config.php +++ b/Logging/src/V2/resources/config_service_v2_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Logging/src/V2/resources/logging_service_v2_descriptor_config.php b/Logging/src/V2/resources/logging_service_v2_descriptor_config.php index b80f45fbed1a..3505083acc20 100644 --- a/Logging/src/V2/resources/logging_service_v2_descriptor_config.php +++ b/Logging/src/V2/resources/logging_service_v2_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Logging/src/V2/resources/logging_service_v2_rest_client_config.php b/Logging/src/V2/resources/logging_service_v2_rest_client_config.php index 00e4c2f5ffa8..68c4b1500604 100644 --- a/Logging/src/V2/resources/logging_service_v2_rest_client_config.php +++ b/Logging/src/V2/resources/logging_service_v2_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Logging/src/V2/resources/metrics_service_v2_descriptor_config.php b/Logging/src/V2/resources/metrics_service_v2_descriptor_config.php index 909fbbd14e28..8cb36fbdccff 100644 --- a/Logging/src/V2/resources/metrics_service_v2_descriptor_config.php +++ b/Logging/src/V2/resources/metrics_service_v2_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Logging/src/V2/resources/metrics_service_v2_rest_client_config.php b/Logging/src/V2/resources/metrics_service_v2_rest_client_config.php index 9d07868f5bec..51a3c52919a0 100644 --- a/Logging/src/V2/resources/metrics_service_v2_rest_client_config.php +++ b/Logging/src/V2/resources/metrics_service_v2_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/LongRunning/src/LongRunning/resources/operations_descriptor_config.php b/LongRunning/src/LongRunning/resources/operations_descriptor_config.php index d46a3426ef91..a577192a83e7 100644 --- a/LongRunning/src/LongRunning/resources/operations_descriptor_config.php +++ b/LongRunning/src/LongRunning/resources/operations_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/LongRunning/src/LongRunning/resources/operations_rest_client_config.php b/LongRunning/src/LongRunning/resources/operations_rest_client_config.php index fe4811c4f752..dfdf3c103851 100644 --- a/LongRunning/src/LongRunning/resources/operations_rest_client_config.php +++ b/LongRunning/src/LongRunning/resources/operations_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ManagedIdentities/src/V1/resources/managed_identities_service_descriptor_config.php b/ManagedIdentities/src/V1/resources/managed_identities_service_descriptor_config.php index ade23ee2b66a..f5f9c7931585 100644 --- a/ManagedIdentities/src/V1/resources/managed_identities_service_descriptor_config.php +++ b/ManagedIdentities/src/V1/resources/managed_identities_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ManagedIdentities/src/V1/resources/managed_identities_service_rest_client_config.php b/ManagedIdentities/src/V1/resources/managed_identities_service_rest_client_config.php index 686858d806ee..5a26dbcf0866 100644 --- a/ManagedIdentities/src/V1/resources/managed_identities_service_rest_client_config.php +++ b/ManagedIdentities/src/V1/resources/managed_identities_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ManagedIdentities/src/V1beta1/resources/managed_identities_service_descriptor_config.php b/ManagedIdentities/src/V1beta1/resources/managed_identities_service_descriptor_config.php index 61902e5157b4..11dd1b5af54b 100644 --- a/ManagedIdentities/src/V1beta1/resources/managed_identities_service_descriptor_config.php +++ b/ManagedIdentities/src/V1beta1/resources/managed_identities_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ManagedIdentities/src/V1beta1/resources/managed_identities_service_rest_client_config.php b/ManagedIdentities/src/V1beta1/resources/managed_identities_service_rest_client_config.php index 4d195a123f8f..27b32f685b73 100644 --- a/ManagedIdentities/src/V1beta1/resources/managed_identities_service_rest_client_config.php +++ b/ManagedIdentities/src/V1beta1/resources/managed_identities_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/MediaTranslation/src/V1beta1/resources/speech_translation_service_descriptor_config.php b/MediaTranslation/src/V1beta1/resources/speech_translation_service_descriptor_config.php index 6e9855e29875..d869e566673a 100644 --- a/MediaTranslation/src/V1beta1/resources/speech_translation_service_descriptor_config.php +++ b/MediaTranslation/src/V1beta1/resources/speech_translation_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/MediaTranslation/src/V1beta1/resources/speech_translation_service_rest_client_config.php b/MediaTranslation/src/V1beta1/resources/speech_translation_service_rest_client_config.php index 180f8ce91961..b33f57959be3 100644 --- a/MediaTranslation/src/V1beta1/resources/speech_translation_service_rest_client_config.php +++ b/MediaTranslation/src/V1beta1/resources/speech_translation_service_rest_client_config.php @@ -1,4 +1,24 @@ [], diff --git a/Memcache/src/V1/resources/cloud_memcache_descriptor_config.php b/Memcache/src/V1/resources/cloud_memcache_descriptor_config.php index 98f3ee97c465..97d3dc1ba57d 100644 --- a/Memcache/src/V1/resources/cloud_memcache_descriptor_config.php +++ b/Memcache/src/V1/resources/cloud_memcache_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Memcache/src/V1/resources/cloud_memcache_rest_client_config.php b/Memcache/src/V1/resources/cloud_memcache_rest_client_config.php index 31c5b193ea69..281466044120 100644 --- a/Memcache/src/V1/resources/cloud_memcache_rest_client_config.php +++ b/Memcache/src/V1/resources/cloud_memcache_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Memcache/src/V1beta2/resources/cloud_memcache_descriptor_config.php b/Memcache/src/V1beta2/resources/cloud_memcache_descriptor_config.php index 6c5424d07862..e9035e05f1af 100644 --- a/Memcache/src/V1beta2/resources/cloud_memcache_descriptor_config.php +++ b/Memcache/src/V1beta2/resources/cloud_memcache_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Memcache/src/V1beta2/resources/cloud_memcache_rest_client_config.php b/Memcache/src/V1beta2/resources/cloud_memcache_rest_client_config.php index b8026c441298..69e964295aef 100644 --- a/Memcache/src/V1beta2/resources/cloud_memcache_rest_client_config.php +++ b/Memcache/src/V1beta2/resources/cloud_memcache_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/MigrationCenter/src/V1/resources/migration_center_descriptor_config.php b/MigrationCenter/src/V1/resources/migration_center_descriptor_config.php index 44b43bd008a5..27a9cb93b901 100644 --- a/MigrationCenter/src/V1/resources/migration_center_descriptor_config.php +++ b/MigrationCenter/src/V1/resources/migration_center_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/MigrationCenter/src/V1/resources/migration_center_rest_client_config.php b/MigrationCenter/src/V1/resources/migration_center_rest_client_config.php index 89945183672b..209af4c348a6 100644 --- a/MigrationCenter/src/V1/resources/migration_center_rest_client_config.php +++ b/MigrationCenter/src/V1/resources/migration_center_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/NetApp/src/V1/resources/net_app_descriptor_config.php b/NetApp/src/V1/resources/net_app_descriptor_config.php index 03894c46cda3..bb9ce30c91de 100644 --- a/NetApp/src/V1/resources/net_app_descriptor_config.php +++ b/NetApp/src/V1/resources/net_app_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/NetApp/src/V1/resources/net_app_rest_client_config.php b/NetApp/src/V1/resources/net_app_rest_client_config.php index df03e0f2ebd3..488232f4d8fc 100644 --- a/NetApp/src/V1/resources/net_app_rest_client_config.php +++ b/NetApp/src/V1/resources/net_app_rest_client_config.php @@ -1,4 +1,24 @@ [ From 5629ed52164b18fe2700dc05760c7490fe121214 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 09:12:07 -0700 Subject: [PATCH 36/86] chore: add license and generated code headers to generated resource files (#7230) PiperOrigin-RevId: 624277410 Source-Link: https://github.com/googleapis/googleapis/commit/2d881be8c566e4c374061248dd205efd72b7ef4f Source-Link: https://github.com/googleapis/googleapis-gen/commit/1d063f9353aeffb9a968f1a00f1d105b0c14a42d Copy-Tag: eyJwIjoiTmV0d29ya0Nvbm5lY3Rpdml0eS8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiTmV0d29ya01hbmFnZW1lbnQvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiTmV0d29ya1NlY3VyaXR5Ly5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiTm90ZWJvb2tzLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiT3B0aW1pemF0aW9uLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiT3JjaGVzdHJhdGlvbkFpcmZsb3cvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiT3JnUG9saWN5Ly5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiT3NDb25maWcvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiT3NMb2dpbi8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiUGFyYWxsZWxzdG9yZS8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiUG9saWN5U2ltdWxhdG9yLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiUG9saWN5VHJvdWJsZXNob290ZXIvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiUG9saWN5VHJvdWJsZXNob290ZXJJYW0vLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiUHJpdmF0ZUNhdGFsb2cvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiUHJvZmlsZXIvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiUHViU3ViLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiUXVvdGFzLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiUmFwaWRNaWdyYXRpb25Bc3Nlc3NtZW50Ly5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiUmVjYXB0Y2hhRW50ZXJwcmlzZS8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiUmVjb21tZW5kYXRpb25FbmdpbmUvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== --- .../hub_service_descriptor_config.php | 20 +++++++++++++++++++ .../hub_service_rest_client_config.php | 20 +++++++++++++++++++ ...ased_routing_service_descriptor_config.php | 20 +++++++++++++++++++ ...sed_routing_service_rest_client_config.php | 20 +++++++++++++++++++ ...reachability_service_descriptor_config.php | 20 +++++++++++++++++++ ...eachability_service_rest_client_config.php | 20 +++++++++++++++++++ .../network_security_descriptor_config.php | 20 +++++++++++++++++++ .../network_security_rest_client_config.php | 20 +++++++++++++++++++ .../network_security_descriptor_config.php | 20 +++++++++++++++++++ .../network_security_rest_client_config.php | 20 +++++++++++++++++++ ...ged_notebook_service_descriptor_config.php | 20 +++++++++++++++++++ ...ed_notebook_service_rest_client_config.php | 20 +++++++++++++++++++ .../notebook_service_descriptor_config.php | 20 +++++++++++++++++++ .../notebook_service_rest_client_config.php | 20 +++++++++++++++++++ .../notebook_service_descriptor_config.php | 20 +++++++++++++++++++ .../notebook_service_rest_client_config.php | 20 +++++++++++++++++++ .../notebook_service_descriptor_config.php | 20 +++++++++++++++++++ .../notebook_service_rest_client_config.php | 20 +++++++++++++++++++ .../fleet_routing_descriptor_config.php | 20 +++++++++++++++++++ .../fleet_routing_rest_client_config.php | 20 +++++++++++++++++++ .../environments_descriptor_config.php | 20 +++++++++++++++++++ .../environments_rest_client_config.php | 20 +++++++++++++++++++ .../image_versions_descriptor_config.php | 20 +++++++++++++++++++ .../image_versions_rest_client_config.php | 20 +++++++++++++++++++ .../org_policy_descriptor_config.php | 20 +++++++++++++++++++ .../org_policy_rest_client_config.php | 20 +++++++++++++++++++ .../os_config_service_descriptor_config.php | 20 +++++++++++++++++++ .../os_config_service_rest_client_config.php | 20 +++++++++++++++++++ ...config_zonal_service_descriptor_config.php | 20 +++++++++++++++++++ ...onfig_zonal_service_rest_client_config.php | 20 +++++++++++++++++++ .../os_login_service_descriptor_config.php | 20 +++++++++++++++++++ .../os_login_service_rest_client_config.php | 20 +++++++++++++++++++ .../os_login_service_descriptor_config.php | 20 +++++++++++++++++++ .../os_login_service_rest_client_config.php | 20 +++++++++++++++++++ .../parallelstore_descriptor_config.php | 20 +++++++++++++++++++ .../parallelstore_rest_client_config.php | 20 +++++++++++++++++++ .../resources/simulator_descriptor_config.php | 20 +++++++++++++++++++ .../simulator_rest_client_config.php | 20 +++++++++++++++++++ .../iam_checker_descriptor_config.php | 20 +++++++++++++++++++ .../iam_checker_rest_client_config.php | 20 +++++++++++++++++++ ...olicy_troubleshooter_descriptor_config.php | 20 +++++++++++++++++++ ...licy_troubleshooter_rest_client_config.php | 20 +++++++++++++++++++ .../private_catalog_descriptor_config.php | 20 +++++++++++++++++++ .../private_catalog_rest_client_config.php | 20 +++++++++++++++++++ .../export_service_descriptor_config.php | 20 +++++++++++++++++++ .../export_service_rest_client_config.php | 20 +++++++++++++++++++ .../profiler_service_descriptor_config.php | 20 +++++++++++++++++++ .../profiler_service_rest_client_config.php | 20 +++++++++++++++++++ .../resources/publisher_descriptor_config.php | 20 +++++++++++++++++++ .../publisher_rest_client_config.php | 20 +++++++++++++++++++ .../schema_service_descriptor_config.php | 20 +++++++++++++++++++ .../schema_service_rest_client_config.php | 20 +++++++++++++++++++ .../subscriber_descriptor_config.php | 20 +++++++++++++++++++ .../subscriber_rest_client_config.php | 20 +++++++++++++++++++ .../cloud_quotas_descriptor_config.php | 20 +++++++++++++++++++ .../cloud_quotas_rest_client_config.php | 20 +++++++++++++++++++ ...migration_assessment_descriptor_config.php | 20 +++++++++++++++++++ ...igration_assessment_rest_client_config.php | 20 +++++++++++++++++++ ...a_enterprise_service_descriptor_config.php | 20 +++++++++++++++++++ ..._enterprise_service_rest_client_config.php | 20 +++++++++++++++++++ .../catalog_service_descriptor_config.php | 20 +++++++++++++++++++ .../catalog_service_rest_client_config.php | 20 +++++++++++++++++++ ...ion_api_key_registry_descriptor_config.php | 20 +++++++++++++++++++ ...on_api_key_registry_rest_client_config.php | 20 +++++++++++++++++++ .../prediction_service_descriptor_config.php | 20 +++++++++++++++++++ .../prediction_service_rest_client_config.php | 20 +++++++++++++++++++ .../user_event_service_descriptor_config.php | 20 +++++++++++++++++++ .../user_event_service_rest_client_config.php | 20 +++++++++++++++++++ 68 files changed, 1360 insertions(+) diff --git a/NetworkConnectivity/src/V1/resources/hub_service_descriptor_config.php b/NetworkConnectivity/src/V1/resources/hub_service_descriptor_config.php index 1a0452bf2561..05a83a500e6b 100644 --- a/NetworkConnectivity/src/V1/resources/hub_service_descriptor_config.php +++ b/NetworkConnectivity/src/V1/resources/hub_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/NetworkConnectivity/src/V1/resources/hub_service_rest_client_config.php b/NetworkConnectivity/src/V1/resources/hub_service_rest_client_config.php index 77bb745f6b9f..04b387f4a742 100644 --- a/NetworkConnectivity/src/V1/resources/hub_service_rest_client_config.php +++ b/NetworkConnectivity/src/V1/resources/hub_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/NetworkConnectivity/src/V1/resources/policy_based_routing_service_descriptor_config.php b/NetworkConnectivity/src/V1/resources/policy_based_routing_service_descriptor_config.php index c40bec4c8c9d..43fb2ee993b3 100644 --- a/NetworkConnectivity/src/V1/resources/policy_based_routing_service_descriptor_config.php +++ b/NetworkConnectivity/src/V1/resources/policy_based_routing_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/NetworkConnectivity/src/V1/resources/policy_based_routing_service_rest_client_config.php b/NetworkConnectivity/src/V1/resources/policy_based_routing_service_rest_client_config.php index 9da325f69e4f..185f9fcd591a 100644 --- a/NetworkConnectivity/src/V1/resources/policy_based_routing_service_rest_client_config.php +++ b/NetworkConnectivity/src/V1/resources/policy_based_routing_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/NetworkManagement/src/V1/resources/reachability_service_descriptor_config.php b/NetworkManagement/src/V1/resources/reachability_service_descriptor_config.php index 4728554444e0..2026717dc44c 100644 --- a/NetworkManagement/src/V1/resources/reachability_service_descriptor_config.php +++ b/NetworkManagement/src/V1/resources/reachability_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/NetworkManagement/src/V1/resources/reachability_service_rest_client_config.php b/NetworkManagement/src/V1/resources/reachability_service_rest_client_config.php index f88ed948a781..0d396f9a9e19 100644 --- a/NetworkManagement/src/V1/resources/reachability_service_rest_client_config.php +++ b/NetworkManagement/src/V1/resources/reachability_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/NetworkSecurity/src/V1/resources/network_security_descriptor_config.php b/NetworkSecurity/src/V1/resources/network_security_descriptor_config.php index 19f694c19c74..37aaa8d95d71 100644 --- a/NetworkSecurity/src/V1/resources/network_security_descriptor_config.php +++ b/NetworkSecurity/src/V1/resources/network_security_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/NetworkSecurity/src/V1/resources/network_security_rest_client_config.php b/NetworkSecurity/src/V1/resources/network_security_rest_client_config.php index dab7e6f85ae1..0364328337cf 100644 --- a/NetworkSecurity/src/V1/resources/network_security_rest_client_config.php +++ b/NetworkSecurity/src/V1/resources/network_security_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/NetworkSecurity/src/V1beta1/resources/network_security_descriptor_config.php b/NetworkSecurity/src/V1beta1/resources/network_security_descriptor_config.php index 498b2d381d3a..a374e66e4bfe 100644 --- a/NetworkSecurity/src/V1beta1/resources/network_security_descriptor_config.php +++ b/NetworkSecurity/src/V1beta1/resources/network_security_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/NetworkSecurity/src/V1beta1/resources/network_security_rest_client_config.php b/NetworkSecurity/src/V1beta1/resources/network_security_rest_client_config.php index eb8e55eb9b80..fe1cc1816e4a 100644 --- a/NetworkSecurity/src/V1beta1/resources/network_security_rest_client_config.php +++ b/NetworkSecurity/src/V1beta1/resources/network_security_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Notebooks/src/V1/resources/managed_notebook_service_descriptor_config.php b/Notebooks/src/V1/resources/managed_notebook_service_descriptor_config.php index 36871e1a5668..6398bbee3ac6 100644 --- a/Notebooks/src/V1/resources/managed_notebook_service_descriptor_config.php +++ b/Notebooks/src/V1/resources/managed_notebook_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Notebooks/src/V1/resources/managed_notebook_service_rest_client_config.php b/Notebooks/src/V1/resources/managed_notebook_service_rest_client_config.php index 0d1fc3b081f9..8a16450224c1 100644 --- a/Notebooks/src/V1/resources/managed_notebook_service_rest_client_config.php +++ b/Notebooks/src/V1/resources/managed_notebook_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Notebooks/src/V1/resources/notebook_service_descriptor_config.php b/Notebooks/src/V1/resources/notebook_service_descriptor_config.php index bceb4836de60..4bfb6bac1601 100644 --- a/Notebooks/src/V1/resources/notebook_service_descriptor_config.php +++ b/Notebooks/src/V1/resources/notebook_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Notebooks/src/V1/resources/notebook_service_rest_client_config.php b/Notebooks/src/V1/resources/notebook_service_rest_client_config.php index 8d79f0d95c1c..ab6bb270a12e 100644 --- a/Notebooks/src/V1/resources/notebook_service_rest_client_config.php +++ b/Notebooks/src/V1/resources/notebook_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Notebooks/src/V1beta1/resources/notebook_service_descriptor_config.php b/Notebooks/src/V1beta1/resources/notebook_service_descriptor_config.php index ca0460e95864..33ecc9d79fec 100644 --- a/Notebooks/src/V1beta1/resources/notebook_service_descriptor_config.php +++ b/Notebooks/src/V1beta1/resources/notebook_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Notebooks/src/V1beta1/resources/notebook_service_rest_client_config.php b/Notebooks/src/V1beta1/resources/notebook_service_rest_client_config.php index f500ca691b68..8cfe9f1fc5ab 100644 --- a/Notebooks/src/V1beta1/resources/notebook_service_rest_client_config.php +++ b/Notebooks/src/V1beta1/resources/notebook_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Notebooks/src/V2/resources/notebook_service_descriptor_config.php b/Notebooks/src/V2/resources/notebook_service_descriptor_config.php index e4ffcc7b52c8..185207fc5d5a 100644 --- a/Notebooks/src/V2/resources/notebook_service_descriptor_config.php +++ b/Notebooks/src/V2/resources/notebook_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Notebooks/src/V2/resources/notebook_service_rest_client_config.php b/Notebooks/src/V2/resources/notebook_service_rest_client_config.php index 7b6ff8da86d6..36b52b12ea7a 100644 --- a/Notebooks/src/V2/resources/notebook_service_rest_client_config.php +++ b/Notebooks/src/V2/resources/notebook_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Optimization/src/V1/resources/fleet_routing_descriptor_config.php b/Optimization/src/V1/resources/fleet_routing_descriptor_config.php index e4991f64f3d2..e640229844c2 100644 --- a/Optimization/src/V1/resources/fleet_routing_descriptor_config.php +++ b/Optimization/src/V1/resources/fleet_routing_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Optimization/src/V1/resources/fleet_routing_rest_client_config.php b/Optimization/src/V1/resources/fleet_routing_rest_client_config.php index 5d00717f6a23..770f33a8d635 100644 --- a/Optimization/src/V1/resources/fleet_routing_rest_client_config.php +++ b/Optimization/src/V1/resources/fleet_routing_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/OrchestrationAirflow/src/V1/resources/environments_descriptor_config.php b/OrchestrationAirflow/src/V1/resources/environments_descriptor_config.php index 67d752501d64..a5dc4f5c03bd 100644 --- a/OrchestrationAirflow/src/V1/resources/environments_descriptor_config.php +++ b/OrchestrationAirflow/src/V1/resources/environments_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/OrchestrationAirflow/src/V1/resources/environments_rest_client_config.php b/OrchestrationAirflow/src/V1/resources/environments_rest_client_config.php index 10f009f69bf4..bcc2842c73a1 100644 --- a/OrchestrationAirflow/src/V1/resources/environments_rest_client_config.php +++ b/OrchestrationAirflow/src/V1/resources/environments_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/OrchestrationAirflow/src/V1/resources/image_versions_descriptor_config.php b/OrchestrationAirflow/src/V1/resources/image_versions_descriptor_config.php index 7be5f5de4d22..1eb232f5660d 100644 --- a/OrchestrationAirflow/src/V1/resources/image_versions_descriptor_config.php +++ b/OrchestrationAirflow/src/V1/resources/image_versions_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/OrchestrationAirflow/src/V1/resources/image_versions_rest_client_config.php b/OrchestrationAirflow/src/V1/resources/image_versions_rest_client_config.php index db5a33f189aa..e999b9722e51 100644 --- a/OrchestrationAirflow/src/V1/resources/image_versions_rest_client_config.php +++ b/OrchestrationAirflow/src/V1/resources/image_versions_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/OrgPolicy/src/V2/resources/org_policy_descriptor_config.php b/OrgPolicy/src/V2/resources/org_policy_descriptor_config.php index 9f94db0048d2..797825a2e765 100644 --- a/OrgPolicy/src/V2/resources/org_policy_descriptor_config.php +++ b/OrgPolicy/src/V2/resources/org_policy_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/OrgPolicy/src/V2/resources/org_policy_rest_client_config.php b/OrgPolicy/src/V2/resources/org_policy_rest_client_config.php index 17955ddb132b..cb54175b8f87 100644 --- a/OrgPolicy/src/V2/resources/org_policy_rest_client_config.php +++ b/OrgPolicy/src/V2/resources/org_policy_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/OsConfig/src/V1/resources/os_config_service_descriptor_config.php b/OsConfig/src/V1/resources/os_config_service_descriptor_config.php index 819eb3599501..9ea9f6165176 100644 --- a/OsConfig/src/V1/resources/os_config_service_descriptor_config.php +++ b/OsConfig/src/V1/resources/os_config_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/OsConfig/src/V1/resources/os_config_service_rest_client_config.php b/OsConfig/src/V1/resources/os_config_service_rest_client_config.php index d66f7e61f9d2..eefb6ab786c2 100644 --- a/OsConfig/src/V1/resources/os_config_service_rest_client_config.php +++ b/OsConfig/src/V1/resources/os_config_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/OsConfig/src/V1/resources/os_config_zonal_service_descriptor_config.php b/OsConfig/src/V1/resources/os_config_zonal_service_descriptor_config.php index 267977357acf..c02c4e8d16c9 100644 --- a/OsConfig/src/V1/resources/os_config_zonal_service_descriptor_config.php +++ b/OsConfig/src/V1/resources/os_config_zonal_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/OsConfig/src/V1/resources/os_config_zonal_service_rest_client_config.php b/OsConfig/src/V1/resources/os_config_zonal_service_rest_client_config.php index a695fcc3fa0a..5ac6fb548708 100644 --- a/OsConfig/src/V1/resources/os_config_zonal_service_rest_client_config.php +++ b/OsConfig/src/V1/resources/os_config_zonal_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/OsLogin/src/V1/resources/os_login_service_descriptor_config.php b/OsLogin/src/V1/resources/os_login_service_descriptor_config.php index ccf615a104e3..9ae321a9cf63 100644 --- a/OsLogin/src/V1/resources/os_login_service_descriptor_config.php +++ b/OsLogin/src/V1/resources/os_login_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/OsLogin/src/V1/resources/os_login_service_rest_client_config.php b/OsLogin/src/V1/resources/os_login_service_rest_client_config.php index 37ff351a8d33..b2660ac687cb 100644 --- a/OsLogin/src/V1/resources/os_login_service_rest_client_config.php +++ b/OsLogin/src/V1/resources/os_login_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/OsLogin/src/V1beta/resources/os_login_service_descriptor_config.php b/OsLogin/src/V1beta/resources/os_login_service_descriptor_config.php index 0f8116c3c86f..e2f37e277e85 100644 --- a/OsLogin/src/V1beta/resources/os_login_service_descriptor_config.php +++ b/OsLogin/src/V1beta/resources/os_login_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/OsLogin/src/V1beta/resources/os_login_service_rest_client_config.php b/OsLogin/src/V1beta/resources/os_login_service_rest_client_config.php index 6e60ed77a8db..e207013235f5 100644 --- a/OsLogin/src/V1beta/resources/os_login_service_rest_client_config.php +++ b/OsLogin/src/V1beta/resources/os_login_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Parallelstore/src/V1beta/resources/parallelstore_descriptor_config.php b/Parallelstore/src/V1beta/resources/parallelstore_descriptor_config.php index 2d94feecbec3..5305a99ff5c2 100644 --- a/Parallelstore/src/V1beta/resources/parallelstore_descriptor_config.php +++ b/Parallelstore/src/V1beta/resources/parallelstore_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Parallelstore/src/V1beta/resources/parallelstore_rest_client_config.php b/Parallelstore/src/V1beta/resources/parallelstore_rest_client_config.php index b3973062a45b..8da2dd0c98a5 100644 --- a/Parallelstore/src/V1beta/resources/parallelstore_rest_client_config.php +++ b/Parallelstore/src/V1beta/resources/parallelstore_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/PolicySimulator/src/V1/resources/simulator_descriptor_config.php b/PolicySimulator/src/V1/resources/simulator_descriptor_config.php index 7ff3df2b5b3f..81964f7d8a95 100644 --- a/PolicySimulator/src/V1/resources/simulator_descriptor_config.php +++ b/PolicySimulator/src/V1/resources/simulator_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/PolicySimulator/src/V1/resources/simulator_rest_client_config.php b/PolicySimulator/src/V1/resources/simulator_rest_client_config.php index 3a0056183e3d..351a9fd85c33 100644 --- a/PolicySimulator/src/V1/resources/simulator_rest_client_config.php +++ b/PolicySimulator/src/V1/resources/simulator_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/PolicyTroubleshooter/src/V1/resources/iam_checker_descriptor_config.php b/PolicyTroubleshooter/src/V1/resources/iam_checker_descriptor_config.php index 87e75a80a072..b1fe76c28bb6 100644 --- a/PolicyTroubleshooter/src/V1/resources/iam_checker_descriptor_config.php +++ b/PolicyTroubleshooter/src/V1/resources/iam_checker_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/PolicyTroubleshooter/src/V1/resources/iam_checker_rest_client_config.php b/PolicyTroubleshooter/src/V1/resources/iam_checker_rest_client_config.php index 0e1a114ec391..35b80f85afd1 100644 --- a/PolicyTroubleshooter/src/V1/resources/iam_checker_rest_client_config.php +++ b/PolicyTroubleshooter/src/V1/resources/iam_checker_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/PolicyTroubleshooterIam/src/V3/resources/policy_troubleshooter_descriptor_config.php b/PolicyTroubleshooterIam/src/V3/resources/policy_troubleshooter_descriptor_config.php index e5b4e0435eae..b6365012b5d6 100644 --- a/PolicyTroubleshooterIam/src/V3/resources/policy_troubleshooter_descriptor_config.php +++ b/PolicyTroubleshooterIam/src/V3/resources/policy_troubleshooter_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/PolicyTroubleshooterIam/src/V3/resources/policy_troubleshooter_rest_client_config.php b/PolicyTroubleshooterIam/src/V3/resources/policy_troubleshooter_rest_client_config.php index 01b555c8e2d1..1fa971fc5cf6 100644 --- a/PolicyTroubleshooterIam/src/V3/resources/policy_troubleshooter_rest_client_config.php +++ b/PolicyTroubleshooterIam/src/V3/resources/policy_troubleshooter_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/PrivateCatalog/src/V1beta1/resources/private_catalog_descriptor_config.php b/PrivateCatalog/src/V1beta1/resources/private_catalog_descriptor_config.php index 4d1f4a9ddb50..28920e23950d 100644 --- a/PrivateCatalog/src/V1beta1/resources/private_catalog_descriptor_config.php +++ b/PrivateCatalog/src/V1beta1/resources/private_catalog_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/PrivateCatalog/src/V1beta1/resources/private_catalog_rest_client_config.php b/PrivateCatalog/src/V1beta1/resources/private_catalog_rest_client_config.php index fad61f326bf0..af11787e28b2 100644 --- a/PrivateCatalog/src/V1beta1/resources/private_catalog_rest_client_config.php +++ b/PrivateCatalog/src/V1beta1/resources/private_catalog_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Profiler/src/V2/resources/export_service_descriptor_config.php b/Profiler/src/V2/resources/export_service_descriptor_config.php index 8d4baa8ca2e7..1770633a584e 100644 --- a/Profiler/src/V2/resources/export_service_descriptor_config.php +++ b/Profiler/src/V2/resources/export_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Profiler/src/V2/resources/export_service_rest_client_config.php b/Profiler/src/V2/resources/export_service_rest_client_config.php index 1d0ddfa982ce..a2ee763f0603 100644 --- a/Profiler/src/V2/resources/export_service_rest_client_config.php +++ b/Profiler/src/V2/resources/export_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Profiler/src/V2/resources/profiler_service_descriptor_config.php b/Profiler/src/V2/resources/profiler_service_descriptor_config.php index 6c16c0b3d285..5caac2012699 100644 --- a/Profiler/src/V2/resources/profiler_service_descriptor_config.php +++ b/Profiler/src/V2/resources/profiler_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Profiler/src/V2/resources/profiler_service_rest_client_config.php b/Profiler/src/V2/resources/profiler_service_rest_client_config.php index 29d974a28083..95b5868f63e3 100644 --- a/Profiler/src/V2/resources/profiler_service_rest_client_config.php +++ b/Profiler/src/V2/resources/profiler_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/PubSub/src/V1/resources/publisher_descriptor_config.php b/PubSub/src/V1/resources/publisher_descriptor_config.php index a40d4dbdf363..d39d0d038d3d 100644 --- a/PubSub/src/V1/resources/publisher_descriptor_config.php +++ b/PubSub/src/V1/resources/publisher_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/PubSub/src/V1/resources/publisher_rest_client_config.php b/PubSub/src/V1/resources/publisher_rest_client_config.php index fbf6fd4b9f2e..a62253330e66 100644 --- a/PubSub/src/V1/resources/publisher_rest_client_config.php +++ b/PubSub/src/V1/resources/publisher_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/PubSub/src/V1/resources/schema_service_descriptor_config.php b/PubSub/src/V1/resources/schema_service_descriptor_config.php index 419ce2442082..f11afb7e2cf1 100644 --- a/PubSub/src/V1/resources/schema_service_descriptor_config.php +++ b/PubSub/src/V1/resources/schema_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/PubSub/src/V1/resources/schema_service_rest_client_config.php b/PubSub/src/V1/resources/schema_service_rest_client_config.php index f91306680604..db359582076c 100644 --- a/PubSub/src/V1/resources/schema_service_rest_client_config.php +++ b/PubSub/src/V1/resources/schema_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/PubSub/src/V1/resources/subscriber_descriptor_config.php b/PubSub/src/V1/resources/subscriber_descriptor_config.php index 497c2fd7960e..4b0fead59008 100644 --- a/PubSub/src/V1/resources/subscriber_descriptor_config.php +++ b/PubSub/src/V1/resources/subscriber_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/PubSub/src/V1/resources/subscriber_rest_client_config.php b/PubSub/src/V1/resources/subscriber_rest_client_config.php index 3643254a4cf1..e39849a42744 100644 --- a/PubSub/src/V1/resources/subscriber_rest_client_config.php +++ b/PubSub/src/V1/resources/subscriber_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Quotas/src/V1/resources/cloud_quotas_descriptor_config.php b/Quotas/src/V1/resources/cloud_quotas_descriptor_config.php index b7d647da8de5..41d398d899d5 100644 --- a/Quotas/src/V1/resources/cloud_quotas_descriptor_config.php +++ b/Quotas/src/V1/resources/cloud_quotas_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Quotas/src/V1/resources/cloud_quotas_rest_client_config.php b/Quotas/src/V1/resources/cloud_quotas_rest_client_config.php index 05ae394975e0..b9078725af73 100644 --- a/Quotas/src/V1/resources/cloud_quotas_rest_client_config.php +++ b/Quotas/src/V1/resources/cloud_quotas_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/RapidMigrationAssessment/src/V1/resources/rapid_migration_assessment_descriptor_config.php b/RapidMigrationAssessment/src/V1/resources/rapid_migration_assessment_descriptor_config.php index 501188a5495b..186a1712b144 100644 --- a/RapidMigrationAssessment/src/V1/resources/rapid_migration_assessment_descriptor_config.php +++ b/RapidMigrationAssessment/src/V1/resources/rapid_migration_assessment_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/RapidMigrationAssessment/src/V1/resources/rapid_migration_assessment_rest_client_config.php b/RapidMigrationAssessment/src/V1/resources/rapid_migration_assessment_rest_client_config.php index 08baccc79646..d2d9306a498c 100644 --- a/RapidMigrationAssessment/src/V1/resources/rapid_migration_assessment_rest_client_config.php +++ b/RapidMigrationAssessment/src/V1/resources/rapid_migration_assessment_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/RecaptchaEnterprise/src/V1/resources/recaptcha_enterprise_service_descriptor_config.php b/RecaptchaEnterprise/src/V1/resources/recaptcha_enterprise_service_descriptor_config.php index daccbc6ba335..92cc78a016ef 100644 --- a/RecaptchaEnterprise/src/V1/resources/recaptcha_enterprise_service_descriptor_config.php +++ b/RecaptchaEnterprise/src/V1/resources/recaptcha_enterprise_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/RecaptchaEnterprise/src/V1/resources/recaptcha_enterprise_service_rest_client_config.php b/RecaptchaEnterprise/src/V1/resources/recaptcha_enterprise_service_rest_client_config.php index 3636b14a9737..62b1bdf13daf 100644 --- a/RecaptchaEnterprise/src/V1/resources/recaptcha_enterprise_service_rest_client_config.php +++ b/RecaptchaEnterprise/src/V1/resources/recaptcha_enterprise_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/RecommendationEngine/src/V1beta1/resources/catalog_service_descriptor_config.php b/RecommendationEngine/src/V1beta1/resources/catalog_service_descriptor_config.php index 160a5c9b4209..61fe05ae36e1 100644 --- a/RecommendationEngine/src/V1beta1/resources/catalog_service_descriptor_config.php +++ b/RecommendationEngine/src/V1beta1/resources/catalog_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/RecommendationEngine/src/V1beta1/resources/catalog_service_rest_client_config.php b/RecommendationEngine/src/V1beta1/resources/catalog_service_rest_client_config.php index 66180dd017d9..a1513d076690 100644 --- a/RecommendationEngine/src/V1beta1/resources/catalog_service_rest_client_config.php +++ b/RecommendationEngine/src/V1beta1/resources/catalog_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/RecommendationEngine/src/V1beta1/resources/prediction_api_key_registry_descriptor_config.php b/RecommendationEngine/src/V1beta1/resources/prediction_api_key_registry_descriptor_config.php index 54302de06b55..d5590b985195 100644 --- a/RecommendationEngine/src/V1beta1/resources/prediction_api_key_registry_descriptor_config.php +++ b/RecommendationEngine/src/V1beta1/resources/prediction_api_key_registry_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/RecommendationEngine/src/V1beta1/resources/prediction_api_key_registry_rest_client_config.php b/RecommendationEngine/src/V1beta1/resources/prediction_api_key_registry_rest_client_config.php index 4633fa13bf5b..a0b8022f9ac1 100644 --- a/RecommendationEngine/src/V1beta1/resources/prediction_api_key_registry_rest_client_config.php +++ b/RecommendationEngine/src/V1beta1/resources/prediction_api_key_registry_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/RecommendationEngine/src/V1beta1/resources/prediction_service_descriptor_config.php b/RecommendationEngine/src/V1beta1/resources/prediction_service_descriptor_config.php index b839d7cb4423..af6dc6eacd8d 100644 --- a/RecommendationEngine/src/V1beta1/resources/prediction_service_descriptor_config.php +++ b/RecommendationEngine/src/V1beta1/resources/prediction_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/RecommendationEngine/src/V1beta1/resources/prediction_service_rest_client_config.php b/RecommendationEngine/src/V1beta1/resources/prediction_service_rest_client_config.php index 56f6452b94ac..00812eb23486 100644 --- a/RecommendationEngine/src/V1beta1/resources/prediction_service_rest_client_config.php +++ b/RecommendationEngine/src/V1beta1/resources/prediction_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/RecommendationEngine/src/V1beta1/resources/user_event_service_descriptor_config.php b/RecommendationEngine/src/V1beta1/resources/user_event_service_descriptor_config.php index b1a3aad3fd3b..99ff5ec8fa93 100644 --- a/RecommendationEngine/src/V1beta1/resources/user_event_service_descriptor_config.php +++ b/RecommendationEngine/src/V1beta1/resources/user_event_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/RecommendationEngine/src/V1beta1/resources/user_event_service_rest_client_config.php b/RecommendationEngine/src/V1beta1/resources/user_event_service_rest_client_config.php index 6afcb6e75c8b..071753ea18df 100644 --- a/RecommendationEngine/src/V1beta1/resources/user_event_service_rest_client_config.php +++ b/RecommendationEngine/src/V1beta1/resources/user_event_service_rest_client_config.php @@ -1,4 +1,24 @@ [ From 4cb428abc31c4436bbfb613deae75a2b7da3fea0 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 09:12:28 -0700 Subject: [PATCH 37/86] chore: add license and generated code headers to generated resource files (#7232) PiperOrigin-RevId: 624277410 Source-Link: https://github.com/googleapis/googleapis/commit/2d881be8c566e4c374061248dd205efd72b7ef4f Source-Link: https://github.com/googleapis/googleapis-gen/commit/1d063f9353aeffb9a968f1a00f1d105b0c14a42d Copy-Tag: eyJwIjoiU2hvcHBpbmdDc3MvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiU2hvcHBpbmdNZXJjaGFudEludmVudG9yaWVzLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiU2hvcHBpbmdNZXJjaGFudFF1b3RhLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiU2hvcHBpbmdNZXJjaGFudFJlcG9ydHMvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiU3Bhbm5lci8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiU3BlZWNoLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiU3FsQWRtaW4vLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiU3RvcmFnZUluc2lnaHRzLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiU3RvcmFnZVRyYW5zZmVyLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiU3VwcG9ydC8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiVGFsZW50Ly5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiVGFza3MvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiVGVsY29BdXRvbWF0aW9uLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiVGV4dFRvU3BlZWNoLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiVHB1Ly5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiVHJhY2UvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiVHJhbnNsYXRlLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiVmlkZW9JbnRlbGxpZ2VuY2UvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiVmlkZW9MaXZlU3RyZWFtLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiVmlkZW9TdGl0Y2hlci8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 --- ...count_labels_service_descriptor_config.php | 20 ++++++++++++++++++ ...ount_labels_service_rest_client_config.php | 20 ++++++++++++++++++ .../accounts_service_descriptor_config.php | 20 ++++++++++++++++++ .../accounts_service_rest_client_config.php | 20 ++++++++++++++++++ ...oduct_inputs_service_descriptor_config.php | 20 ++++++++++++++++++ ...duct_inputs_service_rest_client_config.php | 20 ++++++++++++++++++ ...css_products_service_descriptor_config.php | 20 ++++++++++++++++++ ...ss_products_service_rest_client_config.php | 20 ++++++++++++++++++ ...al_inventory_service_descriptor_config.php | 20 ++++++++++++++++++ ...l_inventory_service_rest_client_config.php | 20 ++++++++++++++++++ ...al_inventory_service_descriptor_config.php | 20 ++++++++++++++++++ ...l_inventory_service_rest_client_config.php | 20 ++++++++++++++++++ .../quota_service_descriptor_config.php | 20 ++++++++++++++++++ .../quota_service_rest_client_config.php | 20 ++++++++++++++++++ .../report_service_descriptor_config.php | 20 ++++++++++++++++++ .../report_service_rest_client_config.php | 20 ++++++++++++++++++ .../database_admin_descriptor_config.php | 20 ++++++++++++++++++ .../database_admin_rest_client_config.php | 20 ++++++++++++++++++ .../instance_admin_descriptor_config.php | 20 ++++++++++++++++++ .../instance_admin_rest_client_config.php | 20 ++++++++++++++++++ .../resources/spanner_descriptor_config.php | 20 ++++++++++++++++++ .../resources/spanner_rest_client_config.php | 20 ++++++++++++++++++ .../adaptation_descriptor_config.php | 20 ++++++++++++++++++ .../adaptation_rest_client_config.php | 20 ++++++++++++++++++ .../V1/resources/speech_descriptor_config.php | 20 ++++++++++++++++++ .../resources/speech_rest_client_config.php | 20 ++++++++++++++++++ .../adaptation_descriptor_config.php | 20 ++++++++++++++++++ .../adaptation_rest_client_config.php | 20 ++++++++++++++++++ .../resources/speech_descriptor_config.php | 20 ++++++++++++++++++ .../resources/speech_rest_client_config.php | 20 ++++++++++++++++++ .../V2/resources/speech_descriptor_config.php | 20 ++++++++++++++++++ .../resources/speech_rest_client_config.php | 20 ++++++++++++++++++ ...ase_versions_service_descriptor_config.php | 20 ++++++++++++++++++ ...se_versions_service_rest_client_config.php | 20 ++++++++++++++++++ ..._backup_runs_service_descriptor_config.php | 20 ++++++++++++++++++ ...backup_runs_service_rest_client_config.php | 20 ++++++++++++++++++ .../sql_connect_service_descriptor_config.php | 20 ++++++++++++++++++ ...sql_connect_service_rest_client_config.php | 20 ++++++++++++++++++ ...ql_databases_service_descriptor_config.php | 20 ++++++++++++++++++ ...l_databases_service_rest_client_config.php | 20 ++++++++++++++++++ .../sql_events_service_descriptor_config.php | 20 ++++++++++++++++++ .../sql_events_service_rest_client_config.php | 20 ++++++++++++++++++ .../sql_flags_service_descriptor_config.php | 20 ++++++++++++++++++ .../sql_flags_service_rest_client_config.php | 20 ++++++++++++++++++ ...iam_policies_service_descriptor_config.php | 20 ++++++++++++++++++ ...am_policies_service_rest_client_config.php | 20 ++++++++++++++++++ ...stance_names_service_descriptor_config.php | 20 ++++++++++++++++++ ...tance_names_service_rest_client_config.php | 20 ++++++++++++++++++ ...ql_instances_service_descriptor_config.php | 20 ++++++++++++++++++ ...l_instances_service_rest_client_config.php | 20 ++++++++++++++++++ ...l_operations_service_descriptor_config.php | 20 ++++++++++++++++++ ..._operations_service_rest_client_config.php | 20 ++++++++++++++++++ .../sql_regions_service_descriptor_config.php | 20 ++++++++++++++++++ ...sql_regions_service_rest_client_config.php | 20 ++++++++++++++++++ ...ql_ssl_certs_service_descriptor_config.php | 20 ++++++++++++++++++ ...l_ssl_certs_service_rest_client_config.php | 20 ++++++++++++++++++ .../sql_tiers_service_descriptor_config.php | 20 ++++++++++++++++++ .../sql_tiers_service_rest_client_config.php | 20 ++++++++++++++++++ .../sql_users_service_descriptor_config.php | 20 ++++++++++++++++++ .../sql_users_service_rest_client_config.php | 20 ++++++++++++++++++ ..._backup_runs_service_descriptor_config.php | 20 ++++++++++++++++++ ...backup_runs_service_rest_client_config.php | 20 ++++++++++++++++++ .../sql_connect_service_descriptor_config.php | 20 ++++++++++++++++++ ...sql_connect_service_rest_client_config.php | 20 ++++++++++++++++++ ...ql_databases_service_descriptor_config.php | 20 ++++++++++++++++++ ...l_databases_service_rest_client_config.php | 20 ++++++++++++++++++ .../sql_flags_service_descriptor_config.php | 20 ++++++++++++++++++ .../sql_flags_service_rest_client_config.php | 20 ++++++++++++++++++ ...iam_policies_service_descriptor_config.php | 20 ++++++++++++++++++ ...am_policies_service_rest_client_config.php | 20 ++++++++++++++++++ ...ql_instances_service_descriptor_config.php | 20 ++++++++++++++++++ ...l_instances_service_rest_client_config.php | 20 ++++++++++++++++++ ...l_operations_service_descriptor_config.php | 20 ++++++++++++++++++ ..._operations_service_rest_client_config.php | 20 ++++++++++++++++++ ...ql_ssl_certs_service_descriptor_config.php | 20 ++++++++++++++++++ ...l_ssl_certs_service_rest_client_config.php | 20 ++++++++++++++++++ .../sql_tiers_service_descriptor_config.php | 20 ++++++++++++++++++ .../sql_tiers_service_rest_client_config.php | 20 ++++++++++++++++++ .../sql_users_service_descriptor_config.php | 20 ++++++++++++++++++ .../sql_users_service_rest_client_config.php | 20 ++++++++++++++++++ .../storage_insights_descriptor_config.php | 20 ++++++++++++++++++ .../storage_insights_rest_client_config.php | 20 ++++++++++++++++++ ...age_transfer_service_descriptor_config.php | 20 ++++++++++++++++++ ...ge_transfer_service_rest_client_config.php | 20 ++++++++++++++++++ ...e_attachment_service_descriptor_config.php | 20 ++++++++++++++++++ ..._attachment_service_rest_client_config.php | 20 ++++++++++++++++++ .../case_service_descriptor_config.php | 20 ++++++++++++++++++ .../case_service_rest_client_config.php | 20 ++++++++++++++++++ .../comment_service_descriptor_config.php | 20 ++++++++++++++++++ .../comment_service_rest_client_config.php | 20 ++++++++++++++++++ .../company_service_descriptor_config.php | 20 ++++++++++++++++++ .../company_service_rest_client_config.php | 20 ++++++++++++++++++ .../completion_descriptor_config.php | 20 ++++++++++++++++++ .../completion_rest_client_config.php | 20 ++++++++++++++++++ .../event_service_descriptor_config.php | 20 ++++++++++++++++++ .../event_service_rest_client_config.php | 20 ++++++++++++++++++ .../job_service_descriptor_config.php | 20 ++++++++++++++++++ .../job_service_rest_client_config.php | 20 ++++++++++++++++++ .../tenant_service_descriptor_config.php | 20 ++++++++++++++++++ .../tenant_service_rest_client_config.php | 20 ++++++++++++++++++ .../company_service_descriptor_config.php | 20 ++++++++++++++++++ .../company_service_rest_client_config.php | 20 ++++++++++++++++++ .../completion_descriptor_config.php | 20 ++++++++++++++++++ .../completion_rest_client_config.php | 20 ++++++++++++++++++ .../event_service_descriptor_config.php | 20 ++++++++++++++++++ .../event_service_rest_client_config.php | 20 ++++++++++++++++++ .../job_service_descriptor_config.php | 20 ++++++++++++++++++ .../job_service_rest_client_config.php | 20 ++++++++++++++++++ .../tenant_service_descriptor_config.php | 20 ++++++++++++++++++ .../tenant_service_rest_client_config.php | 20 ++++++++++++++++++ .../cloud_tasks_descriptor_config.php | 20 ++++++++++++++++++ .../cloud_tasks_rest_client_config.php | 20 ++++++++++++++++++ .../cloud_tasks_descriptor_config.php | 20 ++++++++++++++++++ .../cloud_tasks_rest_client_config.php | 20 ++++++++++++++++++ .../cloud_tasks_descriptor_config.php | 20 ++++++++++++++++++ .../cloud_tasks_rest_client_config.php | 20 ++++++++++++++++++ .../metadata/V1/Telcoautomation.php | Bin 24349 -> 24410 bytes TelcoAutomation/src/V1/Deployment.php | 12 +++++++++++ TelcoAutomation/src/V1/DeploymentLevel.php | 10 +++++++++ TelcoAutomation/src/V1/Status.php | 8 +++++++ .../telco_automation_descriptor_config.php | 20 ++++++++++++++++++ .../telco_automation_rest_client_config.php | 20 ++++++++++++++++++ .../text_to_speech_descriptor_config.php | 20 ++++++++++++++++++ ...ong_audio_synthesize_descriptor_config.php | 20 ++++++++++++++++++ ...ng_audio_synthesize_rest_client_config.php | 20 ++++++++++++++++++ .../text_to_speech_rest_client_config.php | 20 ++++++++++++++++++ .../V1/resources/tpu_descriptor_config.php | 20 ++++++++++++++++++ .../V1/resources/tpu_rest_client_config.php | 20 ++++++++++++++++++ .../V2/resources/tpu_descriptor_config.php | 20 ++++++++++++++++++ .../V2/resources/tpu_rest_client_config.php | 20 ++++++++++++++++++ .../trace_service_descriptor_config.php | 20 ++++++++++++++++++ .../trace_service_rest_client_config.php | 20 ++++++++++++++++++ .../translation_service_descriptor_config.php | 20 ++++++++++++++++++ ...translation_service_rest_client_config.php | 20 ++++++++++++++++++ ...intelligence_service_descriptor_config.php | 20 ++++++++++++++++++ ...ntelligence_service_rest_client_config.php | 20 ++++++++++++++++++ ...intelligence_service_descriptor_config.php | 20 ++++++++++++++++++ ...ntelligence_service_rest_client_config.php | 20 ++++++++++++++++++ .../livestream_service_descriptor_config.php | 20 ++++++++++++++++++ .../livestream_service_rest_client_config.php | 20 ++++++++++++++++++ ...deo_stitcher_service_descriptor_config.php | 20 ++++++++++++++++++ ...eo_stitcher_service_rest_client_config.php | 20 ++++++++++++++++++ 142 files changed, 2790 insertions(+) diff --git a/ShoppingCss/src/V1/resources/account_labels_service_descriptor_config.php b/ShoppingCss/src/V1/resources/account_labels_service_descriptor_config.php index 609781bc8417..858503741c33 100644 --- a/ShoppingCss/src/V1/resources/account_labels_service_descriptor_config.php +++ b/ShoppingCss/src/V1/resources/account_labels_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ShoppingCss/src/V1/resources/account_labels_service_rest_client_config.php b/ShoppingCss/src/V1/resources/account_labels_service_rest_client_config.php index cec98ff69444..55009ee18a13 100644 --- a/ShoppingCss/src/V1/resources/account_labels_service_rest_client_config.php +++ b/ShoppingCss/src/V1/resources/account_labels_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ShoppingCss/src/V1/resources/accounts_service_descriptor_config.php b/ShoppingCss/src/V1/resources/accounts_service_descriptor_config.php index f83b474fa6c7..c575b5145c25 100644 --- a/ShoppingCss/src/V1/resources/accounts_service_descriptor_config.php +++ b/ShoppingCss/src/V1/resources/accounts_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ShoppingCss/src/V1/resources/accounts_service_rest_client_config.php b/ShoppingCss/src/V1/resources/accounts_service_rest_client_config.php index 70363ca99f5e..e31c4ca01563 100644 --- a/ShoppingCss/src/V1/resources/accounts_service_rest_client_config.php +++ b/ShoppingCss/src/V1/resources/accounts_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ShoppingCss/src/V1/resources/css_product_inputs_service_descriptor_config.php b/ShoppingCss/src/V1/resources/css_product_inputs_service_descriptor_config.php index 8d1383b283bc..3d28d4be2ea9 100644 --- a/ShoppingCss/src/V1/resources/css_product_inputs_service_descriptor_config.php +++ b/ShoppingCss/src/V1/resources/css_product_inputs_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ShoppingCss/src/V1/resources/css_product_inputs_service_rest_client_config.php b/ShoppingCss/src/V1/resources/css_product_inputs_service_rest_client_config.php index 4d1ba648b442..d3af676e3935 100644 --- a/ShoppingCss/src/V1/resources/css_product_inputs_service_rest_client_config.php +++ b/ShoppingCss/src/V1/resources/css_product_inputs_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ShoppingCss/src/V1/resources/css_products_service_descriptor_config.php b/ShoppingCss/src/V1/resources/css_products_service_descriptor_config.php index 5b4235cbb6d0..0cedd4a1bb4c 100644 --- a/ShoppingCss/src/V1/resources/css_products_service_descriptor_config.php +++ b/ShoppingCss/src/V1/resources/css_products_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ShoppingCss/src/V1/resources/css_products_service_rest_client_config.php b/ShoppingCss/src/V1/resources/css_products_service_rest_client_config.php index 9c15ea052440..165888fb6e00 100644 --- a/ShoppingCss/src/V1/resources/css_products_service_rest_client_config.php +++ b/ShoppingCss/src/V1/resources/css_products_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ShoppingMerchantInventories/src/V1beta/resources/local_inventory_service_descriptor_config.php b/ShoppingMerchantInventories/src/V1beta/resources/local_inventory_service_descriptor_config.php index ecfd84ebebe5..9ba108058e8d 100644 --- a/ShoppingMerchantInventories/src/V1beta/resources/local_inventory_service_descriptor_config.php +++ b/ShoppingMerchantInventories/src/V1beta/resources/local_inventory_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ShoppingMerchantInventories/src/V1beta/resources/local_inventory_service_rest_client_config.php b/ShoppingMerchantInventories/src/V1beta/resources/local_inventory_service_rest_client_config.php index 5aba74e97589..9d90e940d355 100644 --- a/ShoppingMerchantInventories/src/V1beta/resources/local_inventory_service_rest_client_config.php +++ b/ShoppingMerchantInventories/src/V1beta/resources/local_inventory_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ShoppingMerchantInventories/src/V1beta/resources/regional_inventory_service_descriptor_config.php b/ShoppingMerchantInventories/src/V1beta/resources/regional_inventory_service_descriptor_config.php index a4f93fcbeba4..d86f5cc8c1e6 100644 --- a/ShoppingMerchantInventories/src/V1beta/resources/regional_inventory_service_descriptor_config.php +++ b/ShoppingMerchantInventories/src/V1beta/resources/regional_inventory_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ShoppingMerchantInventories/src/V1beta/resources/regional_inventory_service_rest_client_config.php b/ShoppingMerchantInventories/src/V1beta/resources/regional_inventory_service_rest_client_config.php index bfc18a9893e0..06f49a179ecb 100644 --- a/ShoppingMerchantInventories/src/V1beta/resources/regional_inventory_service_rest_client_config.php +++ b/ShoppingMerchantInventories/src/V1beta/resources/regional_inventory_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ShoppingMerchantQuota/src/V1beta/resources/quota_service_descriptor_config.php b/ShoppingMerchantQuota/src/V1beta/resources/quota_service_descriptor_config.php index b364a5aa428e..baf69a0b10eb 100644 --- a/ShoppingMerchantQuota/src/V1beta/resources/quota_service_descriptor_config.php +++ b/ShoppingMerchantQuota/src/V1beta/resources/quota_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ShoppingMerchantQuota/src/V1beta/resources/quota_service_rest_client_config.php b/ShoppingMerchantQuota/src/V1beta/resources/quota_service_rest_client_config.php index e15ea7e3ca80..6e85fece47f3 100644 --- a/ShoppingMerchantQuota/src/V1beta/resources/quota_service_rest_client_config.php +++ b/ShoppingMerchantQuota/src/V1beta/resources/quota_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ShoppingMerchantReports/src/V1beta/resources/report_service_descriptor_config.php b/ShoppingMerchantReports/src/V1beta/resources/report_service_descriptor_config.php index 1807c8da1302..ecf32fa6a3bc 100644 --- a/ShoppingMerchantReports/src/V1beta/resources/report_service_descriptor_config.php +++ b/ShoppingMerchantReports/src/V1beta/resources/report_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ShoppingMerchantReports/src/V1beta/resources/report_service_rest_client_config.php b/ShoppingMerchantReports/src/V1beta/resources/report_service_rest_client_config.php index 79bfd962ba9a..342bcf5aa04c 100644 --- a/ShoppingMerchantReports/src/V1beta/resources/report_service_rest_client_config.php +++ b/ShoppingMerchantReports/src/V1beta/resources/report_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Spanner/src/Admin/Database/V1/resources/database_admin_descriptor_config.php b/Spanner/src/Admin/Database/V1/resources/database_admin_descriptor_config.php index 163a12cd5645..fc499b10c129 100644 --- a/Spanner/src/Admin/Database/V1/resources/database_admin_descriptor_config.php +++ b/Spanner/src/Admin/Database/V1/resources/database_admin_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Spanner/src/Admin/Database/V1/resources/database_admin_rest_client_config.php b/Spanner/src/Admin/Database/V1/resources/database_admin_rest_client_config.php index b14247ff4156..001f0f774002 100644 --- a/Spanner/src/Admin/Database/V1/resources/database_admin_rest_client_config.php +++ b/Spanner/src/Admin/Database/V1/resources/database_admin_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Spanner/src/Admin/Instance/V1/resources/instance_admin_descriptor_config.php b/Spanner/src/Admin/Instance/V1/resources/instance_admin_descriptor_config.php index 77b455a932c5..be079dc50ad9 100644 --- a/Spanner/src/Admin/Instance/V1/resources/instance_admin_descriptor_config.php +++ b/Spanner/src/Admin/Instance/V1/resources/instance_admin_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Spanner/src/Admin/Instance/V1/resources/instance_admin_rest_client_config.php b/Spanner/src/Admin/Instance/V1/resources/instance_admin_rest_client_config.php index e9dcb0cf144a..5016880cb8c3 100644 --- a/Spanner/src/Admin/Instance/V1/resources/instance_admin_rest_client_config.php +++ b/Spanner/src/Admin/Instance/V1/resources/instance_admin_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Spanner/src/V1/resources/spanner_descriptor_config.php b/Spanner/src/V1/resources/spanner_descriptor_config.php index d94df8302c55..4ac244344e49 100644 --- a/Spanner/src/V1/resources/spanner_descriptor_config.php +++ b/Spanner/src/V1/resources/spanner_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Spanner/src/V1/resources/spanner_rest_client_config.php b/Spanner/src/V1/resources/spanner_rest_client_config.php index 23430952a88d..e661da669861 100644 --- a/Spanner/src/V1/resources/spanner_rest_client_config.php +++ b/Spanner/src/V1/resources/spanner_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Speech/src/V1/resources/adaptation_descriptor_config.php b/Speech/src/V1/resources/adaptation_descriptor_config.php index 3a1fb339d0f7..9c99056cec53 100644 --- a/Speech/src/V1/resources/adaptation_descriptor_config.php +++ b/Speech/src/V1/resources/adaptation_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Speech/src/V1/resources/adaptation_rest_client_config.php b/Speech/src/V1/resources/adaptation_rest_client_config.php index 7bdfe447327b..e42f4b5f2b82 100644 --- a/Speech/src/V1/resources/adaptation_rest_client_config.php +++ b/Speech/src/V1/resources/adaptation_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Speech/src/V1/resources/speech_descriptor_config.php b/Speech/src/V1/resources/speech_descriptor_config.php index 7e06c400f928..1ca84398d524 100644 --- a/Speech/src/V1/resources/speech_descriptor_config.php +++ b/Speech/src/V1/resources/speech_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Speech/src/V1/resources/speech_rest_client_config.php b/Speech/src/V1/resources/speech_rest_client_config.php index 3fd298d37c71..7bada9a80e48 100644 --- a/Speech/src/V1/resources/speech_rest_client_config.php +++ b/Speech/src/V1/resources/speech_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Speech/src/V1p1beta1/resources/adaptation_descriptor_config.php b/Speech/src/V1p1beta1/resources/adaptation_descriptor_config.php index 5cb9ea5d7615..6f1bf4d62575 100644 --- a/Speech/src/V1p1beta1/resources/adaptation_descriptor_config.php +++ b/Speech/src/V1p1beta1/resources/adaptation_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Speech/src/V1p1beta1/resources/adaptation_rest_client_config.php b/Speech/src/V1p1beta1/resources/adaptation_rest_client_config.php index 229522c6f95b..d4e0c1845fea 100644 --- a/Speech/src/V1p1beta1/resources/adaptation_rest_client_config.php +++ b/Speech/src/V1p1beta1/resources/adaptation_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Speech/src/V1p1beta1/resources/speech_descriptor_config.php b/Speech/src/V1p1beta1/resources/speech_descriptor_config.php index c99f6c533874..5517a3e9b94e 100644 --- a/Speech/src/V1p1beta1/resources/speech_descriptor_config.php +++ b/Speech/src/V1p1beta1/resources/speech_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Speech/src/V1p1beta1/resources/speech_rest_client_config.php b/Speech/src/V1p1beta1/resources/speech_rest_client_config.php index 433e91d1ac36..49c8e8cc781a 100644 --- a/Speech/src/V1p1beta1/resources/speech_rest_client_config.php +++ b/Speech/src/V1p1beta1/resources/speech_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Speech/src/V2/resources/speech_descriptor_config.php b/Speech/src/V2/resources/speech_descriptor_config.php index e17b343381f8..1384a6d7cada 100644 --- a/Speech/src/V2/resources/speech_descriptor_config.php +++ b/Speech/src/V2/resources/speech_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Speech/src/V2/resources/speech_rest_client_config.php b/Speech/src/V2/resources/speech_rest_client_config.php index 31d2033a4bef..d54af2818314 100644 --- a/Speech/src/V2/resources/speech_rest_client_config.php +++ b/Speech/src/V2/resources/speech_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1/resources/sql_available_database_versions_service_descriptor_config.php b/SqlAdmin/src/V1/resources/sql_available_database_versions_service_descriptor_config.php index aa5583a949d7..356e7981b252 100644 --- a/SqlAdmin/src/V1/resources/sql_available_database_versions_service_descriptor_config.php +++ b/SqlAdmin/src/V1/resources/sql_available_database_versions_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1/resources/sql_available_database_versions_service_rest_client_config.php b/SqlAdmin/src/V1/resources/sql_available_database_versions_service_rest_client_config.php index 180f8ce91961..b33f57959be3 100644 --- a/SqlAdmin/src/V1/resources/sql_available_database_versions_service_rest_client_config.php +++ b/SqlAdmin/src/V1/resources/sql_available_database_versions_service_rest_client_config.php @@ -1,4 +1,24 @@ [], diff --git a/SqlAdmin/src/V1/resources/sql_backup_runs_service_descriptor_config.php b/SqlAdmin/src/V1/resources/sql_backup_runs_service_descriptor_config.php index 58321d21cb45..afda4d34224e 100644 --- a/SqlAdmin/src/V1/resources/sql_backup_runs_service_descriptor_config.php +++ b/SqlAdmin/src/V1/resources/sql_backup_runs_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1/resources/sql_backup_runs_service_rest_client_config.php b/SqlAdmin/src/V1/resources/sql_backup_runs_service_rest_client_config.php index 954030ae0b3b..88a3920f7733 100644 --- a/SqlAdmin/src/V1/resources/sql_backup_runs_service_rest_client_config.php +++ b/SqlAdmin/src/V1/resources/sql_backup_runs_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1/resources/sql_connect_service_descriptor_config.php b/SqlAdmin/src/V1/resources/sql_connect_service_descriptor_config.php index e0f480273905..24ec469afcb7 100644 --- a/SqlAdmin/src/V1/resources/sql_connect_service_descriptor_config.php +++ b/SqlAdmin/src/V1/resources/sql_connect_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1/resources/sql_connect_service_rest_client_config.php b/SqlAdmin/src/V1/resources/sql_connect_service_rest_client_config.php index 95100516a9bc..b68bacc8b395 100644 --- a/SqlAdmin/src/V1/resources/sql_connect_service_rest_client_config.php +++ b/SqlAdmin/src/V1/resources/sql_connect_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1/resources/sql_databases_service_descriptor_config.php b/SqlAdmin/src/V1/resources/sql_databases_service_descriptor_config.php index 20f7c1bd6171..5484e5243370 100644 --- a/SqlAdmin/src/V1/resources/sql_databases_service_descriptor_config.php +++ b/SqlAdmin/src/V1/resources/sql_databases_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1/resources/sql_databases_service_rest_client_config.php b/SqlAdmin/src/V1/resources/sql_databases_service_rest_client_config.php index b745a1bf61aa..92ed62735309 100644 --- a/SqlAdmin/src/V1/resources/sql_databases_service_rest_client_config.php +++ b/SqlAdmin/src/V1/resources/sql_databases_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1/resources/sql_events_service_descriptor_config.php b/SqlAdmin/src/V1/resources/sql_events_service_descriptor_config.php index 844819020bfe..55d525ef6df8 100644 --- a/SqlAdmin/src/V1/resources/sql_events_service_descriptor_config.php +++ b/SqlAdmin/src/V1/resources/sql_events_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1/resources/sql_events_service_rest_client_config.php b/SqlAdmin/src/V1/resources/sql_events_service_rest_client_config.php index 180f8ce91961..b33f57959be3 100644 --- a/SqlAdmin/src/V1/resources/sql_events_service_rest_client_config.php +++ b/SqlAdmin/src/V1/resources/sql_events_service_rest_client_config.php @@ -1,4 +1,24 @@ [], diff --git a/SqlAdmin/src/V1/resources/sql_flags_service_descriptor_config.php b/SqlAdmin/src/V1/resources/sql_flags_service_descriptor_config.php index 2def48b70a6e..34f76073b652 100644 --- a/SqlAdmin/src/V1/resources/sql_flags_service_descriptor_config.php +++ b/SqlAdmin/src/V1/resources/sql_flags_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1/resources/sql_flags_service_rest_client_config.php b/SqlAdmin/src/V1/resources/sql_flags_service_rest_client_config.php index c7530b98ecca..caa3c0daf149 100644 --- a/SqlAdmin/src/V1/resources/sql_flags_service_rest_client_config.php +++ b/SqlAdmin/src/V1/resources/sql_flags_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1/resources/sql_iam_policies_service_descriptor_config.php b/SqlAdmin/src/V1/resources/sql_iam_policies_service_descriptor_config.php index 14d402cc66dd..45c8076dd07f 100644 --- a/SqlAdmin/src/V1/resources/sql_iam_policies_service_descriptor_config.php +++ b/SqlAdmin/src/V1/resources/sql_iam_policies_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1/resources/sql_iam_policies_service_rest_client_config.php b/SqlAdmin/src/V1/resources/sql_iam_policies_service_rest_client_config.php index 180f8ce91961..b33f57959be3 100644 --- a/SqlAdmin/src/V1/resources/sql_iam_policies_service_rest_client_config.php +++ b/SqlAdmin/src/V1/resources/sql_iam_policies_service_rest_client_config.php @@ -1,4 +1,24 @@ [], diff --git a/SqlAdmin/src/V1/resources/sql_instance_names_service_descriptor_config.php b/SqlAdmin/src/V1/resources/sql_instance_names_service_descriptor_config.php index 6c4e6661a1eb..0c94603c1c35 100644 --- a/SqlAdmin/src/V1/resources/sql_instance_names_service_descriptor_config.php +++ b/SqlAdmin/src/V1/resources/sql_instance_names_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1/resources/sql_instance_names_service_rest_client_config.php b/SqlAdmin/src/V1/resources/sql_instance_names_service_rest_client_config.php index 180f8ce91961..b33f57959be3 100644 --- a/SqlAdmin/src/V1/resources/sql_instance_names_service_rest_client_config.php +++ b/SqlAdmin/src/V1/resources/sql_instance_names_service_rest_client_config.php @@ -1,4 +1,24 @@ [], diff --git a/SqlAdmin/src/V1/resources/sql_instances_service_descriptor_config.php b/SqlAdmin/src/V1/resources/sql_instances_service_descriptor_config.php index 1fb9571ffc36..9a8d5c2df561 100644 --- a/SqlAdmin/src/V1/resources/sql_instances_service_descriptor_config.php +++ b/SqlAdmin/src/V1/resources/sql_instances_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1/resources/sql_instances_service_rest_client_config.php b/SqlAdmin/src/V1/resources/sql_instances_service_rest_client_config.php index b1b85ad0cb76..6e5988acb669 100644 --- a/SqlAdmin/src/V1/resources/sql_instances_service_rest_client_config.php +++ b/SqlAdmin/src/V1/resources/sql_instances_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1/resources/sql_operations_service_descriptor_config.php b/SqlAdmin/src/V1/resources/sql_operations_service_descriptor_config.php index 1c4a874eb953..c10561a60717 100644 --- a/SqlAdmin/src/V1/resources/sql_operations_service_descriptor_config.php +++ b/SqlAdmin/src/V1/resources/sql_operations_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1/resources/sql_operations_service_rest_client_config.php b/SqlAdmin/src/V1/resources/sql_operations_service_rest_client_config.php index d23d4d999f97..1f90139216f3 100644 --- a/SqlAdmin/src/V1/resources/sql_operations_service_rest_client_config.php +++ b/SqlAdmin/src/V1/resources/sql_operations_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1/resources/sql_regions_service_descriptor_config.php b/SqlAdmin/src/V1/resources/sql_regions_service_descriptor_config.php index b725347dd1fa..d3311811274a 100644 --- a/SqlAdmin/src/V1/resources/sql_regions_service_descriptor_config.php +++ b/SqlAdmin/src/V1/resources/sql_regions_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1/resources/sql_regions_service_rest_client_config.php b/SqlAdmin/src/V1/resources/sql_regions_service_rest_client_config.php index 180f8ce91961..b33f57959be3 100644 --- a/SqlAdmin/src/V1/resources/sql_regions_service_rest_client_config.php +++ b/SqlAdmin/src/V1/resources/sql_regions_service_rest_client_config.php @@ -1,4 +1,24 @@ [], diff --git a/SqlAdmin/src/V1/resources/sql_ssl_certs_service_descriptor_config.php b/SqlAdmin/src/V1/resources/sql_ssl_certs_service_descriptor_config.php index 32243b2ca98c..2fd9e63e4e12 100644 --- a/SqlAdmin/src/V1/resources/sql_ssl_certs_service_descriptor_config.php +++ b/SqlAdmin/src/V1/resources/sql_ssl_certs_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1/resources/sql_ssl_certs_service_rest_client_config.php b/SqlAdmin/src/V1/resources/sql_ssl_certs_service_rest_client_config.php index 14da6bae91ba..293461e0404a 100644 --- a/SqlAdmin/src/V1/resources/sql_ssl_certs_service_rest_client_config.php +++ b/SqlAdmin/src/V1/resources/sql_ssl_certs_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1/resources/sql_tiers_service_descriptor_config.php b/SqlAdmin/src/V1/resources/sql_tiers_service_descriptor_config.php index d8cef0301cf1..0b40da39b6bc 100644 --- a/SqlAdmin/src/V1/resources/sql_tiers_service_descriptor_config.php +++ b/SqlAdmin/src/V1/resources/sql_tiers_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1/resources/sql_tiers_service_rest_client_config.php b/SqlAdmin/src/V1/resources/sql_tiers_service_rest_client_config.php index a8022275041f..e983b43d09d9 100644 --- a/SqlAdmin/src/V1/resources/sql_tiers_service_rest_client_config.php +++ b/SqlAdmin/src/V1/resources/sql_tiers_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1/resources/sql_users_service_descriptor_config.php b/SqlAdmin/src/V1/resources/sql_users_service_descriptor_config.php index ef66bc4ded66..d998757a81db 100644 --- a/SqlAdmin/src/V1/resources/sql_users_service_descriptor_config.php +++ b/SqlAdmin/src/V1/resources/sql_users_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1/resources/sql_users_service_rest_client_config.php b/SqlAdmin/src/V1/resources/sql_users_service_rest_client_config.php index 4cf47be7cb42..1ce8c4a32f35 100644 --- a/SqlAdmin/src/V1/resources/sql_users_service_rest_client_config.php +++ b/SqlAdmin/src/V1/resources/sql_users_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1beta4/resources/sql_backup_runs_service_descriptor_config.php b/SqlAdmin/src/V1beta4/resources/sql_backup_runs_service_descriptor_config.php index 635377f87292..add77c32c4ee 100644 --- a/SqlAdmin/src/V1beta4/resources/sql_backup_runs_service_descriptor_config.php +++ b/SqlAdmin/src/V1beta4/resources/sql_backup_runs_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1beta4/resources/sql_backup_runs_service_rest_client_config.php b/SqlAdmin/src/V1beta4/resources/sql_backup_runs_service_rest_client_config.php index 9794f11c3ab1..5e1941f98fb4 100644 --- a/SqlAdmin/src/V1beta4/resources/sql_backup_runs_service_rest_client_config.php +++ b/SqlAdmin/src/V1beta4/resources/sql_backup_runs_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1beta4/resources/sql_connect_service_descriptor_config.php b/SqlAdmin/src/V1beta4/resources/sql_connect_service_descriptor_config.php index ba44c630a526..c276de114a2c 100644 --- a/SqlAdmin/src/V1beta4/resources/sql_connect_service_descriptor_config.php +++ b/SqlAdmin/src/V1beta4/resources/sql_connect_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1beta4/resources/sql_connect_service_rest_client_config.php b/SqlAdmin/src/V1beta4/resources/sql_connect_service_rest_client_config.php index ee283d1f2f30..01680b46fca6 100644 --- a/SqlAdmin/src/V1beta4/resources/sql_connect_service_rest_client_config.php +++ b/SqlAdmin/src/V1beta4/resources/sql_connect_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1beta4/resources/sql_databases_service_descriptor_config.php b/SqlAdmin/src/V1beta4/resources/sql_databases_service_descriptor_config.php index 7a68304867af..ced86c484679 100644 --- a/SqlAdmin/src/V1beta4/resources/sql_databases_service_descriptor_config.php +++ b/SqlAdmin/src/V1beta4/resources/sql_databases_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1beta4/resources/sql_databases_service_rest_client_config.php b/SqlAdmin/src/V1beta4/resources/sql_databases_service_rest_client_config.php index 19e11d8755a2..4273d5a60d65 100644 --- a/SqlAdmin/src/V1beta4/resources/sql_databases_service_rest_client_config.php +++ b/SqlAdmin/src/V1beta4/resources/sql_databases_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1beta4/resources/sql_flags_service_descriptor_config.php b/SqlAdmin/src/V1beta4/resources/sql_flags_service_descriptor_config.php index 4b5baa1aec4d..722c492d6de5 100644 --- a/SqlAdmin/src/V1beta4/resources/sql_flags_service_descriptor_config.php +++ b/SqlAdmin/src/V1beta4/resources/sql_flags_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1beta4/resources/sql_flags_service_rest_client_config.php b/SqlAdmin/src/V1beta4/resources/sql_flags_service_rest_client_config.php index 82264f5111c9..72038144262d 100644 --- a/SqlAdmin/src/V1beta4/resources/sql_flags_service_rest_client_config.php +++ b/SqlAdmin/src/V1beta4/resources/sql_flags_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1beta4/resources/sql_iam_policies_service_descriptor_config.php b/SqlAdmin/src/V1beta4/resources/sql_iam_policies_service_descriptor_config.php index 805d7f07299b..7fd9309b7ccc 100644 --- a/SqlAdmin/src/V1beta4/resources/sql_iam_policies_service_descriptor_config.php +++ b/SqlAdmin/src/V1beta4/resources/sql_iam_policies_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1beta4/resources/sql_iam_policies_service_rest_client_config.php b/SqlAdmin/src/V1beta4/resources/sql_iam_policies_service_rest_client_config.php index 180f8ce91961..b33f57959be3 100644 --- a/SqlAdmin/src/V1beta4/resources/sql_iam_policies_service_rest_client_config.php +++ b/SqlAdmin/src/V1beta4/resources/sql_iam_policies_service_rest_client_config.php @@ -1,4 +1,24 @@ [], diff --git a/SqlAdmin/src/V1beta4/resources/sql_instances_service_descriptor_config.php b/SqlAdmin/src/V1beta4/resources/sql_instances_service_descriptor_config.php index e84aa300d2e0..7f91a9fefa6e 100644 --- a/SqlAdmin/src/V1beta4/resources/sql_instances_service_descriptor_config.php +++ b/SqlAdmin/src/V1beta4/resources/sql_instances_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1beta4/resources/sql_instances_service_rest_client_config.php b/SqlAdmin/src/V1beta4/resources/sql_instances_service_rest_client_config.php index 506f0d5450a6..981162de4c65 100644 --- a/SqlAdmin/src/V1beta4/resources/sql_instances_service_rest_client_config.php +++ b/SqlAdmin/src/V1beta4/resources/sql_instances_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1beta4/resources/sql_operations_service_descriptor_config.php b/SqlAdmin/src/V1beta4/resources/sql_operations_service_descriptor_config.php index 040a421d3179..35aeb6d8dfc5 100644 --- a/SqlAdmin/src/V1beta4/resources/sql_operations_service_descriptor_config.php +++ b/SqlAdmin/src/V1beta4/resources/sql_operations_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1beta4/resources/sql_operations_service_rest_client_config.php b/SqlAdmin/src/V1beta4/resources/sql_operations_service_rest_client_config.php index a084356cfafe..f4eb946d172e 100644 --- a/SqlAdmin/src/V1beta4/resources/sql_operations_service_rest_client_config.php +++ b/SqlAdmin/src/V1beta4/resources/sql_operations_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1beta4/resources/sql_ssl_certs_service_descriptor_config.php b/SqlAdmin/src/V1beta4/resources/sql_ssl_certs_service_descriptor_config.php index 2951077eb11d..500d2fa8fb64 100644 --- a/SqlAdmin/src/V1beta4/resources/sql_ssl_certs_service_descriptor_config.php +++ b/SqlAdmin/src/V1beta4/resources/sql_ssl_certs_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1beta4/resources/sql_ssl_certs_service_rest_client_config.php b/SqlAdmin/src/V1beta4/resources/sql_ssl_certs_service_rest_client_config.php index 36b34baeda08..293f6aa32a76 100644 --- a/SqlAdmin/src/V1beta4/resources/sql_ssl_certs_service_rest_client_config.php +++ b/SqlAdmin/src/V1beta4/resources/sql_ssl_certs_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1beta4/resources/sql_tiers_service_descriptor_config.php b/SqlAdmin/src/V1beta4/resources/sql_tiers_service_descriptor_config.php index 48351ac9571b..d045f4288667 100644 --- a/SqlAdmin/src/V1beta4/resources/sql_tiers_service_descriptor_config.php +++ b/SqlAdmin/src/V1beta4/resources/sql_tiers_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1beta4/resources/sql_tiers_service_rest_client_config.php b/SqlAdmin/src/V1beta4/resources/sql_tiers_service_rest_client_config.php index 2782cfe3ddcc..f0e4a5054597 100644 --- a/SqlAdmin/src/V1beta4/resources/sql_tiers_service_rest_client_config.php +++ b/SqlAdmin/src/V1beta4/resources/sql_tiers_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1beta4/resources/sql_users_service_descriptor_config.php b/SqlAdmin/src/V1beta4/resources/sql_users_service_descriptor_config.php index 93f82c112920..acf4e556353e 100644 --- a/SqlAdmin/src/V1beta4/resources/sql_users_service_descriptor_config.php +++ b/SqlAdmin/src/V1beta4/resources/sql_users_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/SqlAdmin/src/V1beta4/resources/sql_users_service_rest_client_config.php b/SqlAdmin/src/V1beta4/resources/sql_users_service_rest_client_config.php index 26a0fecbb649..6d389cb9910f 100644 --- a/SqlAdmin/src/V1beta4/resources/sql_users_service_rest_client_config.php +++ b/SqlAdmin/src/V1beta4/resources/sql_users_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/StorageInsights/src/V1/resources/storage_insights_descriptor_config.php b/StorageInsights/src/V1/resources/storage_insights_descriptor_config.php index eebdad743e95..2db16c29fda1 100644 --- a/StorageInsights/src/V1/resources/storage_insights_descriptor_config.php +++ b/StorageInsights/src/V1/resources/storage_insights_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/StorageInsights/src/V1/resources/storage_insights_rest_client_config.php b/StorageInsights/src/V1/resources/storage_insights_rest_client_config.php index 8172749ca244..85d5310815ca 100644 --- a/StorageInsights/src/V1/resources/storage_insights_rest_client_config.php +++ b/StorageInsights/src/V1/resources/storage_insights_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/StorageTransfer/src/V1/resources/storage_transfer_service_descriptor_config.php b/StorageTransfer/src/V1/resources/storage_transfer_service_descriptor_config.php index 4e2e5fb465fb..02ba6f580f9d 100644 --- a/StorageTransfer/src/V1/resources/storage_transfer_service_descriptor_config.php +++ b/StorageTransfer/src/V1/resources/storage_transfer_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/StorageTransfer/src/V1/resources/storage_transfer_service_rest_client_config.php b/StorageTransfer/src/V1/resources/storage_transfer_service_rest_client_config.php index 1a36cb5260f5..14d19decd51f 100644 --- a/StorageTransfer/src/V1/resources/storage_transfer_service_rest_client_config.php +++ b/StorageTransfer/src/V1/resources/storage_transfer_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Support/src/V2/resources/case_attachment_service_descriptor_config.php b/Support/src/V2/resources/case_attachment_service_descriptor_config.php index 3afb7142d88e..a6acb27cb7fb 100644 --- a/Support/src/V2/resources/case_attachment_service_descriptor_config.php +++ b/Support/src/V2/resources/case_attachment_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Support/src/V2/resources/case_attachment_service_rest_client_config.php b/Support/src/V2/resources/case_attachment_service_rest_client_config.php index 6072ee3b4f59..44f5c6786e92 100644 --- a/Support/src/V2/resources/case_attachment_service_rest_client_config.php +++ b/Support/src/V2/resources/case_attachment_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Support/src/V2/resources/case_service_descriptor_config.php b/Support/src/V2/resources/case_service_descriptor_config.php index 045c4b5642e5..b97e8e966e33 100644 --- a/Support/src/V2/resources/case_service_descriptor_config.php +++ b/Support/src/V2/resources/case_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Support/src/V2/resources/case_service_rest_client_config.php b/Support/src/V2/resources/case_service_rest_client_config.php index 82a1054b5094..35e1aa86a107 100644 --- a/Support/src/V2/resources/case_service_rest_client_config.php +++ b/Support/src/V2/resources/case_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Support/src/V2/resources/comment_service_descriptor_config.php b/Support/src/V2/resources/comment_service_descriptor_config.php index afbc2988d2f3..f3f31a7f53de 100644 --- a/Support/src/V2/resources/comment_service_descriptor_config.php +++ b/Support/src/V2/resources/comment_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Support/src/V2/resources/comment_service_rest_client_config.php b/Support/src/V2/resources/comment_service_rest_client_config.php index 02086419173c..63e87c0fef3f 100644 --- a/Support/src/V2/resources/comment_service_rest_client_config.php +++ b/Support/src/V2/resources/comment_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Talent/src/V4/resources/company_service_descriptor_config.php b/Talent/src/V4/resources/company_service_descriptor_config.php index 6b5a201fbb67..0748ac2fda3f 100644 --- a/Talent/src/V4/resources/company_service_descriptor_config.php +++ b/Talent/src/V4/resources/company_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Talent/src/V4/resources/company_service_rest_client_config.php b/Talent/src/V4/resources/company_service_rest_client_config.php index f9e1d791a15e..04130c8e4313 100644 --- a/Talent/src/V4/resources/company_service_rest_client_config.php +++ b/Talent/src/V4/resources/company_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Talent/src/V4/resources/completion_descriptor_config.php b/Talent/src/V4/resources/completion_descriptor_config.php index 51f2f550fc73..195e93d58e2e 100644 --- a/Talent/src/V4/resources/completion_descriptor_config.php +++ b/Talent/src/V4/resources/completion_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Talent/src/V4/resources/completion_rest_client_config.php b/Talent/src/V4/resources/completion_rest_client_config.php index 984725d9b63c..cb4150f00a18 100644 --- a/Talent/src/V4/resources/completion_rest_client_config.php +++ b/Talent/src/V4/resources/completion_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Talent/src/V4/resources/event_service_descriptor_config.php b/Talent/src/V4/resources/event_service_descriptor_config.php index 7b69cc36ee3e..8b689666ef00 100644 --- a/Talent/src/V4/resources/event_service_descriptor_config.php +++ b/Talent/src/V4/resources/event_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Talent/src/V4/resources/event_service_rest_client_config.php b/Talent/src/V4/resources/event_service_rest_client_config.php index 3215a9371951..1d1280916dc6 100644 --- a/Talent/src/V4/resources/event_service_rest_client_config.php +++ b/Talent/src/V4/resources/event_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Talent/src/V4/resources/job_service_descriptor_config.php b/Talent/src/V4/resources/job_service_descriptor_config.php index 50dc767a2145..f524e9c3e98b 100644 --- a/Talent/src/V4/resources/job_service_descriptor_config.php +++ b/Talent/src/V4/resources/job_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Talent/src/V4/resources/job_service_rest_client_config.php b/Talent/src/V4/resources/job_service_rest_client_config.php index 7321686775c7..a5894278fd9a 100644 --- a/Talent/src/V4/resources/job_service_rest_client_config.php +++ b/Talent/src/V4/resources/job_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Talent/src/V4/resources/tenant_service_descriptor_config.php b/Talent/src/V4/resources/tenant_service_descriptor_config.php index b30011dfee6d..cefb9eb0aac1 100644 --- a/Talent/src/V4/resources/tenant_service_descriptor_config.php +++ b/Talent/src/V4/resources/tenant_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Talent/src/V4/resources/tenant_service_rest_client_config.php b/Talent/src/V4/resources/tenant_service_rest_client_config.php index cfd3a79d0b13..a6c00dacfa9b 100644 --- a/Talent/src/V4/resources/tenant_service_rest_client_config.php +++ b/Talent/src/V4/resources/tenant_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Talent/src/V4beta1/resources/company_service_descriptor_config.php b/Talent/src/V4beta1/resources/company_service_descriptor_config.php index ba9c52c13766..94b457c38f39 100644 --- a/Talent/src/V4beta1/resources/company_service_descriptor_config.php +++ b/Talent/src/V4beta1/resources/company_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Talent/src/V4beta1/resources/company_service_rest_client_config.php b/Talent/src/V4beta1/resources/company_service_rest_client_config.php index 999795014ec9..2c8a3c41ceaf 100644 --- a/Talent/src/V4beta1/resources/company_service_rest_client_config.php +++ b/Talent/src/V4beta1/resources/company_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Talent/src/V4beta1/resources/completion_descriptor_config.php b/Talent/src/V4beta1/resources/completion_descriptor_config.php index d62222a1cdf5..c4f81414f37f 100644 --- a/Talent/src/V4beta1/resources/completion_descriptor_config.php +++ b/Talent/src/V4beta1/resources/completion_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Talent/src/V4beta1/resources/completion_rest_client_config.php b/Talent/src/V4beta1/resources/completion_rest_client_config.php index e0cef887d742..266e1e698309 100644 --- a/Talent/src/V4beta1/resources/completion_rest_client_config.php +++ b/Talent/src/V4beta1/resources/completion_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Talent/src/V4beta1/resources/event_service_descriptor_config.php b/Talent/src/V4beta1/resources/event_service_descriptor_config.php index 1401bed25a88..db0f955b67b9 100644 --- a/Talent/src/V4beta1/resources/event_service_descriptor_config.php +++ b/Talent/src/V4beta1/resources/event_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Talent/src/V4beta1/resources/event_service_rest_client_config.php b/Talent/src/V4beta1/resources/event_service_rest_client_config.php index 2d3cedacb30a..3051b9ba5509 100644 --- a/Talent/src/V4beta1/resources/event_service_rest_client_config.php +++ b/Talent/src/V4beta1/resources/event_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Talent/src/V4beta1/resources/job_service_descriptor_config.php b/Talent/src/V4beta1/resources/job_service_descriptor_config.php index 4ccbc95f21d6..9b8fa55b2db6 100644 --- a/Talent/src/V4beta1/resources/job_service_descriptor_config.php +++ b/Talent/src/V4beta1/resources/job_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Talent/src/V4beta1/resources/job_service_rest_client_config.php b/Talent/src/V4beta1/resources/job_service_rest_client_config.php index eab5f2d8fade..5d662dd0c5ac 100644 --- a/Talent/src/V4beta1/resources/job_service_rest_client_config.php +++ b/Talent/src/V4beta1/resources/job_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Talent/src/V4beta1/resources/tenant_service_descriptor_config.php b/Talent/src/V4beta1/resources/tenant_service_descriptor_config.php index e70c09dcf160..63ff9710684c 100644 --- a/Talent/src/V4beta1/resources/tenant_service_descriptor_config.php +++ b/Talent/src/V4beta1/resources/tenant_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Talent/src/V4beta1/resources/tenant_service_rest_client_config.php b/Talent/src/V4beta1/resources/tenant_service_rest_client_config.php index d6dd411246bd..4cfba8de5130 100644 --- a/Talent/src/V4beta1/resources/tenant_service_rest_client_config.php +++ b/Talent/src/V4beta1/resources/tenant_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Tasks/src/V2/resources/cloud_tasks_descriptor_config.php b/Tasks/src/V2/resources/cloud_tasks_descriptor_config.php index 56a0adfd3e31..b0486c1dd561 100644 --- a/Tasks/src/V2/resources/cloud_tasks_descriptor_config.php +++ b/Tasks/src/V2/resources/cloud_tasks_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Tasks/src/V2/resources/cloud_tasks_rest_client_config.php b/Tasks/src/V2/resources/cloud_tasks_rest_client_config.php index 88db041fc255..6ab177ae9a8f 100644 --- a/Tasks/src/V2/resources/cloud_tasks_rest_client_config.php +++ b/Tasks/src/V2/resources/cloud_tasks_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Tasks/src/V2beta2/resources/cloud_tasks_descriptor_config.php b/Tasks/src/V2beta2/resources/cloud_tasks_descriptor_config.php index 5ba5625faa2d..fea53dec6f93 100644 --- a/Tasks/src/V2beta2/resources/cloud_tasks_descriptor_config.php +++ b/Tasks/src/V2beta2/resources/cloud_tasks_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Tasks/src/V2beta2/resources/cloud_tasks_rest_client_config.php b/Tasks/src/V2beta2/resources/cloud_tasks_rest_client_config.php index d6a4e451cb37..d145d8f9e126 100644 --- a/Tasks/src/V2beta2/resources/cloud_tasks_rest_client_config.php +++ b/Tasks/src/V2beta2/resources/cloud_tasks_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Tasks/src/V2beta3/resources/cloud_tasks_descriptor_config.php b/Tasks/src/V2beta3/resources/cloud_tasks_descriptor_config.php index 59bc660c1596..af3d8e7b96d1 100644 --- a/Tasks/src/V2beta3/resources/cloud_tasks_descriptor_config.php +++ b/Tasks/src/V2beta3/resources/cloud_tasks_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Tasks/src/V2beta3/resources/cloud_tasks_rest_client_config.php b/Tasks/src/V2beta3/resources/cloud_tasks_rest_client_config.php index 8bcffbc8b257..228b1f2c978e 100644 --- a/Tasks/src/V2beta3/resources/cloud_tasks_rest_client_config.php +++ b/Tasks/src/V2beta3/resources/cloud_tasks_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/TelcoAutomation/metadata/V1/Telcoautomation.php b/TelcoAutomation/metadata/V1/Telcoautomation.php index 4abe4a8c09da63f2d429501e82b0c79f4dad508b..01a27db9624c1e248b8b3238b23121e87a3c5f3b 100644 GIT binary patch delta 1055 zcmZ8gTWFF|9Os+a>a%d2&77=SGrF18h;=h_9-X$-`8hwGE*)Q{U*X!+ymVnTYPChs zW!o>RhXoCK>M0lmF&G6!4SI z1hd1-dn|6D&Ej%!-5nOEr)B{@?wMYkr3(|Gq!>$MQcv+kf1^4}7sNvSBF^olnB6;! zcLpt+rQ83Zv=}oe@YJA!)8Gf&dI4`*HohhBX^)fS?~cV3O(l*J=s zyoBCLThL2;(QIm5m!%B_0Woq!6jFWt+TucpM)EYf)J2*)aHife;fJOcG?@qR!@L?3 z=58q32I{j^ai}jNCX&%uTAN8kLTORx52cP`v@HyoB~$Wo*5br#%aPJvZ*^kKI#Q9M zoml5m=<(jnBDU{L5k1aRoUty&?sggM?UlzeT_PDz#8aY<(O|>=0ePX^d?2^F1CLEj z_|{dQqmb*8Vy_rZ&q2v=hFuP$Z8=uj&KH$%#}slmAdc;Onv{Z18Zorf{od9s9~ZVory(c*rb@5Vv? z(tl6!6VHKqCd=CL5pSWb^`tMFO1s75(Nr`ZOOc@}wjL`s)g$bk_ww0$0QRoaWfb#; zZnD3G3l^R>_fm1sIJSy5;X@txPf$jeb1s6%t$Cc1)ZJPTZtl98OzYt2er Q56)M(q$f6Yu4jVz3uZo&n*aa+ delta 1011 zcmZvbT}V@57{@vD`>1ohsT*3BT0wpXQaWwhadRJ;+cfv-rYt?yOr330ES<{0FA$9W z7hR-fPnsYSZd_MEU3U=#5@lyQ+i^jc=Y9Xr|M@-t=RMH~wGp9Syh)>$ zws+DBE>QQeCtnv;`G6K5DqCM?hd+LWsD(6RS9J=d$|7-;$sG6i*|8w`Owm$2mr9|z zc>7RCIh*oBQ6_!NGs=>Ph%Ui#SqX-emC!5H_^zD4DE;1KufXp;FCbN7a}kw8n3hFDp(~M{rJEE2y`aVHn#KXlN_Lk+u_9 zZ5u|Fx>2}~x%H{1v9ESuPkl0%{GjLp%lM!t$YR`3gB6Vi-!ubwuaQCDKEY3=Ct6U> zW;C?tljLBpxVji~qRyagz`WKd^!cD&gj;7!A%3b0p&knN#K{-{G3_^M70gq!PJqa9f;fOa7>}Dsu0k3Z?kW{KV9`i~&v4Ya*$^xv% zKX5%om&b3g=H>+JzlE;LTfE*uY@EIo9i63xQRW{J`4d~Vr&5Y==RzFZZKU&(X+$Zy z5MPXim^aSxR_94${KYhyBqy9`QytVu=}* zhUEXtkc36F49BWv*t9I6&gv8>m#s70j_ktdt0FF!gK8<}YzxS>UlW9WdzkNJsW8Vn zoes(UzLAluo`D;2LP_igsqrV4*Y6!9`xIS-hmIo5I3}_0U9mIOAGFx~n3CEXJ7D8l>2DO~LFQOB!uQ-0Rd|7GZT~ diff --git a/TelcoAutomation/src/V1/Deployment.php b/TelcoAutomation/src/V1/Deployment.php index 219a9e26d768..57440dc2eacb 100644 --- a/TelcoAutomation/src/V1/Deployment.php +++ b/TelcoAutomation/src/V1/Deployment.php @@ -98,6 +98,9 @@ class Deployment extends \Google\Protobuf\Internal\Message protected $source_provider = ''; /** * Optional. Immutable. The WorkloadCluster on which to create the Deployment. + * This field should only be passed when the deployment_level of the source + * blueprint specifies deployments on workload clusters e.g. + * WORKLOAD_CLUSTER_DEPLOYMENT. * * Generated from protobuf field string workload_cluster = 13 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; */ @@ -156,6 +159,9 @@ class Deployment extends \Google\Protobuf\Internal\Message * which this deployment is created. * @type string $workload_cluster * Optional. Immutable. The WorkloadCluster on which to create the Deployment. + * This field should only be passed when the deployment_level of the source + * blueprint specifies deployments on workload clusters e.g. + * WORKLOAD_CLUSTER_DEPLOYMENT. * @type int $deployment_level * Output only. Attributes to where the deployment can inflict changes. The * value can only be [SINGLE_DEPLOYMENT, MULTI_DEPLOYMENT]. @@ -527,6 +533,9 @@ public function setSourceProvider($var) /** * Optional. Immutable. The WorkloadCluster on which to create the Deployment. + * This field should only be passed when the deployment_level of the source + * blueprint specifies deployments on workload clusters e.g. + * WORKLOAD_CLUSTER_DEPLOYMENT. * * Generated from protobuf field string workload_cluster = 13 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; * @return string @@ -538,6 +547,9 @@ public function getWorkloadCluster() /** * Optional. Immutable. The WorkloadCluster on which to create the Deployment. + * This field should only be passed when the deployment_level of the source + * blueprint specifies deployments on workload clusters e.g. + * WORKLOAD_CLUSTER_DEPLOYMENT. * * Generated from protobuf field string workload_cluster = 13 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; * @param string $var diff --git a/TelcoAutomation/src/V1/DeploymentLevel.php b/TelcoAutomation/src/V1/DeploymentLevel.php index 84e9420bd402..f30a5e1284f6 100644 --- a/TelcoAutomation/src/V1/DeploymentLevel.php +++ b/TelcoAutomation/src/V1/DeploymentLevel.php @@ -48,12 +48,22 @@ class DeploymentLevel * Generated from protobuf enum MULTI_DEPLOYMENT = 3; */ const MULTI_DEPLOYMENT = 3; + /** + * Blueprints at WORKLOAD_CLUSTER_DEPLOYMENT level can be + * a) Modified in private catalog. + * b) Used to create a deployment on workload cluster by the user, once + * approved. + * + * Generated from protobuf enum WORKLOAD_CLUSTER_DEPLOYMENT = 4; + */ + const WORKLOAD_CLUSTER_DEPLOYMENT = 4; private static $valueToName = [ self::DEPLOYMENT_LEVEL_UNSPECIFIED => 'DEPLOYMENT_LEVEL_UNSPECIFIED', self::HYDRATION => 'HYDRATION', self::SINGLE_DEPLOYMENT => 'SINGLE_DEPLOYMENT', self::MULTI_DEPLOYMENT => 'MULTI_DEPLOYMENT', + self::WORKLOAD_CLUSTER_DEPLOYMENT => 'WORKLOAD_CLUSTER_DEPLOYMENT', ]; public static function name($value) diff --git a/TelcoAutomation/src/V1/Status.php b/TelcoAutomation/src/V1/Status.php index 9b42bf732e7b..19c10628daa4 100644 --- a/TelcoAutomation/src/V1/Status.php +++ b/TelcoAutomation/src/V1/Status.php @@ -55,6 +55,13 @@ class Status * Generated from protobuf enum STATUS_PEERING = 10; */ const STATUS_PEERING = 10; + /** + * K8s objects such as NetworkAttachmentDefinition don't have a defined + * status. + * + * Generated from protobuf enum STATUS_NOT_APPLICABLE = 11; + */ + const STATUS_NOT_APPLICABLE = 11; private static $valueToName = [ self::STATUS_UNSPECIFIED => 'STATUS_UNSPECIFIED', @@ -64,6 +71,7 @@ class Status self::STATUS_DELETING => 'STATUS_DELETING', self::STATUS_DELETED => 'STATUS_DELETED', self::STATUS_PEERING => 'STATUS_PEERING', + self::STATUS_NOT_APPLICABLE => 'STATUS_NOT_APPLICABLE', ]; public static function name($value) diff --git a/TelcoAutomation/src/V1/resources/telco_automation_descriptor_config.php b/TelcoAutomation/src/V1/resources/telco_automation_descriptor_config.php index 4998bf59ce44..67b54f6c288d 100644 --- a/TelcoAutomation/src/V1/resources/telco_automation_descriptor_config.php +++ b/TelcoAutomation/src/V1/resources/telco_automation_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/TelcoAutomation/src/V1/resources/telco_automation_rest_client_config.php b/TelcoAutomation/src/V1/resources/telco_automation_rest_client_config.php index b4c0f25990ae..c30e914f633e 100644 --- a/TelcoAutomation/src/V1/resources/telco_automation_rest_client_config.php +++ b/TelcoAutomation/src/V1/resources/telco_automation_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/TextToSpeech/src/V1/resources/text_to_speech_descriptor_config.php b/TextToSpeech/src/V1/resources/text_to_speech_descriptor_config.php index 7085bff66dd3..01c2a8f0cf85 100644 --- a/TextToSpeech/src/V1/resources/text_to_speech_descriptor_config.php +++ b/TextToSpeech/src/V1/resources/text_to_speech_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/TextToSpeech/src/V1/resources/text_to_speech_long_audio_synthesize_descriptor_config.php b/TextToSpeech/src/V1/resources/text_to_speech_long_audio_synthesize_descriptor_config.php index 56245da16904..63aa9b8d0232 100644 --- a/TextToSpeech/src/V1/resources/text_to_speech_long_audio_synthesize_descriptor_config.php +++ b/TextToSpeech/src/V1/resources/text_to_speech_long_audio_synthesize_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/TextToSpeech/src/V1/resources/text_to_speech_long_audio_synthesize_rest_client_config.php b/TextToSpeech/src/V1/resources/text_to_speech_long_audio_synthesize_rest_client_config.php index 48d198772c9c..690fa540c6d7 100644 --- a/TextToSpeech/src/V1/resources/text_to_speech_long_audio_synthesize_rest_client_config.php +++ b/TextToSpeech/src/V1/resources/text_to_speech_long_audio_synthesize_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/TextToSpeech/src/V1/resources/text_to_speech_rest_client_config.php b/TextToSpeech/src/V1/resources/text_to_speech_rest_client_config.php index c3996623a6d7..7014d6557556 100644 --- a/TextToSpeech/src/V1/resources/text_to_speech_rest_client_config.php +++ b/TextToSpeech/src/V1/resources/text_to_speech_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Tpu/src/V1/resources/tpu_descriptor_config.php b/Tpu/src/V1/resources/tpu_descriptor_config.php index 11ca5eac08d8..94a4597d8c66 100644 --- a/Tpu/src/V1/resources/tpu_descriptor_config.php +++ b/Tpu/src/V1/resources/tpu_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Tpu/src/V1/resources/tpu_rest_client_config.php b/Tpu/src/V1/resources/tpu_rest_client_config.php index f997e45607d2..982ab1004eea 100644 --- a/Tpu/src/V1/resources/tpu_rest_client_config.php +++ b/Tpu/src/V1/resources/tpu_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Tpu/src/V2/resources/tpu_descriptor_config.php b/Tpu/src/V2/resources/tpu_descriptor_config.php index 6472b5cfffd7..0ff6e23ea756 100644 --- a/Tpu/src/V2/resources/tpu_descriptor_config.php +++ b/Tpu/src/V2/resources/tpu_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Tpu/src/V2/resources/tpu_rest_client_config.php b/Tpu/src/V2/resources/tpu_rest_client_config.php index b3446b2d7360..ce0a034d715e 100644 --- a/Tpu/src/V2/resources/tpu_rest_client_config.php +++ b/Tpu/src/V2/resources/tpu_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Trace/src/V2/resources/trace_service_descriptor_config.php b/Trace/src/V2/resources/trace_service_descriptor_config.php index 80d5351d1318..a2f48eee9cf6 100644 --- a/Trace/src/V2/resources/trace_service_descriptor_config.php +++ b/Trace/src/V2/resources/trace_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Trace/src/V2/resources/trace_service_rest_client_config.php b/Trace/src/V2/resources/trace_service_rest_client_config.php index 9b55961440fc..6fe09272fd07 100644 --- a/Trace/src/V2/resources/trace_service_rest_client_config.php +++ b/Trace/src/V2/resources/trace_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Translate/src/V3/resources/translation_service_descriptor_config.php b/Translate/src/V3/resources/translation_service_descriptor_config.php index 485ef049f09f..3add4334f54f 100644 --- a/Translate/src/V3/resources/translation_service_descriptor_config.php +++ b/Translate/src/V3/resources/translation_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Translate/src/V3/resources/translation_service_rest_client_config.php b/Translate/src/V3/resources/translation_service_rest_client_config.php index 720ee2e54ab0..e9c8b29ac03b 100644 --- a/Translate/src/V3/resources/translation_service_rest_client_config.php +++ b/Translate/src/V3/resources/translation_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/VideoIntelligence/src/V1/resources/video_intelligence_service_descriptor_config.php b/VideoIntelligence/src/V1/resources/video_intelligence_service_descriptor_config.php index 10e205c7cdad..a02a6c5b3c81 100644 --- a/VideoIntelligence/src/V1/resources/video_intelligence_service_descriptor_config.php +++ b/VideoIntelligence/src/V1/resources/video_intelligence_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/VideoIntelligence/src/V1/resources/video_intelligence_service_rest_client_config.php b/VideoIntelligence/src/V1/resources/video_intelligence_service_rest_client_config.php index 91be17c63ed7..9dfb17be6a1e 100644 --- a/VideoIntelligence/src/V1/resources/video_intelligence_service_rest_client_config.php +++ b/VideoIntelligence/src/V1/resources/video_intelligence_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/VideoIntelligence/src/V1beta2/resources/video_intelligence_service_descriptor_config.php b/VideoIntelligence/src/V1beta2/resources/video_intelligence_service_descriptor_config.php index 666138e5312b..f2116acd5829 100644 --- a/VideoIntelligence/src/V1beta2/resources/video_intelligence_service_descriptor_config.php +++ b/VideoIntelligence/src/V1beta2/resources/video_intelligence_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/VideoIntelligence/src/V1beta2/resources/video_intelligence_service_rest_client_config.php b/VideoIntelligence/src/V1beta2/resources/video_intelligence_service_rest_client_config.php index 86b6189ac474..eac8305109fa 100644 --- a/VideoIntelligence/src/V1beta2/resources/video_intelligence_service_rest_client_config.php +++ b/VideoIntelligence/src/V1beta2/resources/video_intelligence_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/VideoLiveStream/src/V1/resources/livestream_service_descriptor_config.php b/VideoLiveStream/src/V1/resources/livestream_service_descriptor_config.php index 7ecc8f7b40bc..2d867c0681de 100644 --- a/VideoLiveStream/src/V1/resources/livestream_service_descriptor_config.php +++ b/VideoLiveStream/src/V1/resources/livestream_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/VideoLiveStream/src/V1/resources/livestream_service_rest_client_config.php b/VideoLiveStream/src/V1/resources/livestream_service_rest_client_config.php index b5a5cb6bdf58..9cf89d84a1b7 100644 --- a/VideoLiveStream/src/V1/resources/livestream_service_rest_client_config.php +++ b/VideoLiveStream/src/V1/resources/livestream_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/VideoStitcher/src/V1/resources/video_stitcher_service_descriptor_config.php b/VideoStitcher/src/V1/resources/video_stitcher_service_descriptor_config.php index a971c38ff6d0..aafb2bf687e4 100644 --- a/VideoStitcher/src/V1/resources/video_stitcher_service_descriptor_config.php +++ b/VideoStitcher/src/V1/resources/video_stitcher_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/VideoStitcher/src/V1/resources/video_stitcher_service_rest_client_config.php b/VideoStitcher/src/V1/resources/video_stitcher_service_rest_client_config.php index d6dd5bc244c6..ffe207fd119e 100644 --- a/VideoStitcher/src/V1/resources/video_stitcher_service_rest_client_config.php +++ b/VideoStitcher/src/V1/resources/video_stitcher_service_rest_client_config.php @@ -1,4 +1,24 @@ [ From 6bd881e85db85a9bbfab6aa6ec11bee4f5c035ee Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 09:12:40 -0700 Subject: [PATCH 38/86] chore: add license and generated code headers to generated resource files (#7233) PiperOrigin-RevId: 624277410 Source-Link: https://github.com/googleapis/googleapis/commit/2d881be8c566e4c374061248dd205efd72b7ef4f Source-Link: https://github.com/googleapis/googleapis-gen/commit/1d063f9353aeffb9a968f1a00f1d105b0c14a42d Copy-Tag: eyJwIjoiVmlkZW9UcmFuc2NvZGVyLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiVmlzaW9uLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiVm1NaWdyYXRpb24vLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiVm13YXJlRW5naW5lLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiVnBjQWNjZXNzLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiV2ViUmlzay8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiV2ViU2VjdXJpdHlTY2FubmVyLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiV29ya2Zsb3dzLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= --- .../transcoder_service_descriptor_config.php | 20 +++++++++++++++++++ .../transcoder_service_rest_client_config.php | 20 +++++++++++++++++++ .../image_annotator_descriptor_config.php | 20 +++++++++++++++++++ .../image_annotator_rest_client_config.php | 20 +++++++++++++++++++ .../product_search_descriptor_config.php | 20 +++++++++++++++++++ .../product_search_rest_client_config.php | 20 +++++++++++++++++++ .../vm_migration_descriptor_config.php | 20 +++++++++++++++++++ .../vm_migration_rest_client_config.php | 20 +++++++++++++++++++ .../vmware_engine_descriptor_config.php | 20 +++++++++++++++++++ .../vmware_engine_rest_client_config.php | 20 +++++++++++++++++++ .../vpc_access_service_descriptor_config.php | 20 +++++++++++++++++++ .../vpc_access_service_rest_client_config.php | 20 +++++++++++++++++++ .../web_risk_service_descriptor_config.php | 20 +++++++++++++++++++ .../web_risk_service_rest_client_config.php | 20 +++++++++++++++++++ ...isk_service_v1_beta1_descriptor_config.php | 20 +++++++++++++++++++ ...sk_service_v1_beta1_rest_client_config.php | 20 +++++++++++++++++++ ...web_security_scanner_descriptor_config.php | 20 +++++++++++++++++++ ...eb_security_scanner_rest_client_config.php | 20 +++++++++++++++++++ ...web_security_scanner_descriptor_config.php | 20 +++++++++++++++++++ ...eb_security_scanner_rest_client_config.php | 20 +++++++++++++++++++ .../executions_descriptor_config.php | 20 +++++++++++++++++++ .../executions_rest_client_config.php | 20 +++++++++++++++++++ .../executions_descriptor_config.php | 20 +++++++++++++++++++ .../executions_rest_client_config.php | 20 +++++++++++++++++++ .../resources/workflows_descriptor_config.php | 20 +++++++++++++++++++ .../workflows_rest_client_config.php | 20 +++++++++++++++++++ .../resources/workflows_descriptor_config.php | 20 +++++++++++++++++++ .../workflows_rest_client_config.php | 20 +++++++++++++++++++ 28 files changed, 560 insertions(+) diff --git a/VideoTranscoder/src/V1/resources/transcoder_service_descriptor_config.php b/VideoTranscoder/src/V1/resources/transcoder_service_descriptor_config.php index acc7edd295ae..885afad568dc 100644 --- a/VideoTranscoder/src/V1/resources/transcoder_service_descriptor_config.php +++ b/VideoTranscoder/src/V1/resources/transcoder_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/VideoTranscoder/src/V1/resources/transcoder_service_rest_client_config.php b/VideoTranscoder/src/V1/resources/transcoder_service_rest_client_config.php index bedf0d6bda0e..a437550fcccb 100644 --- a/VideoTranscoder/src/V1/resources/transcoder_service_rest_client_config.php +++ b/VideoTranscoder/src/V1/resources/transcoder_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Vision/src/V1/resources/image_annotator_descriptor_config.php b/Vision/src/V1/resources/image_annotator_descriptor_config.php index 05ecadd575c1..6ca3b1ee2c4f 100644 --- a/Vision/src/V1/resources/image_annotator_descriptor_config.php +++ b/Vision/src/V1/resources/image_annotator_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Vision/src/V1/resources/image_annotator_rest_client_config.php b/Vision/src/V1/resources/image_annotator_rest_client_config.php index 5ca910208251..6c50e29a0d1a 100644 --- a/Vision/src/V1/resources/image_annotator_rest_client_config.php +++ b/Vision/src/V1/resources/image_annotator_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Vision/src/V1/resources/product_search_descriptor_config.php b/Vision/src/V1/resources/product_search_descriptor_config.php index 62781007ff5c..1de23804b2b9 100644 --- a/Vision/src/V1/resources/product_search_descriptor_config.php +++ b/Vision/src/V1/resources/product_search_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Vision/src/V1/resources/product_search_rest_client_config.php b/Vision/src/V1/resources/product_search_rest_client_config.php index 9ce3ae045331..374f29f1dade 100644 --- a/Vision/src/V1/resources/product_search_rest_client_config.php +++ b/Vision/src/V1/resources/product_search_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/VmMigration/src/V1/resources/vm_migration_descriptor_config.php b/VmMigration/src/V1/resources/vm_migration_descriptor_config.php index e8dffa2de52a..7a4fee565d72 100644 --- a/VmMigration/src/V1/resources/vm_migration_descriptor_config.php +++ b/VmMigration/src/V1/resources/vm_migration_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/VmMigration/src/V1/resources/vm_migration_rest_client_config.php b/VmMigration/src/V1/resources/vm_migration_rest_client_config.php index 04df0194c57a..a548189e98dc 100644 --- a/VmMigration/src/V1/resources/vm_migration_rest_client_config.php +++ b/VmMigration/src/V1/resources/vm_migration_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/VmwareEngine/src/V1/resources/vmware_engine_descriptor_config.php b/VmwareEngine/src/V1/resources/vmware_engine_descriptor_config.php index 81f95b6f2e5c..8005a342582a 100644 --- a/VmwareEngine/src/V1/resources/vmware_engine_descriptor_config.php +++ b/VmwareEngine/src/V1/resources/vmware_engine_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/VmwareEngine/src/V1/resources/vmware_engine_rest_client_config.php b/VmwareEngine/src/V1/resources/vmware_engine_rest_client_config.php index 109ba4a005e7..d95541cca591 100644 --- a/VmwareEngine/src/V1/resources/vmware_engine_rest_client_config.php +++ b/VmwareEngine/src/V1/resources/vmware_engine_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/VpcAccess/src/V1/resources/vpc_access_service_descriptor_config.php b/VpcAccess/src/V1/resources/vpc_access_service_descriptor_config.php index d7820fe3a3fb..e32b995f4bf2 100644 --- a/VpcAccess/src/V1/resources/vpc_access_service_descriptor_config.php +++ b/VpcAccess/src/V1/resources/vpc_access_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/VpcAccess/src/V1/resources/vpc_access_service_rest_client_config.php b/VpcAccess/src/V1/resources/vpc_access_service_rest_client_config.php index 941ea8196186..82cfdbb6b7cc 100644 --- a/VpcAccess/src/V1/resources/vpc_access_service_rest_client_config.php +++ b/VpcAccess/src/V1/resources/vpc_access_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/WebRisk/src/V1/resources/web_risk_service_descriptor_config.php b/WebRisk/src/V1/resources/web_risk_service_descriptor_config.php index 1eb7f1427c23..5fa67c34eea4 100644 --- a/WebRisk/src/V1/resources/web_risk_service_descriptor_config.php +++ b/WebRisk/src/V1/resources/web_risk_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/WebRisk/src/V1/resources/web_risk_service_rest_client_config.php b/WebRisk/src/V1/resources/web_risk_service_rest_client_config.php index ab0a604ffee1..e419b9b74d86 100644 --- a/WebRisk/src/V1/resources/web_risk_service_rest_client_config.php +++ b/WebRisk/src/V1/resources/web_risk_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/WebRisk/src/V1beta1/resources/web_risk_service_v1_beta1_descriptor_config.php b/WebRisk/src/V1beta1/resources/web_risk_service_v1_beta1_descriptor_config.php index 9f26397d4258..fa6b55c8354f 100644 --- a/WebRisk/src/V1beta1/resources/web_risk_service_v1_beta1_descriptor_config.php +++ b/WebRisk/src/V1beta1/resources/web_risk_service_v1_beta1_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/WebRisk/src/V1beta1/resources/web_risk_service_v1_beta1_rest_client_config.php b/WebRisk/src/V1beta1/resources/web_risk_service_v1_beta1_rest_client_config.php index d7ca5b4f9931..a2590f0fa7ff 100644 --- a/WebRisk/src/V1beta1/resources/web_risk_service_v1_beta1_rest_client_config.php +++ b/WebRisk/src/V1beta1/resources/web_risk_service_v1_beta1_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/WebSecurityScanner/src/V1/resources/web_security_scanner_descriptor_config.php b/WebSecurityScanner/src/V1/resources/web_security_scanner_descriptor_config.php index d64b2e48f719..5a50d57910f6 100644 --- a/WebSecurityScanner/src/V1/resources/web_security_scanner_descriptor_config.php +++ b/WebSecurityScanner/src/V1/resources/web_security_scanner_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/WebSecurityScanner/src/V1/resources/web_security_scanner_rest_client_config.php b/WebSecurityScanner/src/V1/resources/web_security_scanner_rest_client_config.php index c38e23bc436f..96a29e0145fe 100644 --- a/WebSecurityScanner/src/V1/resources/web_security_scanner_rest_client_config.php +++ b/WebSecurityScanner/src/V1/resources/web_security_scanner_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/WebSecurityScanner/src/V1beta/resources/web_security_scanner_descriptor_config.php b/WebSecurityScanner/src/V1beta/resources/web_security_scanner_descriptor_config.php index f169d6a5e46d..2e4d71ba0b62 100644 --- a/WebSecurityScanner/src/V1beta/resources/web_security_scanner_descriptor_config.php +++ b/WebSecurityScanner/src/V1beta/resources/web_security_scanner_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/WebSecurityScanner/src/V1beta/resources/web_security_scanner_rest_client_config.php b/WebSecurityScanner/src/V1beta/resources/web_security_scanner_rest_client_config.php index e3cc5c7648f0..1cd7634cf0da 100644 --- a/WebSecurityScanner/src/V1beta/resources/web_security_scanner_rest_client_config.php +++ b/WebSecurityScanner/src/V1beta/resources/web_security_scanner_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Workflows/src/Executions/V1/resources/executions_descriptor_config.php b/Workflows/src/Executions/V1/resources/executions_descriptor_config.php index 719d003ebf94..5057a59c6aa4 100644 --- a/Workflows/src/Executions/V1/resources/executions_descriptor_config.php +++ b/Workflows/src/Executions/V1/resources/executions_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Workflows/src/Executions/V1/resources/executions_rest_client_config.php b/Workflows/src/Executions/V1/resources/executions_rest_client_config.php index 09d749a4004f..2be69d572e95 100644 --- a/Workflows/src/Executions/V1/resources/executions_rest_client_config.php +++ b/Workflows/src/Executions/V1/resources/executions_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Workflows/src/Executions/V1beta/resources/executions_descriptor_config.php b/Workflows/src/Executions/V1beta/resources/executions_descriptor_config.php index 0836e4ff2d47..2b27d3161e9f 100644 --- a/Workflows/src/Executions/V1beta/resources/executions_descriptor_config.php +++ b/Workflows/src/Executions/V1beta/resources/executions_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Workflows/src/Executions/V1beta/resources/executions_rest_client_config.php b/Workflows/src/Executions/V1beta/resources/executions_rest_client_config.php index 1a24fec7f007..fe15ac4028fa 100644 --- a/Workflows/src/Executions/V1beta/resources/executions_rest_client_config.php +++ b/Workflows/src/Executions/V1beta/resources/executions_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Workflows/src/V1/resources/workflows_descriptor_config.php b/Workflows/src/V1/resources/workflows_descriptor_config.php index c4b42c207514..0fe479c12c60 100644 --- a/Workflows/src/V1/resources/workflows_descriptor_config.php +++ b/Workflows/src/V1/resources/workflows_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Workflows/src/V1/resources/workflows_rest_client_config.php b/Workflows/src/V1/resources/workflows_rest_client_config.php index 0ce03d0f8a98..e454d6e93105 100644 --- a/Workflows/src/V1/resources/workflows_rest_client_config.php +++ b/Workflows/src/V1/resources/workflows_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Workflows/src/V1beta/resources/workflows_descriptor_config.php b/Workflows/src/V1beta/resources/workflows_descriptor_config.php index cdd6e9ee581d..506d6214404b 100644 --- a/Workflows/src/V1beta/resources/workflows_descriptor_config.php +++ b/Workflows/src/V1beta/resources/workflows_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Workflows/src/V1beta/resources/workflows_rest_client_config.php b/Workflows/src/V1beta/resources/workflows_rest_client_config.php index 35bd2027c0e3..b9161e7da9a5 100644 --- a/Workflows/src/V1beta/resources/workflows_rest_client_config.php +++ b/Workflows/src/V1beta/resources/workflows_rest_client_config.php @@ -1,4 +1,24 @@ [ From 494e8a447aa67ac1be535640e23fef3cc0d63339 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 09:12:56 -0700 Subject: [PATCH 39/86] chore: add license and generated code headers to generated resource files (#7227) PiperOrigin-RevId: 624277410 Source-Link: https://github.com/googleapis/googleapis/commit/2d881be8c566e4c374061248dd205efd72b7ef4f Source-Link: https://github.com/googleapis/googleapis-gen/commit/1d063f9353aeffb9a968f1a00f1d105b0c14a42d Copy-Tag: eyJwIjoiQ2hhbm5lbC8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiQ29tbWVyY2VDb25zdW1lclByb2N1cmVtZW50Ly5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiQ29tcHV0ZS8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiQ29uZmlkZW50aWFsQ29tcHV0aW5nLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiQ29uZmlnLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiQ29udGFjdENlbnRlckluc2lnaHRzLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiQ29udGFpbmVyLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiQ29udGFpbmVyQW5hbHlzaXMvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiQ29udHJvbHNQYXJ0bmVyLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiRGF0YUNhdGFsb2cvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiRGF0YUNhdGFsb2dMaW5lYWdlLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiRGF0YUZ1c2lvbi8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiRGF0YUxhYmVsaW5nLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiRGF0YWZsb3cvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiRGF0YWZvcm0vLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiRGF0YXBsZXgvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiRGF0YXByb2MvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiRGF0YXByb2NNZXRhc3RvcmUvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiRGF0YXN0b3JlLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiRGF0YXN0b3JlQWRtaW4vLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== --- ...nnel_reports_service_descriptor_config.php | 20 +++++++++++++++++++ ...nel_reports_service_rest_client_config.php | 20 +++++++++++++++++++ ...loud_channel_service_descriptor_config.php | 20 +++++++++++++++++++ ...oud_channel_service_rest_client_config.php | 20 +++++++++++++++++++ ..._procurement_service_descriptor_config.php | 20 +++++++++++++++++++ ...procurement_service_rest_client_config.php | 20 +++++++++++++++++++ .../accelerator_types_descriptor_config.php | 20 +++++++++++++++++++ .../accelerator_types_rest_client_config.php | 20 +++++++++++++++++++ .../resources/addresses_descriptor_config.php | 20 +++++++++++++++++++ .../addresses_rest_client_config.php | 20 +++++++++++++++++++ .../autoscalers_descriptor_config.php | 20 +++++++++++++++++++ .../autoscalers_rest_client_config.php | 20 +++++++++++++++++++ .../backend_buckets_descriptor_config.php | 20 +++++++++++++++++++ .../backend_buckets_rest_client_config.php | 20 +++++++++++++++++++ .../backend_services_descriptor_config.php | 20 +++++++++++++++++++ .../backend_services_rest_client_config.php | 20 +++++++++++++++++++ .../disk_types_descriptor_config.php | 20 +++++++++++++++++++ .../disk_types_rest_client_config.php | 20 +++++++++++++++++++ .../V1/resources/disks_descriptor_config.php | 20 +++++++++++++++++++ .../V1/resources/disks_rest_client_config.php | 20 +++++++++++++++++++ ...xternal_vpn_gateways_descriptor_config.php | 20 +++++++++++++++++++ ...ternal_vpn_gateways_rest_client_config.php | 20 +++++++++++++++++++ .../firewall_policies_descriptor_config.php | 20 +++++++++++++++++++ .../firewall_policies_rest_client_config.php | 20 +++++++++++++++++++ .../resources/firewalls_descriptor_config.php | 20 +++++++++++++++++++ .../firewalls_rest_client_config.php | 20 +++++++++++++++++++ .../forwarding_rules_descriptor_config.php | 20 +++++++++++++++++++ .../forwarding_rules_rest_client_config.php | 20 +++++++++++++++++++ .../global_addresses_descriptor_config.php | 20 +++++++++++++++++++ .../global_addresses_rest_client_config.php | 20 +++++++++++++++++++ ...bal_forwarding_rules_descriptor_config.php | 20 +++++++++++++++++++ ...al_forwarding_rules_rest_client_config.php | 20 +++++++++++++++++++ ...work_endpoint_groups_descriptor_config.php | 20 +++++++++++++++++++ ...ork_endpoint_groups_rest_client_config.php | 20 +++++++++++++++++++ .../global_operations_descriptor_config.php | 20 +++++++++++++++++++ .../global_operations_rest_client_config.php | 20 +++++++++++++++++++ ...anization_operations_descriptor_config.php | 20 +++++++++++++++++++ ...nization_operations_rest_client_config.php | 20 +++++++++++++++++++ ...c_delegated_prefixes_descriptor_config.php | 20 +++++++++++++++++++ ..._delegated_prefixes_rest_client_config.php | 20 +++++++++++++++++++ .../health_checks_descriptor_config.php | 20 +++++++++++++++++++ .../health_checks_rest_client_config.php | 20 +++++++++++++++++++ .../image_family_views_descriptor_config.php | 20 +++++++++++++++++++ .../image_family_views_rest_client_config.php | 20 +++++++++++++++++++ .../V1/resources/images_descriptor_config.php | 20 +++++++++++++++++++ .../resources/images_rest_client_config.php | 20 +++++++++++++++++++ ...tance_group_managers_descriptor_config.php | 20 +++++++++++++++++++ ...ance_group_managers_rest_client_config.php | 20 +++++++++++++++++++ .../instance_groups_descriptor_config.php | 20 +++++++++++++++++++ .../instance_groups_rest_client_config.php | 20 +++++++++++++++++++ .../instance_templates_descriptor_config.php | 20 +++++++++++++++++++ .../instance_templates_rest_client_config.php | 20 +++++++++++++++++++ .../resources/instances_descriptor_config.php | 20 +++++++++++++++++++ .../instances_rest_client_config.php | 20 +++++++++++++++++++ .../instant_snapshots_descriptor_config.php | 20 +++++++++++++++++++ .../instant_snapshots_rest_client_config.php | 20 +++++++++++++++++++ ...rconnect_attachments_descriptor_config.php | 20 +++++++++++++++++++ ...connect_attachments_rest_client_config.php | 20 +++++++++++++++++++ ...terconnect_locations_descriptor_config.php | 20 +++++++++++++++++++ ...erconnect_locations_rest_client_config.php | 20 +++++++++++++++++++ ...ect_remote_locations_descriptor_config.php | 20 +++++++++++++++++++ ...ct_remote_locations_rest_client_config.php | 20 +++++++++++++++++++ .../interconnects_descriptor_config.php | 20 +++++++++++++++++++ .../interconnects_rest_client_config.php | 20 +++++++++++++++++++ .../license_codes_descriptor_config.php | 20 +++++++++++++++++++ .../license_codes_rest_client_config.php | 20 +++++++++++++++++++ .../resources/licenses_descriptor_config.php | 20 +++++++++++++++++++ .../resources/licenses_rest_client_config.php | 20 +++++++++++++++++++ .../machine_images_descriptor_config.php | 20 +++++++++++++++++++ .../machine_images_rest_client_config.php | 20 +++++++++++++++++++ .../machine_types_descriptor_config.php | 20 +++++++++++++++++++ .../machine_types_rest_client_config.php | 20 +++++++++++++++++++ .../network_attachments_descriptor_config.php | 20 +++++++++++++++++++ ...network_attachments_rest_client_config.php | 20 +++++++++++++++++++ ...ge_security_services_descriptor_config.php | 20 +++++++++++++++++++ ...e_security_services_rest_client_config.php | 20 +++++++++++++++++++ ...work_endpoint_groups_descriptor_config.php | 20 +++++++++++++++++++ ...ork_endpoint_groups_rest_client_config.php | 20 +++++++++++++++++++ ...rk_firewall_policies_descriptor_config.php | 20 +++++++++++++++++++ ...k_firewall_policies_rest_client_config.php | 20 +++++++++++++++++++ .../resources/networks_descriptor_config.php | 20 +++++++++++++++++++ .../resources/networks_rest_client_config.php | 20 +++++++++++++++++++ .../node_groups_descriptor_config.php | 20 +++++++++++++++++++ .../node_groups_rest_client_config.php | 20 +++++++++++++++++++ .../node_templates_descriptor_config.php | 20 +++++++++++++++++++ .../node_templates_rest_client_config.php | 20 +++++++++++++++++++ .../node_types_descriptor_config.php | 20 +++++++++++++++++++ .../node_types_rest_client_config.php | 20 +++++++++++++++++++ .../packet_mirrorings_descriptor_config.php | 20 +++++++++++++++++++ .../packet_mirrorings_rest_client_config.php | 20 +++++++++++++++++++ .../resources/projects_descriptor_config.php | 20 +++++++++++++++++++ .../resources/projects_rest_client_config.php | 20 +++++++++++++++++++ ..._advertised_prefixes_descriptor_config.php | 20 +++++++++++++++++++ ...advertised_prefixes_rest_client_config.php | 20 +++++++++++++++++++ ...c_delegated_prefixes_descriptor_config.php | 20 +++++++++++++++++++ ..._delegated_prefixes_rest_client_config.php | 20 +++++++++++++++++++ .../region_autoscalers_descriptor_config.php | 20 +++++++++++++++++++ .../region_autoscalers_rest_client_config.php | 20 +++++++++++++++++++ ...ion_backend_services_descriptor_config.php | 20 +++++++++++++++++++ ...on_backend_services_rest_client_config.php | 20 +++++++++++++++++++ .../region_commitments_descriptor_config.php | 20 +++++++++++++++++++ .../region_commitments_rest_client_config.php | 20 +++++++++++++++++++ .../region_disk_types_descriptor_config.php | 20 +++++++++++++++++++ .../region_disk_types_rest_client_config.php | 20 +++++++++++++++++++ .../region_disks_descriptor_config.php | 20 +++++++++++++++++++ .../region_disks_rest_client_config.php | 20 +++++++++++++++++++ ...ealth_check_services_descriptor_config.php | 20 +++++++++++++++++++ ...alth_check_services_rest_client_config.php | 20 +++++++++++++++++++ ...region_health_checks_descriptor_config.php | 20 +++++++++++++++++++ ...egion_health_checks_rest_client_config.php | 20 +++++++++++++++++++ ...tance_group_managers_descriptor_config.php | 20 +++++++++++++++++++ ...ance_group_managers_rest_client_config.php | 20 +++++++++++++++++++ ...gion_instance_groups_descriptor_config.php | 20 +++++++++++++++++++ ...ion_instance_groups_rest_client_config.php | 20 +++++++++++++++++++ ...n_instance_templates_descriptor_config.php | 20 +++++++++++++++++++ ..._instance_templates_rest_client_config.php | 20 +++++++++++++++++++ .../region_instances_descriptor_config.php | 20 +++++++++++++++++++ .../region_instances_rest_client_config.php | 20 +++++++++++++++++++ ...on_instant_snapshots_descriptor_config.php | 20 +++++++++++++++++++ ...n_instant_snapshots_rest_client_config.php | 20 +++++++++++++++++++ ...work_endpoint_groups_descriptor_config.php | 20 +++++++++++++++++++ ...ork_endpoint_groups_rest_client_config.php | 20 +++++++++++++++++++ ...rk_firewall_policies_descriptor_config.php | 20 +++++++++++++++++++ ...k_firewall_policies_rest_client_config.php | 20 +++++++++++++++++++ ...tification_endpoints_descriptor_config.php | 20 +++++++++++++++++++ ...ification_endpoints_rest_client_config.php | 20 +++++++++++++++++++ .../region_operations_descriptor_config.php | 20 +++++++++++++++++++ .../region_operations_rest_client_config.php | 20 +++++++++++++++++++ ...on_security_policies_descriptor_config.php | 20 +++++++++++++++++++ ...n_security_policies_rest_client_config.php | 20 +++++++++++++++++++ ...ion_ssl_certificates_descriptor_config.php | 20 +++++++++++++++++++ ...on_ssl_certificates_rest_client_config.php | 20 +++++++++++++++++++ .../region_ssl_policies_descriptor_config.php | 20 +++++++++++++++++++ ...region_ssl_policies_rest_client_config.php | 20 +++++++++++++++++++ ..._target_http_proxies_descriptor_config.php | 20 +++++++++++++++++++ ...target_http_proxies_rest_client_config.php | 20 +++++++++++++++++++ ...target_https_proxies_descriptor_config.php | 20 +++++++++++++++++++ ...arget_https_proxies_rest_client_config.php | 20 +++++++++++++++++++ ...n_target_tcp_proxies_descriptor_config.php | 20 +++++++++++++++++++ ..._target_tcp_proxies_rest_client_config.php | 20 +++++++++++++++++++ .../region_url_maps_descriptor_config.php | 20 +++++++++++++++++++ .../region_url_maps_rest_client_config.php | 20 +++++++++++++++++++ .../region_zones_descriptor_config.php | 20 +++++++++++++++++++ .../region_zones_rest_client_config.php | 20 +++++++++++++++++++ .../resources/regions_descriptor_config.php | 20 +++++++++++++++++++ .../resources/regions_rest_client_config.php | 20 +++++++++++++++++++ .../reservations_descriptor_config.php | 20 +++++++++++++++++++ .../reservations_rest_client_config.php | 20 +++++++++++++++++++ .../resource_policies_descriptor_config.php | 20 +++++++++++++++++++ .../resource_policies_rest_client_config.php | 20 +++++++++++++++++++ .../resources/routers_descriptor_config.php | 20 +++++++++++++++++++ .../resources/routers_rest_client_config.php | 20 +++++++++++++++++++ .../V1/resources/routes_descriptor_config.php | 20 +++++++++++++++++++ .../resources/routes_rest_client_config.php | 20 +++++++++++++++++++ .../security_policies_descriptor_config.php | 20 +++++++++++++++++++ .../security_policies_rest_client_config.php | 20 +++++++++++++++++++ .../service_attachments_descriptor_config.php | 20 +++++++++++++++++++ ...service_attachments_rest_client_config.php | 20 +++++++++++++++++++ ...hot_settings_service_descriptor_config.php | 20 +++++++++++++++++++ ...ot_settings_service_rest_client_config.php | 20 +++++++++++++++++++ .../resources/snapshots_descriptor_config.php | 20 +++++++++++++++++++ .../snapshots_rest_client_config.php | 20 +++++++++++++++++++ .../ssl_certificates_descriptor_config.php | 20 +++++++++++++++++++ .../ssl_certificates_rest_client_config.php | 20 +++++++++++++++++++ .../ssl_policies_descriptor_config.php | 20 +++++++++++++++++++ .../ssl_policies_rest_client_config.php | 20 +++++++++++++++++++ .../subnetworks_descriptor_config.php | 20 +++++++++++++++++++ .../subnetworks_rest_client_config.php | 20 +++++++++++++++++++ .../target_grpc_proxies_descriptor_config.php | 20 +++++++++++++++++++ ...target_grpc_proxies_rest_client_config.php | 20 +++++++++++++++++++ .../target_http_proxies_descriptor_config.php | 20 +++++++++++++++++++ ...target_http_proxies_rest_client_config.php | 20 +++++++++++++++++++ ...target_https_proxies_descriptor_config.php | 20 +++++++++++++++++++ ...arget_https_proxies_rest_client_config.php | 20 +++++++++++++++++++ .../target_instances_descriptor_config.php | 20 +++++++++++++++++++ .../target_instances_rest_client_config.php | 20 +++++++++++++++++++ .../target_pools_descriptor_config.php | 20 +++++++++++++++++++ .../target_pools_rest_client_config.php | 20 +++++++++++++++++++ .../target_ssl_proxies_descriptor_config.php | 20 +++++++++++++++++++ .../target_ssl_proxies_rest_client_config.php | 20 +++++++++++++++++++ .../target_tcp_proxies_descriptor_config.php | 20 +++++++++++++++++++ .../target_tcp_proxies_rest_client_config.php | 20 +++++++++++++++++++ .../target_vpn_gateways_descriptor_config.php | 20 +++++++++++++++++++ ...target_vpn_gateways_rest_client_config.php | 20 +++++++++++++++++++ .../resources/url_maps_descriptor_config.php | 20 +++++++++++++++++++ .../resources/url_maps_rest_client_config.php | 20 +++++++++++++++++++ .../vpn_gateways_descriptor_config.php | 20 +++++++++++++++++++ .../vpn_gateways_rest_client_config.php | 20 +++++++++++++++++++ .../vpn_tunnels_descriptor_config.php | 20 +++++++++++++++++++ .../vpn_tunnels_rest_client_config.php | 20 +++++++++++++++++++ .../zone_operations_descriptor_config.php | 20 +++++++++++++++++++ .../zone_operations_rest_client_config.php | 20 +++++++++++++++++++ .../V1/resources/zones_descriptor_config.php | 20 +++++++++++++++++++ .../V1/resources/zones_rest_client_config.php | 20 +++++++++++++++++++ ...nfidential_computing_descriptor_config.php | 20 +++++++++++++++++++ ...fidential_computing_rest_client_config.php | 20 +++++++++++++++++++ .../V1/resources/config_descriptor_config.php | 20 +++++++++++++++++++ .../resources/config_rest_client_config.php | 20 +++++++++++++++++++ ...tact_center_insights_descriptor_config.php | 20 +++++++++++++++++++ ...act_center_insights_rest_client_config.php | 20 +++++++++++++++++++ .../cluster_manager_descriptor_config.php | 20 +++++++++++++++++++ .../cluster_manager_rest_client_config.php | 20 +++++++++++++++++++ .../container_analysis_descriptor_config.php | 20 +++++++++++++++++++ .../container_analysis_rest_client_config.php | 20 +++++++++++++++++++ ...ontrols_partner_core_descriptor_config.php | 20 +++++++++++++++++++ ...ntrols_partner_core_rest_client_config.php | 20 +++++++++++++++++++ ...s_partner_monitoring_descriptor_config.php | 20 +++++++++++++++++++ ..._partner_monitoring_rest_client_config.php | 20 +++++++++++++++++++ .../data_catalog_descriptor_config.php | 20 +++++++++++++++++++ .../data_catalog_rest_client_config.php | 20 +++++++++++++++++++ .../policy_tag_manager_descriptor_config.php | 20 +++++++++++++++++++ .../policy_tag_manager_rest_client_config.php | 20 +++++++++++++++++++ ...anager_serialization_descriptor_config.php | 20 +++++++++++++++++++ ...nager_serialization_rest_client_config.php | 20 +++++++++++++++++++ .../resources/lineage_descriptor_config.php | 20 +++++++++++++++++++ .../resources/lineage_rest_client_config.php | 20 +++++++++++++++++++ .../data_fusion_descriptor_config.php | 20 +++++++++++++++++++ .../data_fusion_rest_client_config.php | 20 +++++++++++++++++++ ...ata_labeling_service_descriptor_config.php | 20 +++++++++++++++++++ ...ta_labeling_service_rest_client_config.php | 20 +++++++++++++++++++ ...ex_templates_service_descriptor_config.php | 20 +++++++++++++++++++ ...x_templates_service_rest_client_config.php | 20 +++++++++++++++++++ .../jobs_v1_beta3_descriptor_config.php | 20 +++++++++++++++++++ .../jobs_v1_beta3_rest_client_config.php | 20 +++++++++++++++++++ .../messages_v1_beta3_descriptor_config.php | 20 +++++++++++++++++++ .../messages_v1_beta3_rest_client_config.php | 20 +++++++++++++++++++ .../metrics_v1_beta3_descriptor_config.php | 20 +++++++++++++++++++ .../metrics_v1_beta3_rest_client_config.php | 20 +++++++++++++++++++ .../snapshots_v1_beta3_descriptor_config.php | 20 +++++++++++++++++++ .../snapshots_v1_beta3_rest_client_config.php | 20 +++++++++++++++++++ .../templates_service_descriptor_config.php | 20 +++++++++++++++++++ .../templates_service_rest_client_config.php | 20 +++++++++++++++++++ .../resources/dataform_descriptor_config.php | 20 +++++++++++++++++++ .../resources/dataform_rest_client_config.php | 20 +++++++++++++++++++ .../catalog_service_descriptor_config.php | 20 +++++++++++++++++++ .../catalog_service_rest_client_config.php | 20 +++++++++++++++++++ .../content_service_descriptor_config.php | 20 +++++++++++++++++++ .../content_service_rest_client_config.php | 20 +++++++++++++++++++ .../data_scan_service_descriptor_config.php | 20 +++++++++++++++++++ .../data_scan_service_rest_client_config.php | 20 +++++++++++++++++++ ...ata_taxonomy_service_descriptor_config.php | 20 +++++++++++++++++++ ...ta_taxonomy_service_rest_client_config.php | 20 +++++++++++++++++++ .../dataplex_service_descriptor_config.php | 20 +++++++++++++++++++ .../dataplex_service_rest_client_config.php | 20 +++++++++++++++++++ .../metadata_service_descriptor_config.php | 20 +++++++++++++++++++ .../metadata_service_rest_client_config.php | 20 +++++++++++++++++++ ...aling_policy_service_descriptor_config.php | 20 +++++++++++++++++++ ...ling_policy_service_rest_client_config.php | 20 +++++++++++++++++++ .../batch_controller_descriptor_config.php | 20 +++++++++++++++++++ .../batch_controller_rest_client_config.php | 20 +++++++++++++++++++ .../cluster_controller_descriptor_config.php | 20 +++++++++++++++++++ .../cluster_controller_rest_client_config.php | 20 +++++++++++++++++++ .../job_controller_descriptor_config.php | 20 +++++++++++++++++++ .../job_controller_rest_client_config.php | 20 +++++++++++++++++++ ...ode_group_controller_descriptor_config.php | 20 +++++++++++++++++++ ...de_group_controller_rest_client_config.php | 20 +++++++++++++++++++ .../session_controller_descriptor_config.php | 20 +++++++++++++++++++ .../session_controller_rest_client_config.php | 20 +++++++++++++++++++ ..._template_controller_descriptor_config.php | 20 +++++++++++++++++++ ...template_controller_rest_client_config.php | 20 +++++++++++++++++++ ...low_template_service_descriptor_config.php | 20 +++++++++++++++++++ ...ow_template_service_rest_client_config.php | 20 +++++++++++++++++++ .../dataproc_metastore_descriptor_config.php | 20 +++++++++++++++++++ ...metastore_federation_descriptor_config.php | 20 +++++++++++++++++++ ...etastore_federation_rest_client_config.php | 20 +++++++++++++++++++ .../dataproc_metastore_rest_client_config.php | 20 +++++++++++++++++++ .../dataproc_metastore_descriptor_config.php | 20 +++++++++++++++++++ ...metastore_federation_descriptor_config.php | 20 +++++++++++++++++++ ...etastore_federation_rest_client_config.php | 20 +++++++++++++++++++ .../dataproc_metastore_rest_client_config.php | 20 +++++++++++++++++++ .../dataproc_metastore_descriptor_config.php | 20 +++++++++++++++++++ ...metastore_federation_descriptor_config.php | 20 +++++++++++++++++++ ...etastore_federation_rest_client_config.php | 20 +++++++++++++++++++ .../dataproc_metastore_rest_client_config.php | 20 +++++++++++++++++++ .../resources/datastore_descriptor_config.php | 20 +++++++++++++++++++ .../datastore_rest_client_config.php | 20 +++++++++++++++++++ .../datastore_admin_descriptor_config.php | 20 +++++++++++++++++++ .../datastore_admin_rest_client_config.php | 20 +++++++++++++++++++ 278 files changed, 5560 insertions(+) diff --git a/Channel/src/V1/resources/cloud_channel_reports_service_descriptor_config.php b/Channel/src/V1/resources/cloud_channel_reports_service_descriptor_config.php index 2587f2d002cb..4feb1760276c 100644 --- a/Channel/src/V1/resources/cloud_channel_reports_service_descriptor_config.php +++ b/Channel/src/V1/resources/cloud_channel_reports_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Channel/src/V1/resources/cloud_channel_reports_service_rest_client_config.php b/Channel/src/V1/resources/cloud_channel_reports_service_rest_client_config.php index 1337ba178996..ca86373ca9f0 100644 --- a/Channel/src/V1/resources/cloud_channel_reports_service_rest_client_config.php +++ b/Channel/src/V1/resources/cloud_channel_reports_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Channel/src/V1/resources/cloud_channel_service_descriptor_config.php b/Channel/src/V1/resources/cloud_channel_service_descriptor_config.php index 5a7ba455a631..edcf6ca6b530 100644 --- a/Channel/src/V1/resources/cloud_channel_service_descriptor_config.php +++ b/Channel/src/V1/resources/cloud_channel_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Channel/src/V1/resources/cloud_channel_service_rest_client_config.php b/Channel/src/V1/resources/cloud_channel_service_rest_client_config.php index 61c0011a8e9a..944a1b7fa7e6 100644 --- a/Channel/src/V1/resources/cloud_channel_service_rest_client_config.php +++ b/Channel/src/V1/resources/cloud_channel_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/CommerceConsumerProcurement/src/V1/resources/consumer_procurement_service_descriptor_config.php b/CommerceConsumerProcurement/src/V1/resources/consumer_procurement_service_descriptor_config.php index 3eb5210ce4a1..c49b87798bc3 100644 --- a/CommerceConsumerProcurement/src/V1/resources/consumer_procurement_service_descriptor_config.php +++ b/CommerceConsumerProcurement/src/V1/resources/consumer_procurement_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/CommerceConsumerProcurement/src/V1/resources/consumer_procurement_service_rest_client_config.php b/CommerceConsumerProcurement/src/V1/resources/consumer_procurement_service_rest_client_config.php index 4050bb08a6c6..940b479b9f04 100644 --- a/CommerceConsumerProcurement/src/V1/resources/consumer_procurement_service_rest_client_config.php +++ b/CommerceConsumerProcurement/src/V1/resources/consumer_procurement_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/accelerator_types_descriptor_config.php b/Compute/src/V1/resources/accelerator_types_descriptor_config.php index 7edc91200ec7..0736fcd8b82b 100644 --- a/Compute/src/V1/resources/accelerator_types_descriptor_config.php +++ b/Compute/src/V1/resources/accelerator_types_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/accelerator_types_rest_client_config.php b/Compute/src/V1/resources/accelerator_types_rest_client_config.php index 1c84bb751e9d..161d8ae3cf13 100644 --- a/Compute/src/V1/resources/accelerator_types_rest_client_config.php +++ b/Compute/src/V1/resources/accelerator_types_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/addresses_descriptor_config.php b/Compute/src/V1/resources/addresses_descriptor_config.php index 86ff215f69af..cf895a421fd7 100644 --- a/Compute/src/V1/resources/addresses_descriptor_config.php +++ b/Compute/src/V1/resources/addresses_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/addresses_rest_client_config.php b/Compute/src/V1/resources/addresses_rest_client_config.php index 54dac71f1823..708350604a8c 100644 --- a/Compute/src/V1/resources/addresses_rest_client_config.php +++ b/Compute/src/V1/resources/addresses_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/autoscalers_descriptor_config.php b/Compute/src/V1/resources/autoscalers_descriptor_config.php index 17a9174f3fd3..30caf9dea66b 100644 --- a/Compute/src/V1/resources/autoscalers_descriptor_config.php +++ b/Compute/src/V1/resources/autoscalers_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/autoscalers_rest_client_config.php b/Compute/src/V1/resources/autoscalers_rest_client_config.php index ca9e67bdedd7..e568b02e624b 100644 --- a/Compute/src/V1/resources/autoscalers_rest_client_config.php +++ b/Compute/src/V1/resources/autoscalers_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/backend_buckets_descriptor_config.php b/Compute/src/V1/resources/backend_buckets_descriptor_config.php index b3f5d5b287eb..9237c8896ade 100644 --- a/Compute/src/V1/resources/backend_buckets_descriptor_config.php +++ b/Compute/src/V1/resources/backend_buckets_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/backend_buckets_rest_client_config.php b/Compute/src/V1/resources/backend_buckets_rest_client_config.php index 3157de49941c..b50134885c3f 100644 --- a/Compute/src/V1/resources/backend_buckets_rest_client_config.php +++ b/Compute/src/V1/resources/backend_buckets_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/backend_services_descriptor_config.php b/Compute/src/V1/resources/backend_services_descriptor_config.php index b25c126452f3..8db30677d7df 100644 --- a/Compute/src/V1/resources/backend_services_descriptor_config.php +++ b/Compute/src/V1/resources/backend_services_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/backend_services_rest_client_config.php b/Compute/src/V1/resources/backend_services_rest_client_config.php index ed9b899b0b25..e24093ec36fe 100644 --- a/Compute/src/V1/resources/backend_services_rest_client_config.php +++ b/Compute/src/V1/resources/backend_services_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/disk_types_descriptor_config.php b/Compute/src/V1/resources/disk_types_descriptor_config.php index 37c35accdf62..ef82b923b64e 100644 --- a/Compute/src/V1/resources/disk_types_descriptor_config.php +++ b/Compute/src/V1/resources/disk_types_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/disk_types_rest_client_config.php b/Compute/src/V1/resources/disk_types_rest_client_config.php index 70bfeee06daa..e76843a408f5 100644 --- a/Compute/src/V1/resources/disk_types_rest_client_config.php +++ b/Compute/src/V1/resources/disk_types_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/disks_descriptor_config.php b/Compute/src/V1/resources/disks_descriptor_config.php index cb8e4bf755d1..c2fc76cfa137 100644 --- a/Compute/src/V1/resources/disks_descriptor_config.php +++ b/Compute/src/V1/resources/disks_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/disks_rest_client_config.php b/Compute/src/V1/resources/disks_rest_client_config.php index 464efcabb326..ca33478f59a6 100644 --- a/Compute/src/V1/resources/disks_rest_client_config.php +++ b/Compute/src/V1/resources/disks_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/external_vpn_gateways_descriptor_config.php b/Compute/src/V1/resources/external_vpn_gateways_descriptor_config.php index 0724dc8be352..3bd841dcee34 100644 --- a/Compute/src/V1/resources/external_vpn_gateways_descriptor_config.php +++ b/Compute/src/V1/resources/external_vpn_gateways_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/external_vpn_gateways_rest_client_config.php b/Compute/src/V1/resources/external_vpn_gateways_rest_client_config.php index 3351b109d267..e034b625db9f 100644 --- a/Compute/src/V1/resources/external_vpn_gateways_rest_client_config.php +++ b/Compute/src/V1/resources/external_vpn_gateways_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/firewall_policies_descriptor_config.php b/Compute/src/V1/resources/firewall_policies_descriptor_config.php index 9ed872cd138d..92a75582f239 100644 --- a/Compute/src/V1/resources/firewall_policies_descriptor_config.php +++ b/Compute/src/V1/resources/firewall_policies_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/firewall_policies_rest_client_config.php b/Compute/src/V1/resources/firewall_policies_rest_client_config.php index 41193ec27444..8afd8ae02e0a 100644 --- a/Compute/src/V1/resources/firewall_policies_rest_client_config.php +++ b/Compute/src/V1/resources/firewall_policies_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/firewalls_descriptor_config.php b/Compute/src/V1/resources/firewalls_descriptor_config.php index b3e15a86de70..14eacf72717c 100644 --- a/Compute/src/V1/resources/firewalls_descriptor_config.php +++ b/Compute/src/V1/resources/firewalls_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/firewalls_rest_client_config.php b/Compute/src/V1/resources/firewalls_rest_client_config.php index 4d41679ec3ad..bd6440758124 100644 --- a/Compute/src/V1/resources/firewalls_rest_client_config.php +++ b/Compute/src/V1/resources/firewalls_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/forwarding_rules_descriptor_config.php b/Compute/src/V1/resources/forwarding_rules_descriptor_config.php index 285982b0eb0a..a23f06fb52d6 100644 --- a/Compute/src/V1/resources/forwarding_rules_descriptor_config.php +++ b/Compute/src/V1/resources/forwarding_rules_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/forwarding_rules_rest_client_config.php b/Compute/src/V1/resources/forwarding_rules_rest_client_config.php index a059926bbbd3..767ade521b04 100644 --- a/Compute/src/V1/resources/forwarding_rules_rest_client_config.php +++ b/Compute/src/V1/resources/forwarding_rules_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/global_addresses_descriptor_config.php b/Compute/src/V1/resources/global_addresses_descriptor_config.php index 014065eb46b2..916970994782 100644 --- a/Compute/src/V1/resources/global_addresses_descriptor_config.php +++ b/Compute/src/V1/resources/global_addresses_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/global_addresses_rest_client_config.php b/Compute/src/V1/resources/global_addresses_rest_client_config.php index f792da604c89..809fbfc58555 100644 --- a/Compute/src/V1/resources/global_addresses_rest_client_config.php +++ b/Compute/src/V1/resources/global_addresses_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/global_forwarding_rules_descriptor_config.php b/Compute/src/V1/resources/global_forwarding_rules_descriptor_config.php index 49549cdf8667..54ef535e9a3f 100644 --- a/Compute/src/V1/resources/global_forwarding_rules_descriptor_config.php +++ b/Compute/src/V1/resources/global_forwarding_rules_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/global_forwarding_rules_rest_client_config.php b/Compute/src/V1/resources/global_forwarding_rules_rest_client_config.php index 37fe87c3718b..7fbcd40ace19 100644 --- a/Compute/src/V1/resources/global_forwarding_rules_rest_client_config.php +++ b/Compute/src/V1/resources/global_forwarding_rules_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/global_network_endpoint_groups_descriptor_config.php b/Compute/src/V1/resources/global_network_endpoint_groups_descriptor_config.php index 7da72ab23aca..372207bde932 100644 --- a/Compute/src/V1/resources/global_network_endpoint_groups_descriptor_config.php +++ b/Compute/src/V1/resources/global_network_endpoint_groups_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/global_network_endpoint_groups_rest_client_config.php b/Compute/src/V1/resources/global_network_endpoint_groups_rest_client_config.php index 42332b41112b..9e7b804dd579 100644 --- a/Compute/src/V1/resources/global_network_endpoint_groups_rest_client_config.php +++ b/Compute/src/V1/resources/global_network_endpoint_groups_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/global_operations_descriptor_config.php b/Compute/src/V1/resources/global_operations_descriptor_config.php index 422c96f5a9a6..ad10343efb61 100644 --- a/Compute/src/V1/resources/global_operations_descriptor_config.php +++ b/Compute/src/V1/resources/global_operations_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/global_operations_rest_client_config.php b/Compute/src/V1/resources/global_operations_rest_client_config.php index 0894d39c93be..3b58af713054 100644 --- a/Compute/src/V1/resources/global_operations_rest_client_config.php +++ b/Compute/src/V1/resources/global_operations_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/global_organization_operations_descriptor_config.php b/Compute/src/V1/resources/global_organization_operations_descriptor_config.php index 931302cd9926..e6a151ab3223 100644 --- a/Compute/src/V1/resources/global_organization_operations_descriptor_config.php +++ b/Compute/src/V1/resources/global_organization_operations_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/global_organization_operations_rest_client_config.php b/Compute/src/V1/resources/global_organization_operations_rest_client_config.php index 7995d7086dd3..54f0a6a3c70a 100644 --- a/Compute/src/V1/resources/global_organization_operations_rest_client_config.php +++ b/Compute/src/V1/resources/global_organization_operations_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/global_public_delegated_prefixes_descriptor_config.php b/Compute/src/V1/resources/global_public_delegated_prefixes_descriptor_config.php index 2946c5544732..cf495d4a42c9 100644 --- a/Compute/src/V1/resources/global_public_delegated_prefixes_descriptor_config.php +++ b/Compute/src/V1/resources/global_public_delegated_prefixes_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/global_public_delegated_prefixes_rest_client_config.php b/Compute/src/V1/resources/global_public_delegated_prefixes_rest_client_config.php index 3290ff25a48a..4b76edc9f660 100644 --- a/Compute/src/V1/resources/global_public_delegated_prefixes_rest_client_config.php +++ b/Compute/src/V1/resources/global_public_delegated_prefixes_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/health_checks_descriptor_config.php b/Compute/src/V1/resources/health_checks_descriptor_config.php index 4bc9674f78cb..e46c9fe2f1d3 100644 --- a/Compute/src/V1/resources/health_checks_descriptor_config.php +++ b/Compute/src/V1/resources/health_checks_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/health_checks_rest_client_config.php b/Compute/src/V1/resources/health_checks_rest_client_config.php index 055deeab125f..b76f93f67fc7 100644 --- a/Compute/src/V1/resources/health_checks_rest_client_config.php +++ b/Compute/src/V1/resources/health_checks_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/image_family_views_descriptor_config.php b/Compute/src/V1/resources/image_family_views_descriptor_config.php index 6b48a883c873..9d8202441ef6 100644 --- a/Compute/src/V1/resources/image_family_views_descriptor_config.php +++ b/Compute/src/V1/resources/image_family_views_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/image_family_views_rest_client_config.php b/Compute/src/V1/resources/image_family_views_rest_client_config.php index 5702cec88cd9..b59bddf865b0 100644 --- a/Compute/src/V1/resources/image_family_views_rest_client_config.php +++ b/Compute/src/V1/resources/image_family_views_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/images_descriptor_config.php b/Compute/src/V1/resources/images_descriptor_config.php index 0681a41dc3d3..09907c4e560c 100644 --- a/Compute/src/V1/resources/images_descriptor_config.php +++ b/Compute/src/V1/resources/images_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/images_rest_client_config.php b/Compute/src/V1/resources/images_rest_client_config.php index abafdacabffd..7579f25ad9ef 100644 --- a/Compute/src/V1/resources/images_rest_client_config.php +++ b/Compute/src/V1/resources/images_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/instance_group_managers_descriptor_config.php b/Compute/src/V1/resources/instance_group_managers_descriptor_config.php index d58a7de6fece..686b12da840d 100644 --- a/Compute/src/V1/resources/instance_group_managers_descriptor_config.php +++ b/Compute/src/V1/resources/instance_group_managers_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/instance_group_managers_rest_client_config.php b/Compute/src/V1/resources/instance_group_managers_rest_client_config.php index 1987677c7eb1..297d62072570 100644 --- a/Compute/src/V1/resources/instance_group_managers_rest_client_config.php +++ b/Compute/src/V1/resources/instance_group_managers_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/instance_groups_descriptor_config.php b/Compute/src/V1/resources/instance_groups_descriptor_config.php index 41cb93744fbf..622893f89b23 100644 --- a/Compute/src/V1/resources/instance_groups_descriptor_config.php +++ b/Compute/src/V1/resources/instance_groups_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/instance_groups_rest_client_config.php b/Compute/src/V1/resources/instance_groups_rest_client_config.php index 0e4260b21e89..d32693408016 100644 --- a/Compute/src/V1/resources/instance_groups_rest_client_config.php +++ b/Compute/src/V1/resources/instance_groups_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/instance_templates_descriptor_config.php b/Compute/src/V1/resources/instance_templates_descriptor_config.php index 2e0c3653bdfb..0eb625709786 100644 --- a/Compute/src/V1/resources/instance_templates_descriptor_config.php +++ b/Compute/src/V1/resources/instance_templates_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/instance_templates_rest_client_config.php b/Compute/src/V1/resources/instance_templates_rest_client_config.php index cafed04e8cb4..8805ae07618e 100644 --- a/Compute/src/V1/resources/instance_templates_rest_client_config.php +++ b/Compute/src/V1/resources/instance_templates_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/instances_descriptor_config.php b/Compute/src/V1/resources/instances_descriptor_config.php index 003375088542..5e27cabd0e41 100644 --- a/Compute/src/V1/resources/instances_descriptor_config.php +++ b/Compute/src/V1/resources/instances_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/instances_rest_client_config.php b/Compute/src/V1/resources/instances_rest_client_config.php index 188323e308cd..4f2c88b993cc 100644 --- a/Compute/src/V1/resources/instances_rest_client_config.php +++ b/Compute/src/V1/resources/instances_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/instant_snapshots_descriptor_config.php b/Compute/src/V1/resources/instant_snapshots_descriptor_config.php index 7a7e452bb2d0..5c5bfc230eef 100644 --- a/Compute/src/V1/resources/instant_snapshots_descriptor_config.php +++ b/Compute/src/V1/resources/instant_snapshots_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/instant_snapshots_rest_client_config.php b/Compute/src/V1/resources/instant_snapshots_rest_client_config.php index 33fea7a00b21..1d9d1169074d 100644 --- a/Compute/src/V1/resources/instant_snapshots_rest_client_config.php +++ b/Compute/src/V1/resources/instant_snapshots_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/interconnect_attachments_descriptor_config.php b/Compute/src/V1/resources/interconnect_attachments_descriptor_config.php index 63691984b3d9..4f59112fa0ec 100644 --- a/Compute/src/V1/resources/interconnect_attachments_descriptor_config.php +++ b/Compute/src/V1/resources/interconnect_attachments_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/interconnect_attachments_rest_client_config.php b/Compute/src/V1/resources/interconnect_attachments_rest_client_config.php index 0478101c7c0a..63d5445cd790 100644 --- a/Compute/src/V1/resources/interconnect_attachments_rest_client_config.php +++ b/Compute/src/V1/resources/interconnect_attachments_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/interconnect_locations_descriptor_config.php b/Compute/src/V1/resources/interconnect_locations_descriptor_config.php index 471b05feccb2..3c9745457e90 100644 --- a/Compute/src/V1/resources/interconnect_locations_descriptor_config.php +++ b/Compute/src/V1/resources/interconnect_locations_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/interconnect_locations_rest_client_config.php b/Compute/src/V1/resources/interconnect_locations_rest_client_config.php index 91b013bf6413..f5021ab17c38 100644 --- a/Compute/src/V1/resources/interconnect_locations_rest_client_config.php +++ b/Compute/src/V1/resources/interconnect_locations_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/interconnect_remote_locations_descriptor_config.php b/Compute/src/V1/resources/interconnect_remote_locations_descriptor_config.php index f4d2b70695c0..b70c6b9fe13d 100644 --- a/Compute/src/V1/resources/interconnect_remote_locations_descriptor_config.php +++ b/Compute/src/V1/resources/interconnect_remote_locations_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/interconnect_remote_locations_rest_client_config.php b/Compute/src/V1/resources/interconnect_remote_locations_rest_client_config.php index b2078d8361c6..afd99a054751 100644 --- a/Compute/src/V1/resources/interconnect_remote_locations_rest_client_config.php +++ b/Compute/src/V1/resources/interconnect_remote_locations_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/interconnects_descriptor_config.php b/Compute/src/V1/resources/interconnects_descriptor_config.php index ca9769656e37..6b82b8b622dc 100644 --- a/Compute/src/V1/resources/interconnects_descriptor_config.php +++ b/Compute/src/V1/resources/interconnects_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/interconnects_rest_client_config.php b/Compute/src/V1/resources/interconnects_rest_client_config.php index 64b54efa2099..85b82c158342 100644 --- a/Compute/src/V1/resources/interconnects_rest_client_config.php +++ b/Compute/src/V1/resources/interconnects_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/license_codes_descriptor_config.php b/Compute/src/V1/resources/license_codes_descriptor_config.php index f6748e31bbcd..614709a4e28d 100644 --- a/Compute/src/V1/resources/license_codes_descriptor_config.php +++ b/Compute/src/V1/resources/license_codes_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/license_codes_rest_client_config.php b/Compute/src/V1/resources/license_codes_rest_client_config.php index d56758404d5b..c448a65a971a 100644 --- a/Compute/src/V1/resources/license_codes_rest_client_config.php +++ b/Compute/src/V1/resources/license_codes_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/licenses_descriptor_config.php b/Compute/src/V1/resources/licenses_descriptor_config.php index 598fb7a8ef66..d988b8f7417a 100644 --- a/Compute/src/V1/resources/licenses_descriptor_config.php +++ b/Compute/src/V1/resources/licenses_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/licenses_rest_client_config.php b/Compute/src/V1/resources/licenses_rest_client_config.php index 8ac1ce3334a2..44ec0c314963 100644 --- a/Compute/src/V1/resources/licenses_rest_client_config.php +++ b/Compute/src/V1/resources/licenses_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/machine_images_descriptor_config.php b/Compute/src/V1/resources/machine_images_descriptor_config.php index a034261a3631..df87e80c4b78 100644 --- a/Compute/src/V1/resources/machine_images_descriptor_config.php +++ b/Compute/src/V1/resources/machine_images_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/machine_images_rest_client_config.php b/Compute/src/V1/resources/machine_images_rest_client_config.php index a400604a448a..afff9d18bf84 100644 --- a/Compute/src/V1/resources/machine_images_rest_client_config.php +++ b/Compute/src/V1/resources/machine_images_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/machine_types_descriptor_config.php b/Compute/src/V1/resources/machine_types_descriptor_config.php index a49acc75c6a9..151402618f49 100644 --- a/Compute/src/V1/resources/machine_types_descriptor_config.php +++ b/Compute/src/V1/resources/machine_types_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/machine_types_rest_client_config.php b/Compute/src/V1/resources/machine_types_rest_client_config.php index 9909b6a46abc..6ae1dd710b8b 100644 --- a/Compute/src/V1/resources/machine_types_rest_client_config.php +++ b/Compute/src/V1/resources/machine_types_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/network_attachments_descriptor_config.php b/Compute/src/V1/resources/network_attachments_descriptor_config.php index 95eadb1d08bf..2c2982395377 100644 --- a/Compute/src/V1/resources/network_attachments_descriptor_config.php +++ b/Compute/src/V1/resources/network_attachments_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/network_attachments_rest_client_config.php b/Compute/src/V1/resources/network_attachments_rest_client_config.php index 5aeeffb6f702..a706569c34b6 100644 --- a/Compute/src/V1/resources/network_attachments_rest_client_config.php +++ b/Compute/src/V1/resources/network_attachments_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/network_edge_security_services_descriptor_config.php b/Compute/src/V1/resources/network_edge_security_services_descriptor_config.php index 58ea07a87f3c..66671178a7d4 100644 --- a/Compute/src/V1/resources/network_edge_security_services_descriptor_config.php +++ b/Compute/src/V1/resources/network_edge_security_services_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/network_edge_security_services_rest_client_config.php b/Compute/src/V1/resources/network_edge_security_services_rest_client_config.php index 70cf161e9295..61d9e5d605ab 100644 --- a/Compute/src/V1/resources/network_edge_security_services_rest_client_config.php +++ b/Compute/src/V1/resources/network_edge_security_services_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/network_endpoint_groups_descriptor_config.php b/Compute/src/V1/resources/network_endpoint_groups_descriptor_config.php index 8f8d2e5d4a28..437a3994dd91 100644 --- a/Compute/src/V1/resources/network_endpoint_groups_descriptor_config.php +++ b/Compute/src/V1/resources/network_endpoint_groups_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/network_endpoint_groups_rest_client_config.php b/Compute/src/V1/resources/network_endpoint_groups_rest_client_config.php index eec3e87162f1..995e54193772 100644 --- a/Compute/src/V1/resources/network_endpoint_groups_rest_client_config.php +++ b/Compute/src/V1/resources/network_endpoint_groups_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/network_firewall_policies_descriptor_config.php b/Compute/src/V1/resources/network_firewall_policies_descriptor_config.php index def4e8e41677..03212e133d1e 100644 --- a/Compute/src/V1/resources/network_firewall_policies_descriptor_config.php +++ b/Compute/src/V1/resources/network_firewall_policies_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/network_firewall_policies_rest_client_config.php b/Compute/src/V1/resources/network_firewall_policies_rest_client_config.php index e78571010fb1..90ad923dba7b 100644 --- a/Compute/src/V1/resources/network_firewall_policies_rest_client_config.php +++ b/Compute/src/V1/resources/network_firewall_policies_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/networks_descriptor_config.php b/Compute/src/V1/resources/networks_descriptor_config.php index 3b52487e3d98..6e6526774c45 100644 --- a/Compute/src/V1/resources/networks_descriptor_config.php +++ b/Compute/src/V1/resources/networks_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/networks_rest_client_config.php b/Compute/src/V1/resources/networks_rest_client_config.php index c0f8122bb856..6cff31187bae 100644 --- a/Compute/src/V1/resources/networks_rest_client_config.php +++ b/Compute/src/V1/resources/networks_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/node_groups_descriptor_config.php b/Compute/src/V1/resources/node_groups_descriptor_config.php index abb80e96919d..c84f328e6778 100644 --- a/Compute/src/V1/resources/node_groups_descriptor_config.php +++ b/Compute/src/V1/resources/node_groups_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/node_groups_rest_client_config.php b/Compute/src/V1/resources/node_groups_rest_client_config.php index ff8b3a61877c..f0700690fc7f 100644 --- a/Compute/src/V1/resources/node_groups_rest_client_config.php +++ b/Compute/src/V1/resources/node_groups_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/node_templates_descriptor_config.php b/Compute/src/V1/resources/node_templates_descriptor_config.php index d0ec22de13d5..aada90a1d2bd 100644 --- a/Compute/src/V1/resources/node_templates_descriptor_config.php +++ b/Compute/src/V1/resources/node_templates_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/node_templates_rest_client_config.php b/Compute/src/V1/resources/node_templates_rest_client_config.php index 8ad88e53289c..96a09c236bd3 100644 --- a/Compute/src/V1/resources/node_templates_rest_client_config.php +++ b/Compute/src/V1/resources/node_templates_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/node_types_descriptor_config.php b/Compute/src/V1/resources/node_types_descriptor_config.php index e1af4dd5ace5..fb63671578ca 100644 --- a/Compute/src/V1/resources/node_types_descriptor_config.php +++ b/Compute/src/V1/resources/node_types_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/node_types_rest_client_config.php b/Compute/src/V1/resources/node_types_rest_client_config.php index 0c5ece5b4cb0..9f921a3107b9 100644 --- a/Compute/src/V1/resources/node_types_rest_client_config.php +++ b/Compute/src/V1/resources/node_types_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/packet_mirrorings_descriptor_config.php b/Compute/src/V1/resources/packet_mirrorings_descriptor_config.php index 461e860beb3b..8e5276480ae2 100644 --- a/Compute/src/V1/resources/packet_mirrorings_descriptor_config.php +++ b/Compute/src/V1/resources/packet_mirrorings_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/packet_mirrorings_rest_client_config.php b/Compute/src/V1/resources/packet_mirrorings_rest_client_config.php index 2628175095d0..c7ca42ac392a 100644 --- a/Compute/src/V1/resources/packet_mirrorings_rest_client_config.php +++ b/Compute/src/V1/resources/packet_mirrorings_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/projects_descriptor_config.php b/Compute/src/V1/resources/projects_descriptor_config.php index bb713956e7a5..e2efb3491193 100644 --- a/Compute/src/V1/resources/projects_descriptor_config.php +++ b/Compute/src/V1/resources/projects_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/projects_rest_client_config.php b/Compute/src/V1/resources/projects_rest_client_config.php index 8c4c86b29f3f..db4625b7e3bd 100644 --- a/Compute/src/V1/resources/projects_rest_client_config.php +++ b/Compute/src/V1/resources/projects_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/public_advertised_prefixes_descriptor_config.php b/Compute/src/V1/resources/public_advertised_prefixes_descriptor_config.php index 4f47f745db97..4d238b93cd73 100644 --- a/Compute/src/V1/resources/public_advertised_prefixes_descriptor_config.php +++ b/Compute/src/V1/resources/public_advertised_prefixes_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/public_advertised_prefixes_rest_client_config.php b/Compute/src/V1/resources/public_advertised_prefixes_rest_client_config.php index 9e17af227519..33cbe8ac9675 100644 --- a/Compute/src/V1/resources/public_advertised_prefixes_rest_client_config.php +++ b/Compute/src/V1/resources/public_advertised_prefixes_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/public_delegated_prefixes_descriptor_config.php b/Compute/src/V1/resources/public_delegated_prefixes_descriptor_config.php index f30d61067f19..9aa9e516d86b 100644 --- a/Compute/src/V1/resources/public_delegated_prefixes_descriptor_config.php +++ b/Compute/src/V1/resources/public_delegated_prefixes_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/public_delegated_prefixes_rest_client_config.php b/Compute/src/V1/resources/public_delegated_prefixes_rest_client_config.php index 319395735fe3..12ced9d5ac24 100644 --- a/Compute/src/V1/resources/public_delegated_prefixes_rest_client_config.php +++ b/Compute/src/V1/resources/public_delegated_prefixes_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_autoscalers_descriptor_config.php b/Compute/src/V1/resources/region_autoscalers_descriptor_config.php index d2855dde7e9c..9e56a76ba767 100644 --- a/Compute/src/V1/resources/region_autoscalers_descriptor_config.php +++ b/Compute/src/V1/resources/region_autoscalers_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_autoscalers_rest_client_config.php b/Compute/src/V1/resources/region_autoscalers_rest_client_config.php index 7e8b0757e133..aa8825529066 100644 --- a/Compute/src/V1/resources/region_autoscalers_rest_client_config.php +++ b/Compute/src/V1/resources/region_autoscalers_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_backend_services_descriptor_config.php b/Compute/src/V1/resources/region_backend_services_descriptor_config.php index 247ea22dd88e..8cf59faa6aa7 100644 --- a/Compute/src/V1/resources/region_backend_services_descriptor_config.php +++ b/Compute/src/V1/resources/region_backend_services_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_backend_services_rest_client_config.php b/Compute/src/V1/resources/region_backend_services_rest_client_config.php index 6a4538937f17..20111fdff857 100644 --- a/Compute/src/V1/resources/region_backend_services_rest_client_config.php +++ b/Compute/src/V1/resources/region_backend_services_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_commitments_descriptor_config.php b/Compute/src/V1/resources/region_commitments_descriptor_config.php index 12bbdd9b2802..d301f8eaa33c 100644 --- a/Compute/src/V1/resources/region_commitments_descriptor_config.php +++ b/Compute/src/V1/resources/region_commitments_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_commitments_rest_client_config.php b/Compute/src/V1/resources/region_commitments_rest_client_config.php index 8b651d0b84b7..5e07d5490ec2 100644 --- a/Compute/src/V1/resources/region_commitments_rest_client_config.php +++ b/Compute/src/V1/resources/region_commitments_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_disk_types_descriptor_config.php b/Compute/src/V1/resources/region_disk_types_descriptor_config.php index 7bca4b588f6e..7e4585b9b87d 100644 --- a/Compute/src/V1/resources/region_disk_types_descriptor_config.php +++ b/Compute/src/V1/resources/region_disk_types_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_disk_types_rest_client_config.php b/Compute/src/V1/resources/region_disk_types_rest_client_config.php index 0b01e78fa006..37f3ae33a8bd 100644 --- a/Compute/src/V1/resources/region_disk_types_rest_client_config.php +++ b/Compute/src/V1/resources/region_disk_types_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_disks_descriptor_config.php b/Compute/src/V1/resources/region_disks_descriptor_config.php index c5f9eccc5ce6..0e2e95ba6b3a 100644 --- a/Compute/src/V1/resources/region_disks_descriptor_config.php +++ b/Compute/src/V1/resources/region_disks_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_disks_rest_client_config.php b/Compute/src/V1/resources/region_disks_rest_client_config.php index 2ee9187b091d..e4b64d4bc054 100644 --- a/Compute/src/V1/resources/region_disks_rest_client_config.php +++ b/Compute/src/V1/resources/region_disks_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_health_check_services_descriptor_config.php b/Compute/src/V1/resources/region_health_check_services_descriptor_config.php index 008a751b2ec5..06e06df7d0b7 100644 --- a/Compute/src/V1/resources/region_health_check_services_descriptor_config.php +++ b/Compute/src/V1/resources/region_health_check_services_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_health_check_services_rest_client_config.php b/Compute/src/V1/resources/region_health_check_services_rest_client_config.php index 26eccb9feb10..ad2da6b16e7f 100644 --- a/Compute/src/V1/resources/region_health_check_services_rest_client_config.php +++ b/Compute/src/V1/resources/region_health_check_services_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_health_checks_descriptor_config.php b/Compute/src/V1/resources/region_health_checks_descriptor_config.php index 895e78b58448..8c4c1fdd3d13 100644 --- a/Compute/src/V1/resources/region_health_checks_descriptor_config.php +++ b/Compute/src/V1/resources/region_health_checks_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_health_checks_rest_client_config.php b/Compute/src/V1/resources/region_health_checks_rest_client_config.php index 30b3ca807626..137f3b7f2cd6 100644 --- a/Compute/src/V1/resources/region_health_checks_rest_client_config.php +++ b/Compute/src/V1/resources/region_health_checks_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_instance_group_managers_descriptor_config.php b/Compute/src/V1/resources/region_instance_group_managers_descriptor_config.php index 52bbe7708164..ffbe58f22d12 100644 --- a/Compute/src/V1/resources/region_instance_group_managers_descriptor_config.php +++ b/Compute/src/V1/resources/region_instance_group_managers_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_instance_group_managers_rest_client_config.php b/Compute/src/V1/resources/region_instance_group_managers_rest_client_config.php index e3b9f9497a41..a20fa10e6e76 100644 --- a/Compute/src/V1/resources/region_instance_group_managers_rest_client_config.php +++ b/Compute/src/V1/resources/region_instance_group_managers_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_instance_groups_descriptor_config.php b/Compute/src/V1/resources/region_instance_groups_descriptor_config.php index f8a3e9c3af64..5af30f171591 100644 --- a/Compute/src/V1/resources/region_instance_groups_descriptor_config.php +++ b/Compute/src/V1/resources/region_instance_groups_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_instance_groups_rest_client_config.php b/Compute/src/V1/resources/region_instance_groups_rest_client_config.php index f0f82821e161..9a911532edd0 100644 --- a/Compute/src/V1/resources/region_instance_groups_rest_client_config.php +++ b/Compute/src/V1/resources/region_instance_groups_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_instance_templates_descriptor_config.php b/Compute/src/V1/resources/region_instance_templates_descriptor_config.php index 70751d9f6fdf..41b569be292c 100644 --- a/Compute/src/V1/resources/region_instance_templates_descriptor_config.php +++ b/Compute/src/V1/resources/region_instance_templates_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_instance_templates_rest_client_config.php b/Compute/src/V1/resources/region_instance_templates_rest_client_config.php index 3a3a87d4b5d9..33dcab1f0b23 100644 --- a/Compute/src/V1/resources/region_instance_templates_rest_client_config.php +++ b/Compute/src/V1/resources/region_instance_templates_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_instances_descriptor_config.php b/Compute/src/V1/resources/region_instances_descriptor_config.php index eb25a10e2f08..55eb355aa382 100644 --- a/Compute/src/V1/resources/region_instances_descriptor_config.php +++ b/Compute/src/V1/resources/region_instances_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_instances_rest_client_config.php b/Compute/src/V1/resources/region_instances_rest_client_config.php index 0894332d2be2..68cab5a92197 100644 --- a/Compute/src/V1/resources/region_instances_rest_client_config.php +++ b/Compute/src/V1/resources/region_instances_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_instant_snapshots_descriptor_config.php b/Compute/src/V1/resources/region_instant_snapshots_descriptor_config.php index 0d7367e29e07..f5acc7ccfd38 100644 --- a/Compute/src/V1/resources/region_instant_snapshots_descriptor_config.php +++ b/Compute/src/V1/resources/region_instant_snapshots_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_instant_snapshots_rest_client_config.php b/Compute/src/V1/resources/region_instant_snapshots_rest_client_config.php index f10ed5015562..baf56358885e 100644 --- a/Compute/src/V1/resources/region_instant_snapshots_rest_client_config.php +++ b/Compute/src/V1/resources/region_instant_snapshots_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_network_endpoint_groups_descriptor_config.php b/Compute/src/V1/resources/region_network_endpoint_groups_descriptor_config.php index abdb5fc0f9fd..48a384a5e3ee 100644 --- a/Compute/src/V1/resources/region_network_endpoint_groups_descriptor_config.php +++ b/Compute/src/V1/resources/region_network_endpoint_groups_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_network_endpoint_groups_rest_client_config.php b/Compute/src/V1/resources/region_network_endpoint_groups_rest_client_config.php index 128531f5257c..623475c02856 100644 --- a/Compute/src/V1/resources/region_network_endpoint_groups_rest_client_config.php +++ b/Compute/src/V1/resources/region_network_endpoint_groups_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_network_firewall_policies_descriptor_config.php b/Compute/src/V1/resources/region_network_firewall_policies_descriptor_config.php index 775c6a27acbd..b81470041d5f 100644 --- a/Compute/src/V1/resources/region_network_firewall_policies_descriptor_config.php +++ b/Compute/src/V1/resources/region_network_firewall_policies_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_network_firewall_policies_rest_client_config.php b/Compute/src/V1/resources/region_network_firewall_policies_rest_client_config.php index 0213804c5f06..b7af731f1388 100644 --- a/Compute/src/V1/resources/region_network_firewall_policies_rest_client_config.php +++ b/Compute/src/V1/resources/region_network_firewall_policies_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_notification_endpoints_descriptor_config.php b/Compute/src/V1/resources/region_notification_endpoints_descriptor_config.php index 96150c62b6e3..a89277a203c8 100644 --- a/Compute/src/V1/resources/region_notification_endpoints_descriptor_config.php +++ b/Compute/src/V1/resources/region_notification_endpoints_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_notification_endpoints_rest_client_config.php b/Compute/src/V1/resources/region_notification_endpoints_rest_client_config.php index 33f8645dbc02..3c9bd94ba3b0 100644 --- a/Compute/src/V1/resources/region_notification_endpoints_rest_client_config.php +++ b/Compute/src/V1/resources/region_notification_endpoints_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_operations_descriptor_config.php b/Compute/src/V1/resources/region_operations_descriptor_config.php index 2cd027c96974..c6edc1d2bc15 100644 --- a/Compute/src/V1/resources/region_operations_descriptor_config.php +++ b/Compute/src/V1/resources/region_operations_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_operations_rest_client_config.php b/Compute/src/V1/resources/region_operations_rest_client_config.php index f35d33047d15..9cc1aa619923 100644 --- a/Compute/src/V1/resources/region_operations_rest_client_config.php +++ b/Compute/src/V1/resources/region_operations_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_security_policies_descriptor_config.php b/Compute/src/V1/resources/region_security_policies_descriptor_config.php index d3764e1688bf..86b26739f51b 100644 --- a/Compute/src/V1/resources/region_security_policies_descriptor_config.php +++ b/Compute/src/V1/resources/region_security_policies_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_security_policies_rest_client_config.php b/Compute/src/V1/resources/region_security_policies_rest_client_config.php index 4d15aaaa5e93..6682f16c85f7 100644 --- a/Compute/src/V1/resources/region_security_policies_rest_client_config.php +++ b/Compute/src/V1/resources/region_security_policies_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_ssl_certificates_descriptor_config.php b/Compute/src/V1/resources/region_ssl_certificates_descriptor_config.php index 6cfa919b4fb6..05d610ccb8d5 100644 --- a/Compute/src/V1/resources/region_ssl_certificates_descriptor_config.php +++ b/Compute/src/V1/resources/region_ssl_certificates_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_ssl_certificates_rest_client_config.php b/Compute/src/V1/resources/region_ssl_certificates_rest_client_config.php index 3fd01c150089..3323a159629b 100644 --- a/Compute/src/V1/resources/region_ssl_certificates_rest_client_config.php +++ b/Compute/src/V1/resources/region_ssl_certificates_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_ssl_policies_descriptor_config.php b/Compute/src/V1/resources/region_ssl_policies_descriptor_config.php index 9618e231d074..d724a43f0c70 100644 --- a/Compute/src/V1/resources/region_ssl_policies_descriptor_config.php +++ b/Compute/src/V1/resources/region_ssl_policies_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_ssl_policies_rest_client_config.php b/Compute/src/V1/resources/region_ssl_policies_rest_client_config.php index c629efb312de..e497a97f8758 100644 --- a/Compute/src/V1/resources/region_ssl_policies_rest_client_config.php +++ b/Compute/src/V1/resources/region_ssl_policies_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_target_http_proxies_descriptor_config.php b/Compute/src/V1/resources/region_target_http_proxies_descriptor_config.php index fe2a1579f6f1..45894ab5584a 100644 --- a/Compute/src/V1/resources/region_target_http_proxies_descriptor_config.php +++ b/Compute/src/V1/resources/region_target_http_proxies_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_target_http_proxies_rest_client_config.php b/Compute/src/V1/resources/region_target_http_proxies_rest_client_config.php index cec72248fd00..037780c4027d 100644 --- a/Compute/src/V1/resources/region_target_http_proxies_rest_client_config.php +++ b/Compute/src/V1/resources/region_target_http_proxies_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_target_https_proxies_descriptor_config.php b/Compute/src/V1/resources/region_target_https_proxies_descriptor_config.php index 571131c8b95d..7c892dab8056 100644 --- a/Compute/src/V1/resources/region_target_https_proxies_descriptor_config.php +++ b/Compute/src/V1/resources/region_target_https_proxies_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_target_https_proxies_rest_client_config.php b/Compute/src/V1/resources/region_target_https_proxies_rest_client_config.php index 3878815bcbed..b3285aeab109 100644 --- a/Compute/src/V1/resources/region_target_https_proxies_rest_client_config.php +++ b/Compute/src/V1/resources/region_target_https_proxies_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_target_tcp_proxies_descriptor_config.php b/Compute/src/V1/resources/region_target_tcp_proxies_descriptor_config.php index 6046892ce301..b8dc8befd70a 100644 --- a/Compute/src/V1/resources/region_target_tcp_proxies_descriptor_config.php +++ b/Compute/src/V1/resources/region_target_tcp_proxies_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_target_tcp_proxies_rest_client_config.php b/Compute/src/V1/resources/region_target_tcp_proxies_rest_client_config.php index 642bdf414916..a40a28e2ee43 100644 --- a/Compute/src/V1/resources/region_target_tcp_proxies_rest_client_config.php +++ b/Compute/src/V1/resources/region_target_tcp_proxies_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_url_maps_descriptor_config.php b/Compute/src/V1/resources/region_url_maps_descriptor_config.php index faee4c418e15..8859e43452ef 100644 --- a/Compute/src/V1/resources/region_url_maps_descriptor_config.php +++ b/Compute/src/V1/resources/region_url_maps_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_url_maps_rest_client_config.php b/Compute/src/V1/resources/region_url_maps_rest_client_config.php index 58af102aba7e..3b6a797485c2 100644 --- a/Compute/src/V1/resources/region_url_maps_rest_client_config.php +++ b/Compute/src/V1/resources/region_url_maps_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_zones_descriptor_config.php b/Compute/src/V1/resources/region_zones_descriptor_config.php index b713ea7c1528..d62c29bf8e01 100644 --- a/Compute/src/V1/resources/region_zones_descriptor_config.php +++ b/Compute/src/V1/resources/region_zones_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/region_zones_rest_client_config.php b/Compute/src/V1/resources/region_zones_rest_client_config.php index 1eecf1c22d0f..87a6aa539964 100644 --- a/Compute/src/V1/resources/region_zones_rest_client_config.php +++ b/Compute/src/V1/resources/region_zones_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/regions_descriptor_config.php b/Compute/src/V1/resources/regions_descriptor_config.php index 761657a918d8..4ee10209bab2 100644 --- a/Compute/src/V1/resources/regions_descriptor_config.php +++ b/Compute/src/V1/resources/regions_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/regions_rest_client_config.php b/Compute/src/V1/resources/regions_rest_client_config.php index ae8029c2907f..3b31296ef691 100644 --- a/Compute/src/V1/resources/regions_rest_client_config.php +++ b/Compute/src/V1/resources/regions_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/reservations_descriptor_config.php b/Compute/src/V1/resources/reservations_descriptor_config.php index 72265380ef79..d9e947351539 100644 --- a/Compute/src/V1/resources/reservations_descriptor_config.php +++ b/Compute/src/V1/resources/reservations_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/reservations_rest_client_config.php b/Compute/src/V1/resources/reservations_rest_client_config.php index 60aacfab67b3..7f7f10f09d63 100644 --- a/Compute/src/V1/resources/reservations_rest_client_config.php +++ b/Compute/src/V1/resources/reservations_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/resource_policies_descriptor_config.php b/Compute/src/V1/resources/resource_policies_descriptor_config.php index e78b7e81806f..2ca924d67c27 100644 --- a/Compute/src/V1/resources/resource_policies_descriptor_config.php +++ b/Compute/src/V1/resources/resource_policies_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/resource_policies_rest_client_config.php b/Compute/src/V1/resources/resource_policies_rest_client_config.php index 6a38a2664e77..0b25a4b7a850 100644 --- a/Compute/src/V1/resources/resource_policies_rest_client_config.php +++ b/Compute/src/V1/resources/resource_policies_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/routers_descriptor_config.php b/Compute/src/V1/resources/routers_descriptor_config.php index 94a98c5cabeb..25bc2008eb2b 100644 --- a/Compute/src/V1/resources/routers_descriptor_config.php +++ b/Compute/src/V1/resources/routers_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/routers_rest_client_config.php b/Compute/src/V1/resources/routers_rest_client_config.php index 82dddd4f4abb..56d4e5cb6f02 100644 --- a/Compute/src/V1/resources/routers_rest_client_config.php +++ b/Compute/src/V1/resources/routers_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/routes_descriptor_config.php b/Compute/src/V1/resources/routes_descriptor_config.php index 7d8d8c32c2b7..3178689ce144 100644 --- a/Compute/src/V1/resources/routes_descriptor_config.php +++ b/Compute/src/V1/resources/routes_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/routes_rest_client_config.php b/Compute/src/V1/resources/routes_rest_client_config.php index f89f5283061e..3994ba001ddf 100644 --- a/Compute/src/V1/resources/routes_rest_client_config.php +++ b/Compute/src/V1/resources/routes_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/security_policies_descriptor_config.php b/Compute/src/V1/resources/security_policies_descriptor_config.php index 7bc855789a3f..46e5ff1db4a0 100644 --- a/Compute/src/V1/resources/security_policies_descriptor_config.php +++ b/Compute/src/V1/resources/security_policies_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/security_policies_rest_client_config.php b/Compute/src/V1/resources/security_policies_rest_client_config.php index 255ad61388a1..023b45e63528 100644 --- a/Compute/src/V1/resources/security_policies_rest_client_config.php +++ b/Compute/src/V1/resources/security_policies_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/service_attachments_descriptor_config.php b/Compute/src/V1/resources/service_attachments_descriptor_config.php index d667f1647282..f5c3cb903abb 100644 --- a/Compute/src/V1/resources/service_attachments_descriptor_config.php +++ b/Compute/src/V1/resources/service_attachments_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/service_attachments_rest_client_config.php b/Compute/src/V1/resources/service_attachments_rest_client_config.php index 7870dc81998a..e7457efef55d 100644 --- a/Compute/src/V1/resources/service_attachments_rest_client_config.php +++ b/Compute/src/V1/resources/service_attachments_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/snapshot_settings_service_descriptor_config.php b/Compute/src/V1/resources/snapshot_settings_service_descriptor_config.php index eb1a9f3d12c4..324adf409a87 100644 --- a/Compute/src/V1/resources/snapshot_settings_service_descriptor_config.php +++ b/Compute/src/V1/resources/snapshot_settings_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/snapshot_settings_service_rest_client_config.php b/Compute/src/V1/resources/snapshot_settings_service_rest_client_config.php index 339329971438..3a0bca96cdc8 100644 --- a/Compute/src/V1/resources/snapshot_settings_service_rest_client_config.php +++ b/Compute/src/V1/resources/snapshot_settings_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/snapshots_descriptor_config.php b/Compute/src/V1/resources/snapshots_descriptor_config.php index f27d0c31f6c9..c101c42e1240 100644 --- a/Compute/src/V1/resources/snapshots_descriptor_config.php +++ b/Compute/src/V1/resources/snapshots_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/snapshots_rest_client_config.php b/Compute/src/V1/resources/snapshots_rest_client_config.php index fd4a630af841..0126c6825734 100644 --- a/Compute/src/V1/resources/snapshots_rest_client_config.php +++ b/Compute/src/V1/resources/snapshots_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/ssl_certificates_descriptor_config.php b/Compute/src/V1/resources/ssl_certificates_descriptor_config.php index 9e67186de03b..0d7a08d10736 100644 --- a/Compute/src/V1/resources/ssl_certificates_descriptor_config.php +++ b/Compute/src/V1/resources/ssl_certificates_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/ssl_certificates_rest_client_config.php b/Compute/src/V1/resources/ssl_certificates_rest_client_config.php index 347030dd55cc..10a8ae36561c 100644 --- a/Compute/src/V1/resources/ssl_certificates_rest_client_config.php +++ b/Compute/src/V1/resources/ssl_certificates_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/ssl_policies_descriptor_config.php b/Compute/src/V1/resources/ssl_policies_descriptor_config.php index 6584c657ae2a..69792fd30a86 100644 --- a/Compute/src/V1/resources/ssl_policies_descriptor_config.php +++ b/Compute/src/V1/resources/ssl_policies_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/ssl_policies_rest_client_config.php b/Compute/src/V1/resources/ssl_policies_rest_client_config.php index 5201078dcbb4..fa7057a3f242 100644 --- a/Compute/src/V1/resources/ssl_policies_rest_client_config.php +++ b/Compute/src/V1/resources/ssl_policies_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/subnetworks_descriptor_config.php b/Compute/src/V1/resources/subnetworks_descriptor_config.php index 780b677ba5b1..f78e4e18f1db 100644 --- a/Compute/src/V1/resources/subnetworks_descriptor_config.php +++ b/Compute/src/V1/resources/subnetworks_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/subnetworks_rest_client_config.php b/Compute/src/V1/resources/subnetworks_rest_client_config.php index 59e136364dab..68af3d0c3bbb 100644 --- a/Compute/src/V1/resources/subnetworks_rest_client_config.php +++ b/Compute/src/V1/resources/subnetworks_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/target_grpc_proxies_descriptor_config.php b/Compute/src/V1/resources/target_grpc_proxies_descriptor_config.php index 2be4613df5e0..254183f84e52 100644 --- a/Compute/src/V1/resources/target_grpc_proxies_descriptor_config.php +++ b/Compute/src/V1/resources/target_grpc_proxies_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/target_grpc_proxies_rest_client_config.php b/Compute/src/V1/resources/target_grpc_proxies_rest_client_config.php index eae3b5c48bbd..159ace9b824a 100644 --- a/Compute/src/V1/resources/target_grpc_proxies_rest_client_config.php +++ b/Compute/src/V1/resources/target_grpc_proxies_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/target_http_proxies_descriptor_config.php b/Compute/src/V1/resources/target_http_proxies_descriptor_config.php index 4f9693818ba3..cf0edd6501da 100644 --- a/Compute/src/V1/resources/target_http_proxies_descriptor_config.php +++ b/Compute/src/V1/resources/target_http_proxies_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/target_http_proxies_rest_client_config.php b/Compute/src/V1/resources/target_http_proxies_rest_client_config.php index 385d8bd35f94..c23a40f88a1d 100644 --- a/Compute/src/V1/resources/target_http_proxies_rest_client_config.php +++ b/Compute/src/V1/resources/target_http_proxies_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/target_https_proxies_descriptor_config.php b/Compute/src/V1/resources/target_https_proxies_descriptor_config.php index 994c9698de33..8e90fe47911b 100644 --- a/Compute/src/V1/resources/target_https_proxies_descriptor_config.php +++ b/Compute/src/V1/resources/target_https_proxies_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/target_https_proxies_rest_client_config.php b/Compute/src/V1/resources/target_https_proxies_rest_client_config.php index 244931a89dbe..d1030d866857 100644 --- a/Compute/src/V1/resources/target_https_proxies_rest_client_config.php +++ b/Compute/src/V1/resources/target_https_proxies_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/target_instances_descriptor_config.php b/Compute/src/V1/resources/target_instances_descriptor_config.php index 982d489327fe..fb28638269c3 100644 --- a/Compute/src/V1/resources/target_instances_descriptor_config.php +++ b/Compute/src/V1/resources/target_instances_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/target_instances_rest_client_config.php b/Compute/src/V1/resources/target_instances_rest_client_config.php index a722e8c4fbb6..d0d3118a3a2d 100644 --- a/Compute/src/V1/resources/target_instances_rest_client_config.php +++ b/Compute/src/V1/resources/target_instances_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/target_pools_descriptor_config.php b/Compute/src/V1/resources/target_pools_descriptor_config.php index 7151a1d54831..223636d00cc1 100644 --- a/Compute/src/V1/resources/target_pools_descriptor_config.php +++ b/Compute/src/V1/resources/target_pools_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/target_pools_rest_client_config.php b/Compute/src/V1/resources/target_pools_rest_client_config.php index 22ced57431fd..cce64208e969 100644 --- a/Compute/src/V1/resources/target_pools_rest_client_config.php +++ b/Compute/src/V1/resources/target_pools_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/target_ssl_proxies_descriptor_config.php b/Compute/src/V1/resources/target_ssl_proxies_descriptor_config.php index 1a8591626794..c4e8dbaa6f77 100644 --- a/Compute/src/V1/resources/target_ssl_proxies_descriptor_config.php +++ b/Compute/src/V1/resources/target_ssl_proxies_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/target_ssl_proxies_rest_client_config.php b/Compute/src/V1/resources/target_ssl_proxies_rest_client_config.php index 840b2b8806ac..6edf163ce9bc 100644 --- a/Compute/src/V1/resources/target_ssl_proxies_rest_client_config.php +++ b/Compute/src/V1/resources/target_ssl_proxies_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/target_tcp_proxies_descriptor_config.php b/Compute/src/V1/resources/target_tcp_proxies_descriptor_config.php index 3bd962f32ff0..9464ee53f3d4 100644 --- a/Compute/src/V1/resources/target_tcp_proxies_descriptor_config.php +++ b/Compute/src/V1/resources/target_tcp_proxies_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/target_tcp_proxies_rest_client_config.php b/Compute/src/V1/resources/target_tcp_proxies_rest_client_config.php index 1f01ae231cab..e92438bed04c 100644 --- a/Compute/src/V1/resources/target_tcp_proxies_rest_client_config.php +++ b/Compute/src/V1/resources/target_tcp_proxies_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/target_vpn_gateways_descriptor_config.php b/Compute/src/V1/resources/target_vpn_gateways_descriptor_config.php index 0bb21a24e58f..7285dc4c336d 100644 --- a/Compute/src/V1/resources/target_vpn_gateways_descriptor_config.php +++ b/Compute/src/V1/resources/target_vpn_gateways_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/target_vpn_gateways_rest_client_config.php b/Compute/src/V1/resources/target_vpn_gateways_rest_client_config.php index 077da5d98fe4..b5a05ad6bf46 100644 --- a/Compute/src/V1/resources/target_vpn_gateways_rest_client_config.php +++ b/Compute/src/V1/resources/target_vpn_gateways_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/url_maps_descriptor_config.php b/Compute/src/V1/resources/url_maps_descriptor_config.php index 34d0d4c78701..307ae7b17e48 100644 --- a/Compute/src/V1/resources/url_maps_descriptor_config.php +++ b/Compute/src/V1/resources/url_maps_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/url_maps_rest_client_config.php b/Compute/src/V1/resources/url_maps_rest_client_config.php index d52a2b838eb4..b070a36b8dd8 100644 --- a/Compute/src/V1/resources/url_maps_rest_client_config.php +++ b/Compute/src/V1/resources/url_maps_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/vpn_gateways_descriptor_config.php b/Compute/src/V1/resources/vpn_gateways_descriptor_config.php index 60220d9fc6c8..18b6b1fd11a6 100644 --- a/Compute/src/V1/resources/vpn_gateways_descriptor_config.php +++ b/Compute/src/V1/resources/vpn_gateways_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/vpn_gateways_rest_client_config.php b/Compute/src/V1/resources/vpn_gateways_rest_client_config.php index 8b8865286b4e..ea4a5fc86a2b 100644 --- a/Compute/src/V1/resources/vpn_gateways_rest_client_config.php +++ b/Compute/src/V1/resources/vpn_gateways_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/vpn_tunnels_descriptor_config.php b/Compute/src/V1/resources/vpn_tunnels_descriptor_config.php index 7f34cfd2359c..738677fc5452 100644 --- a/Compute/src/V1/resources/vpn_tunnels_descriptor_config.php +++ b/Compute/src/V1/resources/vpn_tunnels_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/vpn_tunnels_rest_client_config.php b/Compute/src/V1/resources/vpn_tunnels_rest_client_config.php index d82a11474b23..67aade00b791 100644 --- a/Compute/src/V1/resources/vpn_tunnels_rest_client_config.php +++ b/Compute/src/V1/resources/vpn_tunnels_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/zone_operations_descriptor_config.php b/Compute/src/V1/resources/zone_operations_descriptor_config.php index ef2f9a921f67..2a679de05bc5 100644 --- a/Compute/src/V1/resources/zone_operations_descriptor_config.php +++ b/Compute/src/V1/resources/zone_operations_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/zone_operations_rest_client_config.php b/Compute/src/V1/resources/zone_operations_rest_client_config.php index ee892a09d50b..96db89ae2421 100644 --- a/Compute/src/V1/resources/zone_operations_rest_client_config.php +++ b/Compute/src/V1/resources/zone_operations_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/zones_descriptor_config.php b/Compute/src/V1/resources/zones_descriptor_config.php index 974072ecc8a4..4f91a0e331b1 100644 --- a/Compute/src/V1/resources/zones_descriptor_config.php +++ b/Compute/src/V1/resources/zones_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Compute/src/V1/resources/zones_rest_client_config.php b/Compute/src/V1/resources/zones_rest_client_config.php index f2183aa4495d..af7de216d677 100644 --- a/Compute/src/V1/resources/zones_rest_client_config.php +++ b/Compute/src/V1/resources/zones_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ConfidentialComputing/src/V1/resources/confidential_computing_descriptor_config.php b/ConfidentialComputing/src/V1/resources/confidential_computing_descriptor_config.php index 8ab43815b29c..6767113b9bf8 100644 --- a/ConfidentialComputing/src/V1/resources/confidential_computing_descriptor_config.php +++ b/ConfidentialComputing/src/V1/resources/confidential_computing_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ConfidentialComputing/src/V1/resources/confidential_computing_rest_client_config.php b/ConfidentialComputing/src/V1/resources/confidential_computing_rest_client_config.php index 364900244c32..0e6d40c8875d 100644 --- a/ConfidentialComputing/src/V1/resources/confidential_computing_rest_client_config.php +++ b/ConfidentialComputing/src/V1/resources/confidential_computing_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Config/src/V1/resources/config_descriptor_config.php b/Config/src/V1/resources/config_descriptor_config.php index 6937c9679f4a..b6363a20d766 100644 --- a/Config/src/V1/resources/config_descriptor_config.php +++ b/Config/src/V1/resources/config_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Config/src/V1/resources/config_rest_client_config.php b/Config/src/V1/resources/config_rest_client_config.php index a3cbbd7e11a8..8c4252307138 100644 --- a/Config/src/V1/resources/config_rest_client_config.php +++ b/Config/src/V1/resources/config_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ContactCenterInsights/src/V1/resources/contact_center_insights_descriptor_config.php b/ContactCenterInsights/src/V1/resources/contact_center_insights_descriptor_config.php index 3e813b4ea4ef..aa0bfa54c9d4 100644 --- a/ContactCenterInsights/src/V1/resources/contact_center_insights_descriptor_config.php +++ b/ContactCenterInsights/src/V1/resources/contact_center_insights_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ContactCenterInsights/src/V1/resources/contact_center_insights_rest_client_config.php b/ContactCenterInsights/src/V1/resources/contact_center_insights_rest_client_config.php index 571d7849c475..1da13d22d3a7 100644 --- a/ContactCenterInsights/src/V1/resources/contact_center_insights_rest_client_config.php +++ b/ContactCenterInsights/src/V1/resources/contact_center_insights_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Container/src/V1/resources/cluster_manager_descriptor_config.php b/Container/src/V1/resources/cluster_manager_descriptor_config.php index 7a95b60680a4..1b330b402c69 100644 --- a/Container/src/V1/resources/cluster_manager_descriptor_config.php +++ b/Container/src/V1/resources/cluster_manager_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Container/src/V1/resources/cluster_manager_rest_client_config.php b/Container/src/V1/resources/cluster_manager_rest_client_config.php index a273effe3867..378a10f34ef5 100644 --- a/Container/src/V1/resources/cluster_manager_rest_client_config.php +++ b/Container/src/V1/resources/cluster_manager_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ContainerAnalysis/src/V1/resources/container_analysis_descriptor_config.php b/ContainerAnalysis/src/V1/resources/container_analysis_descriptor_config.php index 864aead92eb2..ad6ca1c4b15b 100644 --- a/ContainerAnalysis/src/V1/resources/container_analysis_descriptor_config.php +++ b/ContainerAnalysis/src/V1/resources/container_analysis_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ContainerAnalysis/src/V1/resources/container_analysis_rest_client_config.php b/ContainerAnalysis/src/V1/resources/container_analysis_rest_client_config.php index df46c60e8329..a21fcda50214 100644 --- a/ContainerAnalysis/src/V1/resources/container_analysis_rest_client_config.php +++ b/ContainerAnalysis/src/V1/resources/container_analysis_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ControlsPartner/src/V1beta/resources/cloud_controls_partner_core_descriptor_config.php b/ControlsPartner/src/V1beta/resources/cloud_controls_partner_core_descriptor_config.php index 5ccdd23067bb..f3f5186c4791 100644 --- a/ControlsPartner/src/V1beta/resources/cloud_controls_partner_core_descriptor_config.php +++ b/ControlsPartner/src/V1beta/resources/cloud_controls_partner_core_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ControlsPartner/src/V1beta/resources/cloud_controls_partner_core_rest_client_config.php b/ControlsPartner/src/V1beta/resources/cloud_controls_partner_core_rest_client_config.php index 9d8d11f56ee9..3dd6f9afb6b6 100644 --- a/ControlsPartner/src/V1beta/resources/cloud_controls_partner_core_rest_client_config.php +++ b/ControlsPartner/src/V1beta/resources/cloud_controls_partner_core_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/ControlsPartner/src/V1beta/resources/cloud_controls_partner_monitoring_descriptor_config.php b/ControlsPartner/src/V1beta/resources/cloud_controls_partner_monitoring_descriptor_config.php index 784a7adace50..df21bc1ae902 100644 --- a/ControlsPartner/src/V1beta/resources/cloud_controls_partner_monitoring_descriptor_config.php +++ b/ControlsPartner/src/V1beta/resources/cloud_controls_partner_monitoring_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/ControlsPartner/src/V1beta/resources/cloud_controls_partner_monitoring_rest_client_config.php b/ControlsPartner/src/V1beta/resources/cloud_controls_partner_monitoring_rest_client_config.php index 223d112af066..f3eb5ee07389 100644 --- a/ControlsPartner/src/V1beta/resources/cloud_controls_partner_monitoring_rest_client_config.php +++ b/ControlsPartner/src/V1beta/resources/cloud_controls_partner_monitoring_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DataCatalog/src/V1/resources/data_catalog_descriptor_config.php b/DataCatalog/src/V1/resources/data_catalog_descriptor_config.php index db32a4ee613d..f33442a300df 100644 --- a/DataCatalog/src/V1/resources/data_catalog_descriptor_config.php +++ b/DataCatalog/src/V1/resources/data_catalog_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DataCatalog/src/V1/resources/data_catalog_rest_client_config.php b/DataCatalog/src/V1/resources/data_catalog_rest_client_config.php index e88d57fa1ed3..6cfbc6216468 100644 --- a/DataCatalog/src/V1/resources/data_catalog_rest_client_config.php +++ b/DataCatalog/src/V1/resources/data_catalog_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DataCatalog/src/V1/resources/policy_tag_manager_descriptor_config.php b/DataCatalog/src/V1/resources/policy_tag_manager_descriptor_config.php index 9c3137a11bbb..a89d289f0b67 100644 --- a/DataCatalog/src/V1/resources/policy_tag_manager_descriptor_config.php +++ b/DataCatalog/src/V1/resources/policy_tag_manager_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DataCatalog/src/V1/resources/policy_tag_manager_rest_client_config.php b/DataCatalog/src/V1/resources/policy_tag_manager_rest_client_config.php index 994ba95e96aa..9492ed0d1fb9 100644 --- a/DataCatalog/src/V1/resources/policy_tag_manager_rest_client_config.php +++ b/DataCatalog/src/V1/resources/policy_tag_manager_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DataCatalog/src/V1/resources/policy_tag_manager_serialization_descriptor_config.php b/DataCatalog/src/V1/resources/policy_tag_manager_serialization_descriptor_config.php index 6ba1c5da19f6..52717a0a49be 100644 --- a/DataCatalog/src/V1/resources/policy_tag_manager_serialization_descriptor_config.php +++ b/DataCatalog/src/V1/resources/policy_tag_manager_serialization_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DataCatalog/src/V1/resources/policy_tag_manager_serialization_rest_client_config.php b/DataCatalog/src/V1/resources/policy_tag_manager_serialization_rest_client_config.php index ec08adc7e22f..e7f1ba4e670e 100644 --- a/DataCatalog/src/V1/resources/policy_tag_manager_serialization_rest_client_config.php +++ b/DataCatalog/src/V1/resources/policy_tag_manager_serialization_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DataCatalogLineage/src/V1/resources/lineage_descriptor_config.php b/DataCatalogLineage/src/V1/resources/lineage_descriptor_config.php index 67a2be85f895..49b653ccab4c 100644 --- a/DataCatalogLineage/src/V1/resources/lineage_descriptor_config.php +++ b/DataCatalogLineage/src/V1/resources/lineage_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DataCatalogLineage/src/V1/resources/lineage_rest_client_config.php b/DataCatalogLineage/src/V1/resources/lineage_rest_client_config.php index 0f8e407dc4fb..4b008e74c5fa 100644 --- a/DataCatalogLineage/src/V1/resources/lineage_rest_client_config.php +++ b/DataCatalogLineage/src/V1/resources/lineage_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DataFusion/src/V1/resources/data_fusion_descriptor_config.php b/DataFusion/src/V1/resources/data_fusion_descriptor_config.php index 34fbd52f9e1d..ce4552a4a4f4 100644 --- a/DataFusion/src/V1/resources/data_fusion_descriptor_config.php +++ b/DataFusion/src/V1/resources/data_fusion_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DataFusion/src/V1/resources/data_fusion_rest_client_config.php b/DataFusion/src/V1/resources/data_fusion_rest_client_config.php index ac0819bbf4e3..94d67062be95 100644 --- a/DataFusion/src/V1/resources/data_fusion_rest_client_config.php +++ b/DataFusion/src/V1/resources/data_fusion_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DataLabeling/src/V1beta1/resources/data_labeling_service_descriptor_config.php b/DataLabeling/src/V1beta1/resources/data_labeling_service_descriptor_config.php index 56369463b2fc..df5c4236d60f 100644 --- a/DataLabeling/src/V1beta1/resources/data_labeling_service_descriptor_config.php +++ b/DataLabeling/src/V1beta1/resources/data_labeling_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DataLabeling/src/V1beta1/resources/data_labeling_service_rest_client_config.php b/DataLabeling/src/V1beta1/resources/data_labeling_service_rest_client_config.php index 143e7d9a5b59..b067c3abe9a1 100644 --- a/DataLabeling/src/V1beta1/resources/data_labeling_service_rest_client_config.php +++ b/DataLabeling/src/V1beta1/resources/data_labeling_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataflow/src/V1beta3/resources/flex_templates_service_descriptor_config.php b/Dataflow/src/V1beta3/resources/flex_templates_service_descriptor_config.php index 215fe9e2c16e..f338653db8c8 100644 --- a/Dataflow/src/V1beta3/resources/flex_templates_service_descriptor_config.php +++ b/Dataflow/src/V1beta3/resources/flex_templates_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataflow/src/V1beta3/resources/flex_templates_service_rest_client_config.php b/Dataflow/src/V1beta3/resources/flex_templates_service_rest_client_config.php index 1b436c06964a..393ccd3582f6 100644 --- a/Dataflow/src/V1beta3/resources/flex_templates_service_rest_client_config.php +++ b/Dataflow/src/V1beta3/resources/flex_templates_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataflow/src/V1beta3/resources/jobs_v1_beta3_descriptor_config.php b/Dataflow/src/V1beta3/resources/jobs_v1_beta3_descriptor_config.php index 72fac5975de0..8e33090209ae 100644 --- a/Dataflow/src/V1beta3/resources/jobs_v1_beta3_descriptor_config.php +++ b/Dataflow/src/V1beta3/resources/jobs_v1_beta3_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataflow/src/V1beta3/resources/jobs_v1_beta3_rest_client_config.php b/Dataflow/src/V1beta3/resources/jobs_v1_beta3_rest_client_config.php index 57ae0aceb76b..dbd750aed7df 100644 --- a/Dataflow/src/V1beta3/resources/jobs_v1_beta3_rest_client_config.php +++ b/Dataflow/src/V1beta3/resources/jobs_v1_beta3_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataflow/src/V1beta3/resources/messages_v1_beta3_descriptor_config.php b/Dataflow/src/V1beta3/resources/messages_v1_beta3_descriptor_config.php index 92e76f70edec..e0f8ede8402a 100644 --- a/Dataflow/src/V1beta3/resources/messages_v1_beta3_descriptor_config.php +++ b/Dataflow/src/V1beta3/resources/messages_v1_beta3_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataflow/src/V1beta3/resources/messages_v1_beta3_rest_client_config.php b/Dataflow/src/V1beta3/resources/messages_v1_beta3_rest_client_config.php index e8f6b18eda1d..3edf36424b49 100644 --- a/Dataflow/src/V1beta3/resources/messages_v1_beta3_rest_client_config.php +++ b/Dataflow/src/V1beta3/resources/messages_v1_beta3_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataflow/src/V1beta3/resources/metrics_v1_beta3_descriptor_config.php b/Dataflow/src/V1beta3/resources/metrics_v1_beta3_descriptor_config.php index 298c38d58a43..1424dceb6344 100644 --- a/Dataflow/src/V1beta3/resources/metrics_v1_beta3_descriptor_config.php +++ b/Dataflow/src/V1beta3/resources/metrics_v1_beta3_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataflow/src/V1beta3/resources/metrics_v1_beta3_rest_client_config.php b/Dataflow/src/V1beta3/resources/metrics_v1_beta3_rest_client_config.php index 47324b92545e..847c7a9b0cb4 100644 --- a/Dataflow/src/V1beta3/resources/metrics_v1_beta3_rest_client_config.php +++ b/Dataflow/src/V1beta3/resources/metrics_v1_beta3_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataflow/src/V1beta3/resources/snapshots_v1_beta3_descriptor_config.php b/Dataflow/src/V1beta3/resources/snapshots_v1_beta3_descriptor_config.php index 997e29031e3e..16a981abe7fa 100644 --- a/Dataflow/src/V1beta3/resources/snapshots_v1_beta3_descriptor_config.php +++ b/Dataflow/src/V1beta3/resources/snapshots_v1_beta3_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataflow/src/V1beta3/resources/snapshots_v1_beta3_rest_client_config.php b/Dataflow/src/V1beta3/resources/snapshots_v1_beta3_rest_client_config.php index 7009c3778574..85094b7f9fee 100644 --- a/Dataflow/src/V1beta3/resources/snapshots_v1_beta3_rest_client_config.php +++ b/Dataflow/src/V1beta3/resources/snapshots_v1_beta3_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataflow/src/V1beta3/resources/templates_service_descriptor_config.php b/Dataflow/src/V1beta3/resources/templates_service_descriptor_config.php index f826b2612275..63d551030482 100644 --- a/Dataflow/src/V1beta3/resources/templates_service_descriptor_config.php +++ b/Dataflow/src/V1beta3/resources/templates_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataflow/src/V1beta3/resources/templates_service_rest_client_config.php b/Dataflow/src/V1beta3/resources/templates_service_rest_client_config.php index f2d8c1e2eeca..ca4b9b599d05 100644 --- a/Dataflow/src/V1beta3/resources/templates_service_rest_client_config.php +++ b/Dataflow/src/V1beta3/resources/templates_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataform/src/V1beta1/resources/dataform_descriptor_config.php b/Dataform/src/V1beta1/resources/dataform_descriptor_config.php index d7372d8f96e8..6dafd0df7635 100644 --- a/Dataform/src/V1beta1/resources/dataform_descriptor_config.php +++ b/Dataform/src/V1beta1/resources/dataform_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataform/src/V1beta1/resources/dataform_rest_client_config.php b/Dataform/src/V1beta1/resources/dataform_rest_client_config.php index 4abb481103fb..31b71282ca2d 100644 --- a/Dataform/src/V1beta1/resources/dataform_rest_client_config.php +++ b/Dataform/src/V1beta1/resources/dataform_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataplex/src/V1/resources/catalog_service_descriptor_config.php b/Dataplex/src/V1/resources/catalog_service_descriptor_config.php index dc858843630c..4fb6f9c29697 100644 --- a/Dataplex/src/V1/resources/catalog_service_descriptor_config.php +++ b/Dataplex/src/V1/resources/catalog_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataplex/src/V1/resources/catalog_service_rest_client_config.php b/Dataplex/src/V1/resources/catalog_service_rest_client_config.php index eafed6a66d23..162e126e7aca 100644 --- a/Dataplex/src/V1/resources/catalog_service_rest_client_config.php +++ b/Dataplex/src/V1/resources/catalog_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataplex/src/V1/resources/content_service_descriptor_config.php b/Dataplex/src/V1/resources/content_service_descriptor_config.php index 6b877ef652b6..29009356e98f 100644 --- a/Dataplex/src/V1/resources/content_service_descriptor_config.php +++ b/Dataplex/src/V1/resources/content_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataplex/src/V1/resources/content_service_rest_client_config.php b/Dataplex/src/V1/resources/content_service_rest_client_config.php index a108de8fb9e9..0dcaf936b334 100644 --- a/Dataplex/src/V1/resources/content_service_rest_client_config.php +++ b/Dataplex/src/V1/resources/content_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataplex/src/V1/resources/data_scan_service_descriptor_config.php b/Dataplex/src/V1/resources/data_scan_service_descriptor_config.php index 75de3af00155..124541dc6289 100644 --- a/Dataplex/src/V1/resources/data_scan_service_descriptor_config.php +++ b/Dataplex/src/V1/resources/data_scan_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataplex/src/V1/resources/data_scan_service_rest_client_config.php b/Dataplex/src/V1/resources/data_scan_service_rest_client_config.php index ad7020e93ebb..88c14e05728b 100644 --- a/Dataplex/src/V1/resources/data_scan_service_rest_client_config.php +++ b/Dataplex/src/V1/resources/data_scan_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataplex/src/V1/resources/data_taxonomy_service_descriptor_config.php b/Dataplex/src/V1/resources/data_taxonomy_service_descriptor_config.php index 48dcbb5a034a..4ceab622da94 100644 --- a/Dataplex/src/V1/resources/data_taxonomy_service_descriptor_config.php +++ b/Dataplex/src/V1/resources/data_taxonomy_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataplex/src/V1/resources/data_taxonomy_service_rest_client_config.php b/Dataplex/src/V1/resources/data_taxonomy_service_rest_client_config.php index f8b9cff8373a..a7177928a495 100644 --- a/Dataplex/src/V1/resources/data_taxonomy_service_rest_client_config.php +++ b/Dataplex/src/V1/resources/data_taxonomy_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataplex/src/V1/resources/dataplex_service_descriptor_config.php b/Dataplex/src/V1/resources/dataplex_service_descriptor_config.php index bd5f19c4c2d4..0b939902187f 100644 --- a/Dataplex/src/V1/resources/dataplex_service_descriptor_config.php +++ b/Dataplex/src/V1/resources/dataplex_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataplex/src/V1/resources/dataplex_service_rest_client_config.php b/Dataplex/src/V1/resources/dataplex_service_rest_client_config.php index a62570d12938..e35baf81da8e 100644 --- a/Dataplex/src/V1/resources/dataplex_service_rest_client_config.php +++ b/Dataplex/src/V1/resources/dataplex_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataplex/src/V1/resources/metadata_service_descriptor_config.php b/Dataplex/src/V1/resources/metadata_service_descriptor_config.php index 771d154bf19c..3d1ec7be5b9e 100644 --- a/Dataplex/src/V1/resources/metadata_service_descriptor_config.php +++ b/Dataplex/src/V1/resources/metadata_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataplex/src/V1/resources/metadata_service_rest_client_config.php b/Dataplex/src/V1/resources/metadata_service_rest_client_config.php index 1bb3e6834af8..30ded483e607 100644 --- a/Dataplex/src/V1/resources/metadata_service_rest_client_config.php +++ b/Dataplex/src/V1/resources/metadata_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataproc/src/V1/resources/autoscaling_policy_service_descriptor_config.php b/Dataproc/src/V1/resources/autoscaling_policy_service_descriptor_config.php index 26dc5cb06ac0..bcd0647b0a39 100644 --- a/Dataproc/src/V1/resources/autoscaling_policy_service_descriptor_config.php +++ b/Dataproc/src/V1/resources/autoscaling_policy_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataproc/src/V1/resources/autoscaling_policy_service_rest_client_config.php b/Dataproc/src/V1/resources/autoscaling_policy_service_rest_client_config.php index 802871a91d8a..44063647d781 100644 --- a/Dataproc/src/V1/resources/autoscaling_policy_service_rest_client_config.php +++ b/Dataproc/src/V1/resources/autoscaling_policy_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataproc/src/V1/resources/batch_controller_descriptor_config.php b/Dataproc/src/V1/resources/batch_controller_descriptor_config.php index 2f7bc24e6d8a..19bfb52172a6 100644 --- a/Dataproc/src/V1/resources/batch_controller_descriptor_config.php +++ b/Dataproc/src/V1/resources/batch_controller_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataproc/src/V1/resources/batch_controller_rest_client_config.php b/Dataproc/src/V1/resources/batch_controller_rest_client_config.php index 15194bea6ec7..659966269563 100644 --- a/Dataproc/src/V1/resources/batch_controller_rest_client_config.php +++ b/Dataproc/src/V1/resources/batch_controller_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataproc/src/V1/resources/cluster_controller_descriptor_config.php b/Dataproc/src/V1/resources/cluster_controller_descriptor_config.php index 925b0ae43a33..4e2d3eeb3557 100644 --- a/Dataproc/src/V1/resources/cluster_controller_descriptor_config.php +++ b/Dataproc/src/V1/resources/cluster_controller_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataproc/src/V1/resources/cluster_controller_rest_client_config.php b/Dataproc/src/V1/resources/cluster_controller_rest_client_config.php index 87a6911ceeb5..8b8101084039 100644 --- a/Dataproc/src/V1/resources/cluster_controller_rest_client_config.php +++ b/Dataproc/src/V1/resources/cluster_controller_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataproc/src/V1/resources/job_controller_descriptor_config.php b/Dataproc/src/V1/resources/job_controller_descriptor_config.php index 65927f736c9a..453069a0a0ea 100644 --- a/Dataproc/src/V1/resources/job_controller_descriptor_config.php +++ b/Dataproc/src/V1/resources/job_controller_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataproc/src/V1/resources/job_controller_rest_client_config.php b/Dataproc/src/V1/resources/job_controller_rest_client_config.php index 7523816ab8bb..53e1947a7087 100644 --- a/Dataproc/src/V1/resources/job_controller_rest_client_config.php +++ b/Dataproc/src/V1/resources/job_controller_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataproc/src/V1/resources/node_group_controller_descriptor_config.php b/Dataproc/src/V1/resources/node_group_controller_descriptor_config.php index 6367bd1eb3b4..bd02f3ee961a 100644 --- a/Dataproc/src/V1/resources/node_group_controller_descriptor_config.php +++ b/Dataproc/src/V1/resources/node_group_controller_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataproc/src/V1/resources/node_group_controller_rest_client_config.php b/Dataproc/src/V1/resources/node_group_controller_rest_client_config.php index d0ef71ea59cd..944ebcf8c317 100644 --- a/Dataproc/src/V1/resources/node_group_controller_rest_client_config.php +++ b/Dataproc/src/V1/resources/node_group_controller_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataproc/src/V1/resources/session_controller_descriptor_config.php b/Dataproc/src/V1/resources/session_controller_descriptor_config.php index 63f146b9c3c4..8be59bd1856c 100644 --- a/Dataproc/src/V1/resources/session_controller_descriptor_config.php +++ b/Dataproc/src/V1/resources/session_controller_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataproc/src/V1/resources/session_controller_rest_client_config.php b/Dataproc/src/V1/resources/session_controller_rest_client_config.php index 0320cc2ee016..8eba90b341fc 100644 --- a/Dataproc/src/V1/resources/session_controller_rest_client_config.php +++ b/Dataproc/src/V1/resources/session_controller_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataproc/src/V1/resources/session_template_controller_descriptor_config.php b/Dataproc/src/V1/resources/session_template_controller_descriptor_config.php index fb70322096a5..7f0e4054e33f 100644 --- a/Dataproc/src/V1/resources/session_template_controller_descriptor_config.php +++ b/Dataproc/src/V1/resources/session_template_controller_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataproc/src/V1/resources/session_template_controller_rest_client_config.php b/Dataproc/src/V1/resources/session_template_controller_rest_client_config.php index 413b2b166346..76c40e9cd267 100644 --- a/Dataproc/src/V1/resources/session_template_controller_rest_client_config.php +++ b/Dataproc/src/V1/resources/session_template_controller_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataproc/src/V1/resources/workflow_template_service_descriptor_config.php b/Dataproc/src/V1/resources/workflow_template_service_descriptor_config.php index 07140b14784c..dc59aae5180f 100644 --- a/Dataproc/src/V1/resources/workflow_template_service_descriptor_config.php +++ b/Dataproc/src/V1/resources/workflow_template_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Dataproc/src/V1/resources/workflow_template_service_rest_client_config.php b/Dataproc/src/V1/resources/workflow_template_service_rest_client_config.php index 695430e9a494..67af15034a23 100644 --- a/Dataproc/src/V1/resources/workflow_template_service_rest_client_config.php +++ b/Dataproc/src/V1/resources/workflow_template_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DataprocMetastore/src/V1/resources/dataproc_metastore_descriptor_config.php b/DataprocMetastore/src/V1/resources/dataproc_metastore_descriptor_config.php index 97128c1f9682..2bd8ecc833d2 100644 --- a/DataprocMetastore/src/V1/resources/dataproc_metastore_descriptor_config.php +++ b/DataprocMetastore/src/V1/resources/dataproc_metastore_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DataprocMetastore/src/V1/resources/dataproc_metastore_federation_descriptor_config.php b/DataprocMetastore/src/V1/resources/dataproc_metastore_federation_descriptor_config.php index 5ec02fe35edb..6cc1c44a5edc 100644 --- a/DataprocMetastore/src/V1/resources/dataproc_metastore_federation_descriptor_config.php +++ b/DataprocMetastore/src/V1/resources/dataproc_metastore_federation_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DataprocMetastore/src/V1/resources/dataproc_metastore_federation_rest_client_config.php b/DataprocMetastore/src/V1/resources/dataproc_metastore_federation_rest_client_config.php index d0d2069126b3..30e2dfd599f0 100644 --- a/DataprocMetastore/src/V1/resources/dataproc_metastore_federation_rest_client_config.php +++ b/DataprocMetastore/src/V1/resources/dataproc_metastore_federation_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DataprocMetastore/src/V1/resources/dataproc_metastore_rest_client_config.php b/DataprocMetastore/src/V1/resources/dataproc_metastore_rest_client_config.php index 1c55296f4988..c77a6c280858 100644 --- a/DataprocMetastore/src/V1/resources/dataproc_metastore_rest_client_config.php +++ b/DataprocMetastore/src/V1/resources/dataproc_metastore_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_descriptor_config.php b/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_descriptor_config.php index 94d5d9d3a88f..6bb0b1c9e93b 100644 --- a/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_descriptor_config.php +++ b/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_federation_descriptor_config.php b/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_federation_descriptor_config.php index 0fb6ca9677cb..11f1cbce2581 100644 --- a/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_federation_descriptor_config.php +++ b/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_federation_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_federation_rest_client_config.php b/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_federation_rest_client_config.php index aad54be89376..6265cadd23a0 100644 --- a/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_federation_rest_client_config.php +++ b/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_federation_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_rest_client_config.php b/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_rest_client_config.php index 5da0a2b6574d..cc57a96689a2 100644 --- a/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_rest_client_config.php +++ b/DataprocMetastore/src/V1alpha/resources/dataproc_metastore_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DataprocMetastore/src/V1beta/resources/dataproc_metastore_descriptor_config.php b/DataprocMetastore/src/V1beta/resources/dataproc_metastore_descriptor_config.php index dda1e9b12646..9a06002101d9 100644 --- a/DataprocMetastore/src/V1beta/resources/dataproc_metastore_descriptor_config.php +++ b/DataprocMetastore/src/V1beta/resources/dataproc_metastore_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DataprocMetastore/src/V1beta/resources/dataproc_metastore_federation_descriptor_config.php b/DataprocMetastore/src/V1beta/resources/dataproc_metastore_federation_descriptor_config.php index 97796f6e3c5e..c96ae408bbb7 100644 --- a/DataprocMetastore/src/V1beta/resources/dataproc_metastore_federation_descriptor_config.php +++ b/DataprocMetastore/src/V1beta/resources/dataproc_metastore_federation_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DataprocMetastore/src/V1beta/resources/dataproc_metastore_federation_rest_client_config.php b/DataprocMetastore/src/V1beta/resources/dataproc_metastore_federation_rest_client_config.php index 8a7cd63d635b..687939a6e5a4 100644 --- a/DataprocMetastore/src/V1beta/resources/dataproc_metastore_federation_rest_client_config.php +++ b/DataprocMetastore/src/V1beta/resources/dataproc_metastore_federation_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DataprocMetastore/src/V1beta/resources/dataproc_metastore_rest_client_config.php b/DataprocMetastore/src/V1beta/resources/dataproc_metastore_rest_client_config.php index b199ccc74cfc..848d3380831f 100644 --- a/DataprocMetastore/src/V1beta/resources/dataproc_metastore_rest_client_config.php +++ b/DataprocMetastore/src/V1beta/resources/dataproc_metastore_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Datastore/src/V1/resources/datastore_descriptor_config.php b/Datastore/src/V1/resources/datastore_descriptor_config.php index bbe767420859..533cf81dbb42 100644 --- a/Datastore/src/V1/resources/datastore_descriptor_config.php +++ b/Datastore/src/V1/resources/datastore_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Datastore/src/V1/resources/datastore_rest_client_config.php b/Datastore/src/V1/resources/datastore_rest_client_config.php index 844a82672b86..b3e9cc385e70 100644 --- a/Datastore/src/V1/resources/datastore_rest_client_config.php +++ b/Datastore/src/V1/resources/datastore_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/DatastoreAdmin/src/V1/resources/datastore_admin_descriptor_config.php b/DatastoreAdmin/src/V1/resources/datastore_admin_descriptor_config.php index e2891b13099f..3f6eb7ac9f33 100644 --- a/DatastoreAdmin/src/V1/resources/datastore_admin_descriptor_config.php +++ b/DatastoreAdmin/src/V1/resources/datastore_admin_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/DatastoreAdmin/src/V1/resources/datastore_admin_rest_client_config.php b/DatastoreAdmin/src/V1/resources/datastore_admin_rest_client_config.php index 08331544a7e6..71c74dbe495f 100644 --- a/DatastoreAdmin/src/V1/resources/datastore_admin_rest_client_config.php +++ b/DatastoreAdmin/src/V1/resources/datastore_admin_rest_client_config.php @@ -1,4 +1,24 @@ [ From deebbfa057a27f5c8a98e04d89305a6be662cee9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 16:36:32 +0000 Subject: [PATCH 40/86] chore: add license and generated code headers to generated resource files (#7226) PiperOrigin-RevId: 624277410 Source-Link: https://github.com/googleapis/googleapis/commit/2d881be8c566e4c374061248dd205efd72b7ef4f Source-Link: https://github.com/googleapis/googleapis-gen/commit/1d063f9353aeffb9a968f1a00f1d105b0c14a42d Copy-Tag: eyJwIjoiQmF0Y2gvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiQmV5b25kQ29ycEFwcENvbm5lY3Rpb25zLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiQmV5b25kQ29ycEFwcENvbm5lY3RvcnMvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiQmV5b25kQ29ycEFwcEdhdGV3YXlzLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiQmV5b25kQ29ycENsaWVudENvbm5lY3RvclNlcnZpY2VzLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiQmV5b25kQ29ycENsaWVudEdhdGV3YXlzLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiQmlnUXVlcnlBbmFseXRpY3NIdWIvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiQmlnUXVlcnlDb25uZWN0aW9uLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiQmlnUXVlcnlEYXRhRXhjaGFuZ2UvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiQmlnUXVlcnlEYXRhUG9saWNpZXMvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiQmlnUXVlcnlEYXRhVHJhbnNmZXIvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiQmlnUXVlcnlNaWdyYXRpb24vLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiQmlnUXVlcnlSZXNlcnZhdGlvbi8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiQmlnUXVlcnlTdG9yYWdlLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= Copy-Tag: eyJwIjoiQmlndGFibGUvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiQmlsbGluZy8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiQmlsbGluZ0J1ZGdldHMvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiQmluYXJ5QXV0aG9yaXphdGlvbi8uT3dsQm90LnlhbWwiLCJoIjoiMWQwNjNmOTM1M2FlZmZiOWE5NjhmMWEwMGYxZDEwNWIwYzE0YTQyZCJ9 Copy-Tag: eyJwIjoiQnVpbGQvLk93bEJvdC55YW1sIiwiaCI6IjFkMDYzZjkzNTNhZWZmYjlhOTY4ZjFhMDBmMWQxMDViMGMxNGE0MmQifQ== Copy-Tag: eyJwIjoiQ2VydGlmaWNhdGVNYW5hZ2VyLy5Pd2xCb3QueWFtbCIsImgiOiIxZDA2M2Y5MzUzYWVmZmI5YTk2OGYxYTAwZjFkMTA1YjBjMTRhNDJkIn0= * Revert changes to BigQueryDataTransfer Co-authored-by: Brent Shaffer --- .../batch_service_descriptor_config.php | 20 +++++++++++++++++++ .../batch_service_rest_client_config.php | 20 +++++++++++++++++++ ..._connections_service_descriptor_config.php | 20 +++++++++++++++++++ ...connections_service_rest_client_config.php | 20 +++++++++++++++++++ ...p_connectors_service_descriptor_config.php | 20 +++++++++++++++++++ ..._connectors_service_rest_client_config.php | 20 +++++++++++++++++++ ...app_gateways_service_descriptor_config.php | 20 +++++++++++++++++++ ...pp_gateways_service_rest_client_config.php | 20 +++++++++++++++++++ ...tor_services_service_descriptor_config.php | 20 +++++++++++++++++++ ...or_services_service_rest_client_config.php | 20 +++++++++++++++++++ ...ent_gateways_service_descriptor_config.php | 20 +++++++++++++++++++ ...nt_gateways_service_rest_client_config.php | 20 +++++++++++++++++++ ...nalytics_hub_service_descriptor_config.php | 20 +++++++++++++++++++ ...alytics_hub_service_rest_client_config.php | 20 +++++++++++++++++++ .../connection_service_descriptor_config.php | 20 +++++++++++++++++++ .../connection_service_rest_client_config.php | 20 +++++++++++++++++++ ...nalytics_hub_service_descriptor_config.php | 20 +++++++++++++++++++ ...alytics_hub_service_rest_client_config.php | 20 +++++++++++++++++++ .../data_policy_service_descriptor_config.php | 20 +++++++++++++++++++ ...data_policy_service_rest_client_config.php | 20 +++++++++++++++++++ .../data_policy_service_descriptor_config.php | 20 +++++++++++++++++++ ...data_policy_service_rest_client_config.php | 20 +++++++++++++++++++ .../migration_service_descriptor_config.php | 20 +++++++++++++++++++ .../migration_service_rest_client_config.php | 20 +++++++++++++++++++ .../reservation_service_descriptor_config.php | 20 +++++++++++++++++++ ...reservation_service_rest_client_config.php | 20 +++++++++++++++++++ .../big_query_read_descriptor_config.php | 20 +++++++++++++++++++ .../big_query_read_rest_client_config.php | 20 +++++++++++++++++++ .../big_query_write_descriptor_config.php | 20 +++++++++++++++++++ .../big_query_write_rest_client_config.php | 20 +++++++++++++++++++ .../cloud_billing_descriptor_config.php | 20 +++++++++++++++++++ .../cloud_billing_rest_client_config.php | 20 +++++++++++++++++++ .../cloud_catalog_descriptor_config.php | 20 +++++++++++++++++++ .../cloud_catalog_rest_client_config.php | 20 +++++++++++++++++++ .../budget_service_descriptor_config.php | 20 +++++++++++++++++++ .../budget_service_rest_client_config.php | 20 +++++++++++++++++++ .../budget_service_descriptor_config.php | 20 +++++++++++++++++++ .../budget_service_rest_client_config.php | 20 +++++++++++++++++++ ...anagement_service_v1_descriptor_config.php | 20 +++++++++++++++++++ ...nagement_service_v1_rest_client_config.php | 20 +++++++++++++++++++ .../system_policy_v1_descriptor_config.php | 20 +++++++++++++++++++ .../system_policy_v1_rest_client_config.php | 20 +++++++++++++++++++ ...validation_helper_v1_descriptor_config.php | 20 +++++++++++++++++++ ...alidation_helper_v1_rest_client_config.php | 20 +++++++++++++++++++ ...ent_service_v1_beta1_descriptor_config.php | 20 +++++++++++++++++++ ...nt_service_v1_beta1_rest_client_config.php | 20 +++++++++++++++++++ ...stem_policy_v1_beta1_descriptor_config.php | 20 +++++++++++++++++++ ...tem_policy_v1_beta1_rest_client_config.php | 20 +++++++++++++++++++ .../cloud_build_descriptor_config.php | 20 +++++++++++++++++++ .../cloud_build_rest_client_config.php | 20 +++++++++++++++++++ .../repository_manager_descriptor_config.php | 20 +++++++++++++++++++ .../repository_manager_rest_client_config.php | 20 +++++++++++++++++++ .../certificate_manager_descriptor_config.php | 20 +++++++++++++++++++ ...certificate_manager_rest_client_config.php | 20 +++++++++++++++++++ 54 files changed, 1080 insertions(+) diff --git a/Batch/src/V1/resources/batch_service_descriptor_config.php b/Batch/src/V1/resources/batch_service_descriptor_config.php index 3b05da1b865f..8618662401e1 100644 --- a/Batch/src/V1/resources/batch_service_descriptor_config.php +++ b/Batch/src/V1/resources/batch_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Batch/src/V1/resources/batch_service_rest_client_config.php b/Batch/src/V1/resources/batch_service_rest_client_config.php index a72321464b81..53dc86dfd5dc 100644 --- a/Batch/src/V1/resources/batch_service_rest_client_config.php +++ b/Batch/src/V1/resources/batch_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/BeyondCorpAppConnections/src/V1/resources/app_connections_service_descriptor_config.php b/BeyondCorpAppConnections/src/V1/resources/app_connections_service_descriptor_config.php index 0efddabe3d31..2362b01c1024 100644 --- a/BeyondCorpAppConnections/src/V1/resources/app_connections_service_descriptor_config.php +++ b/BeyondCorpAppConnections/src/V1/resources/app_connections_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/BeyondCorpAppConnections/src/V1/resources/app_connections_service_rest_client_config.php b/BeyondCorpAppConnections/src/V1/resources/app_connections_service_rest_client_config.php index 1094f3784fcd..ddb0a23de5ad 100644 --- a/BeyondCorpAppConnections/src/V1/resources/app_connections_service_rest_client_config.php +++ b/BeyondCorpAppConnections/src/V1/resources/app_connections_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/BeyondCorpAppConnectors/src/V1/resources/app_connectors_service_descriptor_config.php b/BeyondCorpAppConnectors/src/V1/resources/app_connectors_service_descriptor_config.php index 2f6d0ac9a2c9..6de05317288a 100644 --- a/BeyondCorpAppConnectors/src/V1/resources/app_connectors_service_descriptor_config.php +++ b/BeyondCorpAppConnectors/src/V1/resources/app_connectors_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/BeyondCorpAppConnectors/src/V1/resources/app_connectors_service_rest_client_config.php b/BeyondCorpAppConnectors/src/V1/resources/app_connectors_service_rest_client_config.php index e2c275550503..4eb4516f5c91 100644 --- a/BeyondCorpAppConnectors/src/V1/resources/app_connectors_service_rest_client_config.php +++ b/BeyondCorpAppConnectors/src/V1/resources/app_connectors_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/BeyondCorpAppGateways/src/V1/resources/app_gateways_service_descriptor_config.php b/BeyondCorpAppGateways/src/V1/resources/app_gateways_service_descriptor_config.php index 270c9a8fe5da..8100e79b67a2 100644 --- a/BeyondCorpAppGateways/src/V1/resources/app_gateways_service_descriptor_config.php +++ b/BeyondCorpAppGateways/src/V1/resources/app_gateways_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/BeyondCorpAppGateways/src/V1/resources/app_gateways_service_rest_client_config.php b/BeyondCorpAppGateways/src/V1/resources/app_gateways_service_rest_client_config.php index 11864d505ad2..b1d9ab39bc31 100644 --- a/BeyondCorpAppGateways/src/V1/resources/app_gateways_service_rest_client_config.php +++ b/BeyondCorpAppGateways/src/V1/resources/app_gateways_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/BeyondCorpClientConnectorServices/src/V1/resources/client_connector_services_service_descriptor_config.php b/BeyondCorpClientConnectorServices/src/V1/resources/client_connector_services_service_descriptor_config.php index 593d5772ad92..0dbda905ab14 100644 --- a/BeyondCorpClientConnectorServices/src/V1/resources/client_connector_services_service_descriptor_config.php +++ b/BeyondCorpClientConnectorServices/src/V1/resources/client_connector_services_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/BeyondCorpClientConnectorServices/src/V1/resources/client_connector_services_service_rest_client_config.php b/BeyondCorpClientConnectorServices/src/V1/resources/client_connector_services_service_rest_client_config.php index 6875e581606c..ae310fcb8790 100644 --- a/BeyondCorpClientConnectorServices/src/V1/resources/client_connector_services_service_rest_client_config.php +++ b/BeyondCorpClientConnectorServices/src/V1/resources/client_connector_services_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/BeyondCorpClientGateways/src/V1/resources/client_gateways_service_descriptor_config.php b/BeyondCorpClientGateways/src/V1/resources/client_gateways_service_descriptor_config.php index 053175b674ef..feae5f92322d 100644 --- a/BeyondCorpClientGateways/src/V1/resources/client_gateways_service_descriptor_config.php +++ b/BeyondCorpClientGateways/src/V1/resources/client_gateways_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/BeyondCorpClientGateways/src/V1/resources/client_gateways_service_rest_client_config.php b/BeyondCorpClientGateways/src/V1/resources/client_gateways_service_rest_client_config.php index eacb5dffb661..903cf45ad886 100644 --- a/BeyondCorpClientGateways/src/V1/resources/client_gateways_service_rest_client_config.php +++ b/BeyondCorpClientGateways/src/V1/resources/client_gateways_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/BigQueryAnalyticsHub/src/V1/resources/analytics_hub_service_descriptor_config.php b/BigQueryAnalyticsHub/src/V1/resources/analytics_hub_service_descriptor_config.php index 242040976ef9..efefd6b59a97 100644 --- a/BigQueryAnalyticsHub/src/V1/resources/analytics_hub_service_descriptor_config.php +++ b/BigQueryAnalyticsHub/src/V1/resources/analytics_hub_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/BigQueryAnalyticsHub/src/V1/resources/analytics_hub_service_rest_client_config.php b/BigQueryAnalyticsHub/src/V1/resources/analytics_hub_service_rest_client_config.php index 5e6b0a671c80..8dba38a5eee3 100644 --- a/BigQueryAnalyticsHub/src/V1/resources/analytics_hub_service_rest_client_config.php +++ b/BigQueryAnalyticsHub/src/V1/resources/analytics_hub_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/BigQueryConnection/src/V1/resources/connection_service_descriptor_config.php b/BigQueryConnection/src/V1/resources/connection_service_descriptor_config.php index b83ae9e36bd0..cde4430f8eda 100644 --- a/BigQueryConnection/src/V1/resources/connection_service_descriptor_config.php +++ b/BigQueryConnection/src/V1/resources/connection_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/BigQueryConnection/src/V1/resources/connection_service_rest_client_config.php b/BigQueryConnection/src/V1/resources/connection_service_rest_client_config.php index 6b7d7f7813b7..31ae1178ae30 100644 --- a/BigQueryConnection/src/V1/resources/connection_service_rest_client_config.php +++ b/BigQueryConnection/src/V1/resources/connection_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/BigQueryDataExchange/src/V1beta1/resources/analytics_hub_service_descriptor_config.php b/BigQueryDataExchange/src/V1beta1/resources/analytics_hub_service_descriptor_config.php index 483a7d7da69f..a8f4be36fc80 100644 --- a/BigQueryDataExchange/src/V1beta1/resources/analytics_hub_service_descriptor_config.php +++ b/BigQueryDataExchange/src/V1beta1/resources/analytics_hub_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/BigQueryDataExchange/src/V1beta1/resources/analytics_hub_service_rest_client_config.php b/BigQueryDataExchange/src/V1beta1/resources/analytics_hub_service_rest_client_config.php index b8d0e8344dab..514c173d9e4f 100644 --- a/BigQueryDataExchange/src/V1beta1/resources/analytics_hub_service_rest_client_config.php +++ b/BigQueryDataExchange/src/V1beta1/resources/analytics_hub_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/BigQueryDataPolicies/src/V1/resources/data_policy_service_descriptor_config.php b/BigQueryDataPolicies/src/V1/resources/data_policy_service_descriptor_config.php index cda5186072b8..adc115ae66f4 100644 --- a/BigQueryDataPolicies/src/V1/resources/data_policy_service_descriptor_config.php +++ b/BigQueryDataPolicies/src/V1/resources/data_policy_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/BigQueryDataPolicies/src/V1/resources/data_policy_service_rest_client_config.php b/BigQueryDataPolicies/src/V1/resources/data_policy_service_rest_client_config.php index 0e1f8f6bdad2..ea0fae9fef3c 100644 --- a/BigQueryDataPolicies/src/V1/resources/data_policy_service_rest_client_config.php +++ b/BigQueryDataPolicies/src/V1/resources/data_policy_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/BigQueryDataPolicies/src/V1beta1/resources/data_policy_service_descriptor_config.php b/BigQueryDataPolicies/src/V1beta1/resources/data_policy_service_descriptor_config.php index a2034625444d..66f835ec2e37 100644 --- a/BigQueryDataPolicies/src/V1beta1/resources/data_policy_service_descriptor_config.php +++ b/BigQueryDataPolicies/src/V1beta1/resources/data_policy_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/BigQueryDataPolicies/src/V1beta1/resources/data_policy_service_rest_client_config.php b/BigQueryDataPolicies/src/V1beta1/resources/data_policy_service_rest_client_config.php index 3806a270227a..ebd68b9fa91b 100644 --- a/BigQueryDataPolicies/src/V1beta1/resources/data_policy_service_rest_client_config.php +++ b/BigQueryDataPolicies/src/V1beta1/resources/data_policy_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/BigQueryMigration/src/V2/resources/migration_service_descriptor_config.php b/BigQueryMigration/src/V2/resources/migration_service_descriptor_config.php index f1301a436a11..4b8ec9bd0660 100644 --- a/BigQueryMigration/src/V2/resources/migration_service_descriptor_config.php +++ b/BigQueryMigration/src/V2/resources/migration_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/BigQueryMigration/src/V2/resources/migration_service_rest_client_config.php b/BigQueryMigration/src/V2/resources/migration_service_rest_client_config.php index b93e6bb69ad6..efc080cd9643 100644 --- a/BigQueryMigration/src/V2/resources/migration_service_rest_client_config.php +++ b/BigQueryMigration/src/V2/resources/migration_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/BigQueryReservation/src/V1/resources/reservation_service_descriptor_config.php b/BigQueryReservation/src/V1/resources/reservation_service_descriptor_config.php index 9ec8dbc6b3eb..64ce8be98798 100644 --- a/BigQueryReservation/src/V1/resources/reservation_service_descriptor_config.php +++ b/BigQueryReservation/src/V1/resources/reservation_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/BigQueryReservation/src/V1/resources/reservation_service_rest_client_config.php b/BigQueryReservation/src/V1/resources/reservation_service_rest_client_config.php index c3899f4a560c..f9074a563915 100644 --- a/BigQueryReservation/src/V1/resources/reservation_service_rest_client_config.php +++ b/BigQueryReservation/src/V1/resources/reservation_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/BigQueryStorage/src/V1/resources/big_query_read_descriptor_config.php b/BigQueryStorage/src/V1/resources/big_query_read_descriptor_config.php index ac1c5be43324..38011adeeb9a 100644 --- a/BigQueryStorage/src/V1/resources/big_query_read_descriptor_config.php +++ b/BigQueryStorage/src/V1/resources/big_query_read_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/BigQueryStorage/src/V1/resources/big_query_read_rest_client_config.php b/BigQueryStorage/src/V1/resources/big_query_read_rest_client_config.php index ce433a4dbec2..7733f1719340 100644 --- a/BigQueryStorage/src/V1/resources/big_query_read_rest_client_config.php +++ b/BigQueryStorage/src/V1/resources/big_query_read_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/BigQueryStorage/src/V1/resources/big_query_write_descriptor_config.php b/BigQueryStorage/src/V1/resources/big_query_write_descriptor_config.php index e29698e6ac77..60b87fa400a8 100644 --- a/BigQueryStorage/src/V1/resources/big_query_write_descriptor_config.php +++ b/BigQueryStorage/src/V1/resources/big_query_write_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/BigQueryStorage/src/V1/resources/big_query_write_rest_client_config.php b/BigQueryStorage/src/V1/resources/big_query_write_rest_client_config.php index 6dddf701ad6e..3279f1679d8b 100644 --- a/BigQueryStorage/src/V1/resources/big_query_write_rest_client_config.php +++ b/BigQueryStorage/src/V1/resources/big_query_write_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Billing/src/V1/resources/cloud_billing_descriptor_config.php b/Billing/src/V1/resources/cloud_billing_descriptor_config.php index 4c260b1f98a1..8ca1e982a3d7 100644 --- a/Billing/src/V1/resources/cloud_billing_descriptor_config.php +++ b/Billing/src/V1/resources/cloud_billing_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Billing/src/V1/resources/cloud_billing_rest_client_config.php b/Billing/src/V1/resources/cloud_billing_rest_client_config.php index 4d5e6aa39ea6..b2500432e22c 100644 --- a/Billing/src/V1/resources/cloud_billing_rest_client_config.php +++ b/Billing/src/V1/resources/cloud_billing_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Billing/src/V1/resources/cloud_catalog_descriptor_config.php b/Billing/src/V1/resources/cloud_catalog_descriptor_config.php index dea7f5743c67..e4ea2ad57c7c 100644 --- a/Billing/src/V1/resources/cloud_catalog_descriptor_config.php +++ b/Billing/src/V1/resources/cloud_catalog_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Billing/src/V1/resources/cloud_catalog_rest_client_config.php b/Billing/src/V1/resources/cloud_catalog_rest_client_config.php index 9c1d4dc0c5bd..e4490137b9cb 100644 --- a/Billing/src/V1/resources/cloud_catalog_rest_client_config.php +++ b/Billing/src/V1/resources/cloud_catalog_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/BillingBudgets/src/V1/resources/budget_service_descriptor_config.php b/BillingBudgets/src/V1/resources/budget_service_descriptor_config.php index 091bfdc92ae8..31788f25dfc6 100644 --- a/BillingBudgets/src/V1/resources/budget_service_descriptor_config.php +++ b/BillingBudgets/src/V1/resources/budget_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/BillingBudgets/src/V1/resources/budget_service_rest_client_config.php b/BillingBudgets/src/V1/resources/budget_service_rest_client_config.php index 6a141936139b..13ac0525c7a7 100644 --- a/BillingBudgets/src/V1/resources/budget_service_rest_client_config.php +++ b/BillingBudgets/src/V1/resources/budget_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/BillingBudgets/src/V1beta1/resources/budget_service_descriptor_config.php b/BillingBudgets/src/V1beta1/resources/budget_service_descriptor_config.php index 63035b6cc48c..8f504ebc81ff 100644 --- a/BillingBudgets/src/V1beta1/resources/budget_service_descriptor_config.php +++ b/BillingBudgets/src/V1beta1/resources/budget_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/BillingBudgets/src/V1beta1/resources/budget_service_rest_client_config.php b/BillingBudgets/src/V1beta1/resources/budget_service_rest_client_config.php index 893b7fa9ca32..65465df381b2 100644 --- a/BillingBudgets/src/V1beta1/resources/budget_service_rest_client_config.php +++ b/BillingBudgets/src/V1beta1/resources/budget_service_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/BinaryAuthorization/src/V1/resources/binauthz_management_service_v1_descriptor_config.php b/BinaryAuthorization/src/V1/resources/binauthz_management_service_v1_descriptor_config.php index 7cea96b9a95a..bb1b92f5375b 100644 --- a/BinaryAuthorization/src/V1/resources/binauthz_management_service_v1_descriptor_config.php +++ b/BinaryAuthorization/src/V1/resources/binauthz_management_service_v1_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/BinaryAuthorization/src/V1/resources/binauthz_management_service_v1_rest_client_config.php b/BinaryAuthorization/src/V1/resources/binauthz_management_service_v1_rest_client_config.php index 526988cfafee..af98c0b1d9be 100644 --- a/BinaryAuthorization/src/V1/resources/binauthz_management_service_v1_rest_client_config.php +++ b/BinaryAuthorization/src/V1/resources/binauthz_management_service_v1_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/BinaryAuthorization/src/V1/resources/system_policy_v1_descriptor_config.php b/BinaryAuthorization/src/V1/resources/system_policy_v1_descriptor_config.php index 5542afb3b6d6..793669b40206 100644 --- a/BinaryAuthorization/src/V1/resources/system_policy_v1_descriptor_config.php +++ b/BinaryAuthorization/src/V1/resources/system_policy_v1_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/BinaryAuthorization/src/V1/resources/system_policy_v1_rest_client_config.php b/BinaryAuthorization/src/V1/resources/system_policy_v1_rest_client_config.php index d166d44e70f2..ed9921930ee4 100644 --- a/BinaryAuthorization/src/V1/resources/system_policy_v1_rest_client_config.php +++ b/BinaryAuthorization/src/V1/resources/system_policy_v1_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/BinaryAuthorization/src/V1/resources/validation_helper_v1_descriptor_config.php b/BinaryAuthorization/src/V1/resources/validation_helper_v1_descriptor_config.php index a62b6ff0f3ab..48f7cbf0f6f2 100644 --- a/BinaryAuthorization/src/V1/resources/validation_helper_v1_descriptor_config.php +++ b/BinaryAuthorization/src/V1/resources/validation_helper_v1_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/BinaryAuthorization/src/V1/resources/validation_helper_v1_rest_client_config.php b/BinaryAuthorization/src/V1/resources/validation_helper_v1_rest_client_config.php index ee759802d324..6505b99035b4 100644 --- a/BinaryAuthorization/src/V1/resources/validation_helper_v1_rest_client_config.php +++ b/BinaryAuthorization/src/V1/resources/validation_helper_v1_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/BinaryAuthorization/src/V1beta1/resources/binauthz_management_service_v1_beta1_descriptor_config.php b/BinaryAuthorization/src/V1beta1/resources/binauthz_management_service_v1_beta1_descriptor_config.php index e7c5b3ed92f8..3243955d9de4 100644 --- a/BinaryAuthorization/src/V1beta1/resources/binauthz_management_service_v1_beta1_descriptor_config.php +++ b/BinaryAuthorization/src/V1beta1/resources/binauthz_management_service_v1_beta1_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/BinaryAuthorization/src/V1beta1/resources/binauthz_management_service_v1_beta1_rest_client_config.php b/BinaryAuthorization/src/V1beta1/resources/binauthz_management_service_v1_beta1_rest_client_config.php index e1709facf48c..58ec7a48b19d 100644 --- a/BinaryAuthorization/src/V1beta1/resources/binauthz_management_service_v1_beta1_rest_client_config.php +++ b/BinaryAuthorization/src/V1beta1/resources/binauthz_management_service_v1_beta1_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/BinaryAuthorization/src/V1beta1/resources/system_policy_v1_beta1_descriptor_config.php b/BinaryAuthorization/src/V1beta1/resources/system_policy_v1_beta1_descriptor_config.php index f493441acadb..8bcc1b01afcb 100644 --- a/BinaryAuthorization/src/V1beta1/resources/system_policy_v1_beta1_descriptor_config.php +++ b/BinaryAuthorization/src/V1beta1/resources/system_policy_v1_beta1_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/BinaryAuthorization/src/V1beta1/resources/system_policy_v1_beta1_rest_client_config.php b/BinaryAuthorization/src/V1beta1/resources/system_policy_v1_beta1_rest_client_config.php index 33d5c656e9d9..644b70f64222 100644 --- a/BinaryAuthorization/src/V1beta1/resources/system_policy_v1_beta1_rest_client_config.php +++ b/BinaryAuthorization/src/V1beta1/resources/system_policy_v1_beta1_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Build/src/V1/resources/cloud_build_descriptor_config.php b/Build/src/V1/resources/cloud_build_descriptor_config.php index 4713c1b1f306..26adbe6e6ec8 100644 --- a/Build/src/V1/resources/cloud_build_descriptor_config.php +++ b/Build/src/V1/resources/cloud_build_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Build/src/V1/resources/cloud_build_rest_client_config.php b/Build/src/V1/resources/cloud_build_rest_client_config.php index a8cd7478a2e0..66e7b402fee0 100644 --- a/Build/src/V1/resources/cloud_build_rest_client_config.php +++ b/Build/src/V1/resources/cloud_build_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/Build/src/V2/resources/repository_manager_descriptor_config.php b/Build/src/V2/resources/repository_manager_descriptor_config.php index 4b9e3a0955ee..558f82a811e0 100644 --- a/Build/src/V2/resources/repository_manager_descriptor_config.php +++ b/Build/src/V2/resources/repository_manager_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/Build/src/V2/resources/repository_manager_rest_client_config.php b/Build/src/V2/resources/repository_manager_rest_client_config.php index 2d33c154f631..16a789bd7973 100644 --- a/Build/src/V2/resources/repository_manager_rest_client_config.php +++ b/Build/src/V2/resources/repository_manager_rest_client_config.php @@ -1,4 +1,24 @@ [ diff --git a/CertificateManager/src/V1/resources/certificate_manager_descriptor_config.php b/CertificateManager/src/V1/resources/certificate_manager_descriptor_config.php index ceccbd511160..f125748025cd 100644 --- a/CertificateManager/src/V1/resources/certificate_manager_descriptor_config.php +++ b/CertificateManager/src/V1/resources/certificate_manager_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/CertificateManager/src/V1/resources/certificate_manager_rest_client_config.php b/CertificateManager/src/V1/resources/certificate_manager_rest_client_config.php index 95ecef8f8c9a..5036313a7cab 100644 --- a/CertificateManager/src/V1/resources/certificate_manager_rest_client_config.php +++ b/CertificateManager/src/V1/resources/certificate_manager_rest_client_config.php @@ -1,4 +1,24 @@ [ From f96050a36d71a03dc22e6bf5e84c7ab75d640a3c Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 15 Apr 2024 18:56:28 +0200 Subject: [PATCH 41/86] chore(deps): update gcr.io/cloud-spanner-emulator/emulator docker tag to v1.5.16 (#7150) --- .github/workflows/spanner-emulator-system-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/spanner-emulator-system-tests.yaml b/.github/workflows/spanner-emulator-system-tests.yaml index 972840be74b0..bcd9f801f04f 100644 --- a/.github/workflows/spanner-emulator-system-tests.yaml +++ b/.github/workflows/spanner-emulator-system-tests.yaml @@ -18,7 +18,7 @@ jobs: services: emulator: - image: gcr.io/cloud-spanner-emulator/emulator:1.5.14 + image: gcr.io/cloud-spanner-emulator/emulator:1.5.16 ports: - 9010:9010 - 9020:9020 From 33b7263ed2c35270acadbb948e88e1827a46ee4d Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 15 Apr 2024 18:58:02 +0200 Subject: [PATCH 42/86] chore(deps): update dependency certifi to v2024 (#7027) --- .kokoro/docs/docker/requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.kokoro/docs/docker/requirements.txt b/.kokoro/docs/docker/requirements.txt index b035063a2665..3dbd6907a442 100644 --- a/.kokoro/docs/docker/requirements.txt +++ b/.kokoro/docs/docker/requirements.txt @@ -8,9 +8,9 @@ cachetools==5.3.2 \ --hash=sha256:086ee420196f7b2ab9ca2db2520aca326318b68fe5ba8bc4d49cca91add450f2 \ --hash=sha256:861f35a13a451f94e301ce2bec7cac63e881232ccce7ed67fab9b5df4d3beaa1 # via google-auth -certifi==2023.11.17 \ - --hash=sha256:9b469f3a900bf28dc19b8cfbf8019bf47f7fdd1a65a1d4ffb98fc14166beb4d1 \ - --hash=sha256:e036ab49d5b79556f99cfc2d9320b34cfbe5be05c5871b51de9329f0603b0474 +certifi==2024.2.2 \ + --hash=sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f \ + --hash=sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1 # via requests charset-normalizer==2.1.1 \ --hash=sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845 \ From 1c5846d9ae3ded5ca6fab3e637daba8a1254a72d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 15:18:39 -0700 Subject: [PATCH 43/86] fix: mark parent/name fields with the REQUIRED field_behavior annotation (#7236) PiperOrigin-RevId: 625048783 Source-Link: https://github.com/googleapis/googleapis/commit/d0205ed355e5f14eb181d6742e754a870885ea29 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d68874be31ac91810d1bc25f13a954ac28e9c9ef Copy-Tag: eyJwIjoiQmlnUXVlcnlEYXRhVHJhbnNmZXIvLk93bEJvdC55YW1sIiwiaCI6ImQ2ODg3NGJlMzFhYzkxODEwZDFiYzI1ZjEzYTk1NGFjMjhlOWM5ZWYifQ== --- .../metadata/V1/Datatransfer.php | Bin 11698 -> 11711 bytes BigQueryDataTransfer/metadata/V1/Transfer.php | Bin 4165 -> 4175 bytes .../src/V1/EnrollDataSourcesRequest.php | 18 ++++++++++------ .../Gapic/DataTransferServiceGapicClient.php | 8 ++++--- .../src/V1/StartManualTransferRunsRequest.php | 14 ++++++------ .../src/V1/TransferConfig.php | 14 ++++++------ BigQueryDataTransfer/src/V1/TransferRun.php | 14 ++++++------ .../src/V1/UnenrollDataSourcesRequest.php | 18 ++++++++++------ ...ata_transfer_service_descriptor_config.php | 20 ++++++++++++++++++ ...ta_transfer_service_rest_client_config.php | 20 ++++++++++++++++++ 10 files changed, 88 insertions(+), 38 deletions(-) diff --git a/BigQueryDataTransfer/metadata/V1/Datatransfer.php b/BigQueryDataTransfer/metadata/V1/Datatransfer.php index d8ce107f2cf909fe1aab4702bd12798d94f4da79..7c3b4d398e0e37883800db349bb6cd247a5c1e07 100644 GIT binary patch delta 120 zcmdlKy+3+GC=1KvATEo^{H$u5>sc5@7`rAnN+?av68G8sMxvRK(QR^pl(di_7fW7Z zZmI;M0;2|}6Y~Q{rpdKJl7>niTvDNVsd+{DIXNzgC5gfLrA5i9#X+fsrK!awSafZ^ ID|J-}0CWK((f|Me delta 110 zcmdlVy(xM_C<{wl5SPVdepa>3^(>4cjO~*fC6ol+x!4L4i&FDSBp4MKH8`EjC)bHv wY<@4%%*f)%CE+^xfRqF;4;M>bVs0u##pDH2QjE@%cT34)h)Zr}mfj--0EwF%eEstring name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; */ private $name = ''; /** @@ -37,7 +38,8 @@ class EnrollDataSourcesRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * The name of the project resource in the form: `projects/{project_id}` + * Required. The name of the project resource in the form: + * `projects/{project_id}` * @type array|\Google\Protobuf\Internal\RepeatedField $data_source_ids * Data sources that are enrolled. It is required to provide at least one * data source id. @@ -49,9 +51,10 @@ public function __construct($data = NULL) { } /** - * The name of the project resource in the form: `projects/{project_id}` + * Required. The name of the project resource in the form: + * `projects/{project_id}` * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; * @return string */ public function getName() @@ -60,9 +63,10 @@ public function getName() } /** - * The name of the project resource in the form: `projects/{project_id}` + * Required. The name of the project resource in the form: + * `projects/{project_id}` * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; * @param string $var * @return $this */ diff --git a/BigQueryDataTransfer/src/V1/Gapic/DataTransferServiceGapicClient.php b/BigQueryDataTransfer/src/V1/Gapic/DataTransferServiceGapicClient.php index 270627e54d79..15469ac5d2db 100644 --- a/BigQueryDataTransfer/src/V1/Gapic/DataTransferServiceGapicClient.php +++ b/BigQueryDataTransfer/src/V1/Gapic/DataTransferServiceGapicClient.php @@ -835,7 +835,8 @@ public function deleteTransferRun($name, array $optionalArgs = []) * Optional. * * @type string $name - * The name of the project resource in the form: `projects/{project_id}` + * Required. The name of the project resource in the form: + * `projects/{project_id}` * @type string[] $dataSourceIds * Data sources that are enrolled. It is required to provide at least one * data source id. @@ -1374,7 +1375,7 @@ public function scheduleTransferRuns($parent, $startTime, $endTime, array $optio * Optional. * * @type string $parent - * Transfer configuration name in the form: + * Required. Transfer configuration name in the form: * `projects/{project_id}/transferConfigs/{config_id}` or * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. * @type TimeRange $requestedTimeRange @@ -1440,7 +1441,8 @@ public function startManualTransferRuns(array $optionalArgs = []) * Optional. * * @type string $name - * The name of the project resource in the form: `projects/{project_id}` + * Required. The name of the project resource in the form: + * `projects/{project_id}` * @type string[] $dataSourceIds * Data sources that are unenrolled. It is required to provide at least one * data source id. diff --git a/BigQueryDataTransfer/src/V1/StartManualTransferRunsRequest.php b/BigQueryDataTransfer/src/V1/StartManualTransferRunsRequest.php index 3d8150fad26f..e2402e244c0c 100644 --- a/BigQueryDataTransfer/src/V1/StartManualTransferRunsRequest.php +++ b/BigQueryDataTransfer/src/V1/StartManualTransferRunsRequest.php @@ -16,11 +16,11 @@ class StartManualTransferRunsRequest extends \Google\Protobuf\Internal\Message { /** - * Transfer configuration name in the form: + * Required. Transfer configuration name in the form: * `projects/{project_id}/transferConfigs/{config_id}` or * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. * - * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ private $parent = ''; protected $time; @@ -32,7 +32,7 @@ class StartManualTransferRunsRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $parent - * Transfer configuration name in the form: + * Required. Transfer configuration name in the form: * `projects/{project_id}/transferConfigs/{config_id}` or * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. * @type \Google\Cloud\BigQuery\DataTransfer\V1\StartManualTransferRunsRequest\TimeRange $requested_time_range @@ -53,11 +53,11 @@ public function __construct($data = NULL) { } /** - * Transfer configuration name in the form: + * Required. Transfer configuration name in the form: * `projects/{project_id}/transferConfigs/{config_id}` or * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. * - * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string */ public function getParent() @@ -66,11 +66,11 @@ public function getParent() } /** - * Transfer configuration name in the form: + * Required. Transfer configuration name in the form: * `projects/{project_id}/transferConfigs/{config_id}` or * `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. * - * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var * @return $this */ diff --git a/BigQueryDataTransfer/src/V1/TransferConfig.php b/BigQueryDataTransfer/src/V1/TransferConfig.php index 4cbc6e88545f..c3a7c65269c7 100644 --- a/BigQueryDataTransfer/src/V1/TransferConfig.php +++ b/BigQueryDataTransfer/src/V1/TransferConfig.php @@ -21,7 +21,7 @@ class TransferConfig extends \Google\Protobuf\Internal\Message { /** - * The resource name of the transfer config. + * Identifier. The resource name of the transfer config. * Transfer config names have the form either * `projects/{project_id}/locations/{region}/transferConfigs/{config_id}` or * `projects/{project_id}/transferConfigs/{config_id}`, @@ -29,7 +29,7 @@ class TransferConfig extends \Google\Protobuf\Internal\Message * guaranteed or required. The name is ignored when creating a transfer * config. * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; */ private $name = ''; /** @@ -169,7 +169,7 @@ class TransferConfig extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * The resource name of the transfer config. + * Identifier. The resource name of the transfer config. * Transfer config names have the form either * `projects/{project_id}/locations/{region}/transferConfigs/{config_id}` or * `projects/{project_id}/transferConfigs/{config_id}`, @@ -250,7 +250,7 @@ public function __construct($data = NULL) { } /** - * The resource name of the transfer config. + * Identifier. The resource name of the transfer config. * Transfer config names have the form either * `projects/{project_id}/locations/{region}/transferConfigs/{config_id}` or * `projects/{project_id}/transferConfigs/{config_id}`, @@ -258,7 +258,7 @@ public function __construct($data = NULL) { * guaranteed or required. The name is ignored when creating a transfer * config. * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @return string */ public function getName() @@ -267,7 +267,7 @@ public function getName() } /** - * The resource name of the transfer config. + * Identifier. The resource name of the transfer config. * Transfer config names have the form either * `projects/{project_id}/locations/{region}/transferConfigs/{config_id}` or * `projects/{project_id}/transferConfigs/{config_id}`, @@ -275,7 +275,7 @@ public function getName() * guaranteed or required. The name is ignored when creating a transfer * config. * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @param string $var * @return $this */ diff --git a/BigQueryDataTransfer/src/V1/TransferRun.php b/BigQueryDataTransfer/src/V1/TransferRun.php index 651506086b71..e5bfac0ddba7 100644 --- a/BigQueryDataTransfer/src/V1/TransferRun.php +++ b/BigQueryDataTransfer/src/V1/TransferRun.php @@ -16,12 +16,12 @@ class TransferRun extends \Google\Protobuf\Internal\Message { /** - * The resource name of the transfer run. + * Identifier. The resource name of the transfer run. * Transfer run names have the form * `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`. * The name is ignored when creating a transfer run. * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; */ private $name = ''; /** @@ -127,7 +127,7 @@ class TransferRun extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * The resource name of the transfer run. + * Identifier. The resource name of the transfer run. * Transfer run names have the form * `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`. * The name is ignored when creating a transfer run. @@ -183,12 +183,12 @@ public function __construct($data = NULL) { } /** - * The resource name of the transfer run. + * Identifier. The resource name of the transfer run. * Transfer run names have the form * `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`. * The name is ignored when creating a transfer run. * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @return string */ public function getName() @@ -197,12 +197,12 @@ public function getName() } /** - * The resource name of the transfer run. + * Identifier. The resource name of the transfer run. * Transfer run names have the form * `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`. * The name is ignored when creating a transfer run. * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @param string $var * @return $this */ diff --git a/BigQueryDataTransfer/src/V1/UnenrollDataSourcesRequest.php b/BigQueryDataTransfer/src/V1/UnenrollDataSourcesRequest.php index 54dfb0777fb4..9801f5ba50db 100644 --- a/BigQueryDataTransfer/src/V1/UnenrollDataSourcesRequest.php +++ b/BigQueryDataTransfer/src/V1/UnenrollDataSourcesRequest.php @@ -17,9 +17,10 @@ class UnenrollDataSourcesRequest extends \Google\Protobuf\Internal\Message { /** - * The name of the project resource in the form: `projects/{project_id}` + * Required. The name of the project resource in the form: + * `projects/{project_id}` * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; */ private $name = ''; /** @@ -37,7 +38,8 @@ class UnenrollDataSourcesRequest extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * The name of the project resource in the form: `projects/{project_id}` + * Required. The name of the project resource in the form: + * `projects/{project_id}` * @type array|\Google\Protobuf\Internal\RepeatedField $data_source_ids * Data sources that are unenrolled. It is required to provide at least one * data source id. @@ -49,9 +51,10 @@ public function __construct($data = NULL) { } /** - * The name of the project resource in the form: `projects/{project_id}` + * Required. The name of the project resource in the form: + * `projects/{project_id}` * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; * @return string */ public function getName() @@ -60,9 +63,10 @@ public function getName() } /** - * The name of the project resource in the form: `projects/{project_id}` + * Required. The name of the project resource in the form: + * `projects/{project_id}` * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; * @param string $var * @return $this */ diff --git a/BigQueryDataTransfer/src/V1/resources/data_transfer_service_descriptor_config.php b/BigQueryDataTransfer/src/V1/resources/data_transfer_service_descriptor_config.php index 0ba525ab51ce..fa7c2336fc25 100644 --- a/BigQueryDataTransfer/src/V1/resources/data_transfer_service_descriptor_config.php +++ b/BigQueryDataTransfer/src/V1/resources/data_transfer_service_descriptor_config.php @@ -1,4 +1,24 @@ [ diff --git a/BigQueryDataTransfer/src/V1/resources/data_transfer_service_rest_client_config.php b/BigQueryDataTransfer/src/V1/resources/data_transfer_service_rest_client_config.php index a4c615bef14a..ba2556ef3d8d 100644 --- a/BigQueryDataTransfer/src/V1/resources/data_transfer_service_rest_client_config.php +++ b/BigQueryDataTransfer/src/V1/resources/data_transfer_service_rest_client_config.php @@ -1,4 +1,24 @@ [ From b0c6cc9f994ea9b5a0be3492efffbcf0171855f7 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Tue, 16 Apr 2024 09:32:45 -0600 Subject: [PATCH 44/86] feat: introduce AppsChat (#7215) --- AppsChat/.OwlBot.yaml | 6 + AppsChat/.gitattributes | 8 + AppsChat/.github/pull_request_template.md | 24 + AppsChat/.repo-metadata.json | 8 + AppsChat/CONTRIBUTING.md | 10 + AppsChat/LICENSE | 202 ++ AppsChat/README.md | 45 + AppsChat/VERSION | 1 + AppsChat/composer.json | 32 + AppsChat/metadata/Card/V1/Card.php | Bin 0 -> 8612 bytes AppsChat/metadata/Chat/V1/ActionStatus.php | 31 + AppsChat/metadata/Chat/V1/Annotation.php | Bin 0 -> 2038 bytes AppsChat/metadata/Chat/V1/Attachment.php | Bin 0 -> 1779 bytes AppsChat/metadata/Chat/V1/ChatService.php | Bin 0 -> 5388 bytes AppsChat/metadata/Chat/V1/ContextualAddon.php | Bin 0 -> 1479 bytes .../metadata/Chat/V1/DeletionMetadata.php | Bin 0 -> 1023 bytes AppsChat/metadata/Chat/V1/Group.php | 30 + AppsChat/metadata/Chat/V1/HistoryState.php | Bin 0 -> 837 bytes AppsChat/metadata/Chat/V1/MatchedUrl.php | 31 + AppsChat/metadata/Chat/V1/Membership.php | Bin 0 -> 2411 bytes AppsChat/metadata/Chat/V1/Message.php | Bin 0 -> 5774 bytes AppsChat/metadata/Chat/V1/Reaction.php | Bin 0 -> 1842 bytes AppsChat/metadata/Chat/V1/SlashCommand.php | 30 + AppsChat/metadata/Chat/V1/Space.php | Bin 0 -> 2793 bytes AppsChat/metadata/Chat/V1/SpaceSetup.php | 35 + AppsChat/metadata/Chat/V1/User.php | Bin 0 -> 1051 bytes AppsChat/metadata/Chat/V1/Widgets.php | Bin 0 -> 2649 bytes AppsChat/owlbot.py | 78 + AppsChat/phpunit.xml.dist | 16 + .../complete_import_space.php | 78 + .../ChatServiceClient/create_membership.php | 99 + .../V1/ChatServiceClient/create_message.php | 85 + .../V1/ChatServiceClient/create_reaction.php | 80 + .../V1/ChatServiceClient/create_space.php | 68 + .../ChatServiceClient/delete_membership.php | 89 + .../V1/ChatServiceClient/delete_message.php | 88 + .../V1/ChatServiceClient/delete_reaction.php | 76 + .../V1/ChatServiceClient/delete_space.php | 78 + .../ChatServiceClient/find_direct_message.php | 100 + .../V1/ChatServiceClient/get_attachment.php | 79 + .../V1/ChatServiceClient/get_membership.php | 92 + .../V1/ChatServiceClient/get_message.php | 90 + .../V1/ChatServiceClient/get_space.php | 83 + .../V1/ChatServiceClient/list_memberships.php | 97 + .../V1/ChatServiceClient/list_messages.php | 82 + .../V1/ChatServiceClient/list_reactions.php | 82 + .../V1/ChatServiceClient/list_spaces.php | 76 + .../V1/ChatServiceClient/set_up_space.php | 99 + .../V1/ChatServiceClient/update_message.php | 74 + .../V1/ChatServiceClient/update_space.php | 68 + .../ChatServiceClient/upload_attachment.php | 83 + AppsChat/src/Card/V1/Action.php | 331 ++++ .../src/Card/V1/Action/ActionParameter.php | 109 ++ AppsChat/src/Card/V1/Action/Interaction.php | 72 + AppsChat/src/Card/V1/Action/LoadIndicator.php | 58 + AppsChat/src/Card/V1/BorderStyle.php | 148 ++ .../src/Card/V1/BorderStyle/BorderType.php | 64 + AppsChat/src/Card/V1/Button.php | 400 ++++ AppsChat/src/Card/V1/ButtonList.php | 72 + AppsChat/src/Card/V1/Card.php | 638 +++++++ AppsChat/src/Card/V1/Card/CardAction.php | 116 ++ AppsChat/src/Card/V1/Card/CardFixedFooter.php | 144 ++ AppsChat/src/Card/V1/Card/CardHeader.php | 231 +++ AppsChat/src/Card/V1/Card/DisplayStyle.php | 69 + AppsChat/src/Card/V1/Card/DividerStyle.php | 65 + AppsChat/src/Card/V1/Card/Section.php | 253 +++ AppsChat/src/Card/V1/Columns.php | 91 + AppsChat/src/Card/V1/Columns/Column.php | 186 ++ .../V1/Columns/Column/HorizontalSizeStyle.php | 71 + .../V1/Columns/Column/VerticalAlignment.php | 74 + .../src/Card/V1/Columns/Column/Widgets.php | 278 +++ AppsChat/src/Card/V1/DateTimePicker.php | 314 +++ .../V1/DateTimePicker/DateTimePickerType.php | 65 + AppsChat/src/Card/V1/DecoratedText.php | 480 +++++ .../Card/V1/DecoratedText/SwitchControl.php | 245 +++ .../SwitchControl/ControlType.php | 68 + AppsChat/src/Card/V1/Divider.php | 42 + AppsChat/src/Card/V1/Grid.php | 281 +++ AppsChat/src/Card/V1/Grid/GridItem.php | 221 +++ .../Card/V1/Grid/GridItem/GridItemLayout.php | 64 + AppsChat/src/Card/V1/Icon.php | 318 ++++ AppsChat/src/Card/V1/Image.php | 165 ++ AppsChat/src/Card/V1/ImageComponent.php | 191 ++ AppsChat/src/Card/V1/ImageCropStyle.php | 138 ++ .../Card/V1/ImageCropStyle/ImageCropType.php | 79 + AppsChat/src/Card/V1/MaterialIcon.php | 250 +++ AppsChat/src/Card/V1/OnClick.php | 198 ++ AppsChat/src/Card/V1/OpenLink.php | 157 ++ AppsChat/src/Card/V1/OpenLink/OnClose.php | 65 + AppsChat/src/Card/V1/OpenLink/OpenAs.php | 62 + AppsChat/src/Card/V1/SelectionInput.php | 439 +++++ .../V1/SelectionInput/PlatformDataSource.php | 83 + .../PlatformDataSource/CommonDataSource.php | 59 + .../Card/V1/SelectionInput/SelectionItem.php | 243 +++ .../Card/V1/SelectionInput/SelectionType.php | 104 + AppsChat/src/Card/V1/Suggestions.php | 84 + .../Card/V1/Suggestions/SuggestionItem.php | 81 + AppsChat/src/Card/V1/TextInput.php | 532 ++++++ AppsChat/src/Card/V1/TextInput/Type.php | 60 + AppsChat/src/Card/V1/TextParagraph.php | 79 + AppsChat/src/Card/V1/Widget.php | 1062 +++++++++++ .../Card/V1/Widget/HorizontalAlignment.php | 74 + AppsChat/src/Card/V1/Widget/ImageType.php | 59 + AppsChat/src/Chat/V1/AccessoryWidget.php | 77 + AppsChat/src/Chat/V1/ActionResponse.php | 201 ++ .../Chat/V1/ActionResponse/ResponseType.php | 94 + .../Chat/V1/ActionResponse/SelectionItems.php | 68 + .../Chat/V1/ActionResponse/UpdatedWidget.php | 115 ++ AppsChat/src/Chat/V1/ActionStatus.php | 106 ++ AppsChat/src/Chat/V1/Annotation.php | 285 +++ AppsChat/src/Chat/V1/AnnotationType.php | 68 + AppsChat/src/Chat/V1/AttachedGif.php | 67 + AppsChat/src/Chat/V1/Attachment.php | 338 ++++ AppsChat/src/Chat/V1/Attachment/Source.php | 62 + AppsChat/src/Chat/V1/AttachmentDataRef.php | 113 ++ AppsChat/src/Chat/V1/CardWithId.php | 121 ++ .../src/Chat/V1/Client/ChatServiceClient.php | 1210 ++++++++++++ .../Chat/V1/CompleteImportSpaceRequest.php | 71 + .../Chat/V1/CompleteImportSpaceResponse.php | 77 + .../src/Chat/V1/ContextualAddOnMarkup.php | 33 + .../Chat/V1/ContextualAddOnMarkup/Card.php | 181 ++ .../ContextualAddOnMarkup/Card/CardAction.php | 116 ++ .../ContextualAddOnMarkup/Card/CardHeader.php | 176 ++ .../Card/CardHeader/ImageStyle.php | 58 + .../V1/ContextualAddOnMarkup/Card/Section.php | 137 ++ .../src/Chat/V1/CreateMembershipRequest.php | 213 +++ AppsChat/src/Chat/V1/CreateMessageRequest.php | 370 ++++ .../MessageReplyOption.php | 72 + .../src/Chat/V1/CreateReactionRequest.php | 133 ++ AppsChat/src/Chat/V1/CreateSpaceRequest.php | 176 ++ AppsChat/src/Chat/V1/CustomEmoji.php | 67 + .../src/Chat/V1/DeleteMembershipRequest.php | 134 ++ AppsChat/src/Chat/V1/DeleteMessageRequest.php | 162 ++ .../src/Chat/V1/DeleteReactionRequest.php | 87 + AppsChat/src/Chat/V1/DeleteSpaceRequest.php | 87 + AppsChat/src/Chat/V1/DeletionMetadata.php | 68 + .../Chat/V1/DeletionMetadata/DeletionType.php | 90 + AppsChat/src/Chat/V1/Dialog.php | 85 + AppsChat/src/Chat/V1/DialogAction.php | 139 ++ AppsChat/src/Chat/V1/DriveDataRef.php | 67 + AppsChat/src/Chat/V1/DriveLinkData.php | 119 ++ AppsChat/src/Chat/V1/Emoji.php | 108 ++ AppsChat/src/Chat/V1/EmojiReactionSummary.php | 121 ++ .../src/Chat/V1/FindDirectMessageRequest.php | 111 ++ AppsChat/src/Chat/V1/GetAttachmentRequest.php | 86 + AppsChat/src/Chat/V1/GetMembershipRequest.php | 124 ++ AppsChat/src/Chat/V1/GetMessageRequest.php | 108 ++ AppsChat/src/Chat/V1/GetSpaceRequest.php | 87 + AppsChat/src/Chat/V1/Group.php | 83 + AppsChat/src/Chat/V1/HistoryState.php | 65 + .../src/Chat/V1/ListMembershipsRequest.php | 426 +++++ .../src/Chat/V1/ListMembershipsResponse.php | 105 ++ AppsChat/src/Chat/V1/ListMessagesRequest.php | 421 +++++ AppsChat/src/Chat/V1/ListMessagesResponse.php | 105 ++ AppsChat/src/Chat/V1/ListReactionsRequest.php | 349 ++++ .../src/Chat/V1/ListReactionsResponse.php | 105 ++ AppsChat/src/Chat/V1/ListSpacesRequest.php | 219 +++ AppsChat/src/Chat/V1/ListSpacesResponse.php | 105 ++ AppsChat/src/Chat/V1/MatchedUrl.php | 69 + AppsChat/src/Chat/V1/Membership.php | 352 ++++ .../src/Chat/V1/Membership/MembershipRole.php | 71 + .../Chat/V1/Membership/MembershipState.php | 71 + AppsChat/src/Chat/V1/Message.php | 1422 ++++++++++++++ .../src/Chat/V1/QuotedMessageMetadata.php | 119 ++ AppsChat/src/Chat/V1/Reaction.php | 159 ++ AppsChat/src/Chat/V1/RichLinkMetadata.php | 143 ++ .../Chat/V1/RichLinkMetadata/RichLinkType.php | 55 + AppsChat/src/Chat/V1/SetUpSpaceRequest.php | 305 +++ AppsChat/src/Chat/V1/SlashCommand.php | 69 + AppsChat/src/Chat/V1/SlashCommandMetadata.php | 213 +++ .../src/Chat/V1/SlashCommandMetadata/Type.php | 60 + AppsChat/src/Chat/V1/Space.php | 658 +++++++ AppsChat/src/Chat/V1/Space/SpaceDetails.php | 114 ++ .../src/Chat/V1/Space/SpaceThreadingState.php | 73 + AppsChat/src/Chat/V1/Space/SpaceType.php | 72 + AppsChat/src/Chat/V1/Space/Type.php | 63 + AppsChat/src/Chat/V1/Thread.php | 134 ++ AppsChat/src/Chat/V1/UpdateMessageRequest.php | 238 +++ AppsChat/src/Chat/V1/UpdateSpaceRequest.php | 292 +++ .../src/Chat/V1/UploadAttachmentRequest.php | 105 ++ .../src/Chat/V1/UploadAttachmentResponse.php | 77 + AppsChat/src/Chat/V1/User.php | 275 +++ AppsChat/src/Chat/V1/User/Type.php | 60 + AppsChat/src/Chat/V1/UserMentionMetadata.php | 111 ++ .../src/Chat/V1/UserMentionMetadata/Type.php | 60 + AppsChat/src/Chat/V1/WidgetMarkup.php | 179 ++ AppsChat/src/Chat/V1/WidgetMarkup/Button.php | 109 ++ .../src/Chat/V1/WidgetMarkup/FormAction.php | 115 ++ .../FormAction/ActionParameter.php | 105 ++ AppsChat/src/Chat/V1/WidgetMarkup/Icon.php | 196 ++ AppsChat/src/Chat/V1/WidgetMarkup/Image.php | 158 ++ .../src/Chat/V1/WidgetMarkup/ImageButton.php | 194 ++ .../src/Chat/V1/WidgetMarkup/KeyValue.php | 423 +++++ AppsChat/src/Chat/V1/WidgetMarkup/OnClick.php | 109 ++ .../src/Chat/V1/WidgetMarkup/OpenLink.php | 68 + .../src/Chat/V1/WidgetMarkup/TextButton.php | 112 ++ .../Chat/V1/WidgetMarkup/TextParagraph.php | 68 + AppsChat/src/Chat/V1/gapic_metadata.json | 128 ++ .../resources/chat_service_client_config.json | 144 ++ .../chat_service_descriptor_config.php | 303 +++ .../chat_service_rest_client_config.php | 261 +++ .../Unit/V1/Client/ChatServiceClientTest.php | 1677 +++++++++++++++++ composer.json | 5 + 203 files changed, 30630 insertions(+) create mode 100644 AppsChat/.OwlBot.yaml create mode 100644 AppsChat/.gitattributes create mode 100644 AppsChat/.github/pull_request_template.md create mode 100644 AppsChat/.repo-metadata.json create mode 100644 AppsChat/CONTRIBUTING.md create mode 100644 AppsChat/LICENSE create mode 100644 AppsChat/README.md create mode 100644 AppsChat/VERSION create mode 100644 AppsChat/composer.json create mode 100644 AppsChat/metadata/Card/V1/Card.php create mode 100644 AppsChat/metadata/Chat/V1/ActionStatus.php create mode 100644 AppsChat/metadata/Chat/V1/Annotation.php create mode 100644 AppsChat/metadata/Chat/V1/Attachment.php create mode 100644 AppsChat/metadata/Chat/V1/ChatService.php create mode 100644 AppsChat/metadata/Chat/V1/ContextualAddon.php create mode 100644 AppsChat/metadata/Chat/V1/DeletionMetadata.php create mode 100644 AppsChat/metadata/Chat/V1/Group.php create mode 100644 AppsChat/metadata/Chat/V1/HistoryState.php create mode 100644 AppsChat/metadata/Chat/V1/MatchedUrl.php create mode 100644 AppsChat/metadata/Chat/V1/Membership.php create mode 100644 AppsChat/metadata/Chat/V1/Message.php create mode 100644 AppsChat/metadata/Chat/V1/Reaction.php create mode 100644 AppsChat/metadata/Chat/V1/SlashCommand.php create mode 100644 AppsChat/metadata/Chat/V1/Space.php create mode 100644 AppsChat/metadata/Chat/V1/SpaceSetup.php create mode 100644 AppsChat/metadata/Chat/V1/User.php create mode 100644 AppsChat/metadata/Chat/V1/Widgets.php create mode 100644 AppsChat/owlbot.py create mode 100644 AppsChat/phpunit.xml.dist create mode 100644 AppsChat/samples/V1/ChatServiceClient/complete_import_space.php create mode 100644 AppsChat/samples/V1/ChatServiceClient/create_membership.php create mode 100644 AppsChat/samples/V1/ChatServiceClient/create_message.php create mode 100644 AppsChat/samples/V1/ChatServiceClient/create_reaction.php create mode 100644 AppsChat/samples/V1/ChatServiceClient/create_space.php create mode 100644 AppsChat/samples/V1/ChatServiceClient/delete_membership.php create mode 100644 AppsChat/samples/V1/ChatServiceClient/delete_message.php create mode 100644 AppsChat/samples/V1/ChatServiceClient/delete_reaction.php create mode 100644 AppsChat/samples/V1/ChatServiceClient/delete_space.php create mode 100644 AppsChat/samples/V1/ChatServiceClient/find_direct_message.php create mode 100644 AppsChat/samples/V1/ChatServiceClient/get_attachment.php create mode 100644 AppsChat/samples/V1/ChatServiceClient/get_membership.php create mode 100644 AppsChat/samples/V1/ChatServiceClient/get_message.php create mode 100644 AppsChat/samples/V1/ChatServiceClient/get_space.php create mode 100644 AppsChat/samples/V1/ChatServiceClient/list_memberships.php create mode 100644 AppsChat/samples/V1/ChatServiceClient/list_messages.php create mode 100644 AppsChat/samples/V1/ChatServiceClient/list_reactions.php create mode 100644 AppsChat/samples/V1/ChatServiceClient/list_spaces.php create mode 100644 AppsChat/samples/V1/ChatServiceClient/set_up_space.php create mode 100644 AppsChat/samples/V1/ChatServiceClient/update_message.php create mode 100644 AppsChat/samples/V1/ChatServiceClient/update_space.php create mode 100644 AppsChat/samples/V1/ChatServiceClient/upload_attachment.php create mode 100644 AppsChat/src/Card/V1/Action.php create mode 100644 AppsChat/src/Card/V1/Action/ActionParameter.php create mode 100644 AppsChat/src/Card/V1/Action/Interaction.php create mode 100644 AppsChat/src/Card/V1/Action/LoadIndicator.php create mode 100644 AppsChat/src/Card/V1/BorderStyle.php create mode 100644 AppsChat/src/Card/V1/BorderStyle/BorderType.php create mode 100644 AppsChat/src/Card/V1/Button.php create mode 100644 AppsChat/src/Card/V1/ButtonList.php create mode 100644 AppsChat/src/Card/V1/Card.php create mode 100644 AppsChat/src/Card/V1/Card/CardAction.php create mode 100644 AppsChat/src/Card/V1/Card/CardFixedFooter.php create mode 100644 AppsChat/src/Card/V1/Card/CardHeader.php create mode 100644 AppsChat/src/Card/V1/Card/DisplayStyle.php create mode 100644 AppsChat/src/Card/V1/Card/DividerStyle.php create mode 100644 AppsChat/src/Card/V1/Card/Section.php create mode 100644 AppsChat/src/Card/V1/Columns.php create mode 100644 AppsChat/src/Card/V1/Columns/Column.php create mode 100644 AppsChat/src/Card/V1/Columns/Column/HorizontalSizeStyle.php create mode 100644 AppsChat/src/Card/V1/Columns/Column/VerticalAlignment.php create mode 100644 AppsChat/src/Card/V1/Columns/Column/Widgets.php create mode 100644 AppsChat/src/Card/V1/DateTimePicker.php create mode 100644 AppsChat/src/Card/V1/DateTimePicker/DateTimePickerType.php create mode 100644 AppsChat/src/Card/V1/DecoratedText.php create mode 100644 AppsChat/src/Card/V1/DecoratedText/SwitchControl.php create mode 100644 AppsChat/src/Card/V1/DecoratedText/SwitchControl/ControlType.php create mode 100644 AppsChat/src/Card/V1/Divider.php create mode 100644 AppsChat/src/Card/V1/Grid.php create mode 100644 AppsChat/src/Card/V1/Grid/GridItem.php create mode 100644 AppsChat/src/Card/V1/Grid/GridItem/GridItemLayout.php create mode 100644 AppsChat/src/Card/V1/Icon.php create mode 100644 AppsChat/src/Card/V1/Image.php create mode 100644 AppsChat/src/Card/V1/ImageComponent.php create mode 100644 AppsChat/src/Card/V1/ImageCropStyle.php create mode 100644 AppsChat/src/Card/V1/ImageCropStyle/ImageCropType.php create mode 100644 AppsChat/src/Card/V1/MaterialIcon.php create mode 100644 AppsChat/src/Card/V1/OnClick.php create mode 100644 AppsChat/src/Card/V1/OpenLink.php create mode 100644 AppsChat/src/Card/V1/OpenLink/OnClose.php create mode 100644 AppsChat/src/Card/V1/OpenLink/OpenAs.php create mode 100644 AppsChat/src/Card/V1/SelectionInput.php create mode 100644 AppsChat/src/Card/V1/SelectionInput/PlatformDataSource.php create mode 100644 AppsChat/src/Card/V1/SelectionInput/PlatformDataSource/CommonDataSource.php create mode 100644 AppsChat/src/Card/V1/SelectionInput/SelectionItem.php create mode 100644 AppsChat/src/Card/V1/SelectionInput/SelectionType.php create mode 100644 AppsChat/src/Card/V1/Suggestions.php create mode 100644 AppsChat/src/Card/V1/Suggestions/SuggestionItem.php create mode 100644 AppsChat/src/Card/V1/TextInput.php create mode 100644 AppsChat/src/Card/V1/TextInput/Type.php create mode 100644 AppsChat/src/Card/V1/TextParagraph.php create mode 100644 AppsChat/src/Card/V1/Widget.php create mode 100644 AppsChat/src/Card/V1/Widget/HorizontalAlignment.php create mode 100644 AppsChat/src/Card/V1/Widget/ImageType.php create mode 100644 AppsChat/src/Chat/V1/AccessoryWidget.php create mode 100644 AppsChat/src/Chat/V1/ActionResponse.php create mode 100644 AppsChat/src/Chat/V1/ActionResponse/ResponseType.php create mode 100644 AppsChat/src/Chat/V1/ActionResponse/SelectionItems.php create mode 100644 AppsChat/src/Chat/V1/ActionResponse/UpdatedWidget.php create mode 100644 AppsChat/src/Chat/V1/ActionStatus.php create mode 100644 AppsChat/src/Chat/V1/Annotation.php create mode 100644 AppsChat/src/Chat/V1/AnnotationType.php create mode 100644 AppsChat/src/Chat/V1/AttachedGif.php create mode 100644 AppsChat/src/Chat/V1/Attachment.php create mode 100644 AppsChat/src/Chat/V1/Attachment/Source.php create mode 100644 AppsChat/src/Chat/V1/AttachmentDataRef.php create mode 100644 AppsChat/src/Chat/V1/CardWithId.php create mode 100644 AppsChat/src/Chat/V1/Client/ChatServiceClient.php create mode 100644 AppsChat/src/Chat/V1/CompleteImportSpaceRequest.php create mode 100644 AppsChat/src/Chat/V1/CompleteImportSpaceResponse.php create mode 100644 AppsChat/src/Chat/V1/ContextualAddOnMarkup.php create mode 100644 AppsChat/src/Chat/V1/ContextualAddOnMarkup/Card.php create mode 100644 AppsChat/src/Chat/V1/ContextualAddOnMarkup/Card/CardAction.php create mode 100644 AppsChat/src/Chat/V1/ContextualAddOnMarkup/Card/CardHeader.php create mode 100644 AppsChat/src/Chat/V1/ContextualAddOnMarkup/Card/CardHeader/ImageStyle.php create mode 100644 AppsChat/src/Chat/V1/ContextualAddOnMarkup/Card/Section.php create mode 100644 AppsChat/src/Chat/V1/CreateMembershipRequest.php create mode 100644 AppsChat/src/Chat/V1/CreateMessageRequest.php create mode 100644 AppsChat/src/Chat/V1/CreateMessageRequest/MessageReplyOption.php create mode 100644 AppsChat/src/Chat/V1/CreateReactionRequest.php create mode 100644 AppsChat/src/Chat/V1/CreateSpaceRequest.php create mode 100644 AppsChat/src/Chat/V1/CustomEmoji.php create mode 100644 AppsChat/src/Chat/V1/DeleteMembershipRequest.php create mode 100644 AppsChat/src/Chat/V1/DeleteMessageRequest.php create mode 100644 AppsChat/src/Chat/V1/DeleteReactionRequest.php create mode 100644 AppsChat/src/Chat/V1/DeleteSpaceRequest.php create mode 100644 AppsChat/src/Chat/V1/DeletionMetadata.php create mode 100644 AppsChat/src/Chat/V1/DeletionMetadata/DeletionType.php create mode 100644 AppsChat/src/Chat/V1/Dialog.php create mode 100644 AppsChat/src/Chat/V1/DialogAction.php create mode 100644 AppsChat/src/Chat/V1/DriveDataRef.php create mode 100644 AppsChat/src/Chat/V1/DriveLinkData.php create mode 100644 AppsChat/src/Chat/V1/Emoji.php create mode 100644 AppsChat/src/Chat/V1/EmojiReactionSummary.php create mode 100644 AppsChat/src/Chat/V1/FindDirectMessageRequest.php create mode 100644 AppsChat/src/Chat/V1/GetAttachmentRequest.php create mode 100644 AppsChat/src/Chat/V1/GetMembershipRequest.php create mode 100644 AppsChat/src/Chat/V1/GetMessageRequest.php create mode 100644 AppsChat/src/Chat/V1/GetSpaceRequest.php create mode 100644 AppsChat/src/Chat/V1/Group.php create mode 100644 AppsChat/src/Chat/V1/HistoryState.php create mode 100644 AppsChat/src/Chat/V1/ListMembershipsRequest.php create mode 100644 AppsChat/src/Chat/V1/ListMembershipsResponse.php create mode 100644 AppsChat/src/Chat/V1/ListMessagesRequest.php create mode 100644 AppsChat/src/Chat/V1/ListMessagesResponse.php create mode 100644 AppsChat/src/Chat/V1/ListReactionsRequest.php create mode 100644 AppsChat/src/Chat/V1/ListReactionsResponse.php create mode 100644 AppsChat/src/Chat/V1/ListSpacesRequest.php create mode 100644 AppsChat/src/Chat/V1/ListSpacesResponse.php create mode 100644 AppsChat/src/Chat/V1/MatchedUrl.php create mode 100644 AppsChat/src/Chat/V1/Membership.php create mode 100644 AppsChat/src/Chat/V1/Membership/MembershipRole.php create mode 100644 AppsChat/src/Chat/V1/Membership/MembershipState.php create mode 100644 AppsChat/src/Chat/V1/Message.php create mode 100644 AppsChat/src/Chat/V1/QuotedMessageMetadata.php create mode 100644 AppsChat/src/Chat/V1/Reaction.php create mode 100644 AppsChat/src/Chat/V1/RichLinkMetadata.php create mode 100644 AppsChat/src/Chat/V1/RichLinkMetadata/RichLinkType.php create mode 100644 AppsChat/src/Chat/V1/SetUpSpaceRequest.php create mode 100644 AppsChat/src/Chat/V1/SlashCommand.php create mode 100644 AppsChat/src/Chat/V1/SlashCommandMetadata.php create mode 100644 AppsChat/src/Chat/V1/SlashCommandMetadata/Type.php create mode 100644 AppsChat/src/Chat/V1/Space.php create mode 100644 AppsChat/src/Chat/V1/Space/SpaceDetails.php create mode 100644 AppsChat/src/Chat/V1/Space/SpaceThreadingState.php create mode 100644 AppsChat/src/Chat/V1/Space/SpaceType.php create mode 100644 AppsChat/src/Chat/V1/Space/Type.php create mode 100644 AppsChat/src/Chat/V1/Thread.php create mode 100644 AppsChat/src/Chat/V1/UpdateMessageRequest.php create mode 100644 AppsChat/src/Chat/V1/UpdateSpaceRequest.php create mode 100644 AppsChat/src/Chat/V1/UploadAttachmentRequest.php create mode 100644 AppsChat/src/Chat/V1/UploadAttachmentResponse.php create mode 100644 AppsChat/src/Chat/V1/User.php create mode 100644 AppsChat/src/Chat/V1/User/Type.php create mode 100644 AppsChat/src/Chat/V1/UserMentionMetadata.php create mode 100644 AppsChat/src/Chat/V1/UserMentionMetadata/Type.php create mode 100644 AppsChat/src/Chat/V1/WidgetMarkup.php create mode 100644 AppsChat/src/Chat/V1/WidgetMarkup/Button.php create mode 100644 AppsChat/src/Chat/V1/WidgetMarkup/FormAction.php create mode 100644 AppsChat/src/Chat/V1/WidgetMarkup/FormAction/ActionParameter.php create mode 100644 AppsChat/src/Chat/V1/WidgetMarkup/Icon.php create mode 100644 AppsChat/src/Chat/V1/WidgetMarkup/Image.php create mode 100644 AppsChat/src/Chat/V1/WidgetMarkup/ImageButton.php create mode 100644 AppsChat/src/Chat/V1/WidgetMarkup/KeyValue.php create mode 100644 AppsChat/src/Chat/V1/WidgetMarkup/OnClick.php create mode 100644 AppsChat/src/Chat/V1/WidgetMarkup/OpenLink.php create mode 100644 AppsChat/src/Chat/V1/WidgetMarkup/TextButton.php create mode 100644 AppsChat/src/Chat/V1/WidgetMarkup/TextParagraph.php create mode 100644 AppsChat/src/Chat/V1/gapic_metadata.json create mode 100644 AppsChat/src/Chat/V1/resources/chat_service_client_config.json create mode 100644 AppsChat/src/Chat/V1/resources/chat_service_descriptor_config.php create mode 100644 AppsChat/src/Chat/V1/resources/chat_service_rest_client_config.php create mode 100644 AppsChat/tests/Unit/V1/Client/ChatServiceClientTest.php diff --git a/AppsChat/.OwlBot.yaml b/AppsChat/.OwlBot.yaml new file mode 100644 index 000000000000..1f2c6c892f98 --- /dev/null +++ b/AppsChat/.OwlBot.yaml @@ -0,0 +1,6 @@ +deep-copy-regex: + - source: /google/chat/(v1)/.*-php/(.*) + dest: /owl-bot-staging/AppsChat/$1/$2 + - source: /google/apps/card/(v1)/.*-php/(.*) + dest: /owl-bot-staging/AppsChat/card-protos/$1/$2 +api-name: AppsChat diff --git a/AppsChat/.gitattributes b/AppsChat/.gitattributes new file mode 100644 index 000000000000..8119e7fcc1b2 --- /dev/null +++ b/AppsChat/.gitattributes @@ -0,0 +1,8 @@ +/*.xml.dist export-ignore +/.OwlBot.yaml export-ignore +/.github export-ignore +/.repo-metadata.json export-ignore +/owlbot.py export-ignore +/src/**/gapic_metadata.json export-ignore +/samples export-ignore +/tests export-ignore diff --git a/AppsChat/.github/pull_request_template.md b/AppsChat/.github/pull_request_template.md new file mode 100644 index 000000000000..01e8f62554e3 --- /dev/null +++ b/AppsChat/.github/pull_request_template.md @@ -0,0 +1,24 @@ +**PLEASE READ THIS ENTIRE MESSAGE** + +Hello, and thank you for your contribution! Please note that this repository is +a read-only split of `googleapis/google-cloud-php`. As such, we are +unable to accept pull requests to this repository. + +We welcome your pull request and would be happy to consider it for inclusion in +our library if you follow these steps: + +* Clone the parent client library repository: + +```sh +$ git clone git@github.com:googleapis/google-cloud-php.git +``` + +* Move your changes into the correct location in that library. Library code +belongs in `AppsChat/src`, and tests in `AppsChat/tests`. + +* Push the changes in a new branch to a fork, and open a new pull request +[here](https://github.com/googleapis/google-cloud-php). + +Thanks again, and we look forward to seeing your proposed change! + +The Google Cloud PHP team diff --git a/AppsChat/.repo-metadata.json b/AppsChat/.repo-metadata.json new file mode 100644 index 000000000000..917a35ff0820 --- /dev/null +++ b/AppsChat/.repo-metadata.json @@ -0,0 +1,8 @@ +{ + "language": "php", + "distribution_name": "google/chat", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/chat/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "chat" +} diff --git a/AppsChat/CONTRIBUTING.md b/AppsChat/CONTRIBUTING.md new file mode 100644 index 000000000000..76ea811cacdb --- /dev/null +++ b/AppsChat/CONTRIBUTING.md @@ -0,0 +1,10 @@ +# How to Contribute + +We'd love to accept your patches and contributions to this project. We accept +and review pull requests against the main +[Google Cloud PHP](https://github.com/googleapis/google-cloud-php) +repository, which contains all of our client libraries. You will also need to +sign a Contributor License Agreement. For more details about how to contribute, +see the +[CONTRIBUTING.md](https://github.com/googleapis/google-cloud-php/blob/main/CONTRIBUTING.md) +file in the main Google Cloud PHP repository. diff --git a/AppsChat/LICENSE b/AppsChat/LICENSE new file mode 100644 index 000000000000..8f71f43fee3f --- /dev/null +++ b/AppsChat/LICENSE @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/AppsChat/README.md b/AppsChat/README.md new file mode 100644 index 000000000000..4f4e02075d2d --- /dev/null +++ b/AppsChat/README.md @@ -0,0 +1,45 @@ +# Google Apps Chat for PHP + +> Idiomatic PHP client for [Google Apps Chat](https://developers.google.com/chat/concepts). + +[![Latest Stable Version](https://poser.pugx.org/google/chat/v/stable)](https://packagist.org/packages/google/chat) [![Packagist](https://img.shields.io/packagist/dm/google/chat.svg)](https://packagist.org/packages/google/chat) + +* [API documentation](https://cloud.google.com/php/docs/reference/chat/latest) + +**NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any +support requests, bug reports, or development contributions should be directed to +that project. + +### Installation + +To begin, install the preferred dependency manager for PHP, [Composer](https://getcomposer.org/). + +Now, install this component: + +```sh +$ composer require google/chat +``` + +> Browse the complete list of [Google Cloud APIs](https://cloud.google.com/php/docs/reference) +> for PHP + +This component supports both REST over HTTP/1.1 and gRPC. In order to take advantage of the benefits +offered by gRPC (such as streaming methods) please see our +[gRPC installation guide](https://cloud.google.com/php/grpc). + +### Authentication + +Please see our [Authentication guide](https://github.com/googleapis/google-cloud-php/blob/main/AUTHENTICATION.md) for more information +on authenticating your client. Once authenticated, you'll be ready to start making requests. + +### Sample + +See the [samples directory](https://github.com/googleapis/php-chat/tree/main/samples) for a canonical list of samples. + +### Version + +This component is considered alpha. As such, it is still a work-in-progress and is more likely to get backwards-incompatible updates. + +### Next Steps + +1. Understand the [official documentation](https://developers.google.com/chat/concepts). diff --git a/AppsChat/VERSION b/AppsChat/VERSION new file mode 100644 index 000000000000..77d6f4ca2371 --- /dev/null +++ b/AppsChat/VERSION @@ -0,0 +1 @@ +0.0.0 diff --git a/AppsChat/composer.json b/AppsChat/composer.json new file mode 100644 index 000000000000..29d44291df31 --- /dev/null +++ b/AppsChat/composer.json @@ -0,0 +1,32 @@ +{ + "name": "google/apps-chat", + "description": "Google Apps Chat Client for PHP", + "license": "Apache-2.0", + "minimum-stability": "stable", + "autoload": { + "psr-4": { + "Google\\Apps\\Chat\\": "src/Chat", + "GPBMetadata\\Google\\Chat\\": "metadata/Chat", + "Google\\Apps\\Card\\": "src/Card", + "GPBMetadata\\Google\\Apps\\Card\\": "metadata/Card" + } + }, + "extra": { + "component": { + "id": "apps-chat", + "path": "AppsChat", + "target": "googleapis/php-apps-chat" + } + }, + "require": { + "php": "^8.0", + "google/gax": "^1.30.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "suggest": { + "ext-grpc": "Enables use of gRPC, a universal high-performance RPC framework created by Google.", + "ext-protobuf": "Provides a significant increase in throughput over the pure PHP protobuf implementation. See https://cloud.google.com/php/grpc for installation instructions." + } +} diff --git a/AppsChat/metadata/Card/V1/Card.php b/AppsChat/metadata/Card/V1/Card.php new file mode 100644 index 0000000000000000000000000000000000000000..2b741a7e434713f65e36108693fe4b643097aeab GIT binary patch literal 8612 zcmeHNJ98V?6&AoJ4oHYz(Kbz4Hnfs0DYl>xvaK;>Nx@6xMj!wKAZ0n6*;x`xa!0@} zyt|MrXH+;vCVl!;nPiea{sCz+lN6bBnN+EhHf?6|oqI1{)Dp7Oq=^a2k?vT?A|3_5A}omp<~mqmF&U>h*#f2bSNy@nl2%&4{IlT&rsbJ?p?uZ`KRjc4)P& z(AwJ+Tzh$N?G?ebx4Uth=%8Z-L7KnQk136Rz5ag3IY%3U|+qKmTNNY<(`K#-boMSsPnOLae)2*hRlfP%! zsu{Lw=E;WsheeuY+h`xq{IPAdZGSD6j$KV=FJ~giGfXP}+Y+?eO{_w2k0d?lZ@I!Jyrt<+c;_I@U9FlKGdP zM3Bpq+@+PCZ9g`}ag-GngbXh^jkLo0&tpU^k}}FN&4o?~eX=DJ+6rvc-pKE zPS-lJ%@9twHX~$xC-Srpoi>6bV=y&)to8~eBx~RADDAyQDf!6igl1@e84CR+*1wL? z!ocLI3GYg1@6*ClvGl-g&QIB1J4Z>tSI6oF&OVOC=2_G((RskZ=&`95G!MMK8?Lbh z=GGfhG0N(zv?QIy>{$DDN9iX+i=Jy90FxfWhuQbvj1;Ek7MW)KIh{Re|C^NR`A~xY z%-rvXq35a~iau3AkZ2#$3c|p1+hc5U|7mP`ot7rT-~zo-GIotpxnVY2k1Azzr`oKS zi^hGUTv|B;gDp2}6{BP-qLrAIBC6Jg-{X3TR~&Okv0}4c$v=u*5r|PQmmgrEBrP<` zpevSF;`&eLXX?;Msbw+!S=7c{fW2{Fq8SIfD z##U`8QRF-6eC*E2Z1h&80V(eZ?vE%b?PYeHAQb+b%)TADp)^_rWZ?UNNF2~{dwuEd z$?RK^Y`l@dRN%TxX9K$nIz{~oO%&mwA_u5I?atU64Y68?>MRS3vD)j;`Db4A*G($amUnB*c6pQp`;d$h8rS{jM9VC8q=tG9J@_ zVVhQuJ>U7tb3?0RBKse?T^oVB2<}w&M&w=!j<$w;`2m}Li4wvm1WFOjH$UCUH_8YA zd@dS|Vx_zi(|<(gB6zjSl-{Z}jL&P;R=#59E5>GZyIgIZh@=F~HCy>c3y#lgf}q@3 ziE9fqQ?8a)W(xB(%Vm&$ftDv+nv)HCi-a3}Z;$4Lq?1@GvHCk=5o7xhb=mO~dV&^| z{q$eV(ei}HBeZ56AdU*hXnPtUD8$!d+I1q-KYnNmmZd2!z$|>4(CaB=6|xKuF0(8M zo&pR;DPmCrAn$v?%dTSMa7bw5N|63N6_6q5yh2^}on&?ze8Ta5NU7kd6CNBRQ@Ek; zbyP5XKhotU6qsoW#-ilITGwgOcH2@z((O-I>eiX{uj4@D@g;_Zh%`Sk_Y8`Zi_6v$T@>^)v@Iwd&^v=P%HY-D)BW?DoL4T%I6H4%6{@)51dg4=NQw0onv1) zB$^M6R&fg(z;BB25 zm>lS?=ZHp`l*>RFxr5E4^)5N|f6im4iKIB)XYMJFkOl5Wv|%RJ%M6zn%KX7VGqXZ7 z-)#lfO=P^v?jri6%FcUN=X4scPE&+T}x&^`Zjv4D}IzD zR#OZafQF9&hC}tUwk8tgD83~Ea2qoThG;xS3CisIj%rBIE~u;`0)+LQSpQv&v=^n& zY|;>iU4ZJiS{RK}+0Fm%WI#z?aQvwHHCj3Ol&j~R>VsrsS9? zTrP~XB)oD0PtTwPSZd@;M$Ihjv|6>QtWFdZ#~F%Cjat3LyUZ}H00XmGu9S<~07n6kp@| zH!+%*Aa%lr5y-OQl8xQz#esH_=1@O-zDV@RtTyny5IGGVgBF=fI)$giN<>C-i z2@5TATlLK2<)Wyy^xwy5R+Mk6M2}tXsVi$4QH~(=HCp8A55d)uH3^>OXt@i;`ltGKymZP9K{ckZ!iR!%Qdp$Xw8Ke;j3eibml10u-cm?6nJa!0r==)5x zsg5TU8PmU@bL1(lC#j*0Cp^)`bskBvtkicPy+y#VX@4y678Io&Kj8 zn&nQJ{cU_Ww=pO&ZiS6UwW@2Q+)=OnS{5CS~D(>On1{1vDC|H)+(KvMC zta1_*tp8?)7S!kej~$2CI+?Ehyiv&)(9SmNJb8|3uaPEx**2=i_Rh9?9@jskS6*~Co!;6lH(Ew<%A{{J-iz^g zuT`sK&WDGE8Y*n$R{ig|+89(>m_Dfnosc0yY zOJw99zPS)Q$W^J1XQ4fJ+rUR$GK)$lm5shfREt!=VGJ1H$*CT8$0dU)dZ0j9Y!S$o z6c@pkxV=;(uDvUfexnvP_~Ka7uV1IL^65xeSoE>|OdWkVNfX79{w^&~iUox>>qfPT z{#10T)fz@iG5t0r$9BinternalAddGeneratedFile( + ' +¯ +"google/chat/v1/action_status.protogoogle.chat.v1"R + ActionStatus% + status_code (2.google.rpc.Code +user_facing_message ( Bœ +com.google.chat.v1BActionStatusProtoPZ,cloud.google.com/go/chat/apiv1/chatpb;chatpbªGoogle.Apps.Chat.V1ÊGoogle\\Apps\\Chat\\V1êGoogle::Apps::Chat::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AppsChat/metadata/Chat/V1/Annotation.php b/AppsChat/metadata/Chat/V1/Annotation.php new file mode 100644 index 0000000000000000000000000000000000000000..62c79c5cae09771481e1c0528979740f40f3e6af GIT binary patch literal 2038 zcma)7-EQJW7>$8tmk&bdY}C?iyF1H9T2f^lL94cMnpA*Eur~Y%28QvpI37ByGytsJxGR6%cnYFCEW}53l&sp=! zYir!-bNC0~$$xYmF&XmrINq&eZ~5gtLASj z8`v{_>zYJ^#oyJi!ff@kxQ@(We5zyyYVDNHAa_UUF+A!kjh1$)bY5y(dYT82`^u=P zohz5kf>2LGieFdy9(M0Yqc0&JS>j)7KA9{V`{`Ck+)bZM&qb9kzmMe4@6QEI{sR(Cllgp%a+y?%=XEXladZyIt$Zg#_A#%(~J-vi_?8hz&!` zU43tJceojP!s{c$b{FOv=+2L)ZnXAv&tjX8KXu;tB>MP0@$e$taAM8#0+Fvdaa8$p zb*ifTSdG>n+kby2K8)a!#J`XvPLQNgWtVV D?#*eP literal 0 HcmV?d00001 diff --git a/AppsChat/metadata/Chat/V1/Attachment.php b/AppsChat/metadata/Chat/V1/Attachment.php new file mode 100644 index 0000000000000000000000000000000000000000..013dfc061df3f3f8599d69bcea444d2799d17c9e GIT binary patch literal 1779 zcma)7+j7%J7{(5m@HeDEoD4m%n3I{I^0;(*p%7ZxvW=%9_Be+NMl+hVw6=GuXoa*& zhcbSVK0+Ubr{J35u6Moa9u&(Z;ouv||Nh^9{Pxq6U*cH|cTkT+B*B~nX#5KC89{Nv zIP+PE#@S>-66CYPn1&=V5po7-XRwDlPJi#VfTk=J3}Z3C98E*zGBp+ZHhQpt%X)hd517LK7UOM8Hq_PO`}7ltoAa29Zzd50Q>3eecFhbh(9&3mMABMbmCS z;v|W1=sG0z6B=`t427#@O$lF&OIqp=^RzM?ouIm|(XvhyxrKO=k>%_NC4^^5w5jTr z0p^Q0_mnZ&F?G9?gh7kU@DXK+Wfff&K|Tf@k$hXHqSPpUcuMoe?I2k6*%iC5FDjFD zK7jYDaO*QmH`cX-DOq72HE-U?0XU|OBrituqxR1VK(TdW4bDo!R7!!TzY-@%DFihn;r6+wV9VXN+|KXVgFFc-{VX zXQO0XfsOs)_P};Jj@KUS>~(hbHp-Uw&URh+Uad@zNNg)Lg#t8+5gC@c%4y@Zdd?f- zZl`!kgdu;MFG+x~7K@m-09KEeQM(6g%d<1C!bLstiJ+WEgQ{9}?KikoB+ut8eUC|` zX`#t-3$7R0yew8j=InP8<-xY$N{{d&-iW-+NXm_$mO0nD|JE-5YopIiqDJ8QzRGbj z;A5!7I1#MXG;ZBdA-^-eIc>Pl^#ny%tFm{+b4gXj^K$J4R8OW!V-}^vczQa~V2J&GKJ#$#!9sx^X(e3}-j9l|^3>8e HhdIE1@76N@ literal 0 HcmV?d00001 diff --git a/AppsChat/metadata/Chat/V1/ChatService.php b/AppsChat/metadata/Chat/V1/ChatService.php new file mode 100644 index 0000000000000000000000000000000000000000..815f339431fd5a860dd2fcde679b70a5bf171606 GIT binary patch literal 5388 zcmbtY%WoS+7{?WaYWkiiEp=a;ZD>;0Su3rC#HImllQycLZPeGHvJ|b?<9O+MciCAt zYD)w{q6ZEf;6xD!uKX#z0XLtyz+b`4H#58IU2kodTUughUmPuNqiF7 zF==b9r&`=4S{Ma!-~^u5>UTOM(wv|dx*mxPP20Gm-M({QyS{Pr{yY<9}6zsc6~Q?ZO?tifUjvC+oOcZ7kN8<--+G8*SNqP z-yusEHKCL9E`$MdbWKx8wz%)i@8(TECXsJ@%?(1G$PMEl+G4DxxkKV4V*Hn-i_$Dt z=XSIufzdPzAlI}w>XWQ>O^Zm}kNj1@%@yn=-h*-0ssF!YjqONP@q4QvSTq)O_U95s@eljLfS4D&z@p)lc624uBl6()#tX`{`#-Kf7o|XKg);ZbHTL+4$wwzuOa!V`L6tizpbEypSm=b z$|*jdH=Cs@Yy}U7nP|vH2+MRZ4wqBWwMyRA+iEg&ErWm==Fj1HeXv17X^U-kmQP`3hc40;a!Bl z0@OF2&+AQT%5-VzENAVieB|wd8D1{<4_3MlLbguJOLvGo*8W$Ofi;WQ>?3Tv{MP zALuoxo!rqdIT`X(q7tCye)Sdq$QBo$rOE&;F0LW6LRfGl$0aM9?Xc`ov5u!e$a&!0LcrSW3HtNuFk%9@33C=U7T=0gqEntxg^X1Z}4 zQnS(6-QAUmQ`CmtkGt@?VYGs{J`rOZjxm$*x-gz5<4s$HPAy>AVK}`ItFm_Bdrv2o z6p^2f+i;kbm`o|eWT1B@j)Z__By#`LELZdfp_x()cIt#K3f`&Qk|N5LYwSjhSx4k% z*R`XWTQj_2Y*ilB9WUs&6V9O5*a^gAAnP3Y9vHS(dB26N-}lXK!mFQQg&{S#I^*HW zEA?x$$$xH&Cqecm`0u{sg55MZ!8EymX+B(O&A=i5%3|^aQWx)Qndi9Dr#RpgPiA{) H52616=Z|U8 literal 0 HcmV?d00001 diff --git a/AppsChat/metadata/Chat/V1/ContextualAddon.php b/AppsChat/metadata/Chat/V1/ContextualAddon.php new file mode 100644 index 0000000000000000000000000000000000000000..c72b5a23be72aecff6eec59588b1e73a7636a76e GIT binary patch literal 1479 zcmb7E-BQy)6t<-ldO)T|R0h3R5r;AZ=@dsVf+(derK8Y}Ep=ovli4KOHba`tBpVbR zUci^|-be8bd<8EYAHm&hD1YimFPhBeJKs6qIcLA;Fa3cJk5HX>B*2W=$UH`DK#(6$ zMlI?hGwSt7fGj%n9hU?uLe(bPYj#kr+UPvwp&^X|i)g4%Y2PJ9Yk*nts8qD5$H)g3 zVb{R6O+7Vc1n}^Xgg&+is<*aw3BxvKSg*&ydW8q;-O@UM<>D|zl@UosTmcnDNJ=6B>@^FbBKNM=oFk^{^Wf&T$pni#&@t)I%bm=~<+(j3lSPF8Y)U-ax0- zv_ucMe!an^1Ri$vDhaK?@fi(T9I9!3!bY7FCxzuCt)O#ys32?9v@1n!AQnXAe0GEa z!lJ-ikLwl$C!;t0@4eFBIyNsO)U-2AXB4rd)fY}8fOm0J?=~N2VU$7STY{fic>G^; zRAwYh72{TqN(-OI;m(C=HN9ON97g{9uMA`=IIxu(WCsM>B$!K~RAFlEsd|w^{bRf; zV&lJ^I9RE|WJuyEhI45&#);OhLDZI^$}5<*II)2frm>jmx+Rt4Xk{8QVy)*gTvu-X zdkR1loz#01#+k!h606QBd0u{G%9FIfEBi3z3~`?rAv@-bns zDZk05=XYS@w1YDj#+g%AVdA}9#bhiGE=!P`nykfvY*Ny}S(uiSFkEaBH|fdKH1)`jP^L8`dT4*6gJPi|=5xcO_iY#0O0i0h-n=nc3J7pDc~8 V;EJ?_a}M%X_lS}5mY={0z;A?*&c^@% literal 0 HcmV?d00001 diff --git a/AppsChat/metadata/Chat/V1/DeletionMetadata.php b/AppsChat/metadata/Chat/V1/DeletionMetadata.php new file mode 100644 index 0000000000000000000000000000000000000000..ce6976a0ddc4853dae10d7d19840e5eb7466bf68 GIT binary patch literal 1023 zcma)5(QeZ)6eSxQ!h$NeCFbhfS&oM(| z#E_ax0uZA)PALj7>^QCNa?|VNY_HAP-mu;PAc#B*W{cLzrNeC2=G7Ed&cF%XO9Mk{M8#rd$y0A<`zN74c zd+oldyLMlelmoCgaP+q6+m}7FFK;RL!H#Zpt)9HC90Emm9KUN0271Tz&5w@Nzmo4N z6>zW=@Q0S}bBw&BJO-6Dp>kul^-Tf_&-uokT8~ziS0T((;Ygp(f{0|}5>Do|DJk-g zXvm*{=qMdEisk!OrO3FdQ<|zG=<2ZkV^#G$QTB=lz+b?xt-}JYX<|du1VPh=_0ewr aj$WUX6F)10w3fSnW-dn-@mhcd0Dk}winternalAddGeneratedFile( + ' +ã +google/chat/v1/group.protogoogle.chat.v1" +Group +name ( B• +com.google.chat.v1B +GroupProtoPZ,cloud.google.com/go/chat/apiv1/chatpb;chatpbªGoogle.Apps.Chat.V1ÊGoogle\\Apps\\Chat\\V1êGoogle::Apps::Chat::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AppsChat/metadata/Chat/V1/HistoryState.php b/AppsChat/metadata/Chat/V1/HistoryState.php new file mode 100644 index 0000000000000000000000000000000000000000..ec2fc6b93e7166f3871733c628257c784c81279c GIT binary patch literal 837 zcmah{-HH=27`46dBFb7T2wp6Fs|(webxQFrwJz=UXXnCBv9+KKluRbm2Bwpc$tC#E$Qg`y0@T8MSZ+H^y7`=-<0@LUUZyUMkp^-4N~GO}g4 zB$UBqHu%6aiHRoRr0fi@OlP?4bP=K{$#b}N40B6>z9BH5ETWWCu$<;N<@t(dTyv80 zuSR+g5|ZZ35ZuQmMMgCj8Q6v(qpWofj?-dKr7)}ZU@v86w>O)Iex{kqNE!}VP8FAC zrI~?Zyk@$3Gh1n$-;K3&Jb{+ei19s~dij4Nnnw=fS+l&G&g&_9eE8bUWAx(MpD%)spI7rme=%Bpn$BmV zD}U^dhK&c!C+N}sIv9@|wdN5*Rbkqw55Ct>(d3GKOHQQ&a55UA@m0#F$v)S literal 0 HcmV?d00001 diff --git a/AppsChat/metadata/Chat/V1/MatchedUrl.php b/AppsChat/metadata/Chat/V1/MatchedUrl.php new file mode 100644 index 000000000000..bfe88200ad6f --- /dev/null +++ b/AppsChat/metadata/Chat/V1/MatchedUrl.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + ' +÷ + google/chat/v1/matched_url.protogoogle.chat.v1" + +MatchedUrl +url ( BàABš +com.google.chat.v1BMatchedUrlProtoPZ,cloud.google.com/go/chat/apiv1/chatpb;chatpbªGoogle.Apps.Chat.V1ÊGoogle\\Apps\\Chat\\V1êGoogle::Apps::Chat::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AppsChat/metadata/Chat/V1/Membership.php b/AppsChat/metadata/Chat/V1/Membership.php new file mode 100644 index 0000000000000000000000000000000000000000..6feaa39be9a0cfec68d9978193f218eb5dc37fed GIT binary patch literal 2411 zcmbtW-EJC36b@iWd_cCfNeywUdP<@MR|yCwYNd6YYB87)*?=(dMYSqgmH|dxcDFl& z+tl)HuY27`=ri;Q+L!Qk9-&vApIsn!B3y-=U1rXA=FE4#bI!i_&L8{m0M)UJ1B>AS z>c2&7jFBIB%(FcQ^{2xj4v_6leB$7sh)}hKnyoIXRU6%}IFx$Rz{WZndEUsuC3|eK z(pkAQ!IM4?=$QCL=?lQMCYbt`jZwW_ImXNySj;l(5@sH7n0Z>>1F#*7Qgl3n!#N=S z^QV1>*oZQV@yA0#d&DJ-SPuD>N4<}RmP0XzU$-4jU7HclMFP-rZCuzv%BQe>=zIK@ z`zQ*eEiTS4Z8ltn1J`oQDyDWoeC7phZmR1e%w}|nmBLPVtZ+w$sGwrh^=m=yBNj~Y z;^_zlm`wwBPsS}AT+H6g571=z#5^R}8C3AtIwM}7>+@U9oqP=1!C|&;j0*E&)&pngTX8zhg_tE8HIw-$M9DMwwI_=TT=!_ zA>ZOzdFy@%uzXSqLe`X!x3;eM8VPE`y$B}Uh$@)!`-fXm2(lWuz)CE-q%z3=o&=c7 zUMs_jsF+*~#R{vH2mcxfzLe3a<9T4T$g8rn0C@>Xp*@_7bIjWA*TwfQRh*kHyq*X| zC2?sav=^`vcn;3pmhhb$!8;rv&@t^1q$aXza|w=5@7}wL7h-sIOM40#Nm(znPD<;~ zu3AgQar18>Z3mdg*b{{1R;2Y-WF4_toJppVx-^m^9u6E}2S>m=HwET@fb}_3k{%7g z7ss{ZO09G9s?qM9bd7GU_ojK$t{pTE8@1}jEe#;`y47g%_n4N3+l}UFqs#xqwGGJd zcG)v}%E3k=--Wfgf5D%&4WBQ#@3fAtdS8dMTn&B1gjcm-G>v+#vk}*;?+jz9LbhcC zrloWFyokDV>0IUFqLKknuidvk&i@vJ?13bIAz=K|lozM=4WxW4z%C0F`smV#bCGJx zMEWc`LCglJ)b#EwoniSc$Wv%5p8qEXn@5DQc^I_wiE(Vgs&9>OkMaQ`!$>L_X946o z^M1sxl=7`+c^f>+WKdQw^z)?NGy>n#K>TEJ@l2=3MK0&5Xz&);hRaVqI4WHz&@<$9b-ov6|4zpibC_gz8+OhAS*p4?H%nW(o8+qzmgEvCnXa&^o z@2SV1@w;{TSy426pB4{9Pd_dH9j%(CST@x+2mk1J7vEIox-K?!T>y0bwA@e0_VVoU bY@j?*6MSLdi-t?=4-9*0sYdbzTmbwBb4B_@ literal 0 HcmV?d00001 diff --git a/AppsChat/metadata/Chat/V1/Message.php b/AppsChat/metadata/Chat/V1/Message.php new file mode 100644 index 0000000000000000000000000000000000000000..5fa92ad96c456af1c9f6ce4f063fe37829403aac GIT binary patch literal 5774 zcmbtYOLN=S6*l#tq(eO@M7AM0j$uZz<-{gON+)jUC^h(y%&}z3BxNTV&R`($ib4be zFdlMMkJ`zy+itq(wwvUqblG3vwSPi4?YR%YBuLqos|~1o&pG!zzjN;W?ho#f3!f|7 z#3r5|kdAV2ssu+waXlw+498Lq!ox%2DTdQ?O^bMWMXA)4C-s(6t<+jKk=1uX&mcvm z>o{GD6pSN1D4eVpdc^njF3B@N0Je?`u5J)zd#|)h0==ULdV8Dkw9ClTezyJqz_4`R zS9UosyaEOP-0;9M4aE=i06(jyubH+Pn7U>D3H9An4t2{X$U97X7}`c)I<`U?>b61F z?kHR)rCoI$v~N?1wAiC2qq*&x9T3mft#*a@hG)8g?pdjc1Ijb#hHi7 z8rQK{98z*q3A~W>pROn#2|~|)!1Sg9&f;I~5k68~v%O^!t5YIJ`ibdy#o}A5-U>O7 zwLwIjF2Lpb?XvE5Ff#1>;RlL%wpHf+CI&9_KZ4t~9U61T{s`V6(2b)Wv4e~AmK}`$ zAA?Z0)K2GP4zCc4P_?5pzqks!dSD!p&c269_n}daoZcWhbNj_Pn^=5DWvAEE?aoJV z)9SuB+rCdOkjin5vQpU9{o@ZmG3ITVh(&?kb4T+sT)6kWDNq2DATIhXguu19Oli^H zhX3A#Pv3=o(mdbIQ)JAatgkE!YTY#po+wKWlPjOaTdrR)u=XgD(y!RhB@W_|)+p?R zzM#30q>0PuJc77Z1i=>x2}WEHnocW1kljjZ zVmoQIPxDm6jzkkx(5xgxuwEnfB8SreP=|(?a$+mejddx+{=y-JSgnVNB`6|y#uP!6 zJ)9u-E5MX!Skf#^&_*Yxl+@acbO+Ktu{*?*$MFBm#!{Xu8D&DA=6-4XwK^`{hm3(% z2SlUd<#9&8646Iz=i|&RrC+O)uho?FEo9Lfffl;hPzCqZ_j0o{e+L;BGQqX-VO(e; zMMrr8$!DZ%Fn{QHJw3qDL1XJ*(RFUrCQQ=Y_2o%r9L@hSGDj3begJ6e_O9+7hi;y> zoYI(_lJ3GZW7keL$Og%Bx9BtCYSW$eWD%lppvlTyZ_~gjPv((1}T2 zVs)-EW6rJ4N$DXh4uP9|i*YGQ1(MC5AO0Awz6c#!B+=OsNXqToOwboeK~EXIK$d8f z;L`46O0dwNysmlZ%U?2QTuX{j1<|&7$Qg^Us2c{l+3`-bmu3eCT3^1)m~RX*M}*HA zU9tQ|eF)cB<#8Cp{^jQpg$qJQ=_V@?zwnBE&!Q^;E(oK~ayKB;r<9b1@z66lTrv%F ze;tF%BQ2NK`?0n3Iilu&)a&n7XcRbdD2_9C1hi6cEdG*uqy8E0j52q$dQabLe1T^` zBBF&?e0eA_&T=mxE#POcuUrKXRdq~GS+8JlkSacWqi$kZ(K#a#A|dBSLP;(L1H^xv z<^DYZ^MfEHeUE^D>hhj8zwy;@n$S@qlGLqq7yvE7Hfe_%?SxntAp1!r>pU* z7VT~bwJMB=tHWj0V4gR+j>ulthB6y>-=oz&>yFqeXvQ;9D-D=$;=sa2fTMF#KvVBLoA@)G?_58J_fPEETilFo4B3A~rEtmh)2Unb=zGE-Mn& zc2l{3j>A%!O_~X%zJ|1`d)SYePBRo>sq>_FB7UDGbRNuXyxWrH0pLm_$4qHbPSH6Q zG0o#ar0su-ZK3rk=_gnc&f+tK=D4(&9p%8$>tOiSR};ao}`L#nH=A?hU{dyS`v{O&~%6{YTtS7GR3@5SrcmcG$iR6LdwW z^bTo%Pl1GUR&<Ly19DDTLaxeAMUBhz1PE3V^S=Zsuu{f#GcLbaZ+=B=F^V`@b z+wAc*uhRBbrZdB{^?yaH?KWL*^OsqC0DLocg_9SHbfZ|L48`KJ^@B8l5YO338c#~AUXx;4K#PeKSCq3H5JDFMvXeHc3QZJBB&w^d^?B@Ud%itx z_aaJVo_Xep&%npvkx$X*egk-7|J+?%r-_j2mp#wU?EHSeotgdWo8&lwkI62^m{N%Y z(tl3mF_I+Zl7~DZ{cJeIl!Sboun1F+kez+3~3}#1)udDX0bs*bijTbV)Hh!XKLTIge!(yq=0dt zNh`v^{a9ie( z#+wGWK44OQ1#b|kld#|(!)VaOV|v1P>iegxP7gUR^bqr#`rlFctpq;^JSUeC@YAnZ zE>~wTDAl>As-;=-(d^dYpC$O-62l1<_7C9uRZG(^>=w=#d|%Wr@3~kFFRFt4Hj_BpR#(@c&^TR z-qoA_kFPpM@V!hXnK+q8?L;f`>n?>1*zL_+7uwZhy z*WgkXvycyR5_@y*mvA}EgyiF%#c0{wn#H(ne9S3^)ZSdT2A4vv?kkp!o3K3P;4VWo zV*{&GBZ3tZRJpq8i`?g=%YEOVX4ao+_ncFCV%Z0f3JH?G6tkVR_d)aP}T8e`)Ltj=H( z36BN3pFpjkCzLK#br0wAQ#r53__ORyCDz4KYdnC}9gOg-<{Q%uQz(9Mjd%ZWz*R** zqjLA1LQpeV51hw$!iZ;s(oMC=h}$Pa^^JNpbR#AGO}qSAxxQ=O2d|SP!rRs};i&z0 zVGROp4(#KhUXNFm8`js0 literal 0 HcmV?d00001 diff --git a/AppsChat/metadata/Chat/V1/SlashCommand.php b/AppsChat/metadata/Chat/V1/SlashCommand.php new file mode 100644 index 000000000000..d31b2a8bf0d2 --- /dev/null +++ b/AppsChat/metadata/Chat/V1/SlashCommand.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + ' +ÿ +"google/chat/v1/slash_command.protogoogle.chat.v1"" + SlashCommand + +command_id (Bœ +com.google.chat.v1BSlashCommandProtoPZ,cloud.google.com/go/chat/apiv1/chatpb;chatpbªGoogle.Apps.Chat.V1ÊGoogle\\Apps\\Chat\\V1êGoogle::Apps::Chat::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AppsChat/metadata/Chat/V1/Space.php b/AppsChat/metadata/Chat/V1/Space.php new file mode 100644 index 0000000000000000000000000000000000000000..d0f7fa81bd7fd68d1337f2f4a777fdc29a2fe4d5 GIT binary patch literal 2793 zcmbVOO>Wyp6s{!8wVo1N9>po61PH^Xh>a!`>@0#ZO$+MBih#-%EZJxZ0R&Bs>_I4! zR_wO!|-?ND9P0QmNV$_2I4Z}ezvyLN1kIubEzB4Tv3{S?6QY|hnzK*DQK@h_Yn zd(2UJY{&Sy&$z{W7BkypzoFJ=>e%);MdZ7-96F-(F5mfQuxnUCdcO*xIM;~=)&iL!*?l}6!>nIm7oN_-ko+oi5j zl*{RHH{hDfc<9+@mQ-E9%@WaIgZ`QnR>Ej|UhoTIS2D^X>A^-SR1)LyiBFXh+N|zu zeMobLkclc37RWbnJ)v{4-7t?UWuz(ZXdj?yC6)-SCeSOfRjx}NcjgH$*9cLd%qC$F z#nvQnsZzr%}uepw#qv$St4zcGu#)puacb|=io&WAbXdFZuj zMq8*ofon2snf5A_-L!LI^GlP40Gv#jOFiaOE>owZ>98b2eFG}P7yY(%xHssxo88@R zyH)v&tiaO2{(i5LBg>F)^(uMo2ukuG397-(LEmh)tp(5$Ca%~+>?%O#VE?dhHJ_Wq zN}do{ZFLXY&7sw64+dtZT`6e4=b)MpUkM`l3ht#xJU?igt?pjO8Vt?hywD9;A4-FE zDQWk6<>F1^_1E%yuKft4 zDT67u59rTR>{Vn7igI6iy}YwApDEH|gK$M^?<|Yx5g{8fK^&haKNK>8>--J?V zpHPeAt0&2eSrvj@kAs)gzr;eSusmiS7MvpMFQFa+xlGN&z~>bGyevg?BrafqELM$z z*L*BtYyLc~0c#za=*{F}kGkksjeB_Cf6dz;aIf|VlwIb#Ef!HH?orP1vKiU>6*A#G zEd+8H;simZmomdo@O~Z2Q%N9OvUFVeqL zu3X@g>6&nRAzd2T`yZ8#f8>B*qR-`O1EjRR7>oM3pB_41Fm-1(SQjTjGU;KV;IJnu zCp>N01+&?POC(dZn`0saHac35iw literal 0 HcmV?d00001 diff --git a/AppsChat/metadata/Chat/V1/SpaceSetup.php b/AppsChat/metadata/Chat/V1/SpaceSetup.php new file mode 100644 index 000000000000..69d661afdf88 --- /dev/null +++ b/AppsChat/metadata/Chat/V1/SpaceSetup.php @@ -0,0 +1,35 @@ +internalAddGeneratedFile( + ' +¤ + google/chat/v1/space_setup.protogoogle.chat.v1google/chat/v1/membership.protogoogle/chat/v1/space.proto" +SetUpSpaceRequest) +space ( 2.google.chat.v1.SpaceBàA + +request_id ( BàA4 + memberships ( 2.google.chat.v1.MembershipBàABš +com.google.chat.v1BSpaceSetupProtoPZ,cloud.google.com/go/chat/apiv1/chatpb;chatpbªGoogle.Apps.Chat.V1ÊGoogle\\Apps\\Chat\\V1êGoogle::Apps::Chat::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AppsChat/metadata/Chat/V1/User.php b/AppsChat/metadata/Chat/V1/User.php new file mode 100644 index 0000000000000000000000000000000000000000..8b5c899a36a39e0b662dccec09fd18483c81e0be GIT binary patch literal 1051 zcmZ`&-Hy^g7`4Fe%4D;_Y7BTauA9InYZ1L0L<7r@Tr3a;5;slA&<-$3=}e|m5;VMp z58$;=;4}CXUi%czw9sAMg`3i^=X}5CynW9X9K3)X;uC=-ap80g<$^#im}Cy~;53}g zh=2}Ta_SLbLD=lWUVjK%&F=8Iq6RD!4nc6v*xVy!XMtsTRVjyo0!LW@@bQua96JPd z28}Bsv5O_PI}yRYR0MlmsRH15I0)cK5y4jg)sKf$k2)}rSgOYv4JOp5l46g3QJvP{ z40{1l#Jkv8=sS`!A8JD1cSz|R#yK_ij59S^4enYP=wa2McGs6g_}H_XBya@fl8J$W zA~Yv5S&@#E&bMWCIy!@;xJQKUG+BdEgyeR02nCU$@T*bZI>9FSXWz4+I;VD<63=ar z1zu4m5W1P_CdoePN3y-py{u>zFW=Ga;C0tc=4`8bmy*tOpGELJ4GMb?ZJxxREUf`+ zRe839Vou9q+eWO3)1L;&=u4Z&Afx4xH=t3&fea^>2Mk7qEs3pz|vAV4wNxB@2W6ks>^d@}9l|nF#U( z$m(*Dlm^E2 zh2yc%O(1Mpp0n5+Y8lENdPRI%jUPW!k7F}fbRt;2Tg6lIk^si!d< lA^ia%O+aW|nI1-lds9rVb`h)ZmRR=+HA2R6+JFrJe*rJJLec;L literal 0 HcmV?d00001 diff --git a/AppsChat/metadata/Chat/V1/Widgets.php b/AppsChat/metadata/Chat/V1/Widgets.php new file mode 100644 index 0000000000000000000000000000000000000000..addbc96ed7ce38f820b649f3d017e2ecb71e2837 GIT binary patch literal 2649 zcmbtW%Wm6N5RLrMV{FSeOqwWaQZSDqPLarP(g&(EX(@@a2umVC(JE31ASmhDCPI+} zNu_m*?7Qx!AJA^vFDd#JU3cGoXD%hhNf5zky`emuGxyAynala&%kU(G+wwm5dE_K~ zEDulR#1#<;z;`A*4xJH~_l;VIC(hVOoWZ`p4C;s(^!FYEj65ff<*!pL z`~Wikh0~$uj^sFT5`5foW83xJ#C1IPd*u5>K61R6Bld0Iqp3ei+`yL!p!*}fb5BlV zlJA``!2F)ba~1}rjOh+EKjD$@c!LIyN0A#QL1dt7wTcNXgd)q%z1gu8&OMTMQjXQ? zTO^;zNi^kWPnYG0C)3D(EO=9Zmy2J5*@LId(M!1qMQY38*=ECa6c)nVSNkI zHMlr4*psQ3xSs3tQUPD(rOU8646ve;S%h@~IGbQrw8*&R&stW;R_zc z*v)jCe71B5UInhC+0a!e@Z|@v{f3En;WamFm@QaO?>j0);nrWPutp<=4Z*a!-n9?A zJwvT)O-*gE3png~MKg`I(p6c8{;TQwK}RtUSXs)!YVEMcuF;RWVzPo%fc1J?uOF}# z={l4!T2nJSilt%L?qR2H5HYI>;LvObcRKyY8XsErqsTt(R-lr&PN7330q)V`^ z_SLRs8>-pV&5mla%Tf^_HTG1+V(;NqP;9of{g!1brm6LnHe-~{%+^p1#k3Ahm2Fex zmTswSmZiwzr)}zb$F`msD!WLuv~FLsRCWnP%XJjPHnc8Vr6W5kCD3bW1}hP|bJ(^t zqpcz}9Un}h=z6n>6hELq$he2;Y>?S#>8Rfp!A!MhDTk(lISDOtIMiFcmTurd`!>pG zvAmRrHS{vsI)QtZj^wXUOiQaDs1{ozvt=qs?W)9Jv#&K&9kD2n!mbn9)PiMu#%|18 zwf1ucBwVH5Xsp`oYaELe#K?Sef8+(z@xm*Z>>dZ{X61w~E?4v+4~LJ_$L}kb(mkr8 zgkfBvWvbHO`*Us`49Gl4mn__}{$9C~x>u|8qFN + + + + src + + + src/V[!a-zA-Z]* + + + + + tests/Unit + + + diff --git a/AppsChat/samples/V1/ChatServiceClient/complete_import_space.php b/AppsChat/samples/V1/ChatServiceClient/complete_import_space.php new file mode 100644 index 000000000000..3a70907c0c48 --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/complete_import_space.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CompleteImportSpaceResponse $response */ + $response = $chatServiceClient->completeImportSpace($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ChatServiceClient::spaceName('[SPACE]'); + + complete_import_space_sample($formattedName); +} +// [END chat_v1_generated_ChatService_CompleteImportSpace_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/create_membership.php b/AppsChat/samples/V1/ChatServiceClient/create_membership.php new file mode 100644 index 000000000000..35d568d65268 --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/create_membership.php @@ -0,0 +1,99 @@ +setParent($formattedParent) + ->setMembership($membership); + + // Call the API and handle any network failures. + try { + /** @var Membership $response */ + $response = $chatServiceClient->createMembership($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ChatServiceClient::spaceName('[SPACE]'); + + create_membership_sample($formattedParent); +} +// [END chat_v1_generated_ChatService_CreateMembership_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/create_message.php b/AppsChat/samples/V1/ChatServiceClient/create_message.php new file mode 100644 index 000000000000..e3b75029111e --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/create_message.php @@ -0,0 +1,85 @@ +setParent($formattedParent) + ->setMessage($message); + + // Call the API and handle any network failures. + try { + /** @var Message $response */ + $response = $chatServiceClient->createMessage($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ChatServiceClient::spaceName('[SPACE]'); + + create_message_sample($formattedParent); +} +// [END chat_v1_generated_ChatService_CreateMessage_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/create_reaction.php b/AppsChat/samples/V1/ChatServiceClient/create_reaction.php new file mode 100644 index 000000000000..708a409cecff --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/create_reaction.php @@ -0,0 +1,80 @@ +setParent($formattedParent) + ->setReaction($reaction); + + // Call the API and handle any network failures. + try { + /** @var Reaction $response */ + $response = $chatServiceClient->createReaction($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ChatServiceClient::messageName('[SPACE]', '[MESSAGE]'); + + create_reaction_sample($formattedParent); +} +// [END chat_v1_generated_ChatService_CreateReaction_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/create_space.php b/AppsChat/samples/V1/ChatServiceClient/create_space.php new file mode 100644 index 000000000000..bd8d809c8ed3 --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/create_space.php @@ -0,0 +1,68 @@ +setSpace($space); + + // Call the API and handle any network failures. + try { + /** @var Space $response */ + $response = $chatServiceClient->createSpace($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END chat_v1_generated_ChatService_CreateSpace_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/delete_membership.php b/AppsChat/samples/V1/ChatServiceClient/delete_membership.php new file mode 100644 index 000000000000..cb6d26d75502 --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/delete_membership.php @@ -0,0 +1,89 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Membership $response */ + $response = $chatServiceClient->deleteMembership($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ChatServiceClient::membershipName('[SPACE]', '[MEMBER]'); + + delete_membership_sample($formattedName); +} +// [END chat_v1_generated_ChatService_DeleteMembership_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/delete_message.php b/AppsChat/samples/V1/ChatServiceClient/delete_message.php new file mode 100644 index 000000000000..4cba6f6cda36 --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/delete_message.php @@ -0,0 +1,88 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $chatServiceClient->deleteMessage($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 = ChatServiceClient::messageName('[SPACE]', '[MESSAGE]'); + + delete_message_sample($formattedName); +} +// [END chat_v1_generated_ChatService_DeleteMessage_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/delete_reaction.php b/AppsChat/samples/V1/ChatServiceClient/delete_reaction.php new file mode 100644 index 000000000000..ff8e837d34a5 --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/delete_reaction.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $chatServiceClient->deleteReaction($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 = ChatServiceClient::reactionName('[SPACE]', '[MESSAGE]', '[REACTION]'); + + delete_reaction_sample($formattedName); +} +// [END chat_v1_generated_ChatService_DeleteReaction_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/delete_space.php b/AppsChat/samples/V1/ChatServiceClient/delete_space.php new file mode 100644 index 000000000000..d5cb8b8e282c --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/delete_space.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $chatServiceClient->deleteSpace($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 = ChatServiceClient::spaceName('[SPACE]'); + + delete_space_sample($formattedName); +} +// [END chat_v1_generated_ChatService_DeleteSpace_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/find_direct_message.php b/AppsChat/samples/V1/ChatServiceClient/find_direct_message.php new file mode 100644 index 000000000000..db4dd111f3d3 --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/find_direct_message.php @@ -0,0 +1,100 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var Space $response */ + $response = $chatServiceClient->findDirectMessage($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + find_direct_message_sample($name); +} +// [END chat_v1_generated_ChatService_FindDirectMessage_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/get_attachment.php b/AppsChat/samples/V1/ChatServiceClient/get_attachment.php new file mode 100644 index 000000000000..85ee10dc3ee9 --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/get_attachment.php @@ -0,0 +1,79 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Attachment $response */ + $response = $chatServiceClient->getAttachment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ChatServiceClient::attachmentName('[SPACE]', '[MESSAGE]', '[ATTACHMENT]'); + + get_attachment_sample($formattedName); +} +// [END chat_v1_generated_ChatService_GetAttachment_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/get_membership.php b/AppsChat/samples/V1/ChatServiceClient/get_membership.php new file mode 100644 index 000000000000..9465db39e203 --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/get_membership.php @@ -0,0 +1,92 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Membership $response */ + $response = $chatServiceClient->getMembership($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ChatServiceClient::membershipName('[SPACE]', '[MEMBER]'); + + get_membership_sample($formattedName); +} +// [END chat_v1_generated_ChatService_GetMembership_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/get_message.php b/AppsChat/samples/V1/ChatServiceClient/get_message.php new file mode 100644 index 000000000000..b37e14eb6ae3 --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/get_message.php @@ -0,0 +1,90 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Message $response */ + $response = $chatServiceClient->getMessage($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ChatServiceClient::messageName('[SPACE]', '[MESSAGE]'); + + get_message_sample($formattedName); +} +// [END chat_v1_generated_ChatService_GetMessage_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/get_space.php b/AppsChat/samples/V1/ChatServiceClient/get_space.php new file mode 100644 index 000000000000..ab28f86398dc --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/get_space.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Space $response */ + $response = $chatServiceClient->getSpace($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ChatServiceClient::spaceName('[SPACE]'); + + get_space_sample($formattedName); +} +// [END chat_v1_generated_ChatService_GetSpace_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/list_memberships.php b/AppsChat/samples/V1/ChatServiceClient/list_memberships.php new file mode 100644 index 000000000000..2b1320f8efb4 --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/list_memberships.php @@ -0,0 +1,97 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $chatServiceClient->listMemberships($request); + + /** @var Membership $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ChatServiceClient::spaceName('[SPACE]'); + + list_memberships_sample($formattedParent); +} +// [END chat_v1_generated_ChatService_ListMemberships_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/list_messages.php b/AppsChat/samples/V1/ChatServiceClient/list_messages.php new file mode 100644 index 000000000000..ad08845a872f --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/list_messages.php @@ -0,0 +1,82 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $chatServiceClient->listMessages($request); + + /** @var Message $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ChatServiceClient::spaceName('[SPACE]'); + + list_messages_sample($formattedParent); +} +// [END chat_v1_generated_ChatService_ListMessages_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/list_reactions.php b/AppsChat/samples/V1/ChatServiceClient/list_reactions.php new file mode 100644 index 000000000000..316b53751c4d --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/list_reactions.php @@ -0,0 +1,82 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $chatServiceClient->listReactions($request); + + /** @var Reaction $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ChatServiceClient::messageName('[SPACE]', '[MESSAGE]'); + + list_reactions_sample($formattedParent); +} +// [END chat_v1_generated_ChatService_ListReactions_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/list_spaces.php b/AppsChat/samples/V1/ChatServiceClient/list_spaces.php new file mode 100644 index 000000000000..5dcafd1f2f21 --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/list_spaces.php @@ -0,0 +1,76 @@ +listSpaces($request); + + /** @var Space $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END chat_v1_generated_ChatService_ListSpaces_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/set_up_space.php b/AppsChat/samples/V1/ChatServiceClient/set_up_space.php new file mode 100644 index 000000000000..c78a70abfe24 --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/set_up_space.php @@ -0,0 +1,99 @@ +setSpace($space); + + // Call the API and handle any network failures. + try { + /** @var Space $response */ + $response = $chatServiceClient->setUpSpace($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END chat_v1_generated_ChatService_SetUpSpace_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/update_message.php b/AppsChat/samples/V1/ChatServiceClient/update_message.php new file mode 100644 index 000000000000..1f748c1d8a50 --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/update_message.php @@ -0,0 +1,74 @@ +setMessage($message); + + // Call the API and handle any network failures. + try { + /** @var Message $response */ + $response = $chatServiceClient->updateMessage($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END chat_v1_generated_ChatService_UpdateMessage_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/update_space.php b/AppsChat/samples/V1/ChatServiceClient/update_space.php new file mode 100644 index 000000000000..a50b3fcfbeff --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/update_space.php @@ -0,0 +1,68 @@ +setSpace($space); + + // Call the API and handle any network failures. + try { + /** @var Space $response */ + $response = $chatServiceClient->updateSpace($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END chat_v1_generated_ChatService_UpdateSpace_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/upload_attachment.php b/AppsChat/samples/V1/ChatServiceClient/upload_attachment.php new file mode 100644 index 000000000000..5312833b0722 --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/upload_attachment.php @@ -0,0 +1,83 @@ +setParent($formattedParent) + ->setFilename($filename); + + // Call the API and handle any network failures. + try { + /** @var UploadAttachmentResponse $response */ + $response = $chatServiceClient->uploadAttachment($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ChatServiceClient::spaceName('[SPACE]'); + $filename = '[FILENAME]'; + + upload_attachment_sample($formattedParent, $filename); +} +// [END chat_v1_generated_ChatService_UploadAttachment_sync] diff --git a/AppsChat/src/Card/V1/Action.php b/AppsChat/src/Card/V1/Action.php new file mode 100644 index 000000000000..b580ebad2ebc --- /dev/null +++ b/AppsChat/src/Card/V1/Action.php @@ -0,0 +1,331 @@ +google.apps.card.v1.Action + */ +class Action extends \Google\Protobuf\Internal\Message +{ + /** + * A custom function to invoke when the containing element is + * clicked or othrwise activated. + * For example usage, see [Read form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string function = 1; + */ + protected $function = ''; + /** + * List of action parameters. + * + * Generated from protobuf field repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + private $parameters; + /** + * Specifies the loading indicator that the action displays while + * making the call to the action. + * + * Generated from protobuf field .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; + */ + protected $load_indicator = 0; + /** + * Indicates whether form values persist after the action. The default value + * is `false`. + * If `true`, form values remain after the action is triggered. To let the + * user make changes while the action is being processed, set + * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) + * to `NONE`. For [card + * messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create) + * in Chat apps, you must also set the action's + * [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype) + * to `UPDATE_MESSAGE` and use the same + * [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId) + * from the card that contained the action. + * If `false`, the form values are cleared when the action is triggered. + * To prevent the user from making changes while the action is being + * processed, set + * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) + * to `SPINNER`. + * + * Generated from protobuf field bool persist_values = 4; + */ + protected $persist_values = false; + /** + * Optional. Required when opening a + * [dialog](https://developers.google.com/workspace/chat/dialogs). + * What to do in response to an interaction with a user, such as a user + * clicking a button in a card message. + * If unspecified, the app responds by executing an `action`—like opening a + * link or running a function—as normal. + * By specifying an `interaction`, the app can respond in special interactive + * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can + * open a [dialog](https://developers.google.com/workspace/chat/dialogs). When + * specified, a loading indicator isn't shown. If specified for + * an add-on, the entire card is stripped and nothing is shown in the client. + * [Google Chat apps](https://developers.google.com/workspace/chat): + * + * Generated from protobuf field .google.apps.card.v1.Action.Interaction interaction = 5; + */ + protected $interaction = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $function + * A custom function to invoke when the containing element is + * clicked or othrwise activated. + * For example usage, see [Read form + * data](https://developers.google.com/workspace/chat/read-form-data). + * @type array<\Google\Apps\Card\V1\Action\ActionParameter>|\Google\Protobuf\Internal\RepeatedField $parameters + * List of action parameters. + * @type int $load_indicator + * Specifies the loading indicator that the action displays while + * making the call to the action. + * @type bool $persist_values + * Indicates whether form values persist after the action. The default value + * is `false`. + * If `true`, form values remain after the action is triggered. To let the + * user make changes while the action is being processed, set + * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) + * to `NONE`. For [card + * messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create) + * in Chat apps, you must also set the action's + * [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype) + * to `UPDATE_MESSAGE` and use the same + * [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId) + * from the card that contained the action. + * If `false`, the form values are cleared when the action is triggered. + * To prevent the user from making changes while the action is being + * processed, set + * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) + * to `SPINNER`. + * @type int $interaction + * Optional. Required when opening a + * [dialog](https://developers.google.com/workspace/chat/dialogs). + * What to do in response to an interaction with a user, such as a user + * clicking a button in a card message. + * If unspecified, the app responds by executing an `action`—like opening a + * link or running a function—as normal. + * By specifying an `interaction`, the app can respond in special interactive + * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can + * open a [dialog](https://developers.google.com/workspace/chat/dialogs). When + * specified, a loading indicator isn't shown. If specified for + * an add-on, the entire card is stripped and nothing is shown in the client. + * [Google Chat apps](https://developers.google.com/workspace/chat): + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * A custom function to invoke when the containing element is + * clicked or othrwise activated. + * For example usage, see [Read form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string function = 1; + * @return string + */ + public function getFunction() + { + return $this->function; + } + + /** + * A custom function to invoke when the containing element is + * clicked or othrwise activated. + * For example usage, see [Read form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string function = 1; + * @param string $var + * @return $this + */ + public function setFunction($var) + { + GPBUtil::checkString($var, True); + $this->function = $var; + + return $this; + } + + /** + * List of action parameters. + * + * Generated from protobuf field repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getParameters() + { + return $this->parameters; + } + + /** + * List of action parameters. + * + * Generated from protobuf field repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + * @param array<\Google\Apps\Card\V1\Action\ActionParameter>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setParameters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Action\ActionParameter::class); + $this->parameters = $arr; + + return $this; + } + + /** + * Specifies the loading indicator that the action displays while + * making the call to the action. + * + * Generated from protobuf field .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; + * @return int + */ + public function getLoadIndicator() + { + return $this->load_indicator; + } + + /** + * Specifies the loading indicator that the action displays while + * making the call to the action. + * + * Generated from protobuf field .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; + * @param int $var + * @return $this + */ + public function setLoadIndicator($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Action\LoadIndicator::class); + $this->load_indicator = $var; + + return $this; + } + + /** + * Indicates whether form values persist after the action. The default value + * is `false`. + * If `true`, form values remain after the action is triggered. To let the + * user make changes while the action is being processed, set + * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) + * to `NONE`. For [card + * messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create) + * in Chat apps, you must also set the action's + * [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype) + * to `UPDATE_MESSAGE` and use the same + * [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId) + * from the card that contained the action. + * If `false`, the form values are cleared when the action is triggered. + * To prevent the user from making changes while the action is being + * processed, set + * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) + * to `SPINNER`. + * + * Generated from protobuf field bool persist_values = 4; + * @return bool + */ + public function getPersistValues() + { + return $this->persist_values; + } + + /** + * Indicates whether form values persist after the action. The default value + * is `false`. + * If `true`, form values remain after the action is triggered. To let the + * user make changes while the action is being processed, set + * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) + * to `NONE`. For [card + * messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create) + * in Chat apps, you must also set the action's + * [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype) + * to `UPDATE_MESSAGE` and use the same + * [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId) + * from the card that contained the action. + * If `false`, the form values are cleared when the action is triggered. + * To prevent the user from making changes while the action is being + * processed, set + * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) + * to `SPINNER`. + * + * Generated from protobuf field bool persist_values = 4; + * @param bool $var + * @return $this + */ + public function setPersistValues($var) + { + GPBUtil::checkBool($var); + $this->persist_values = $var; + + return $this; + } + + /** + * Optional. Required when opening a + * [dialog](https://developers.google.com/workspace/chat/dialogs). + * What to do in response to an interaction with a user, such as a user + * clicking a button in a card message. + * If unspecified, the app responds by executing an `action`—like opening a + * link or running a function—as normal. + * By specifying an `interaction`, the app can respond in special interactive + * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can + * open a [dialog](https://developers.google.com/workspace/chat/dialogs). When + * specified, a loading indicator isn't shown. If specified for + * an add-on, the entire card is stripped and nothing is shown in the client. + * [Google Chat apps](https://developers.google.com/workspace/chat): + * + * Generated from protobuf field .google.apps.card.v1.Action.Interaction interaction = 5; + * @return int + */ + public function getInteraction() + { + return $this->interaction; + } + + /** + * Optional. Required when opening a + * [dialog](https://developers.google.com/workspace/chat/dialogs). + * What to do in response to an interaction with a user, such as a user + * clicking a button in a card message. + * If unspecified, the app responds by executing an `action`—like opening a + * link or running a function—as normal. + * By specifying an `interaction`, the app can respond in special interactive + * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can + * open a [dialog](https://developers.google.com/workspace/chat/dialogs). When + * specified, a loading indicator isn't shown. If specified for + * an add-on, the entire card is stripped and nothing is shown in the client. + * [Google Chat apps](https://developers.google.com/workspace/chat): + * + * Generated from protobuf field .google.apps.card.v1.Action.Interaction interaction = 5; + * @param int $var + * @return $this + */ + public function setInteraction($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Action\Interaction::class); + $this->interaction = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Card/V1/Action/ActionParameter.php b/AppsChat/src/Card/V1/Action/ActionParameter.php new file mode 100644 index 000000000000..f9e28abd76d6 --- /dev/null +++ b/AppsChat/src/Card/V1/Action/ActionParameter.php @@ -0,0 +1,109 @@ +google.apps.card.v1.Action.ActionParameter + */ +class ActionParameter extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the parameter for the action script. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * The value of the parameter. + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * The name of the parameter for the action script. + * @type string $value + * The value of the parameter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The name of the parameter for the action script. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * The name of the parameter for the action script. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * The value of the parameter. + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The value of the parameter. + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + + diff --git a/AppsChat/src/Card/V1/Action/Interaction.php b/AppsChat/src/Card/V1/Action/Interaction.php new file mode 100644 index 000000000000..8e173f078cbe --- /dev/null +++ b/AppsChat/src/Card/V1/Action/Interaction.php @@ -0,0 +1,72 @@ +google.apps.card.v1.Action.Interaction + */ +class Interaction +{ + /** + * Default value. The `action` executes as normal. + * + * Generated from protobuf enum INTERACTION_UNSPECIFIED = 0; + */ + const INTERACTION_UNSPECIFIED = 0; + /** + * Opens a [dialog](https://developers.google.com/workspace/chat/dialogs), a + * windowed, card-based interface that Chat apps use to interact with users. + * Only supported by Chat apps in response to button-clicks on card + * messages. If specified for + * an add-on, the entire card is stripped and nothing is shown in the + * client. + * [Google Chat apps](https://developers.google.com/workspace/chat): + * + * Generated from protobuf enum OPEN_DIALOG = 1; + */ + const OPEN_DIALOG = 1; + + private static $valueToName = [ + self::INTERACTION_UNSPECIFIED => 'INTERACTION_UNSPECIFIED', + self::OPEN_DIALOG => 'OPEN_DIALOG', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Card/V1/Action/LoadIndicator.php b/AppsChat/src/Card/V1/Action/LoadIndicator.php new file mode 100644 index 000000000000..cfb8070bcfdb --- /dev/null +++ b/AppsChat/src/Card/V1/Action/LoadIndicator.php @@ -0,0 +1,58 @@ +google.apps.card.v1.Action.LoadIndicator + */ +class LoadIndicator +{ + /** + * Displays a spinner to indicate that content is loading. + * + * Generated from protobuf enum SPINNER = 0; + */ + const SPINNER = 0; + /** + * Nothing is displayed. + * + * Generated from protobuf enum NONE = 1; + */ + const NONE = 1; + + private static $valueToName = [ + self::SPINNER => 'SPINNER', + self::NONE => 'NONE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Card/V1/BorderStyle.php b/AppsChat/src/Card/V1/BorderStyle.php new file mode 100644 index 000000000000..4cf88c737048 --- /dev/null +++ b/AppsChat/src/Card/V1/BorderStyle.php @@ -0,0 +1,148 @@ +google.apps.card.v1.BorderStyle + */ +class BorderStyle extends \Google\Protobuf\Internal\Message +{ + /** + * The border type. + * + * Generated from protobuf field .google.apps.card.v1.BorderStyle.BorderType type = 1; + */ + protected $type = 0; + /** + * The colors to use when the type is `BORDER_TYPE_STROKE`. + * + * Generated from protobuf field .google.type.Color stroke_color = 2; + */ + protected $stroke_color = null; + /** + * The corner radius for the border. + * + * Generated from protobuf field int32 corner_radius = 3; + */ + protected $corner_radius = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * The border type. + * @type \Google\Type\Color $stroke_color + * The colors to use when the type is `BORDER_TYPE_STROKE`. + * @type int $corner_radius + * The corner radius for the border. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The border type. + * + * Generated from protobuf field .google.apps.card.v1.BorderStyle.BorderType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The border type. + * + * Generated from protobuf field .google.apps.card.v1.BorderStyle.BorderType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\BorderStyle\BorderType::class); + $this->type = $var; + + return $this; + } + + /** + * The colors to use when the type is `BORDER_TYPE_STROKE`. + * + * Generated from protobuf field .google.type.Color stroke_color = 2; + * @return \Google\Type\Color|null + */ + public function getStrokeColor() + { + return $this->stroke_color; + } + + public function hasStrokeColor() + { + return isset($this->stroke_color); + } + + public function clearStrokeColor() + { + unset($this->stroke_color); + } + + /** + * The colors to use when the type is `BORDER_TYPE_STROKE`. + * + * Generated from protobuf field .google.type.Color stroke_color = 2; + * @param \Google\Type\Color $var + * @return $this + */ + public function setStrokeColor($var) + { + GPBUtil::checkMessage($var, \Google\Type\Color::class); + $this->stroke_color = $var; + + return $this; + } + + /** + * The corner radius for the border. + * + * Generated from protobuf field int32 corner_radius = 3; + * @return int + */ + public function getCornerRadius() + { + return $this->corner_radius; + } + + /** + * The corner radius for the border. + * + * Generated from protobuf field int32 corner_radius = 3; + * @param int $var + * @return $this + */ + public function setCornerRadius($var) + { + GPBUtil::checkInt32($var); + $this->corner_radius = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Card/V1/BorderStyle/BorderType.php b/AppsChat/src/Card/V1/BorderStyle/BorderType.php new file mode 100644 index 000000000000..63f69e7726ec --- /dev/null +++ b/AppsChat/src/Card/V1/BorderStyle/BorderType.php @@ -0,0 +1,64 @@ +google.apps.card.v1.BorderStyle.BorderType + */ +class BorderType +{ + /** + * Don't use. Unspecified. + * + * Generated from protobuf enum BORDER_TYPE_UNSPECIFIED = 0; + */ + const BORDER_TYPE_UNSPECIFIED = 0; + /** + * Default value. No border. + * + * Generated from protobuf enum NO_BORDER = 1; + */ + const NO_BORDER = 1; + /** + * Outline. + * + * Generated from protobuf enum STROKE = 2; + */ + const STROKE = 2; + + private static $valueToName = [ + self::BORDER_TYPE_UNSPECIFIED => 'BORDER_TYPE_UNSPECIFIED', + self::NO_BORDER => 'NO_BORDER', + self::STROKE => 'STROKE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Card/V1/Button.php b/AppsChat/src/Card/V1/Button.php new file mode 100644 index 000000000000..8e966b18cf47 --- /dev/null +++ b/AppsChat/src/Card/V1/Button.php @@ -0,0 +1,400 @@ +google.apps.card.v1.Button + */ +class Button extends \Google\Protobuf\Internal\Message +{ + /** + * The text displayed inside the button. + * + * Generated from protobuf field string text = 1; + */ + protected $text = ''; + /** + * The icon image. If both `icon` and `text` are set, then the icon appears + * before the text. + * + * Generated from protobuf field .google.apps.card.v1.Icon icon = 2; + */ + protected $icon = null; + /** + * If set, the button is filled with a solid background color and the font + * color changes to maintain contrast with the background color. For example, + * setting a blue background likely results in white text. + * If unset, the image background is white and the font color is blue. + * For red, green, and blue, the value of each field is a `float` number that + * you can express in either of two ways: as a number between 0 and 255 + * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents + * the absence of a color and 1 or 255/255 represent the full presence of that + * color on the RGB scale. + * Optionally set `alpha`, which sets a level of transparency using this + * equation: + * ``` + * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + * ``` + * For `alpha`, a value of `1` corresponds with a solid color, and a value of + * `0` corresponds with a completely transparent color. + * For example, the following color represents a half transparent red: + * ``` + * "color": { + * "red": 1, + * "green": 0, + * "blue": 0, + * "alpha": 0.5 + * } + * ``` + * + * Generated from protobuf field .google.type.Color color = 3; + */ + protected $color = null; + /** + * Required. The action to perform when a user clicks the button, such as + * opening a hyperlink or running a custom function. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 4; + */ + protected $on_click = null; + /** + * If `true`, the button is displayed in an inactive state and doesn't respond + * to user actions. + * + * Generated from protobuf field bool disabled = 5; + */ + protected $disabled = false; + /** + * The alternative text that's used for accessibility. + * Set descriptive text that lets users know what the button does. For + * example, if a button opens a hyperlink, you might write: "Opens a new + * browser tab and navigates to the Google Chat developer documentation at + * https://developers.google.com/workspace/chat". + * + * Generated from protobuf field string alt_text = 6; + */ + protected $alt_text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * The text displayed inside the button. + * @type \Google\Apps\Card\V1\Icon $icon + * The icon image. If both `icon` and `text` are set, then the icon appears + * before the text. + * @type \Google\Type\Color $color + * If set, the button is filled with a solid background color and the font + * color changes to maintain contrast with the background color. For example, + * setting a blue background likely results in white text. + * If unset, the image background is white and the font color is blue. + * For red, green, and blue, the value of each field is a `float` number that + * you can express in either of two ways: as a number between 0 and 255 + * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents + * the absence of a color and 1 or 255/255 represent the full presence of that + * color on the RGB scale. + * Optionally set `alpha`, which sets a level of transparency using this + * equation: + * ``` + * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + * ``` + * For `alpha`, a value of `1` corresponds with a solid color, and a value of + * `0` corresponds with a completely transparent color. + * For example, the following color represents a half transparent red: + * ``` + * "color": { + * "red": 1, + * "green": 0, + * "blue": 0, + * "alpha": 0.5 + * } + * ``` + * @type \Google\Apps\Card\V1\OnClick $on_click + * Required. The action to perform when a user clicks the button, such as + * opening a hyperlink or running a custom function. + * @type bool $disabled + * If `true`, the button is displayed in an inactive state and doesn't respond + * to user actions. + * @type string $alt_text + * The alternative text that's used for accessibility. + * Set descriptive text that lets users know what the button does. For + * example, if a button opens a hyperlink, you might write: "Opens a new + * browser tab and navigates to the Google Chat developer documentation at + * https://developers.google.com/workspace/chat". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The text displayed inside the button. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * The text displayed inside the button. + * + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * The icon image. If both `icon` and `text` are set, then the icon appears + * before the text. + * + * Generated from protobuf field .google.apps.card.v1.Icon icon = 2; + * @return \Google\Apps\Card\V1\Icon|null + */ + public function getIcon() + { + return $this->icon; + } + + public function hasIcon() + { + return isset($this->icon); + } + + public function clearIcon() + { + unset($this->icon); + } + + /** + * The icon image. If both `icon` and `text` are set, then the icon appears + * before the text. + * + * Generated from protobuf field .google.apps.card.v1.Icon icon = 2; + * @param \Google\Apps\Card\V1\Icon $var + * @return $this + */ + public function setIcon($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Icon::class); + $this->icon = $var; + + return $this; + } + + /** + * If set, the button is filled with a solid background color and the font + * color changes to maintain contrast with the background color. For example, + * setting a blue background likely results in white text. + * If unset, the image background is white and the font color is blue. + * For red, green, and blue, the value of each field is a `float` number that + * you can express in either of two ways: as a number between 0 and 255 + * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents + * the absence of a color and 1 or 255/255 represent the full presence of that + * color on the RGB scale. + * Optionally set `alpha`, which sets a level of transparency using this + * equation: + * ``` + * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + * ``` + * For `alpha`, a value of `1` corresponds with a solid color, and a value of + * `0` corresponds with a completely transparent color. + * For example, the following color represents a half transparent red: + * ``` + * "color": { + * "red": 1, + * "green": 0, + * "blue": 0, + * "alpha": 0.5 + * } + * ``` + * + * Generated from protobuf field .google.type.Color color = 3; + * @return \Google\Type\Color|null + */ + public function getColor() + { + return $this->color; + } + + public function hasColor() + { + return isset($this->color); + } + + public function clearColor() + { + unset($this->color); + } + + /** + * If set, the button is filled with a solid background color and the font + * color changes to maintain contrast with the background color. For example, + * setting a blue background likely results in white text. + * If unset, the image background is white and the font color is blue. + * For red, green, and blue, the value of each field is a `float` number that + * you can express in either of two ways: as a number between 0 and 255 + * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents + * the absence of a color and 1 or 255/255 represent the full presence of that + * color on the RGB scale. + * Optionally set `alpha`, which sets a level of transparency using this + * equation: + * ``` + * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + * ``` + * For `alpha`, a value of `1` corresponds with a solid color, and a value of + * `0` corresponds with a completely transparent color. + * For example, the following color represents a half transparent red: + * ``` + * "color": { + * "red": 1, + * "green": 0, + * "blue": 0, + * "alpha": 0.5 + * } + * ``` + * + * Generated from protobuf field .google.type.Color color = 3; + * @param \Google\Type\Color $var + * @return $this + */ + public function setColor($var) + { + GPBUtil::checkMessage($var, \Google\Type\Color::class); + $this->color = $var; + + return $this; + } + + /** + * Required. The action to perform when a user clicks the button, such as + * opening a hyperlink or running a custom function. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 4; + * @return \Google\Apps\Card\V1\OnClick|null + */ + public function getOnClick() + { + return $this->on_click; + } + + public function hasOnClick() + { + return isset($this->on_click); + } + + public function clearOnClick() + { + unset($this->on_click); + } + + /** + * Required. The action to perform when a user clicks the button, such as + * opening a hyperlink or running a custom function. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 4; + * @param \Google\Apps\Card\V1\OnClick $var + * @return $this + */ + public function setOnClick($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\OnClick::class); + $this->on_click = $var; + + return $this; + } + + /** + * If `true`, the button is displayed in an inactive state and doesn't respond + * to user actions. + * + * Generated from protobuf field bool disabled = 5; + * @return bool + */ + public function getDisabled() + { + return $this->disabled; + } + + /** + * If `true`, the button is displayed in an inactive state and doesn't respond + * to user actions. + * + * Generated from protobuf field bool disabled = 5; + * @param bool $var + * @return $this + */ + public function setDisabled($var) + { + GPBUtil::checkBool($var); + $this->disabled = $var; + + return $this; + } + + /** + * The alternative text that's used for accessibility. + * Set descriptive text that lets users know what the button does. For + * example, if a button opens a hyperlink, you might write: "Opens a new + * browser tab and navigates to the Google Chat developer documentation at + * https://developers.google.com/workspace/chat". + * + * Generated from protobuf field string alt_text = 6; + * @return string + */ + public function getAltText() + { + return $this->alt_text; + } + + /** + * The alternative text that's used for accessibility. + * Set descriptive text that lets users know what the button does. For + * example, if a button opens a hyperlink, you might write: "Opens a new + * browser tab and navigates to the Google Chat developer documentation at + * https://developers.google.com/workspace/chat". + * + * Generated from protobuf field string alt_text = 6; + * @param string $var + * @return $this + */ + public function setAltText($var) + { + GPBUtil::checkString($var, True); + $this->alt_text = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Card/V1/ButtonList.php b/AppsChat/src/Card/V1/ButtonList.php new file mode 100644 index 000000000000..10b74b56debe --- /dev/null +++ b/AppsChat/src/Card/V1/ButtonList.php @@ -0,0 +1,72 @@ +google.apps.card.v1.ButtonList + */ +class ButtonList extends \Google\Protobuf\Internal\Message +{ + /** + * An array of buttons. + * + * Generated from protobuf field repeated .google.apps.card.v1.Button buttons = 1; + */ + private $buttons; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Apps\Card\V1\Button>|\Google\Protobuf\Internal\RepeatedField $buttons + * An array of buttons. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * An array of buttons. + * + * Generated from protobuf field repeated .google.apps.card.v1.Button buttons = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getButtons() + { + return $this->buttons; + } + + /** + * An array of buttons. + * + * Generated from protobuf field repeated .google.apps.card.v1.Button buttons = 1; + * @param array<\Google\Apps\Card\V1\Button>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setButtons($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Button::class); + $this->buttons = $arr; + + return $this; + } + +} + diff --git a/AppsChat/src/Card/V1/Card.php b/AppsChat/src/Card/V1/Card.php new file mode 100644 index 000000000000..75ffe057a2b8 --- /dev/null +++ b/AppsChat/src/Card/V1/Card.php @@ -0,0 +1,638 @@ +Online" + * } + * }, + * { + * "decoratedText": { + * "startIcon": { + * "knownIcon": "PHONE" + * }, + * "text": "+1 (555) 555-1234" + * } + * }, + * { + * "buttonList": { + * "buttons": [ + * { + * "text": "Share", + * "onClick": { + * "openLink": { + * "url": "https://example.com/share" + * } + * } + * }, + * { + * "text": "Edit", + * "onClick": { + * "action": { + * "function": "goToView", + * "parameters": [ + * { + * "key": "viewType", + * "value": "EDIT" + * } + * ] + * } + * } + * } + * ] + * } + * } + * ] + * } + * ] + * } + * } + * ] + * } + * ``` + * + * Generated from protobuf message google.apps.card.v1.Card + */ +class Card extends \Google\Protobuf\Internal\Message +{ + /** + * The header of the card. A header usually contains a leading image and a + * title. Headers always appear at the top of a card. + * + * Generated from protobuf field .google.apps.card.v1.Card.CardHeader header = 1; + */ + protected $header = null; + /** + * Contains a collection of widgets. Each section has its own, optional + * header. Sections are visually separated by a line divider. For an example + * in Google Chat apps, see [Define a section of a + * card](https://developers.google.com/workspace/chat/design-components-card-dialog#define_a_section_of_a_card). + * + * Generated from protobuf field repeated .google.apps.card.v1.Card.Section sections = 2; + */ + private $sections; + /** + * The divider style between sections. + * + * Generated from protobuf field .google.apps.card.v1.Card.DividerStyle section_divider_style = 9; + */ + protected $section_divider_style = 0; + /** + * The card's actions. Actions are added to the card's toolbar menu. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * For example, the following JSON constructs a card action menu with + * `Settings` and `Send Feedback` options: + * ``` + * "card_actions": [ + * { + * "actionLabel": "Settings", + * "onClick": { + * "action": { + * "functionName": "goToView", + * "parameters": [ + * { + * "key": "viewType", + * "value": "SETTING" + * } + * ], + * "loadIndicator": "LoadIndicator.SPINNER" + * } + * } + * }, + * { + * "actionLabel": "Send Feedback", + * "onClick": { + * "openLink": { + * "url": "https://example.com/feedback" + * } + * } + * } + * ] + * ``` + * + * Generated from protobuf field repeated .google.apps.card.v1.Card.CardAction card_actions = 3; + */ + private $card_actions; + /** + * Name of the card. Used as a card identifier in card navigation. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field string name = 4; + */ + protected $name = ''; + /** + * The fixed footer shown at the bottom of this card. + * Setting `fixedFooter` without specifying a `primaryButton` or a + * `secondaryButton` causes an error. For Chat apps, you can use fixed footers + * in + * [dialogs](https://developers.google.com/workspace/chat/dialogs), but not + * [card + * messages](https://developers.google.com/workspace/chat/create-messages#create). + * [Google Workspace Add-ons and Chat + * apps](https://developers.google.com/workspace/extend): + * + * Generated from protobuf field .google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5; + */ + protected $fixed_footer = null; + /** + * In Google Workspace Add-ons, sets the display properties of the + * `peekCardHeader`. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Card.DisplayStyle display_style = 6; + */ + protected $display_style = 0; + /** + * When displaying contextual content, the peek card header acts as a + * placeholder so that the user can navigate forward between the homepage + * cards and the contextual cards. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Card.CardHeader peek_card_header = 7; + */ + protected $peek_card_header = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Card\V1\Card\CardHeader $header + * The header of the card. A header usually contains a leading image and a + * title. Headers always appear at the top of a card. + * @type array<\Google\Apps\Card\V1\Card\Section>|\Google\Protobuf\Internal\RepeatedField $sections + * Contains a collection of widgets. Each section has its own, optional + * header. Sections are visually separated by a line divider. For an example + * in Google Chat apps, see [Define a section of a + * card](https://developers.google.com/workspace/chat/design-components-card-dialog#define_a_section_of_a_card). + * @type int $section_divider_style + * The divider style between sections. + * @type array<\Google\Apps\Card\V1\Card\CardAction>|\Google\Protobuf\Internal\RepeatedField $card_actions + * The card's actions. Actions are added to the card's toolbar menu. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * For example, the following JSON constructs a card action menu with + * `Settings` and `Send Feedback` options: + * ``` + * "card_actions": [ + * { + * "actionLabel": "Settings", + * "onClick": { + * "action": { + * "functionName": "goToView", + * "parameters": [ + * { + * "key": "viewType", + * "value": "SETTING" + * } + * ], + * "loadIndicator": "LoadIndicator.SPINNER" + * } + * } + * }, + * { + * "actionLabel": "Send Feedback", + * "onClick": { + * "openLink": { + * "url": "https://example.com/feedback" + * } + * } + * } + * ] + * ``` + * @type string $name + * Name of the card. Used as a card identifier in card navigation. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * @type \Google\Apps\Card\V1\Card\CardFixedFooter $fixed_footer + * The fixed footer shown at the bottom of this card. + * Setting `fixedFooter` without specifying a `primaryButton` or a + * `secondaryButton` causes an error. For Chat apps, you can use fixed footers + * in + * [dialogs](https://developers.google.com/workspace/chat/dialogs), but not + * [card + * messages](https://developers.google.com/workspace/chat/create-messages#create). + * [Google Workspace Add-ons and Chat + * apps](https://developers.google.com/workspace/extend): + * @type int $display_style + * In Google Workspace Add-ons, sets the display properties of the + * `peekCardHeader`. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * @type \Google\Apps\Card\V1\Card\CardHeader $peek_card_header + * When displaying contextual content, the peek card header acts as a + * placeholder so that the user can navigate forward between the homepage + * cards and the contextual cards. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The header of the card. A header usually contains a leading image and a + * title. Headers always appear at the top of a card. + * + * Generated from protobuf field .google.apps.card.v1.Card.CardHeader header = 1; + * @return \Google\Apps\Card\V1\Card\CardHeader|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * The header of the card. A header usually contains a leading image and a + * title. Headers always appear at the top of a card. + * + * Generated from protobuf field .google.apps.card.v1.Card.CardHeader header = 1; + * @param \Google\Apps\Card\V1\Card\CardHeader $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Card\CardHeader::class); + $this->header = $var; + + return $this; + } + + /** + * Contains a collection of widgets. Each section has its own, optional + * header. Sections are visually separated by a line divider. For an example + * in Google Chat apps, see [Define a section of a + * card](https://developers.google.com/workspace/chat/design-components-card-dialog#define_a_section_of_a_card). + * + * Generated from protobuf field repeated .google.apps.card.v1.Card.Section sections = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSections() + { + return $this->sections; + } + + /** + * Contains a collection of widgets. Each section has its own, optional + * header. Sections are visually separated by a line divider. For an example + * in Google Chat apps, see [Define a section of a + * card](https://developers.google.com/workspace/chat/design-components-card-dialog#define_a_section_of_a_card). + * + * Generated from protobuf field repeated .google.apps.card.v1.Card.Section sections = 2; + * @param array<\Google\Apps\Card\V1\Card\Section>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Card\Section::class); + $this->sections = $arr; + + return $this; + } + + /** + * The divider style between sections. + * + * Generated from protobuf field .google.apps.card.v1.Card.DividerStyle section_divider_style = 9; + * @return int + */ + public function getSectionDividerStyle() + { + return $this->section_divider_style; + } + + /** + * The divider style between sections. + * + * Generated from protobuf field .google.apps.card.v1.Card.DividerStyle section_divider_style = 9; + * @param int $var + * @return $this + */ + public function setSectionDividerStyle($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Card\DividerStyle::class); + $this->section_divider_style = $var; + + return $this; + } + + /** + * The card's actions. Actions are added to the card's toolbar menu. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * For example, the following JSON constructs a card action menu with + * `Settings` and `Send Feedback` options: + * ``` + * "card_actions": [ + * { + * "actionLabel": "Settings", + * "onClick": { + * "action": { + * "functionName": "goToView", + * "parameters": [ + * { + * "key": "viewType", + * "value": "SETTING" + * } + * ], + * "loadIndicator": "LoadIndicator.SPINNER" + * } + * } + * }, + * { + * "actionLabel": "Send Feedback", + * "onClick": { + * "openLink": { + * "url": "https://example.com/feedback" + * } + * } + * } + * ] + * ``` + * + * Generated from protobuf field repeated .google.apps.card.v1.Card.CardAction card_actions = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCardActions() + { + return $this->card_actions; + } + + /** + * The card's actions. Actions are added to the card's toolbar menu. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * For example, the following JSON constructs a card action menu with + * `Settings` and `Send Feedback` options: + * ``` + * "card_actions": [ + * { + * "actionLabel": "Settings", + * "onClick": { + * "action": { + * "functionName": "goToView", + * "parameters": [ + * { + * "key": "viewType", + * "value": "SETTING" + * } + * ], + * "loadIndicator": "LoadIndicator.SPINNER" + * } + * } + * }, + * { + * "actionLabel": "Send Feedback", + * "onClick": { + * "openLink": { + * "url": "https://example.com/feedback" + * } + * } + * } + * ] + * ``` + * + * Generated from protobuf field repeated .google.apps.card.v1.Card.CardAction card_actions = 3; + * @param array<\Google\Apps\Card\V1\Card\CardAction>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCardActions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Card\CardAction::class); + $this->card_actions = $arr; + + return $this; + } + + /** + * Name of the card. Used as a card identifier in card navigation. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field string name = 4; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the card. Used as a card identifier in card navigation. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field string name = 4; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The fixed footer shown at the bottom of this card. + * Setting `fixedFooter` without specifying a `primaryButton` or a + * `secondaryButton` causes an error. For Chat apps, you can use fixed footers + * in + * [dialogs](https://developers.google.com/workspace/chat/dialogs), but not + * [card + * messages](https://developers.google.com/workspace/chat/create-messages#create). + * [Google Workspace Add-ons and Chat + * apps](https://developers.google.com/workspace/extend): + * + * Generated from protobuf field .google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5; + * @return \Google\Apps\Card\V1\Card\CardFixedFooter|null + */ + public function getFixedFooter() + { + return $this->fixed_footer; + } + + public function hasFixedFooter() + { + return isset($this->fixed_footer); + } + + public function clearFixedFooter() + { + unset($this->fixed_footer); + } + + /** + * The fixed footer shown at the bottom of this card. + * Setting `fixedFooter` without specifying a `primaryButton` or a + * `secondaryButton` causes an error. For Chat apps, you can use fixed footers + * in + * [dialogs](https://developers.google.com/workspace/chat/dialogs), but not + * [card + * messages](https://developers.google.com/workspace/chat/create-messages#create). + * [Google Workspace Add-ons and Chat + * apps](https://developers.google.com/workspace/extend): + * + * Generated from protobuf field .google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5; + * @param \Google\Apps\Card\V1\Card\CardFixedFooter $var + * @return $this + */ + public function setFixedFooter($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Card\CardFixedFooter::class); + $this->fixed_footer = $var; + + return $this; + } + + /** + * In Google Workspace Add-ons, sets the display properties of the + * `peekCardHeader`. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Card.DisplayStyle display_style = 6; + * @return int + */ + public function getDisplayStyle() + { + return $this->display_style; + } + + /** + * In Google Workspace Add-ons, sets the display properties of the + * `peekCardHeader`. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Card.DisplayStyle display_style = 6; + * @param int $var + * @return $this + */ + public function setDisplayStyle($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Card\DisplayStyle::class); + $this->display_style = $var; + + return $this; + } + + /** + * When displaying contextual content, the peek card header acts as a + * placeholder so that the user can navigate forward between the homepage + * cards and the contextual cards. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Card.CardHeader peek_card_header = 7; + * @return \Google\Apps\Card\V1\Card\CardHeader|null + */ + public function getPeekCardHeader() + { + return $this->peek_card_header; + } + + public function hasPeekCardHeader() + { + return isset($this->peek_card_header); + } + + public function clearPeekCardHeader() + { + unset($this->peek_card_header); + } + + /** + * When displaying contextual content, the peek card header acts as a + * placeholder so that the user can navigate forward between the homepage + * cards and the contextual cards. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Card.CardHeader peek_card_header = 7; + * @param \Google\Apps\Card\V1\Card\CardHeader $var + * @return $this + */ + public function setPeekCardHeader($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Card\CardHeader::class); + $this->peek_card_header = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Card/V1/Card/CardAction.php b/AppsChat/src/Card/V1/Card/CardAction.php new file mode 100644 index 000000000000..42ec91741486 --- /dev/null +++ b/AppsChat/src/Card/V1/Card/CardAction.php @@ -0,0 +1,116 @@ +google.apps.card.v1.Card.CardAction + */ +class CardAction extends \Google\Protobuf\Internal\Message +{ + /** + * The label that displays as the action menu item. + * + * Generated from protobuf field string action_label = 1; + */ + protected $action_label = ''; + /** + * The `onClick` action for this action item. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 2; + */ + protected $on_click = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $action_label + * The label that displays as the action menu item. + * @type \Google\Apps\Card\V1\OnClick $on_click + * The `onClick` action for this action item. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The label that displays as the action menu item. + * + * Generated from protobuf field string action_label = 1; + * @return string + */ + public function getActionLabel() + { + return $this->action_label; + } + + /** + * The label that displays as the action menu item. + * + * Generated from protobuf field string action_label = 1; + * @param string $var + * @return $this + */ + public function setActionLabel($var) + { + GPBUtil::checkString($var, True); + $this->action_label = $var; + + return $this; + } + + /** + * The `onClick` action for this action item. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 2; + * @return \Google\Apps\Card\V1\OnClick|null + */ + public function getOnClick() + { + return $this->on_click; + } + + public function hasOnClick() + { + return isset($this->on_click); + } + + public function clearOnClick() + { + unset($this->on_click); + } + + /** + * The `onClick` action for this action item. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 2; + * @param \Google\Apps\Card\V1\OnClick $var + * @return $this + */ + public function setOnClick($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\OnClick::class); + $this->on_click = $var; + + return $this; + } + +} + + diff --git a/AppsChat/src/Card/V1/Card/CardFixedFooter.php b/AppsChat/src/Card/V1/Card/CardFixedFooter.php new file mode 100644 index 000000000000..7cd59d1a1fd3 --- /dev/null +++ b/AppsChat/src/Card/V1/Card/CardFixedFooter.php @@ -0,0 +1,144 @@ +google.apps.card.v1.Card.CardFixedFooter + */ +class CardFixedFooter extends \Google\Protobuf\Internal\Message +{ + /** + * The primary button of the fixed footer. The button must be a text button + * with text and color set. + * + * Generated from protobuf field .google.apps.card.v1.Button primary_button = 1; + */ + protected $primary_button = null; + /** + * The secondary button of the fixed footer. The button must be a text + * button with text and color set. + * If `secondaryButton` is set, you must also set `primaryButton`. + * + * Generated from protobuf field .google.apps.card.v1.Button secondary_button = 2; + */ + protected $secondary_button = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Card\V1\Button $primary_button + * The primary button of the fixed footer. The button must be a text button + * with text and color set. + * @type \Google\Apps\Card\V1\Button $secondary_button + * The secondary button of the fixed footer. The button must be a text + * button with text and color set. + * If `secondaryButton` is set, you must also set `primaryButton`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The primary button of the fixed footer. The button must be a text button + * with text and color set. + * + * Generated from protobuf field .google.apps.card.v1.Button primary_button = 1; + * @return \Google\Apps\Card\V1\Button|null + */ + public function getPrimaryButton() + { + return $this->primary_button; + } + + public function hasPrimaryButton() + { + return isset($this->primary_button); + } + + public function clearPrimaryButton() + { + unset($this->primary_button); + } + + /** + * The primary button of the fixed footer. The button must be a text button + * with text and color set. + * + * Generated from protobuf field .google.apps.card.v1.Button primary_button = 1; + * @param \Google\Apps\Card\V1\Button $var + * @return $this + */ + public function setPrimaryButton($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Button::class); + $this->primary_button = $var; + + return $this; + } + + /** + * The secondary button of the fixed footer. The button must be a text + * button with text and color set. + * If `secondaryButton` is set, you must also set `primaryButton`. + * + * Generated from protobuf field .google.apps.card.v1.Button secondary_button = 2; + * @return \Google\Apps\Card\V1\Button|null + */ + public function getSecondaryButton() + { + return $this->secondary_button; + } + + public function hasSecondaryButton() + { + return isset($this->secondary_button); + } + + public function clearSecondaryButton() + { + unset($this->secondary_button); + } + + /** + * The secondary button of the fixed footer. The button must be a text + * button with text and color set. + * If `secondaryButton` is set, you must also set `primaryButton`. + * + * Generated from protobuf field .google.apps.card.v1.Button secondary_button = 2; + * @param \Google\Apps\Card\V1\Button $var + * @return $this + */ + public function setSecondaryButton($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Button::class); + $this->secondary_button = $var; + + return $this; + } + +} + + diff --git a/AppsChat/src/Card/V1/Card/CardHeader.php b/AppsChat/src/Card/V1/Card/CardHeader.php new file mode 100644 index 000000000000..37724de78a3f --- /dev/null +++ b/AppsChat/src/Card/V1/Card/CardHeader.php @@ -0,0 +1,231 @@ +google.apps.card.v1.Card.CardHeader + */ +class CardHeader extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The title of the card header. + * The header has a fixed height: if both a + * title and subtitle are specified, each takes up one line. If only the + * title is specified, it takes up both lines. + * + * Generated from protobuf field string title = 1; + */ + protected $title = ''; + /** + * The subtitle of the card header. If specified, appears on its own line + * below the `title`. + * + * Generated from protobuf field string subtitle = 2; + */ + protected $subtitle = ''; + /** + * The shape used to crop the image. + * [Google Workspace Add-ons and Chat + * apps](https://developers.google.com/workspace/extend): + * + * Generated from protobuf field .google.apps.card.v1.Widget.ImageType image_type = 3; + */ + protected $image_type = 0; + /** + * The HTTPS URL of the image in the card header. + * + * Generated from protobuf field string image_url = 4; + */ + protected $image_url = ''; + /** + * The alternative text of this image that's used for accessibility. + * + * Generated from protobuf field string image_alt_text = 5; + */ + protected $image_alt_text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $title + * Required. The title of the card header. + * The header has a fixed height: if both a + * title and subtitle are specified, each takes up one line. If only the + * title is specified, it takes up both lines. + * @type string $subtitle + * The subtitle of the card header. If specified, appears on its own line + * below the `title`. + * @type int $image_type + * The shape used to crop the image. + * [Google Workspace Add-ons and Chat + * apps](https://developers.google.com/workspace/extend): + * @type string $image_url + * The HTTPS URL of the image in the card header. + * @type string $image_alt_text + * The alternative text of this image that's used for accessibility. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * Required. The title of the card header. + * The header has a fixed height: if both a + * title and subtitle are specified, each takes up one line. If only the + * title is specified, it takes up both lines. + * + * Generated from protobuf field string title = 1; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Required. The title of the card header. + * The header has a fixed height: if both a + * title and subtitle are specified, each takes up one line. If only the + * title is specified, it takes up both lines. + * + * Generated from protobuf field string title = 1; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * The subtitle of the card header. If specified, appears on its own line + * below the `title`. + * + * Generated from protobuf field string subtitle = 2; + * @return string + */ + public function getSubtitle() + { + return $this->subtitle; + } + + /** + * The subtitle of the card header. If specified, appears on its own line + * below the `title`. + * + * Generated from protobuf field string subtitle = 2; + * @param string $var + * @return $this + */ + public function setSubtitle($var) + { + GPBUtil::checkString($var, True); + $this->subtitle = $var; + + return $this; + } + + /** + * The shape used to crop the image. + * [Google Workspace Add-ons and Chat + * apps](https://developers.google.com/workspace/extend): + * + * Generated from protobuf field .google.apps.card.v1.Widget.ImageType image_type = 3; + * @return int + */ + public function getImageType() + { + return $this->image_type; + } + + /** + * The shape used to crop the image. + * [Google Workspace Add-ons and Chat + * apps](https://developers.google.com/workspace/extend): + * + * Generated from protobuf field .google.apps.card.v1.Widget.ImageType image_type = 3; + * @param int $var + * @return $this + */ + public function setImageType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Widget\ImageType::class); + $this->image_type = $var; + + return $this; + } + + /** + * The HTTPS URL of the image in the card header. + * + * Generated from protobuf field string image_url = 4; + * @return string + */ + public function getImageUrl() + { + return $this->image_url; + } + + /** + * The HTTPS URL of the image in the card header. + * + * Generated from protobuf field string image_url = 4; + * @param string $var + * @return $this + */ + public function setImageUrl($var) + { + GPBUtil::checkString($var, True); + $this->image_url = $var; + + return $this; + } + + /** + * The alternative text of this image that's used for accessibility. + * + * Generated from protobuf field string image_alt_text = 5; + * @return string + */ + public function getImageAltText() + { + return $this->image_alt_text; + } + + /** + * The alternative text of this image that's used for accessibility. + * + * Generated from protobuf field string image_alt_text = 5; + * @param string $var + * @return $this + */ + public function setImageAltText($var) + { + GPBUtil::checkString($var, True); + $this->image_alt_text = $var; + + return $this; + } + +} + + diff --git a/AppsChat/src/Card/V1/Card/DisplayStyle.php b/AppsChat/src/Card/V1/Card/DisplayStyle.php new file mode 100644 index 000000000000..c2c07bc46cd2 --- /dev/null +++ b/AppsChat/src/Card/V1/Card/DisplayStyle.php @@ -0,0 +1,69 @@ +google.apps.card.v1.Card.DisplayStyle + */ +class DisplayStyle +{ + /** + * Don't use. Unspecified. + * + * Generated from protobuf enum DISPLAY_STYLE_UNSPECIFIED = 0; + */ + const DISPLAY_STYLE_UNSPECIFIED = 0; + /** + * The header of the card appears at the bottom of the + * sidebar, partially covering the current top card of the stack. Clicking + * the header pops the card into the card stack. If the card has no header, + * a generated header is used instead. + * + * Generated from protobuf enum PEEK = 1; + */ + const PEEK = 1; + /** + * Default value. The card is shown by replacing the view of the top card in + * the card stack. + * + * Generated from protobuf enum REPLACE = 2; + */ + const REPLACE = 2; + + private static $valueToName = [ + self::DISPLAY_STYLE_UNSPECIFIED => 'DISPLAY_STYLE_UNSPECIFIED', + self::PEEK => 'PEEK', + self::REPLACE => 'REPLACE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Card/V1/Card/DividerStyle.php b/AppsChat/src/Card/V1/Card/DividerStyle.php new file mode 100644 index 000000000000..666a0ada0063 --- /dev/null +++ b/AppsChat/src/Card/V1/Card/DividerStyle.php @@ -0,0 +1,65 @@ +google.apps.card.v1.Card.DividerStyle + */ +class DividerStyle +{ + /** + * Don't use. Unspecified. + * + * Generated from protobuf enum DIVIDER_STYLE_UNSPECIFIED = 0; + */ + const DIVIDER_STYLE_UNSPECIFIED = 0; + /** + * Default option. Render a solid divider between sections. + * + * Generated from protobuf enum SOLID_DIVIDER = 1; + */ + const SOLID_DIVIDER = 1; + /** + * If set, no divider is rendered between sections. + * + * Generated from protobuf enum NO_DIVIDER = 2; + */ + const NO_DIVIDER = 2; + + private static $valueToName = [ + self::DIVIDER_STYLE_UNSPECIFIED => 'DIVIDER_STYLE_UNSPECIFIED', + self::SOLID_DIVIDER => 'SOLID_DIVIDER', + self::NO_DIVIDER => 'NO_DIVIDER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Card/V1/Card/Section.php b/AppsChat/src/Card/V1/Card/Section.php new file mode 100644 index 000000000000..67f9538f92b0 --- /dev/null +++ b/AppsChat/src/Card/V1/Card/Section.php @@ -0,0 +1,253 @@ +google.apps.card.v1.Card.Section + */ +class Section extends \Google\Protobuf\Internal\Message +{ + /** + * Text that appears at the top of a section. + * Supports simple HTML formatted text. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string header = 1; + */ + protected $header = ''; + /** + * All the widgets in the section. + * Must contain at least one widget. + * + * Generated from protobuf field repeated .google.apps.card.v1.Widget widgets = 2; + */ + private $widgets; + /** + * Indicates whether this section is collapsible. + * Collapsible sections hide some or all widgets, but users can expand the + * section to reveal the hidden widgets by clicking **Show more**. Users + * can hide the widgets again by clicking **Show less**. + * To determine which widgets are hidden, specify + * `uncollapsibleWidgetsCount`. + * + * Generated from protobuf field bool collapsible = 5; + */ + protected $collapsible = false; + /** + * The number of uncollapsible widgets which remain visible even when a + * section is collapsed. + * For example, when a section + * contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, + * the first two widgets are always shown and the last three are collapsed + * by default. The `uncollapsibleWidgetsCount` is taken into account only + * when `collapsible` is `true`. + * + * Generated from protobuf field int32 uncollapsible_widgets_count = 6; + */ + protected $uncollapsible_widgets_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $header + * Text that appears at the top of a section. + * Supports simple HTML formatted text. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * @type array<\Google\Apps\Card\V1\Widget>|\Google\Protobuf\Internal\RepeatedField $widgets + * All the widgets in the section. + * Must contain at least one widget. + * @type bool $collapsible + * Indicates whether this section is collapsible. + * Collapsible sections hide some or all widgets, but users can expand the + * section to reveal the hidden widgets by clicking **Show more**. Users + * can hide the widgets again by clicking **Show less**. + * To determine which widgets are hidden, specify + * `uncollapsibleWidgetsCount`. + * @type int $uncollapsible_widgets_count + * The number of uncollapsible widgets which remain visible even when a + * section is collapsed. + * For example, when a section + * contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, + * the first two widgets are always shown and the last three are collapsed + * by default. The `uncollapsibleWidgetsCount` is taken into account only + * when `collapsible` is `true`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * Text that appears at the top of a section. + * Supports simple HTML formatted text. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string header = 1; + * @return string + */ + public function getHeader() + { + return $this->header; + } + + /** + * Text that appears at the top of a section. + * Supports simple HTML formatted text. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string header = 1; + * @param string $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkString($var, True); + $this->header = $var; + + return $this; + } + + /** + * All the widgets in the section. + * Must contain at least one widget. + * + * Generated from protobuf field repeated .google.apps.card.v1.Widget widgets = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWidgets() + { + return $this->widgets; + } + + /** + * All the widgets in the section. + * Must contain at least one widget. + * + * Generated from protobuf field repeated .google.apps.card.v1.Widget widgets = 2; + * @param array<\Google\Apps\Card\V1\Widget>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWidgets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Widget::class); + $this->widgets = $arr; + + return $this; + } + + /** + * Indicates whether this section is collapsible. + * Collapsible sections hide some or all widgets, but users can expand the + * section to reveal the hidden widgets by clicking **Show more**. Users + * can hide the widgets again by clicking **Show less**. + * To determine which widgets are hidden, specify + * `uncollapsibleWidgetsCount`. + * + * Generated from protobuf field bool collapsible = 5; + * @return bool + */ + public function getCollapsible() + { + return $this->collapsible; + } + + /** + * Indicates whether this section is collapsible. + * Collapsible sections hide some or all widgets, but users can expand the + * section to reveal the hidden widgets by clicking **Show more**. Users + * can hide the widgets again by clicking **Show less**. + * To determine which widgets are hidden, specify + * `uncollapsibleWidgetsCount`. + * + * Generated from protobuf field bool collapsible = 5; + * @param bool $var + * @return $this + */ + public function setCollapsible($var) + { + GPBUtil::checkBool($var); + $this->collapsible = $var; + + return $this; + } + + /** + * The number of uncollapsible widgets which remain visible even when a + * section is collapsed. + * For example, when a section + * contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, + * the first two widgets are always shown and the last three are collapsed + * by default. The `uncollapsibleWidgetsCount` is taken into account only + * when `collapsible` is `true`. + * + * Generated from protobuf field int32 uncollapsible_widgets_count = 6; + * @return int + */ + public function getUncollapsibleWidgetsCount() + { + return $this->uncollapsible_widgets_count; + } + + /** + * The number of uncollapsible widgets which remain visible even when a + * section is collapsed. + * For example, when a section + * contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, + * the first two widgets are always shown and the last three are collapsed + * by default. The `uncollapsibleWidgetsCount` is taken into account only + * when `collapsible` is `true`. + * + * Generated from protobuf field int32 uncollapsible_widgets_count = 6; + * @param int $var + * @return $this + */ + public function setUncollapsibleWidgetsCount($var) + { + GPBUtil::checkInt32($var); + $this->uncollapsible_widgets_count = $var; + + return $this; + } + +} + + diff --git a/AppsChat/src/Card/V1/Columns.php b/AppsChat/src/Card/V1/Columns.php new file mode 100644 index 000000000000..f2e8cff1b175 --- /dev/null +++ b/AppsChat/src/Card/V1/Columns.php @@ -0,0 +1,91 @@ +google.apps.card.v1.Columns + */ +class Columns extends \Google\Protobuf\Internal\Message +{ + /** + * An array of columns. You can include up to 2 columns in a card or dialog. + * + * Generated from protobuf field repeated .google.apps.card.v1.Columns.Column column_items = 2; + */ + private $column_items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Apps\Card\V1\Columns\Column>|\Google\Protobuf\Internal\RepeatedField $column_items + * An array of columns. You can include up to 2 columns in a card or dialog. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * An array of columns. You can include up to 2 columns in a card or dialog. + * + * Generated from protobuf field repeated .google.apps.card.v1.Columns.Column column_items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getColumnItems() + { + return $this->column_items; + } + + /** + * An array of columns. You can include up to 2 columns in a card or dialog. + * + * Generated from protobuf field repeated .google.apps.card.v1.Columns.Column column_items = 2; + * @param array<\Google\Apps\Card\V1\Columns\Column>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setColumnItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Columns\Column::class); + $this->column_items = $arr; + + return $this; + } + +} + diff --git a/AppsChat/src/Card/V1/Columns/Column.php b/AppsChat/src/Card/V1/Columns/Column.php new file mode 100644 index 000000000000..e53399f551df --- /dev/null +++ b/AppsChat/src/Card/V1/Columns/Column.php @@ -0,0 +1,186 @@ +google.apps.card.v1.Columns.Column + */ +class Column extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies how a column fills the width of the card. + * + * Generated from protobuf field .google.apps.card.v1.Columns.Column.HorizontalSizeStyle horizontal_size_style = 1; + */ + protected $horizontal_size_style = 0; + /** + * Specifies whether widgets align to the left, right, or center of a + * column. + * + * Generated from protobuf field .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 2; + */ + protected $horizontal_alignment = 0; + /** + * Specifies whether widgets align to the top, bottom, or center of a + * column. + * + * Generated from protobuf field .google.apps.card.v1.Columns.Column.VerticalAlignment vertical_alignment = 3; + */ + protected $vertical_alignment = 0; + /** + * An array of widgets included in a column. Widgets appear in the order + * that they are specified. + * + * Generated from protobuf field repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4; + */ + private $widgets; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $horizontal_size_style + * Specifies how a column fills the width of the card. + * @type int $horizontal_alignment + * Specifies whether widgets align to the left, right, or center of a + * column. + * @type int $vertical_alignment + * Specifies whether widgets align to the top, bottom, or center of a + * column. + * @type array<\Google\Apps\Card\V1\Columns\Column\Widgets>|\Google\Protobuf\Internal\RepeatedField $widgets + * An array of widgets included in a column. Widgets appear in the order + * that they are specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * Specifies how a column fills the width of the card. + * + * Generated from protobuf field .google.apps.card.v1.Columns.Column.HorizontalSizeStyle horizontal_size_style = 1; + * @return int + */ + public function getHorizontalSizeStyle() + { + return $this->horizontal_size_style; + } + + /** + * Specifies how a column fills the width of the card. + * + * Generated from protobuf field .google.apps.card.v1.Columns.Column.HorizontalSizeStyle horizontal_size_style = 1; + * @param int $var + * @return $this + */ + public function setHorizontalSizeStyle($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Columns\Column\HorizontalSizeStyle::class); + $this->horizontal_size_style = $var; + + return $this; + } + + /** + * Specifies whether widgets align to the left, right, or center of a + * column. + * + * Generated from protobuf field .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 2; + * @return int + */ + public function getHorizontalAlignment() + { + return $this->horizontal_alignment; + } + + /** + * Specifies whether widgets align to the left, right, or center of a + * column. + * + * Generated from protobuf field .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 2; + * @param int $var + * @return $this + */ + public function setHorizontalAlignment($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Widget\HorizontalAlignment::class); + $this->horizontal_alignment = $var; + + return $this; + } + + /** + * Specifies whether widgets align to the top, bottom, or center of a + * column. + * + * Generated from protobuf field .google.apps.card.v1.Columns.Column.VerticalAlignment vertical_alignment = 3; + * @return int + */ + public function getVerticalAlignment() + { + return $this->vertical_alignment; + } + + /** + * Specifies whether widgets align to the top, bottom, or center of a + * column. + * + * Generated from protobuf field .google.apps.card.v1.Columns.Column.VerticalAlignment vertical_alignment = 3; + * @param int $var + * @return $this + */ + public function setVerticalAlignment($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Columns\Column\VerticalAlignment::class); + $this->vertical_alignment = $var; + + return $this; + } + + /** + * An array of widgets included in a column. Widgets appear in the order + * that they are specified. + * + * Generated from protobuf field repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWidgets() + { + return $this->widgets; + } + + /** + * An array of widgets included in a column. Widgets appear in the order + * that they are specified. + * + * Generated from protobuf field repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4; + * @param array<\Google\Apps\Card\V1\Columns\Column\Widgets>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWidgets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Columns\Column\Widgets::class); + $this->widgets = $arr; + + return $this; + } + +} + + diff --git a/AppsChat/src/Card/V1/Columns/Column/HorizontalSizeStyle.php b/AppsChat/src/Card/V1/Columns/Column/HorizontalSizeStyle.php new file mode 100644 index 000000000000..a09691dc7bb8 --- /dev/null +++ b/AppsChat/src/Card/V1/Columns/Column/HorizontalSizeStyle.php @@ -0,0 +1,71 @@ +google.apps.card.v1.Columns.Column.HorizontalSizeStyle + */ +class HorizontalSizeStyle +{ + /** + * Don't use. Unspecified. + * + * Generated from protobuf enum HORIZONTAL_SIZE_STYLE_UNSPECIFIED = 0; + */ + const HORIZONTAL_SIZE_STYLE_UNSPECIFIED = 0; + /** + * Default value. Column fills the available space, up to 70% of the + * card's width. If both columns are set to `FILL_AVAILABLE_SPACE`, each + * column fills 50% of the space. + * + * Generated from protobuf enum FILL_AVAILABLE_SPACE = 1; + */ + const FILL_AVAILABLE_SPACE = 1; + /** + * Column fills the least amount of space possible and no more than 30% of + * the card's width. + * + * Generated from protobuf enum FILL_MINIMUM_SPACE = 2; + */ + const FILL_MINIMUM_SPACE = 2; + + private static $valueToName = [ + self::HORIZONTAL_SIZE_STYLE_UNSPECIFIED => 'HORIZONTAL_SIZE_STYLE_UNSPECIFIED', + self::FILL_AVAILABLE_SPACE => 'FILL_AVAILABLE_SPACE', + self::FILL_MINIMUM_SPACE => 'FILL_MINIMUM_SPACE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Card/V1/Columns/Column/VerticalAlignment.php b/AppsChat/src/Card/V1/Columns/Column/VerticalAlignment.php new file mode 100644 index 000000000000..5418be763e9b --- /dev/null +++ b/AppsChat/src/Card/V1/Columns/Column/VerticalAlignment.php @@ -0,0 +1,74 @@ +google.apps.card.v1.Columns.Column.VerticalAlignment + */ +class VerticalAlignment +{ + /** + * Don't use. Unspecified. + * + * Generated from protobuf enum VERTICAL_ALIGNMENT_UNSPECIFIED = 0; + */ + const VERTICAL_ALIGNMENT_UNSPECIFIED = 0; + /** + * Default value. Aligns widgets to the center of a column. + * + * Generated from protobuf enum CENTER = 1; + */ + const CENTER = 1; + /** + * Aligns widgets to the top of a column. + * + * Generated from protobuf enum TOP = 2; + */ + const TOP = 2; + /** + * Aligns widgets to the bottom of a column. + * + * Generated from protobuf enum BOTTOM = 3; + */ + const BOTTOM = 3; + + private static $valueToName = [ + self::VERTICAL_ALIGNMENT_UNSPECIFIED => 'VERTICAL_ALIGNMENT_UNSPECIFIED', + self::CENTER => 'CENTER', + self::TOP => 'TOP', + self::BOTTOM => 'BOTTOM', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Card/V1/Columns/Column/Widgets.php b/AppsChat/src/Card/V1/Columns/Column/Widgets.php new file mode 100644 index 000000000000..c543b1b57682 --- /dev/null +++ b/AppsChat/src/Card/V1/Columns/Column/Widgets.php @@ -0,0 +1,278 @@ +google.apps.card.v1.Columns.Column.Widgets + */ +class Widgets extends \Google\Protobuf\Internal\Message +{ + protected $data; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Card\V1\TextParagraph $text_paragraph + * [TextParagraph][google.apps.card.v1.TextParagraph] widget. + * @type \Google\Apps\Card\V1\Image $image + * [Image][google.apps.card.v1.Image] widget. + * @type \Google\Apps\Card\V1\DecoratedText $decorated_text + * [DecoratedText][google.apps.card.v1.DecoratedText] widget. + * @type \Google\Apps\Card\V1\ButtonList $button_list + * [ButtonList][google.apps.card.v1.ButtonList] widget. + * @type \Google\Apps\Card\V1\TextInput $text_input + * [TextInput][google.apps.card.v1.TextInput] widget. + * @type \Google\Apps\Card\V1\SelectionInput $selection_input + * [SelectionInput][google.apps.card.v1.SelectionInput] widget. + * @type \Google\Apps\Card\V1\DateTimePicker $date_time_picker + * [DateTimePicker][google.apps.card.v1.DateTimePicker] widget. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * [TextParagraph][google.apps.card.v1.TextParagraph] widget. + * + * Generated from protobuf field .google.apps.card.v1.TextParagraph text_paragraph = 1; + * @return \Google\Apps\Card\V1\TextParagraph|null + */ + public function getTextParagraph() + { + return $this->readOneof(1); + } + + public function hasTextParagraph() + { + return $this->hasOneof(1); + } + + /** + * [TextParagraph][google.apps.card.v1.TextParagraph] widget. + * + * Generated from protobuf field .google.apps.card.v1.TextParagraph text_paragraph = 1; + * @param \Google\Apps\Card\V1\TextParagraph $var + * @return $this + */ + public function setTextParagraph($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\TextParagraph::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * [Image][google.apps.card.v1.Image] widget. + * + * Generated from protobuf field .google.apps.card.v1.Image image = 2; + * @return \Google\Apps\Card\V1\Image|null + */ + public function getImage() + { + return $this->readOneof(2); + } + + public function hasImage() + { + return $this->hasOneof(2); + } + + /** + * [Image][google.apps.card.v1.Image] widget. + * + * Generated from protobuf field .google.apps.card.v1.Image image = 2; + * @param \Google\Apps\Card\V1\Image $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Image::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * [DecoratedText][google.apps.card.v1.DecoratedText] widget. + * + * Generated from protobuf field .google.apps.card.v1.DecoratedText decorated_text = 3; + * @return \Google\Apps\Card\V1\DecoratedText|null + */ + public function getDecoratedText() + { + return $this->readOneof(3); + } + + public function hasDecoratedText() + { + return $this->hasOneof(3); + } + + /** + * [DecoratedText][google.apps.card.v1.DecoratedText] widget. + * + * Generated from protobuf field .google.apps.card.v1.DecoratedText decorated_text = 3; + * @param \Google\Apps\Card\V1\DecoratedText $var + * @return $this + */ + public function setDecoratedText($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\DecoratedText::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * [ButtonList][google.apps.card.v1.ButtonList] widget. + * + * Generated from protobuf field .google.apps.card.v1.ButtonList button_list = 4; + * @return \Google\Apps\Card\V1\ButtonList|null + */ + public function getButtonList() + { + return $this->readOneof(4); + } + + public function hasButtonList() + { + return $this->hasOneof(4); + } + + /** + * [ButtonList][google.apps.card.v1.ButtonList] widget. + * + * Generated from protobuf field .google.apps.card.v1.ButtonList button_list = 4; + * @param \Google\Apps\Card\V1\ButtonList $var + * @return $this + */ + public function setButtonList($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\ButtonList::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * [TextInput][google.apps.card.v1.TextInput] widget. + * + * Generated from protobuf field .google.apps.card.v1.TextInput text_input = 5; + * @return \Google\Apps\Card\V1\TextInput|null + */ + public function getTextInput() + { + return $this->readOneof(5); + } + + public function hasTextInput() + { + return $this->hasOneof(5); + } + + /** + * [TextInput][google.apps.card.v1.TextInput] widget. + * + * Generated from protobuf field .google.apps.card.v1.TextInput text_input = 5; + * @param \Google\Apps\Card\V1\TextInput $var + * @return $this + */ + public function setTextInput($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\TextInput::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * [SelectionInput][google.apps.card.v1.SelectionInput] widget. + * + * Generated from protobuf field .google.apps.card.v1.SelectionInput selection_input = 6; + * @return \Google\Apps\Card\V1\SelectionInput|null + */ + public function getSelectionInput() + { + return $this->readOneof(6); + } + + public function hasSelectionInput() + { + return $this->hasOneof(6); + } + + /** + * [SelectionInput][google.apps.card.v1.SelectionInput] widget. + * + * Generated from protobuf field .google.apps.card.v1.SelectionInput selection_input = 6; + * @param \Google\Apps\Card\V1\SelectionInput $var + * @return $this + */ + public function setSelectionInput($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\SelectionInput::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * [DateTimePicker][google.apps.card.v1.DateTimePicker] widget. + * + * Generated from protobuf field .google.apps.card.v1.DateTimePicker date_time_picker = 7; + * @return \Google\Apps\Card\V1\DateTimePicker|null + */ + public function getDateTimePicker() + { + return $this->readOneof(7); + } + + public function hasDateTimePicker() + { + return $this->hasOneof(7); + } + + /** + * [DateTimePicker][google.apps.card.v1.DateTimePicker] widget. + * + * Generated from protobuf field .google.apps.card.v1.DateTimePicker date_time_picker = 7; + * @param \Google\Apps\Card\V1\DateTimePicker $var + * @return $this + */ + public function setDateTimePicker($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\DateTimePicker::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * @return string + */ + public function getData() + { + return $this->whichOneof("data"); + } + +} + + diff --git a/AppsChat/src/Card/V1/DateTimePicker.php b/AppsChat/src/Card/V1/DateTimePicker.php new file mode 100644 index 000000000000..324bcac7ae7c --- /dev/null +++ b/AppsChat/src/Card/V1/DateTimePicker.php @@ -0,0 +1,314 @@ +google.apps.card.v1.DateTimePicker + */ +class DateTimePicker extends \Google\Protobuf\Internal\Message +{ + /** + * The name by which the `DateTimePicker` is identified in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The text that prompts users to input a date, a time, or a date and time. + * For example, if users are scheduling an appointment, use a label such as + * `Appointment date` or `Appointment date and time`. + * + * Generated from protobuf field string label = 2; + */ + protected $label = ''; + /** + * Whether the widget supports inputting a date, a time, or the date and time. + * + * Generated from protobuf field .google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3; + */ + protected $type = 0; + /** + * The default value displayed in the widget, in milliseconds since [Unix + * epoch time](https://en.wikipedia.org/wiki/Unix_time). + * Specify the value based on the type of picker (`DateTimePickerType`): + * * `DATE_AND_TIME`: a calendar date and time in UTC. For example, to + * represent January 1, 2023 at 12:00 PM UTC, use `1672574400000`. + * * `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example, to represent + * January 1, 2023, use `1672531200000`. + * * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use + * `43200000` (or `12 * 60 * 60 * 1000`). + * + * Generated from protobuf field int64 value_ms_epoch = 4; + */ + protected $value_ms_epoch = 0; + /** + * The number representing the time zone offset from UTC, in minutes. + * If set, the `value_ms_epoch` is displayed in the specified time zone. + * If unset, the value defaults to the user's time zone setting. + * + * Generated from protobuf field int32 timezone_offset_date = 5; + */ + protected $timezone_offset_date = 0; + /** + * Triggered when the user clicks **Save** or **Clear** from the + * `DateTimePicker` interface. + * + * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 6; + */ + protected $on_change_action = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name by which the `DateTimePicker` is identified in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * @type string $label + * The text that prompts users to input a date, a time, or a date and time. + * For example, if users are scheduling an appointment, use a label such as + * `Appointment date` or `Appointment date and time`. + * @type int $type + * Whether the widget supports inputting a date, a time, or the date and time. + * @type int|string $value_ms_epoch + * The default value displayed in the widget, in milliseconds since [Unix + * epoch time](https://en.wikipedia.org/wiki/Unix_time). + * Specify the value based on the type of picker (`DateTimePickerType`): + * * `DATE_AND_TIME`: a calendar date and time in UTC. For example, to + * represent January 1, 2023 at 12:00 PM UTC, use `1672574400000`. + * * `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example, to represent + * January 1, 2023, use `1672531200000`. + * * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use + * `43200000` (or `12 * 60 * 60 * 1000`). + * @type int $timezone_offset_date + * The number representing the time zone offset from UTC, in minutes. + * If set, the `value_ms_epoch` is displayed in the specified time zone. + * If unset, the value defaults to the user's time zone setting. + * @type \Google\Apps\Card\V1\Action $on_change_action + * Triggered when the user clicks **Save** or **Clear** from the + * `DateTimePicker` interface. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The name by which the `DateTimePicker` is identified in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name by which the `DateTimePicker` is identified in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The text that prompts users to input a date, a time, or a date and time. + * For example, if users are scheduling an appointment, use a label such as + * `Appointment date` or `Appointment date and time`. + * + * Generated from protobuf field string label = 2; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * The text that prompts users to input a date, a time, or a date and time. + * For example, if users are scheduling an appointment, use a label such as + * `Appointment date` or `Appointment date and time`. + * + * Generated from protobuf field string label = 2; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * Whether the widget supports inputting a date, a time, or the date and time. + * + * Generated from protobuf field .google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Whether the widget supports inputting a date, a time, or the date and time. + * + * Generated from protobuf field .google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\DateTimePicker\DateTimePickerType::class); + $this->type = $var; + + return $this; + } + + /** + * The default value displayed in the widget, in milliseconds since [Unix + * epoch time](https://en.wikipedia.org/wiki/Unix_time). + * Specify the value based on the type of picker (`DateTimePickerType`): + * * `DATE_AND_TIME`: a calendar date and time in UTC. For example, to + * represent January 1, 2023 at 12:00 PM UTC, use `1672574400000`. + * * `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example, to represent + * January 1, 2023, use `1672531200000`. + * * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use + * `43200000` (or `12 * 60 * 60 * 1000`). + * + * Generated from protobuf field int64 value_ms_epoch = 4; + * @return int|string + */ + public function getValueMsEpoch() + { + return $this->value_ms_epoch; + } + + /** + * The default value displayed in the widget, in milliseconds since [Unix + * epoch time](https://en.wikipedia.org/wiki/Unix_time). + * Specify the value based on the type of picker (`DateTimePickerType`): + * * `DATE_AND_TIME`: a calendar date and time in UTC. For example, to + * represent January 1, 2023 at 12:00 PM UTC, use `1672574400000`. + * * `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example, to represent + * January 1, 2023, use `1672531200000`. + * * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use + * `43200000` (or `12 * 60 * 60 * 1000`). + * + * Generated from protobuf field int64 value_ms_epoch = 4; + * @param int|string $var + * @return $this + */ + public function setValueMsEpoch($var) + { + GPBUtil::checkInt64($var); + $this->value_ms_epoch = $var; + + return $this; + } + + /** + * The number representing the time zone offset from UTC, in minutes. + * If set, the `value_ms_epoch` is displayed in the specified time zone. + * If unset, the value defaults to the user's time zone setting. + * + * Generated from protobuf field int32 timezone_offset_date = 5; + * @return int + */ + public function getTimezoneOffsetDate() + { + return $this->timezone_offset_date; + } + + /** + * The number representing the time zone offset from UTC, in minutes. + * If set, the `value_ms_epoch` is displayed in the specified time zone. + * If unset, the value defaults to the user's time zone setting. + * + * Generated from protobuf field int32 timezone_offset_date = 5; + * @param int $var + * @return $this + */ + public function setTimezoneOffsetDate($var) + { + GPBUtil::checkInt32($var); + $this->timezone_offset_date = $var; + + return $this; + } + + /** + * Triggered when the user clicks **Save** or **Clear** from the + * `DateTimePicker` interface. + * + * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 6; + * @return \Google\Apps\Card\V1\Action|null + */ + public function getOnChangeAction() + { + return $this->on_change_action; + } + + public function hasOnChangeAction() + { + return isset($this->on_change_action); + } + + public function clearOnChangeAction() + { + unset($this->on_change_action); + } + + /** + * Triggered when the user clicks **Save** or **Clear** from the + * `DateTimePicker` interface. + * + * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 6; + * @param \Google\Apps\Card\V1\Action $var + * @return $this + */ + public function setOnChangeAction($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Action::class); + $this->on_change_action = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Card/V1/DateTimePicker/DateTimePickerType.php b/AppsChat/src/Card/V1/DateTimePicker/DateTimePickerType.php new file mode 100644 index 000000000000..63b03d361218 --- /dev/null +++ b/AppsChat/src/Card/V1/DateTimePicker/DateTimePickerType.php @@ -0,0 +1,65 @@ +google.apps.card.v1.DateTimePicker.DateTimePickerType + */ +class DateTimePickerType +{ + /** + * Users input a date and time. + * + * Generated from protobuf enum DATE_AND_TIME = 0; + */ + const DATE_AND_TIME = 0; + /** + * Users input a date. + * + * Generated from protobuf enum DATE_ONLY = 1; + */ + const DATE_ONLY = 1; + /** + * Users input a time. + * + * Generated from protobuf enum TIME_ONLY = 2; + */ + const TIME_ONLY = 2; + + private static $valueToName = [ + self::DATE_AND_TIME => 'DATE_AND_TIME', + self::DATE_ONLY => 'DATE_ONLY', + self::TIME_ONLY => 'TIME_ONLY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Card/V1/DecoratedText.php b/AppsChat/src/Card/V1/DecoratedText.php new file mode 100644 index 000000000000..b8526ef893b8 --- /dev/null +++ b/AppsChat/src/Card/V1/DecoratedText.php @@ -0,0 +1,480 @@ +google.apps.card.v1.DecoratedText + */ +class DecoratedText extends \Google\Protobuf\Internal\Message +{ + /** + * Deprecated in favor of `startIcon`. + * + * Generated from protobuf field .google.apps.card.v1.Icon icon = 1 [deprecated = true]; + * @deprecated + */ + protected $icon = null; + /** + * The icon displayed in front of the text. + * + * Generated from protobuf field .google.apps.card.v1.Icon start_icon = 12; + */ + protected $start_icon = null; + /** + * The text that appears above `text`. Always truncates. + * + * Generated from protobuf field string top_label = 3; + */ + protected $top_label = ''; + /** + * Required. The primary text. + * Supports simple formatting. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string text = 4; + */ + protected $text = ''; + /** + * The wrap text setting. If `true`, the text wraps and displays on + * multiple lines. Otherwise, the text is truncated. + * Only applies to `text`, not `topLabel` and `bottomLabel`. + * + * Generated from protobuf field bool wrap_text = 5; + */ + protected $wrap_text = false; + /** + * The text that appears below `text`. Always wraps. + * + * Generated from protobuf field string bottom_label = 6; + */ + protected $bottom_label = ''; + /** + * This action is triggered when users click `topLabel` or `bottomLabel`. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 7; + */ + protected $on_click = null; + protected $control; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Card\V1\Icon $icon + * Deprecated in favor of `startIcon`. + * @type \Google\Apps\Card\V1\Icon $start_icon + * The icon displayed in front of the text. + * @type string $top_label + * The text that appears above `text`. Always truncates. + * @type string $text + * Required. The primary text. + * Supports simple formatting. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * @type bool $wrap_text + * The wrap text setting. If `true`, the text wraps and displays on + * multiple lines. Otherwise, the text is truncated. + * Only applies to `text`, not `topLabel` and `bottomLabel`. + * @type string $bottom_label + * The text that appears below `text`. Always wraps. + * @type \Google\Apps\Card\V1\OnClick $on_click + * This action is triggered when users click `topLabel` or `bottomLabel`. + * @type \Google\Apps\Card\V1\Button $button + * A button that a user can click to trigger an action. + * @type \Google\Apps\Card\V1\DecoratedText\SwitchControl $switch_control + * A switch widget that a user can click to change its state and trigger an + * action. + * @type \Google\Apps\Card\V1\Icon $end_icon + * An icon displayed after the text. + * Supports + * [built-in](https://developers.google.com/workspace/chat/format-messages#builtinicons) + * and + * [custom](https://developers.google.com/workspace/chat/format-messages#customicons) + * icons. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * Deprecated in favor of `startIcon`. + * + * Generated from protobuf field .google.apps.card.v1.Icon icon = 1 [deprecated = true]; + * @return \Google\Apps\Card\V1\Icon|null + * @deprecated + */ + public function getIcon() + { + @trigger_error('icon is deprecated.', E_USER_DEPRECATED); + return $this->icon; + } + + public function hasIcon() + { + @trigger_error('icon is deprecated.', E_USER_DEPRECATED); + return isset($this->icon); + } + + public function clearIcon() + { + @trigger_error('icon is deprecated.', E_USER_DEPRECATED); + unset($this->icon); + } + + /** + * Deprecated in favor of `startIcon`. + * + * Generated from protobuf field .google.apps.card.v1.Icon icon = 1 [deprecated = true]; + * @param \Google\Apps\Card\V1\Icon $var + * @return $this + * @deprecated + */ + public function setIcon($var) + { + @trigger_error('icon is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Icon::class); + $this->icon = $var; + + return $this; + } + + /** + * The icon displayed in front of the text. + * + * Generated from protobuf field .google.apps.card.v1.Icon start_icon = 12; + * @return \Google\Apps\Card\V1\Icon|null + */ + public function getStartIcon() + { + return $this->start_icon; + } + + public function hasStartIcon() + { + return isset($this->start_icon); + } + + public function clearStartIcon() + { + unset($this->start_icon); + } + + /** + * The icon displayed in front of the text. + * + * Generated from protobuf field .google.apps.card.v1.Icon start_icon = 12; + * @param \Google\Apps\Card\V1\Icon $var + * @return $this + */ + public function setStartIcon($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Icon::class); + $this->start_icon = $var; + + return $this; + } + + /** + * The text that appears above `text`. Always truncates. + * + * Generated from protobuf field string top_label = 3; + * @return string + */ + public function getTopLabel() + { + return $this->top_label; + } + + /** + * The text that appears above `text`. Always truncates. + * + * Generated from protobuf field string top_label = 3; + * @param string $var + * @return $this + */ + public function setTopLabel($var) + { + GPBUtil::checkString($var, True); + $this->top_label = $var; + + return $this; + } + + /** + * Required. The primary text. + * Supports simple formatting. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string text = 4; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Required. The primary text. + * Supports simple formatting. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string text = 4; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * The wrap text setting. If `true`, the text wraps and displays on + * multiple lines. Otherwise, the text is truncated. + * Only applies to `text`, not `topLabel` and `bottomLabel`. + * + * Generated from protobuf field bool wrap_text = 5; + * @return bool + */ + public function getWrapText() + { + return $this->wrap_text; + } + + /** + * The wrap text setting. If `true`, the text wraps and displays on + * multiple lines. Otherwise, the text is truncated. + * Only applies to `text`, not `topLabel` and `bottomLabel`. + * + * Generated from protobuf field bool wrap_text = 5; + * @param bool $var + * @return $this + */ + public function setWrapText($var) + { + GPBUtil::checkBool($var); + $this->wrap_text = $var; + + return $this; + } + + /** + * The text that appears below `text`. Always wraps. + * + * Generated from protobuf field string bottom_label = 6; + * @return string + */ + public function getBottomLabel() + { + return $this->bottom_label; + } + + /** + * The text that appears below `text`. Always wraps. + * + * Generated from protobuf field string bottom_label = 6; + * @param string $var + * @return $this + */ + public function setBottomLabel($var) + { + GPBUtil::checkString($var, True); + $this->bottom_label = $var; + + return $this; + } + + /** + * This action is triggered when users click `topLabel` or `bottomLabel`. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 7; + * @return \Google\Apps\Card\V1\OnClick|null + */ + public function getOnClick() + { + return $this->on_click; + } + + public function hasOnClick() + { + return isset($this->on_click); + } + + public function clearOnClick() + { + unset($this->on_click); + } + + /** + * This action is triggered when users click `topLabel` or `bottomLabel`. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 7; + * @param \Google\Apps\Card\V1\OnClick $var + * @return $this + */ + public function setOnClick($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\OnClick::class); + $this->on_click = $var; + + return $this; + } + + /** + * A button that a user can click to trigger an action. + * + * Generated from protobuf field .google.apps.card.v1.Button button = 8; + * @return \Google\Apps\Card\V1\Button|null + */ + public function getButton() + { + return $this->readOneof(8); + } + + public function hasButton() + { + return $this->hasOneof(8); + } + + /** + * A button that a user can click to trigger an action. + * + * Generated from protobuf field .google.apps.card.v1.Button button = 8; + * @param \Google\Apps\Card\V1\Button $var + * @return $this + */ + public function setButton($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Button::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * A switch widget that a user can click to change its state and trigger an + * action. + * + * Generated from protobuf field .google.apps.card.v1.DecoratedText.SwitchControl switch_control = 9; + * @return \Google\Apps\Card\V1\DecoratedText\SwitchControl|null + */ + public function getSwitchControl() + { + return $this->readOneof(9); + } + + public function hasSwitchControl() + { + return $this->hasOneof(9); + } + + /** + * A switch widget that a user can click to change its state and trigger an + * action. + * + * Generated from protobuf field .google.apps.card.v1.DecoratedText.SwitchControl switch_control = 9; + * @param \Google\Apps\Card\V1\DecoratedText\SwitchControl $var + * @return $this + */ + public function setSwitchControl($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\DecoratedText\SwitchControl::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * An icon displayed after the text. + * Supports + * [built-in](https://developers.google.com/workspace/chat/format-messages#builtinicons) + * and + * [custom](https://developers.google.com/workspace/chat/format-messages#customicons) + * icons. + * + * Generated from protobuf field .google.apps.card.v1.Icon end_icon = 11; + * @return \Google\Apps\Card\V1\Icon|null + */ + public function getEndIcon() + { + return $this->readOneof(11); + } + + public function hasEndIcon() + { + return $this->hasOneof(11); + } + + /** + * An icon displayed after the text. + * Supports + * [built-in](https://developers.google.com/workspace/chat/format-messages#builtinicons) + * and + * [custom](https://developers.google.com/workspace/chat/format-messages#customicons) + * icons. + * + * Generated from protobuf field .google.apps.card.v1.Icon end_icon = 11; + * @param \Google\Apps\Card\V1\Icon $var + * @return $this + */ + public function setEndIcon($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Icon::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * @return string + */ + public function getControl() + { + return $this->whichOneof("control"); + } + +} + diff --git a/AppsChat/src/Card/V1/DecoratedText/SwitchControl.php b/AppsChat/src/Card/V1/DecoratedText/SwitchControl.php new file mode 100644 index 000000000000..36934fcc38aa --- /dev/null +++ b/AppsChat/src/Card/V1/DecoratedText/SwitchControl.php @@ -0,0 +1,245 @@ +google.apps.card.v1.DecoratedText.SwitchControl + */ +class SwitchControl extends \Google\Protobuf\Internal\Message +{ + /** + * The name by which the switch widget is identified in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The value entered by a user, returned as part of a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + /** + * When `true`, the switch is selected. + * + * Generated from protobuf field bool selected = 3; + */ + protected $selected = false; + /** + * The action to perform when the switch state is changed, such as what + * function to run. + * + * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 4; + */ + protected $on_change_action = null; + /** + * How the switch appears in the user interface. + * [Google Workspace Add-ons + * and Chat apps](https://developers.google.com/workspace/extend): + * + * Generated from protobuf field .google.apps.card.v1.DecoratedText.SwitchControl.ControlType control_type = 5; + */ + protected $control_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name by which the switch widget is identified in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * @type string $value + * The value entered by a user, returned as part of a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * @type bool $selected + * When `true`, the switch is selected. + * @type \Google\Apps\Card\V1\Action $on_change_action + * The action to perform when the switch state is changed, such as what + * function to run. + * @type int $control_type + * How the switch appears in the user interface. + * [Google Workspace Add-ons + * and Chat apps](https://developers.google.com/workspace/extend): + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The name by which the switch widget is identified in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name by which the switch widget is identified in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The value entered by a user, returned as part of a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The value entered by a user, returned as part of a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + + /** + * When `true`, the switch is selected. + * + * Generated from protobuf field bool selected = 3; + * @return bool + */ + public function getSelected() + { + return $this->selected; + } + + /** + * When `true`, the switch is selected. + * + * Generated from protobuf field bool selected = 3; + * @param bool $var + * @return $this + */ + public function setSelected($var) + { + GPBUtil::checkBool($var); + $this->selected = $var; + + return $this; + } + + /** + * The action to perform when the switch state is changed, such as what + * function to run. + * + * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 4; + * @return \Google\Apps\Card\V1\Action|null + */ + public function getOnChangeAction() + { + return $this->on_change_action; + } + + public function hasOnChangeAction() + { + return isset($this->on_change_action); + } + + public function clearOnChangeAction() + { + unset($this->on_change_action); + } + + /** + * The action to perform when the switch state is changed, such as what + * function to run. + * + * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 4; + * @param \Google\Apps\Card\V1\Action $var + * @return $this + */ + public function setOnChangeAction($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Action::class); + $this->on_change_action = $var; + + return $this; + } + + /** + * How the switch appears in the user interface. + * [Google Workspace Add-ons + * and Chat apps](https://developers.google.com/workspace/extend): + * + * Generated from protobuf field .google.apps.card.v1.DecoratedText.SwitchControl.ControlType control_type = 5; + * @return int + */ + public function getControlType() + { + return $this->control_type; + } + + /** + * How the switch appears in the user interface. + * [Google Workspace Add-ons + * and Chat apps](https://developers.google.com/workspace/extend): + * + * Generated from protobuf field .google.apps.card.v1.DecoratedText.SwitchControl.ControlType control_type = 5; + * @param int $var + * @return $this + */ + public function setControlType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\DecoratedText\SwitchControl\ControlType::class); + $this->control_type = $var; + + return $this; + } + +} + + diff --git a/AppsChat/src/Card/V1/DecoratedText/SwitchControl/ControlType.php b/AppsChat/src/Card/V1/DecoratedText/SwitchControl/ControlType.php new file mode 100644 index 000000000000..5b7622dc4b81 --- /dev/null +++ b/AppsChat/src/Card/V1/DecoratedText/SwitchControl/ControlType.php @@ -0,0 +1,68 @@ +google.apps.card.v1.DecoratedText.SwitchControl.ControlType + */ +class ControlType +{ + /** + * A toggle-style switch. + * + * Generated from protobuf enum SWITCH = 0; + */ + const PBSWITCH = 0; + /** + * Deprecated in favor of `CHECK_BOX`. + * + * Generated from protobuf enum CHECKBOX = 1; + */ + const CHECKBOX = 1; + /** + * A checkbox. + * + * Generated from protobuf enum CHECK_BOX = 2; + */ + const CHECK_BOX = 2; + + private static $valueToName = [ + self::PBSWITCH => 'SWITCH', + self::CHECKBOX => 'CHECKBOX', + self::CHECK_BOX => 'CHECK_BOX', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Card/V1/Divider.php b/AppsChat/src/Card/V1/Divider.php new file mode 100644 index 000000000000..302c3a2b4e4f --- /dev/null +++ b/AppsChat/src/Card/V1/Divider.php @@ -0,0 +1,42 @@ +google.apps.card.v1.Divider + */ +class Divider extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AppsChat/src/Card/V1/Grid.php b/AppsChat/src/Card/V1/Grid.php new file mode 100644 index 000000000000..daf8a87f9278 --- /dev/null +++ b/AppsChat/src/Card/V1/Grid.php @@ -0,0 +1,281 @@ +google.apps.card.v1.Grid + */ +class Grid extends \Google\Protobuf\Internal\Message +{ + /** + * The text that displays in the grid header. + * + * Generated from protobuf field string title = 1; + */ + protected $title = ''; + /** + * The items to display in the grid. + * + * Generated from protobuf field repeated .google.apps.card.v1.Grid.GridItem items = 2; + */ + private $items; + /** + * The border style to apply to each grid item. + * + * Generated from protobuf field .google.apps.card.v1.BorderStyle border_style = 3; + */ + protected $border_style = null; + /** + * The number of columns to display in the grid. A default value + * is used if this field isn't specified, and that default value is + * different depending on where the grid is shown (dialog versus companion). + * + * Generated from protobuf field int32 column_count = 4; + */ + protected $column_count = 0; + /** + * This callback is reused by each individual grid item, but with the + * item's identifier and index in the items list added to the callback's + * parameters. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 5; + */ + protected $on_click = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $title + * The text that displays in the grid header. + * @type array<\Google\Apps\Card\V1\Grid\GridItem>|\Google\Protobuf\Internal\RepeatedField $items + * The items to display in the grid. + * @type \Google\Apps\Card\V1\BorderStyle $border_style + * The border style to apply to each grid item. + * @type int $column_count + * The number of columns to display in the grid. A default value + * is used if this field isn't specified, and that default value is + * different depending on where the grid is shown (dialog versus companion). + * @type \Google\Apps\Card\V1\OnClick $on_click + * This callback is reused by each individual grid item, but with the + * item's identifier and index in the items list added to the callback's + * parameters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The text that displays in the grid header. + * + * Generated from protobuf field string title = 1; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * The text that displays in the grid header. + * + * Generated from protobuf field string title = 1; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * The items to display in the grid. + * + * Generated from protobuf field repeated .google.apps.card.v1.Grid.GridItem items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * The items to display in the grid. + * + * Generated from protobuf field repeated .google.apps.card.v1.Grid.GridItem items = 2; + * @param array<\Google\Apps\Card\V1\Grid\GridItem>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Grid\GridItem::class); + $this->items = $arr; + + return $this; + } + + /** + * The border style to apply to each grid item. + * + * Generated from protobuf field .google.apps.card.v1.BorderStyle border_style = 3; + * @return \Google\Apps\Card\V1\BorderStyle|null + */ + public function getBorderStyle() + { + return $this->border_style; + } + + public function hasBorderStyle() + { + return isset($this->border_style); + } + + public function clearBorderStyle() + { + unset($this->border_style); + } + + /** + * The border style to apply to each grid item. + * + * Generated from protobuf field .google.apps.card.v1.BorderStyle border_style = 3; + * @param \Google\Apps\Card\V1\BorderStyle $var + * @return $this + */ + public function setBorderStyle($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\BorderStyle::class); + $this->border_style = $var; + + return $this; + } + + /** + * The number of columns to display in the grid. A default value + * is used if this field isn't specified, and that default value is + * different depending on where the grid is shown (dialog versus companion). + * + * Generated from protobuf field int32 column_count = 4; + * @return int + */ + public function getColumnCount() + { + return $this->column_count; + } + + /** + * The number of columns to display in the grid. A default value + * is used if this field isn't specified, and that default value is + * different depending on where the grid is shown (dialog versus companion). + * + * Generated from protobuf field int32 column_count = 4; + * @param int $var + * @return $this + */ + public function setColumnCount($var) + { + GPBUtil::checkInt32($var); + $this->column_count = $var; + + return $this; + } + + /** + * This callback is reused by each individual grid item, but with the + * item's identifier and index in the items list added to the callback's + * parameters. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 5; + * @return \Google\Apps\Card\V1\OnClick|null + */ + public function getOnClick() + { + return $this->on_click; + } + + public function hasOnClick() + { + return isset($this->on_click); + } + + public function clearOnClick() + { + unset($this->on_click); + } + + /** + * This callback is reused by each individual grid item, but with the + * item's identifier and index in the items list added to the callback's + * parameters. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 5; + * @param \Google\Apps\Card\V1\OnClick $var + * @return $this + */ + public function setOnClick($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\OnClick::class); + $this->on_click = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Card/V1/Grid/GridItem.php b/AppsChat/src/Card/V1/Grid/GridItem.php new file mode 100644 index 000000000000..bc296728ff7a --- /dev/null +++ b/AppsChat/src/Card/V1/Grid/GridItem.php @@ -0,0 +1,221 @@ +google.apps.card.v1.Grid.GridItem + */ +class GridItem extends \Google\Protobuf\Internal\Message +{ + /** + * A user-specified identifier for this grid item. This identifier is + * returned in the parent grid's `onClick` callback parameters. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * The image that displays in the grid item. + * + * Generated from protobuf field .google.apps.card.v1.ImageComponent image = 2; + */ + protected $image = null; + /** + * The grid item's title. + * + * Generated from protobuf field string title = 3; + */ + protected $title = ''; + /** + * The grid item's subtitle. + * + * Generated from protobuf field string subtitle = 4; + */ + protected $subtitle = ''; + /** + * The layout to use for the grid item. + * + * Generated from protobuf field .google.apps.card.v1.Grid.GridItem.GridItemLayout layout = 9; + */ + protected $layout = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * A user-specified identifier for this grid item. This identifier is + * returned in the parent grid's `onClick` callback parameters. + * @type \Google\Apps\Card\V1\ImageComponent $image + * The image that displays in the grid item. + * @type string $title + * The grid item's title. + * @type string $subtitle + * The grid item's subtitle. + * @type int $layout + * The layout to use for the grid item. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * A user-specified identifier for this grid item. This identifier is + * returned in the parent grid's `onClick` callback parameters. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * A user-specified identifier for this grid item. This identifier is + * returned in the parent grid's `onClick` callback parameters. + * + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The image that displays in the grid item. + * + * Generated from protobuf field .google.apps.card.v1.ImageComponent image = 2; + * @return \Google\Apps\Card\V1\ImageComponent|null + */ + public function getImage() + { + return $this->image; + } + + public function hasImage() + { + return isset($this->image); + } + + public function clearImage() + { + unset($this->image); + } + + /** + * The image that displays in the grid item. + * + * Generated from protobuf field .google.apps.card.v1.ImageComponent image = 2; + * @param \Google\Apps\Card\V1\ImageComponent $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\ImageComponent::class); + $this->image = $var; + + return $this; + } + + /** + * The grid item's title. + * + * Generated from protobuf field string title = 3; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * The grid item's title. + * + * Generated from protobuf field string title = 3; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * The grid item's subtitle. + * + * Generated from protobuf field string subtitle = 4; + * @return string + */ + public function getSubtitle() + { + return $this->subtitle; + } + + /** + * The grid item's subtitle. + * + * Generated from protobuf field string subtitle = 4; + * @param string $var + * @return $this + */ + public function setSubtitle($var) + { + GPBUtil::checkString($var, True); + $this->subtitle = $var; + + return $this; + } + + /** + * The layout to use for the grid item. + * + * Generated from protobuf field .google.apps.card.v1.Grid.GridItem.GridItemLayout layout = 9; + * @return int + */ + public function getLayout() + { + return $this->layout; + } + + /** + * The layout to use for the grid item. + * + * Generated from protobuf field .google.apps.card.v1.Grid.GridItem.GridItemLayout layout = 9; + * @param int $var + * @return $this + */ + public function setLayout($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Grid\GridItem\GridItemLayout::class); + $this->layout = $var; + + return $this; + } + +} + + diff --git a/AppsChat/src/Card/V1/Grid/GridItem/GridItemLayout.php b/AppsChat/src/Card/V1/Grid/GridItem/GridItemLayout.php new file mode 100644 index 000000000000..979273fc70bb --- /dev/null +++ b/AppsChat/src/Card/V1/Grid/GridItem/GridItemLayout.php @@ -0,0 +1,64 @@ +google.apps.card.v1.Grid.GridItem.GridItemLayout + */ +class GridItemLayout +{ + /** + * Don't use. Unspecified. + * + * Generated from protobuf enum GRID_ITEM_LAYOUT_UNSPECIFIED = 0; + */ + const GRID_ITEM_LAYOUT_UNSPECIFIED = 0; + /** + * The title and subtitle are shown below the grid item's image. + * + * Generated from protobuf enum TEXT_BELOW = 1; + */ + const TEXT_BELOW = 1; + /** + * The title and subtitle are shown above the grid item's image. + * + * Generated from protobuf enum TEXT_ABOVE = 2; + */ + const TEXT_ABOVE = 2; + + private static $valueToName = [ + self::GRID_ITEM_LAYOUT_UNSPECIFIED => 'GRID_ITEM_LAYOUT_UNSPECIFIED', + self::TEXT_BELOW => 'TEXT_BELOW', + self::TEXT_ABOVE => 'TEXT_ABOVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Card/V1/Icon.php b/AppsChat/src/Card/V1/Icon.php new file mode 100644 index 000000000000..e3ef2178b1cb --- /dev/null +++ b/AppsChat/src/Card/V1/Icon.php @@ -0,0 +1,318 @@ +google.apps.card.v1.Icon + */ +class Icon extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A description of the icon used for accessibility. + * If unspecified, the default value `Button` is provided. As a best practice, + * you should set a helpful description for what the icon displays, and if + * applicable, what it does. For example, `A user's account portrait`, or + * `Opens a new browser tab and navigates to the Google Chat developer + * documentation at https://developers.google.com/workspace/chat`. + * If the icon is set in a [`Button`][google.apps.card.v1.Button], the + * `altText` appears as helper text when the user hovers over the button. + * However, if the button also sets `text`, the icon's `altText` is ignored. + * + * Generated from protobuf field string alt_text = 3; + */ + protected $alt_text = ''; + /** + * The crop style applied to the image. In some cases, applying a + * `CIRCLE` crop causes the image to be drawn larger than a built-in + * icon. + * + * Generated from protobuf field .google.apps.card.v1.Widget.ImageType image_type = 4; + */ + protected $image_type = 0; + protected $icons; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $known_icon + * Display one of the built-in icons provided by Google Workspace. + * For example, to display an airplane icon, specify `AIRPLANE`. + * For a bus, specify `BUS`. + * For a full list of supported icons, see [built-in + * icons](https://developers.google.com/workspace/chat/format-messages#builtinicons). + * @type string $icon_url + * Display a custom icon hosted at an HTTPS URL. + * For example: + * ``` + * "iconUrl": + * "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png" + * ``` + * Supported file types include `.png` and `.jpg`. + * @type \Google\Apps\Card\V1\MaterialIcon $material_icon + * Display one of the [Google Material + * Icons](https://fonts.google.com/icons). + * For example, to display a [checkbox + * icon](https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048), + * use + * ``` + * "material_icon": { + * "name": "check_box" + * } + * ``` + * [Google Chat apps](https://developers.google.com/workspace/chat): + * @type string $alt_text + * Optional. A description of the icon used for accessibility. + * If unspecified, the default value `Button` is provided. As a best practice, + * you should set a helpful description for what the icon displays, and if + * applicable, what it does. For example, `A user's account portrait`, or + * `Opens a new browser tab and navigates to the Google Chat developer + * documentation at https://developers.google.com/workspace/chat`. + * If the icon is set in a [`Button`][google.apps.card.v1.Button], the + * `altText` appears as helper text when the user hovers over the button. + * However, if the button also sets `text`, the icon's `altText` is ignored. + * @type int $image_type + * The crop style applied to the image. In some cases, applying a + * `CIRCLE` crop causes the image to be drawn larger than a built-in + * icon. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * Display one of the built-in icons provided by Google Workspace. + * For example, to display an airplane icon, specify `AIRPLANE`. + * For a bus, specify `BUS`. + * For a full list of supported icons, see [built-in + * icons](https://developers.google.com/workspace/chat/format-messages#builtinicons). + * + * Generated from protobuf field string known_icon = 1; + * @return string + */ + public function getKnownIcon() + { + return $this->readOneof(1); + } + + public function hasKnownIcon() + { + return $this->hasOneof(1); + } + + /** + * Display one of the built-in icons provided by Google Workspace. + * For example, to display an airplane icon, specify `AIRPLANE`. + * For a bus, specify `BUS`. + * For a full list of supported icons, see [built-in + * icons](https://developers.google.com/workspace/chat/format-messages#builtinicons). + * + * Generated from protobuf field string known_icon = 1; + * @param string $var + * @return $this + */ + public function setKnownIcon($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Display a custom icon hosted at an HTTPS URL. + * For example: + * ``` + * "iconUrl": + * "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png" + * ``` + * Supported file types include `.png` and `.jpg`. + * + * Generated from protobuf field string icon_url = 2; + * @return string + */ + public function getIconUrl() + { + return $this->readOneof(2); + } + + public function hasIconUrl() + { + return $this->hasOneof(2); + } + + /** + * Display a custom icon hosted at an HTTPS URL. + * For example: + * ``` + * "iconUrl": + * "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png" + * ``` + * Supported file types include `.png` and `.jpg`. + * + * Generated from protobuf field string icon_url = 2; + * @param string $var + * @return $this + */ + public function setIconUrl($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Display one of the [Google Material + * Icons](https://fonts.google.com/icons). + * For example, to display a [checkbox + * icon](https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048), + * use + * ``` + * "material_icon": { + * "name": "check_box" + * } + * ``` + * [Google Chat apps](https://developers.google.com/workspace/chat): + * + * Generated from protobuf field .google.apps.card.v1.MaterialIcon material_icon = 5; + * @return \Google\Apps\Card\V1\MaterialIcon|null + */ + public function getMaterialIcon() + { + return $this->readOneof(5); + } + + public function hasMaterialIcon() + { + return $this->hasOneof(5); + } + + /** + * Display one of the [Google Material + * Icons](https://fonts.google.com/icons). + * For example, to display a [checkbox + * icon](https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048), + * use + * ``` + * "material_icon": { + * "name": "check_box" + * } + * ``` + * [Google Chat apps](https://developers.google.com/workspace/chat): + * + * Generated from protobuf field .google.apps.card.v1.MaterialIcon material_icon = 5; + * @param \Google\Apps\Card\V1\MaterialIcon $var + * @return $this + */ + public function setMaterialIcon($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\MaterialIcon::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Optional. A description of the icon used for accessibility. + * If unspecified, the default value `Button` is provided. As a best practice, + * you should set a helpful description for what the icon displays, and if + * applicable, what it does. For example, `A user's account portrait`, or + * `Opens a new browser tab and navigates to the Google Chat developer + * documentation at https://developers.google.com/workspace/chat`. + * If the icon is set in a [`Button`][google.apps.card.v1.Button], the + * `altText` appears as helper text when the user hovers over the button. + * However, if the button also sets `text`, the icon's `altText` is ignored. + * + * Generated from protobuf field string alt_text = 3; + * @return string + */ + public function getAltText() + { + return $this->alt_text; + } + + /** + * Optional. A description of the icon used for accessibility. + * If unspecified, the default value `Button` is provided. As a best practice, + * you should set a helpful description for what the icon displays, and if + * applicable, what it does. For example, `A user's account portrait`, or + * `Opens a new browser tab and navigates to the Google Chat developer + * documentation at https://developers.google.com/workspace/chat`. + * If the icon is set in a [`Button`][google.apps.card.v1.Button], the + * `altText` appears as helper text when the user hovers over the button. + * However, if the button also sets `text`, the icon's `altText` is ignored. + * + * Generated from protobuf field string alt_text = 3; + * @param string $var + * @return $this + */ + public function setAltText($var) + { + GPBUtil::checkString($var, True); + $this->alt_text = $var; + + return $this; + } + + /** + * The crop style applied to the image. In some cases, applying a + * `CIRCLE` crop causes the image to be drawn larger than a built-in + * icon. + * + * Generated from protobuf field .google.apps.card.v1.Widget.ImageType image_type = 4; + * @return int + */ + public function getImageType() + { + return $this->image_type; + } + + /** + * The crop style applied to the image. In some cases, applying a + * `CIRCLE` crop causes the image to be drawn larger than a built-in + * icon. + * + * Generated from protobuf field .google.apps.card.v1.Widget.ImageType image_type = 4; + * @param int $var + * @return $this + */ + public function setImageType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Widget\ImageType::class); + $this->image_type = $var; + + return $this; + } + + /** + * @return string + */ + public function getIcons() + { + return $this->whichOneof("icons"); + } + +} + diff --git a/AppsChat/src/Card/V1/Image.php b/AppsChat/src/Card/V1/Image.php new file mode 100644 index 000000000000..9cd6c58f1608 --- /dev/null +++ b/AppsChat/src/Card/V1/Image.php @@ -0,0 +1,165 @@ +google.apps.card.v1.Image + */ +class Image extends \Google\Protobuf\Internal\Message +{ + /** + * The HTTPS URL that hosts the image. + * For example: + * ``` + * https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png + * ``` + * + * Generated from protobuf field string image_url = 1; + */ + protected $image_url = ''; + /** + * When a user clicks the image, the click triggers this action. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 2; + */ + protected $on_click = null; + /** + * The alternative text of this image that's used for accessibility. + * + * Generated from protobuf field string alt_text = 3; + */ + protected $alt_text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $image_url + * The HTTPS URL that hosts the image. + * For example: + * ``` + * https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png + * ``` + * @type \Google\Apps\Card\V1\OnClick $on_click + * When a user clicks the image, the click triggers this action. + * @type string $alt_text + * The alternative text of this image that's used for accessibility. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The HTTPS URL that hosts the image. + * For example: + * ``` + * https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png + * ``` + * + * Generated from protobuf field string image_url = 1; + * @return string + */ + public function getImageUrl() + { + return $this->image_url; + } + + /** + * The HTTPS URL that hosts the image. + * For example: + * ``` + * https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png + * ``` + * + * Generated from protobuf field string image_url = 1; + * @param string $var + * @return $this + */ + public function setImageUrl($var) + { + GPBUtil::checkString($var, True); + $this->image_url = $var; + + return $this; + } + + /** + * When a user clicks the image, the click triggers this action. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 2; + * @return \Google\Apps\Card\V1\OnClick|null + */ + public function getOnClick() + { + return $this->on_click; + } + + public function hasOnClick() + { + return isset($this->on_click); + } + + public function clearOnClick() + { + unset($this->on_click); + } + + /** + * When a user clicks the image, the click triggers this action. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 2; + * @param \Google\Apps\Card\V1\OnClick $var + * @return $this + */ + public function setOnClick($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\OnClick::class); + $this->on_click = $var; + + return $this; + } + + /** + * The alternative text of this image that's used for accessibility. + * + * Generated from protobuf field string alt_text = 3; + * @return string + */ + public function getAltText() + { + return $this->alt_text; + } + + /** + * The alternative text of this image that's used for accessibility. + * + * Generated from protobuf field string alt_text = 3; + * @param string $var + * @return $this + */ + public function setAltText($var) + { + GPBUtil::checkString($var, True); + $this->alt_text = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Card/V1/ImageComponent.php b/AppsChat/src/Card/V1/ImageComponent.php new file mode 100644 index 000000000000..b0b07608f838 --- /dev/null +++ b/AppsChat/src/Card/V1/ImageComponent.php @@ -0,0 +1,191 @@ +google.apps.card.v1.ImageComponent + */ +class ImageComponent extends \Google\Protobuf\Internal\Message +{ + /** + * The image URL. + * + * Generated from protobuf field string image_uri = 1; + */ + protected $image_uri = ''; + /** + * The accessibility label for the image. + * + * Generated from protobuf field string alt_text = 2; + */ + protected $alt_text = ''; + /** + * The crop style to apply to the image. + * + * Generated from protobuf field .google.apps.card.v1.ImageCropStyle crop_style = 3; + */ + protected $crop_style = null; + /** + * The border style to apply to the image. + * + * Generated from protobuf field .google.apps.card.v1.BorderStyle border_style = 4; + */ + protected $border_style = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $image_uri + * The image URL. + * @type string $alt_text + * The accessibility label for the image. + * @type \Google\Apps\Card\V1\ImageCropStyle $crop_style + * The crop style to apply to the image. + * @type \Google\Apps\Card\V1\BorderStyle $border_style + * The border style to apply to the image. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The image URL. + * + * Generated from protobuf field string image_uri = 1; + * @return string + */ + public function getImageUri() + { + return $this->image_uri; + } + + /** + * The image URL. + * + * Generated from protobuf field string image_uri = 1; + * @param string $var + * @return $this + */ + public function setImageUri($var) + { + GPBUtil::checkString($var, True); + $this->image_uri = $var; + + return $this; + } + + /** + * The accessibility label for the image. + * + * Generated from protobuf field string alt_text = 2; + * @return string + */ + public function getAltText() + { + return $this->alt_text; + } + + /** + * The accessibility label for the image. + * + * Generated from protobuf field string alt_text = 2; + * @param string $var + * @return $this + */ + public function setAltText($var) + { + GPBUtil::checkString($var, True); + $this->alt_text = $var; + + return $this; + } + + /** + * The crop style to apply to the image. + * + * Generated from protobuf field .google.apps.card.v1.ImageCropStyle crop_style = 3; + * @return \Google\Apps\Card\V1\ImageCropStyle|null + */ + public function getCropStyle() + { + return $this->crop_style; + } + + public function hasCropStyle() + { + return isset($this->crop_style); + } + + public function clearCropStyle() + { + unset($this->crop_style); + } + + /** + * The crop style to apply to the image. + * + * Generated from protobuf field .google.apps.card.v1.ImageCropStyle crop_style = 3; + * @param \Google\Apps\Card\V1\ImageCropStyle $var + * @return $this + */ + public function setCropStyle($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\ImageCropStyle::class); + $this->crop_style = $var; + + return $this; + } + + /** + * The border style to apply to the image. + * + * Generated from protobuf field .google.apps.card.v1.BorderStyle border_style = 4; + * @return \Google\Apps\Card\V1\BorderStyle|null + */ + public function getBorderStyle() + { + return $this->border_style; + } + + public function hasBorderStyle() + { + return isset($this->border_style); + } + + public function clearBorderStyle() + { + unset($this->border_style); + } + + /** + * The border style to apply to the image. + * + * Generated from protobuf field .google.apps.card.v1.BorderStyle border_style = 4; + * @param \Google\Apps\Card\V1\BorderStyle $var + * @return $this + */ + public function setBorderStyle($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\BorderStyle::class); + $this->border_style = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Card/V1/ImageCropStyle.php b/AppsChat/src/Card/V1/ImageCropStyle.php new file mode 100644 index 000000000000..eb70bd52adf0 --- /dev/null +++ b/AppsChat/src/Card/V1/ImageCropStyle.php @@ -0,0 +1,138 @@ +google.apps.card.v1.ImageCropStyle + */ +class ImageCropStyle extends \Google\Protobuf\Internal\Message +{ + /** + * The crop type. + * + * Generated from protobuf field .google.apps.card.v1.ImageCropStyle.ImageCropType type = 1; + */ + protected $type = 0; + /** + * The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`. + * For example, here's how to apply a 16:9 aspect ratio: + * ``` + * cropStyle { + * "type": "RECTANGLE_CUSTOM", + * "aspectRatio": 16/9 + * } + * ``` + * + * Generated from protobuf field double aspect_ratio = 2; + */ + protected $aspect_ratio = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * The crop type. + * @type float $aspect_ratio + * The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`. + * For example, here's how to apply a 16:9 aspect ratio: + * ``` + * cropStyle { + * "type": "RECTANGLE_CUSTOM", + * "aspectRatio": 16/9 + * } + * ``` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The crop type. + * + * Generated from protobuf field .google.apps.card.v1.ImageCropStyle.ImageCropType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The crop type. + * + * Generated from protobuf field .google.apps.card.v1.ImageCropStyle.ImageCropType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\ImageCropStyle\ImageCropType::class); + $this->type = $var; + + return $this; + } + + /** + * The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`. + * For example, here's how to apply a 16:9 aspect ratio: + * ``` + * cropStyle { + * "type": "RECTANGLE_CUSTOM", + * "aspectRatio": 16/9 + * } + * ``` + * + * Generated from protobuf field double aspect_ratio = 2; + * @return float + */ + public function getAspectRatio() + { + return $this->aspect_ratio; + } + + /** + * The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`. + * For example, here's how to apply a 16:9 aspect ratio: + * ``` + * cropStyle { + * "type": "RECTANGLE_CUSTOM", + * "aspectRatio": 16/9 + * } + * ``` + * + * Generated from protobuf field double aspect_ratio = 2; + * @param float $var + * @return $this + */ + public function setAspectRatio($var) + { + GPBUtil::checkDouble($var); + $this->aspect_ratio = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Card/V1/ImageCropStyle/ImageCropType.php b/AppsChat/src/Card/V1/ImageCropStyle/ImageCropType.php new file mode 100644 index 000000000000..a9699aa12ff8 --- /dev/null +++ b/AppsChat/src/Card/V1/ImageCropStyle/ImageCropType.php @@ -0,0 +1,79 @@ +google.apps.card.v1.ImageCropStyle.ImageCropType + */ +class ImageCropType +{ + /** + * Don't use. Unspecified. + * + * Generated from protobuf enum IMAGE_CROP_TYPE_UNSPECIFIED = 0; + */ + const IMAGE_CROP_TYPE_UNSPECIFIED = 0; + /** + * Default value. Applies a square crop. + * + * Generated from protobuf enum SQUARE = 1; + */ + const SQUARE = 1; + /** + * Applies a circular crop. + * + * Generated from protobuf enum CIRCLE = 2; + */ + const CIRCLE = 2; + /** + * Applies a rectangular crop with a custom aspect ratio. Set the custom + * aspect ratio with `aspectRatio`. + * + * Generated from protobuf enum RECTANGLE_CUSTOM = 3; + */ + const RECTANGLE_CUSTOM = 3; + /** + * Applies a rectangular crop with a 4:3 aspect ratio. + * + * Generated from protobuf enum RECTANGLE_4_3 = 4; + */ + const RECTANGLE_4_3 = 4; + + private static $valueToName = [ + self::IMAGE_CROP_TYPE_UNSPECIFIED => 'IMAGE_CROP_TYPE_UNSPECIFIED', + self::SQUARE => 'SQUARE', + self::CIRCLE => 'CIRCLE', + self::RECTANGLE_CUSTOM => 'RECTANGLE_CUSTOM', + self::RECTANGLE_4_3 => 'RECTANGLE_4_3', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Card/V1/MaterialIcon.php b/AppsChat/src/Card/V1/MaterialIcon.php new file mode 100644 index 000000000000..f37b5ed6e401 --- /dev/null +++ b/AppsChat/src/Card/V1/MaterialIcon.php @@ -0,0 +1,250 @@ +google.apps.card.v1.MaterialIcon + */ +class MaterialIcon extends \Google\Protobuf\Internal\Message +{ + /** + * The icon name defined in the [Google Material + * Icon](https://fonts.google.com/icons), for example, `check_box`. Any + * invalid names are abandoned and replaced with empty string and + * results in the icon failing to render. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Whether the icon renders as filled. Default value is false. + * To preview different icon settings, go to + * [Google Font Icons](https://fonts.google.com/icons) and adjust the + * settings under **Customize**. + * + * Generated from protobuf field bool fill = 2; + */ + protected $fill = false; + /** + * The stroke weight of the icon. Choose from {100, 200, 300, 400, + * 500, 600, 700}. If absent, default value is 400. If any other value is + * specified, the default value is used. + * To preview different icon settings, go to + * [Google Font Icons](https://fonts.google.com/icons) and adjust the + * settings under **Customize**. + * + * Generated from protobuf field int32 weight = 3; + */ + protected $weight = 0; + /** + * Weight and grade affect a symbol’s thickness. Adjustments to grade are more + * granular than adjustments to weight and have a small impact on the size of + * the symbol. Choose from {-25, 0, 200}. If absent, default value is 0. If + * any other value is specified, the default value is used. + * To preview different icon settings, go to + * [Google Font Icons](https://fonts.google.com/icons) and adjust the + * settings under **Customize**. + * + * Generated from protobuf field int32 grade = 4; + */ + protected $grade = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The icon name defined in the [Google Material + * Icon](https://fonts.google.com/icons), for example, `check_box`. Any + * invalid names are abandoned and replaced with empty string and + * results in the icon failing to render. + * @type bool $fill + * Whether the icon renders as filled. Default value is false. + * To preview different icon settings, go to + * [Google Font Icons](https://fonts.google.com/icons) and adjust the + * settings under **Customize**. + * @type int $weight + * The stroke weight of the icon. Choose from {100, 200, 300, 400, + * 500, 600, 700}. If absent, default value is 400. If any other value is + * specified, the default value is used. + * To preview different icon settings, go to + * [Google Font Icons](https://fonts.google.com/icons) and adjust the + * settings under **Customize**. + * @type int $grade + * Weight and grade affect a symbol’s thickness. Adjustments to grade are more + * granular than adjustments to weight and have a small impact on the size of + * the symbol. Choose from {-25, 0, 200}. If absent, default value is 0. If + * any other value is specified, the default value is used. + * To preview different icon settings, go to + * [Google Font Icons](https://fonts.google.com/icons) and adjust the + * settings under **Customize**. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The icon name defined in the [Google Material + * Icon](https://fonts.google.com/icons), for example, `check_box`. Any + * invalid names are abandoned and replaced with empty string and + * results in the icon failing to render. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The icon name defined in the [Google Material + * Icon](https://fonts.google.com/icons), for example, `check_box`. Any + * invalid names are abandoned and replaced with empty string and + * results in the icon failing to render. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Whether the icon renders as filled. Default value is false. + * To preview different icon settings, go to + * [Google Font Icons](https://fonts.google.com/icons) and adjust the + * settings under **Customize**. + * + * Generated from protobuf field bool fill = 2; + * @return bool + */ + public function getFill() + { + return $this->fill; + } + + /** + * Whether the icon renders as filled. Default value is false. + * To preview different icon settings, go to + * [Google Font Icons](https://fonts.google.com/icons) and adjust the + * settings under **Customize**. + * + * Generated from protobuf field bool fill = 2; + * @param bool $var + * @return $this + */ + public function setFill($var) + { + GPBUtil::checkBool($var); + $this->fill = $var; + + return $this; + } + + /** + * The stroke weight of the icon. Choose from {100, 200, 300, 400, + * 500, 600, 700}. If absent, default value is 400. If any other value is + * specified, the default value is used. + * To preview different icon settings, go to + * [Google Font Icons](https://fonts.google.com/icons) and adjust the + * settings under **Customize**. + * + * Generated from protobuf field int32 weight = 3; + * @return int + */ + public function getWeight() + { + return $this->weight; + } + + /** + * The stroke weight of the icon. Choose from {100, 200, 300, 400, + * 500, 600, 700}. If absent, default value is 400. If any other value is + * specified, the default value is used. + * To preview different icon settings, go to + * [Google Font Icons](https://fonts.google.com/icons) and adjust the + * settings under **Customize**. + * + * Generated from protobuf field int32 weight = 3; + * @param int $var + * @return $this + */ + public function setWeight($var) + { + GPBUtil::checkInt32($var); + $this->weight = $var; + + return $this; + } + + /** + * Weight and grade affect a symbol’s thickness. Adjustments to grade are more + * granular than adjustments to weight and have a small impact on the size of + * the symbol. Choose from {-25, 0, 200}. If absent, default value is 0. If + * any other value is specified, the default value is used. + * To preview different icon settings, go to + * [Google Font Icons](https://fonts.google.com/icons) and adjust the + * settings under **Customize**. + * + * Generated from protobuf field int32 grade = 4; + * @return int + */ + public function getGrade() + { + return $this->grade; + } + + /** + * Weight and grade affect a symbol’s thickness. Adjustments to grade are more + * granular than adjustments to weight and have a small impact on the size of + * the symbol. Choose from {-25, 0, 200}. If absent, default value is 0. If + * any other value is specified, the default value is used. + * To preview different icon settings, go to + * [Google Font Icons](https://fonts.google.com/icons) and adjust the + * settings under **Customize**. + * + * Generated from protobuf field int32 grade = 4; + * @param int $var + * @return $this + */ + public function setGrade($var) + { + GPBUtil::checkInt32($var); + $this->grade = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Card/V1/OnClick.php b/AppsChat/src/Card/V1/OnClick.php new file mode 100644 index 000000000000..7fe0139a6eda --- /dev/null +++ b/AppsChat/src/Card/V1/OnClick.php @@ -0,0 +1,198 @@ +google.apps.card.v1.OnClick + */ +class OnClick extends \Google\Protobuf\Internal\Message +{ + protected $data; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Card\V1\Action $action + * If specified, an action is triggered by this `onClick`. + * @type \Google\Apps\Card\V1\OpenLink $open_link + * If specified, this `onClick` triggers an open link action. + * @type \Google\Apps\Card\V1\Action $open_dynamic_link_action + * An add-on triggers this action when the action needs to open a + * link. This differs from the `open_link` above in that this needs to talk + * to server to get the link. Thus some preparation work is required for + * web client to do before the open link action response comes back. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * @type \Google\Apps\Card\V1\Card $card + * A new card is pushed to the card stack after clicking if specified. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * If specified, an action is triggered by this `onClick`. + * + * Generated from protobuf field .google.apps.card.v1.Action action = 1; + * @return \Google\Apps\Card\V1\Action|null + */ + public function getAction() + { + return $this->readOneof(1); + } + + public function hasAction() + { + return $this->hasOneof(1); + } + + /** + * If specified, an action is triggered by this `onClick`. + * + * Generated from protobuf field .google.apps.card.v1.Action action = 1; + * @param \Google\Apps\Card\V1\Action $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Action::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * If specified, this `onClick` triggers an open link action. + * + * Generated from protobuf field .google.apps.card.v1.OpenLink open_link = 2; + * @return \Google\Apps\Card\V1\OpenLink|null + */ + public function getOpenLink() + { + return $this->readOneof(2); + } + + public function hasOpenLink() + { + return $this->hasOneof(2); + } + + /** + * If specified, this `onClick` triggers an open link action. + * + * Generated from protobuf field .google.apps.card.v1.OpenLink open_link = 2; + * @param \Google\Apps\Card\V1\OpenLink $var + * @return $this + */ + public function setOpenLink($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\OpenLink::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * An add-on triggers this action when the action needs to open a + * link. This differs from the `open_link` above in that this needs to talk + * to server to get the link. Thus some preparation work is required for + * web client to do before the open link action response comes back. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Action open_dynamic_link_action = 3; + * @return \Google\Apps\Card\V1\Action|null + */ + public function getOpenDynamicLinkAction() + { + return $this->readOneof(3); + } + + public function hasOpenDynamicLinkAction() + { + return $this->hasOneof(3); + } + + /** + * An add-on triggers this action when the action needs to open a + * link. This differs from the `open_link` above in that this needs to talk + * to server to get the link. Thus some preparation work is required for + * web client to do before the open link action response comes back. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Action open_dynamic_link_action = 3; + * @param \Google\Apps\Card\V1\Action $var + * @return $this + */ + public function setOpenDynamicLinkAction($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Action::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A new card is pushed to the card stack after clicking if specified. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Card card = 4; + * @return \Google\Apps\Card\V1\Card|null + */ + public function getCard() + { + return $this->readOneof(4); + } + + public function hasCard() + { + return $this->hasOneof(4); + } + + /** + * A new card is pushed to the card stack after clicking if specified. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Card card = 4; + * @param \Google\Apps\Card\V1\Card $var + * @return $this + */ + public function setCard($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Card::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getData() + { + return $this->whichOneof("data"); + } + +} + diff --git a/AppsChat/src/Card/V1/OpenLink.php b/AppsChat/src/Card/V1/OpenLink.php new file mode 100644 index 000000000000..f401cd8d1c40 --- /dev/null +++ b/AppsChat/src/Card/V1/OpenLink.php @@ -0,0 +1,157 @@ +google.apps.card.v1.OpenLink + */ +class OpenLink extends \Google\Protobuf\Internal\Message +{ + /** + * The URL to open. + * + * Generated from protobuf field string url = 1; + */ + protected $url = ''; + /** + * How to open a link. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.OpenLink.OpenAs open_as = 2; + */ + protected $open_as = 0; + /** + * Whether the client forgets about a link after opening it, or observes it + * until the window closes. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.OpenLink.OnClose on_close = 3; + */ + protected $on_close = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * The URL to open. + * @type int $open_as + * How to open a link. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * @type int $on_close + * Whether the client forgets about a link after opening it, or observes it + * until the window closes. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The URL to open. + * + * Generated from protobuf field string url = 1; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * The URL to open. + * + * Generated from protobuf field string url = 1; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + + /** + * How to open a link. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.OpenLink.OpenAs open_as = 2; + * @return int + */ + public function getOpenAs() + { + return $this->open_as; + } + + /** + * How to open a link. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.OpenLink.OpenAs open_as = 2; + * @param int $var + * @return $this + */ + public function setOpenAs($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\OpenLink\OpenAs::class); + $this->open_as = $var; + + return $this; + } + + /** + * Whether the client forgets about a link after opening it, or observes it + * until the window closes. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.OpenLink.OnClose on_close = 3; + * @return int + */ + public function getOnClose() + { + return $this->on_close; + } + + /** + * Whether the client forgets about a link after opening it, or observes it + * until the window closes. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.OpenLink.OnClose on_close = 3; + * @param int $var + * @return $this + */ + public function setOnClose($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\OpenLink\OnClose::class); + $this->on_close = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Card/V1/OpenLink/OnClose.php b/AppsChat/src/Card/V1/OpenLink/OnClose.php new file mode 100644 index 000000000000..998685bc26f4 --- /dev/null +++ b/AppsChat/src/Card/V1/OpenLink/OnClose.php @@ -0,0 +1,65 @@ +google.apps.card.v1.OpenLink.OnClose + */ +class OnClose +{ + /** + * Default value. The card doesn't reload; nothing happens. + * + * Generated from protobuf enum NOTHING = 0; + */ + const NOTHING = 0; + /** + * Reloads the card after the child window closes. + * If used in conjunction with + * [`OpenAs.OVERLAY`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#openas), + * the child window acts as a modal dialog and the parent card is blocked + * until the child window closes. + * + * Generated from protobuf enum RELOAD = 1; + */ + const RELOAD = 1; + + private static $valueToName = [ + self::NOTHING => 'NOTHING', + self::RELOAD => 'RELOAD', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Card/V1/OpenLink/OpenAs.php b/AppsChat/src/Card/V1/OpenLink/OpenAs.php new file mode 100644 index 000000000000..c5058bb03a61 --- /dev/null +++ b/AppsChat/src/Card/V1/OpenLink/OpenAs.php @@ -0,0 +1,62 @@ +google.apps.card.v1.OpenLink.OpenAs + */ +class OpenAs +{ + /** + * The link opens as a full-size window (if that's the frame used by the + * client). + * + * Generated from protobuf enum FULL_SIZE = 0; + */ + const FULL_SIZE = 0; + /** + * The link opens as an overlay, such as a pop-up. + * + * Generated from protobuf enum OVERLAY = 1; + */ + const OVERLAY = 1; + + private static $valueToName = [ + self::FULL_SIZE => 'FULL_SIZE', + self::OVERLAY => 'OVERLAY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Card/V1/SelectionInput.php b/AppsChat/src/Card/V1/SelectionInput.php new file mode 100644 index 000000000000..8ae42a18e5d9 --- /dev/null +++ b/AppsChat/src/Card/V1/SelectionInput.php @@ -0,0 +1,439 @@ +google.apps.card.v1.SelectionInput + */ +class SelectionInput extends \Google\Protobuf\Internal\Message +{ + /** + * The name that identifies the selection input in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The text that appears above the selection input field in the user + * interface. + * Specify text that helps the user enter the information your app needs. + * For example, if users are selecting the urgency of a work ticket from a + * drop-down menu, the label might be "Urgency" or "Select urgency". + * + * Generated from protobuf field string label = 2; + */ + protected $label = ''; + /** + * The type of items that are displayed to users in a `SelectionInput` widget. + * Selection types support different types of interactions. For example, users + * can select one or more checkboxes, but they can only select one value from + * a dropdown menu. + * + * Generated from protobuf field .google.apps.card.v1.SelectionInput.SelectionType type = 3; + */ + protected $type = 0; + /** + * An array of selectable items. For example, an array of radio buttons or + * checkboxes. Supports up to 100 items. + * + * Generated from protobuf field repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4; + */ + private $items; + /** + * If specified, the form is submitted when the selection changes. If not + * specified, you must specify a separate button that submits the form. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 5; + */ + protected $on_change_action = null; + /** + * For multiselect menus, the maximum number of items that a user can select. + * Minimum value is 1 item. If unspecified, defaults to 3 items. + * + * Generated from protobuf field int32 multi_select_max_selected_items = 6; + */ + protected $multi_select_max_selected_items = 0; + /** + * For multiselect menus, the number of text characters that a user inputs + * before the app queries autocomplete and displays suggested items + * in the menu. + * If unspecified, defaults to 0 characters for static data sources and 3 + * characters for external data sources. + * + * Generated from protobuf field int32 multi_select_min_query_length = 7; + */ + protected $multi_select_min_query_length = 0; + protected $multi_select_data_source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name that identifies the selection input in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * @type string $label + * The text that appears above the selection input field in the user + * interface. + * Specify text that helps the user enter the information your app needs. + * For example, if users are selecting the urgency of a work ticket from a + * drop-down menu, the label might be "Urgency" or "Select urgency". + * @type int $type + * The type of items that are displayed to users in a `SelectionInput` widget. + * Selection types support different types of interactions. For example, users + * can select one or more checkboxes, but they can only select one value from + * a dropdown menu. + * @type array<\Google\Apps\Card\V1\SelectionInput\SelectionItem>|\Google\Protobuf\Internal\RepeatedField $items + * An array of selectable items. For example, an array of radio buttons or + * checkboxes. Supports up to 100 items. + * @type \Google\Apps\Card\V1\Action $on_change_action + * If specified, the form is submitted when the selection changes. If not + * specified, you must specify a separate button that submits the form. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * @type int $multi_select_max_selected_items + * For multiselect menus, the maximum number of items that a user can select. + * Minimum value is 1 item. If unspecified, defaults to 3 items. + * @type int $multi_select_min_query_length + * For multiselect menus, the number of text characters that a user inputs + * before the app queries autocomplete and displays suggested items + * in the menu. + * If unspecified, defaults to 0 characters for static data sources and 3 + * characters for external data sources. + * @type \Google\Apps\Card\V1\Action $external_data_source + * An external data source, such as a relational data base. + * @type \Google\Apps\Card\V1\SelectionInput\PlatformDataSource $platform_data_source + * A data source from Google Workspace. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The name that identifies the selection input in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name that identifies the selection input in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The text that appears above the selection input field in the user + * interface. + * Specify text that helps the user enter the information your app needs. + * For example, if users are selecting the urgency of a work ticket from a + * drop-down menu, the label might be "Urgency" or "Select urgency". + * + * Generated from protobuf field string label = 2; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * The text that appears above the selection input field in the user + * interface. + * Specify text that helps the user enter the information your app needs. + * For example, if users are selecting the urgency of a work ticket from a + * drop-down menu, the label might be "Urgency" or "Select urgency". + * + * Generated from protobuf field string label = 2; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * The type of items that are displayed to users in a `SelectionInput` widget. + * Selection types support different types of interactions. For example, users + * can select one or more checkboxes, but they can only select one value from + * a dropdown menu. + * + * Generated from protobuf field .google.apps.card.v1.SelectionInput.SelectionType type = 3; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of items that are displayed to users in a `SelectionInput` widget. + * Selection types support different types of interactions. For example, users + * can select one or more checkboxes, but they can only select one value from + * a dropdown menu. + * + * Generated from protobuf field .google.apps.card.v1.SelectionInput.SelectionType type = 3; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\SelectionInput\SelectionType::class); + $this->type = $var; + + return $this; + } + + /** + * An array of selectable items. For example, an array of radio buttons or + * checkboxes. Supports up to 100 items. + * + * Generated from protobuf field repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * An array of selectable items. For example, an array of radio buttons or + * checkboxes. Supports up to 100 items. + * + * Generated from protobuf field repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4; + * @param array<\Google\Apps\Card\V1\SelectionInput\SelectionItem>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\SelectionInput\SelectionItem::class); + $this->items = $arr; + + return $this; + } + + /** + * If specified, the form is submitted when the selection changes. If not + * specified, you must specify a separate button that submits the form. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 5; + * @return \Google\Apps\Card\V1\Action|null + */ + public function getOnChangeAction() + { + return $this->on_change_action; + } + + public function hasOnChangeAction() + { + return isset($this->on_change_action); + } + + public function clearOnChangeAction() + { + unset($this->on_change_action); + } + + /** + * If specified, the form is submitted when the selection changes. If not + * specified, you must specify a separate button that submits the form. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 5; + * @param \Google\Apps\Card\V1\Action $var + * @return $this + */ + public function setOnChangeAction($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Action::class); + $this->on_change_action = $var; + + return $this; + } + + /** + * For multiselect menus, the maximum number of items that a user can select. + * Minimum value is 1 item. If unspecified, defaults to 3 items. + * + * Generated from protobuf field int32 multi_select_max_selected_items = 6; + * @return int + */ + public function getMultiSelectMaxSelectedItems() + { + return $this->multi_select_max_selected_items; + } + + /** + * For multiselect menus, the maximum number of items that a user can select. + * Minimum value is 1 item. If unspecified, defaults to 3 items. + * + * Generated from protobuf field int32 multi_select_max_selected_items = 6; + * @param int $var + * @return $this + */ + public function setMultiSelectMaxSelectedItems($var) + { + GPBUtil::checkInt32($var); + $this->multi_select_max_selected_items = $var; + + return $this; + } + + /** + * For multiselect menus, the number of text characters that a user inputs + * before the app queries autocomplete and displays suggested items + * in the menu. + * If unspecified, defaults to 0 characters for static data sources and 3 + * characters for external data sources. + * + * Generated from protobuf field int32 multi_select_min_query_length = 7; + * @return int + */ + public function getMultiSelectMinQueryLength() + { + return $this->multi_select_min_query_length; + } + + /** + * For multiselect menus, the number of text characters that a user inputs + * before the app queries autocomplete and displays suggested items + * in the menu. + * If unspecified, defaults to 0 characters for static data sources and 3 + * characters for external data sources. + * + * Generated from protobuf field int32 multi_select_min_query_length = 7; + * @param int $var + * @return $this + */ + public function setMultiSelectMinQueryLength($var) + { + GPBUtil::checkInt32($var); + $this->multi_select_min_query_length = $var; + + return $this; + } + + /** + * An external data source, such as a relational data base. + * + * Generated from protobuf field .google.apps.card.v1.Action external_data_source = 8; + * @return \Google\Apps\Card\V1\Action|null + */ + public function getExternalDataSource() + { + return $this->readOneof(8); + } + + public function hasExternalDataSource() + { + return $this->hasOneof(8); + } + + /** + * An external data source, such as a relational data base. + * + * Generated from protobuf field .google.apps.card.v1.Action external_data_source = 8; + * @param \Google\Apps\Card\V1\Action $var + * @return $this + */ + public function setExternalDataSource($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Action::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * A data source from Google Workspace. + * + * Generated from protobuf field .google.apps.card.v1.SelectionInput.PlatformDataSource platform_data_source = 9; + * @return \Google\Apps\Card\V1\SelectionInput\PlatformDataSource|null + */ + public function getPlatformDataSource() + { + return $this->readOneof(9); + } + + public function hasPlatformDataSource() + { + return $this->hasOneof(9); + } + + /** + * A data source from Google Workspace. + * + * Generated from protobuf field .google.apps.card.v1.SelectionInput.PlatformDataSource platform_data_source = 9; + * @param \Google\Apps\Card\V1\SelectionInput\PlatformDataSource $var + * @return $this + */ + public function setPlatformDataSource($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\SelectionInput\PlatformDataSource::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * @return string + */ + public function getMultiSelectDataSource() + { + return $this->whichOneof("multi_select_data_source"); + } + +} + diff --git a/AppsChat/src/Card/V1/SelectionInput/PlatformDataSource.php b/AppsChat/src/Card/V1/SelectionInput/PlatformDataSource.php new file mode 100644 index 000000000000..c57b4ca69fec --- /dev/null +++ b/AppsChat/src/Card/V1/SelectionInput/PlatformDataSource.php @@ -0,0 +1,83 @@ +google.apps.card.v1.SelectionInput.PlatformDataSource + */ +class PlatformDataSource extends \Google\Protobuf\Internal\Message +{ + protected $data_source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $common_data_source + * A data source shared by all Google Workspace applications, such as + * users in a Google Workspace organization. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * A data source shared by all Google Workspace applications, such as + * users in a Google Workspace organization. + * + * Generated from protobuf field .google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource common_data_source = 1; + * @return int + */ + public function getCommonDataSource() + { + return $this->readOneof(1); + } + + public function hasCommonDataSource() + { + return $this->hasOneof(1); + } + + /** + * A data source shared by all Google Workspace applications, such as + * users in a Google Workspace organization. + * + * Generated from protobuf field .google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource common_data_source = 1; + * @param int $var + * @return $this + */ + public function setCommonDataSource($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\SelectionInput\PlatformDataSource\CommonDataSource::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getDataSource() + { + return $this->whichOneof("data_source"); + } + +} + + diff --git a/AppsChat/src/Card/V1/SelectionInput/PlatformDataSource/CommonDataSource.php b/AppsChat/src/Card/V1/SelectionInput/PlatformDataSource/CommonDataSource.php new file mode 100644 index 000000000000..cb9973e908a0 --- /dev/null +++ b/AppsChat/src/Card/V1/SelectionInput/PlatformDataSource/CommonDataSource.php @@ -0,0 +1,59 @@ +google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource + */ +class CommonDataSource +{ + /** + * Default value. Don't use. + * + * Generated from protobuf enum UNKNOWN = 0; + */ + const UNKNOWN = 0; + /** + * Google Workspace users. The user can only view and select users from + * their Google Workspace organization. + * + * Generated from protobuf enum USER = 1; + */ + const USER = 1; + + private static $valueToName = [ + self::UNKNOWN => 'UNKNOWN', + self::USER => 'USER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Card/V1/SelectionInput/SelectionItem.php b/AppsChat/src/Card/V1/SelectionInput/SelectionItem.php new file mode 100644 index 000000000000..3ed2ba659cf9 --- /dev/null +++ b/AppsChat/src/Card/V1/SelectionInput/SelectionItem.php @@ -0,0 +1,243 @@ +google.apps.card.v1.SelectionInput.SelectionItem + */ +class SelectionItem extends \Google\Protobuf\Internal\Message +{ + /** + * The text that identifies or describes the item to users. + * + * Generated from protobuf field string text = 1; + */ + protected $text = ''; + /** + * The value associated with this item. The client should use this as a form + * input value. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + /** + * Whether the item is selected by default. If the selection input only + * accepts one value (such as for radio buttons or a dropdown menu), only + * set this field for one item. + * + * Generated from protobuf field bool selected = 3; + */ + protected $selected = false; + /** + * For multiselect menus, the URL for the icon displayed next to + * the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS` + * URL. For example, + * `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`. + * + * Generated from protobuf field string start_icon_uri = 4; + */ + protected $start_icon_uri = ''; + /** + * For multiselect menus, a text description or label that's + * displayed below the item's `text` field. + * + * Generated from protobuf field string bottom_text = 5; + */ + protected $bottom_text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * The text that identifies or describes the item to users. + * @type string $value + * The value associated with this item. The client should use this as a form + * input value. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * @type bool $selected + * Whether the item is selected by default. If the selection input only + * accepts one value (such as for radio buttons or a dropdown menu), only + * set this field for one item. + * @type string $start_icon_uri + * For multiselect menus, the URL for the icon displayed next to + * the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS` + * URL. For example, + * `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`. + * @type string $bottom_text + * For multiselect menus, a text description or label that's + * displayed below the item's `text` field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The text that identifies or describes the item to users. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * The text that identifies or describes the item to users. + * + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * The value associated with this item. The client should use this as a form + * input value. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The value associated with this item. The client should use this as a form + * input value. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + + /** + * Whether the item is selected by default. If the selection input only + * accepts one value (such as for radio buttons or a dropdown menu), only + * set this field for one item. + * + * Generated from protobuf field bool selected = 3; + * @return bool + */ + public function getSelected() + { + return $this->selected; + } + + /** + * Whether the item is selected by default. If the selection input only + * accepts one value (such as for radio buttons or a dropdown menu), only + * set this field for one item. + * + * Generated from protobuf field bool selected = 3; + * @param bool $var + * @return $this + */ + public function setSelected($var) + { + GPBUtil::checkBool($var); + $this->selected = $var; + + return $this; + } + + /** + * For multiselect menus, the URL for the icon displayed next to + * the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS` + * URL. For example, + * `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`. + * + * Generated from protobuf field string start_icon_uri = 4; + * @return string + */ + public function getStartIconUri() + { + return $this->start_icon_uri; + } + + /** + * For multiselect menus, the URL for the icon displayed next to + * the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS` + * URL. For example, + * `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`. + * + * Generated from protobuf field string start_icon_uri = 4; + * @param string $var + * @return $this + */ + public function setStartIconUri($var) + { + GPBUtil::checkString($var, True); + $this->start_icon_uri = $var; + + return $this; + } + + /** + * For multiselect menus, a text description or label that's + * displayed below the item's `text` field. + * + * Generated from protobuf field string bottom_text = 5; + * @return string + */ + public function getBottomText() + { + return $this->bottom_text; + } + + /** + * For multiselect menus, a text description or label that's + * displayed below the item's `text` field. + * + * Generated from protobuf field string bottom_text = 5; + * @param string $var + * @return $this + */ + public function setBottomText($var) + { + GPBUtil::checkString($var, True); + $this->bottom_text = $var; + + return $this; + } + +} + + diff --git a/AppsChat/src/Card/V1/SelectionInput/SelectionType.php b/AppsChat/src/Card/V1/SelectionInput/SelectionType.php new file mode 100644 index 000000000000..1a84c939688c --- /dev/null +++ b/AppsChat/src/Card/V1/SelectionInput/SelectionType.php @@ -0,0 +1,104 @@ +google.apps.card.v1.SelectionInput.SelectionType + */ +class SelectionType +{ + /** + * A set of checkboxes. Users can select one or more checkboxes. + * + * Generated from protobuf enum CHECK_BOX = 0; + */ + const CHECK_BOX = 0; + /** + * A set of radio buttons. Users can select one radio button. + * + * Generated from protobuf enum RADIO_BUTTON = 1; + */ + const RADIO_BUTTON = 1; + /** + * A set of switches. Users can turn on one or more switches. + * + * Generated from protobuf enum SWITCH = 2; + */ + const PBSWITCH = 2; + /** + * A dropdown menu. Users can select one item from the menu. + * + * Generated from protobuf enum DROPDOWN = 3; + */ + const DROPDOWN = 3; + /** + * A multiselect menu for static or dynamic data. From the menu bar, + * users select one or more items. Users can also input values to populate + * dynamic data. For example, users can start typing the name of a Google + * Chat space and the widget autosuggests the space. + * To populate items for a multiselect menu, you can use one of the + * following types of data sources: + * * Static data: Items are specified as `SelectionItem` objects in the + * widget. Up to 100 items. + * * Google Workspace data: Items are populated using data from Google + * Workspace, such as Google Workspace users or Google Chat spaces. + * * External data: Items are populated from an external data + * source outside of Google Workspace. + * For examples of how to implement multiselect menus, see + * [Add a multiselect + * menu](https://developers.google.com/workspace/chat/design-interactive-card-dialog#multiselect-menu). + * [Google Workspace Add-ons and Chat + * apps](https://developers.google.com/workspace/extend): + * Multiselect for Google Workspace Add-ons are in + * Developer Preview. + * + * Generated from protobuf enum MULTI_SELECT = 4; + */ + const MULTI_SELECT = 4; + + private static $valueToName = [ + self::CHECK_BOX => 'CHECK_BOX', + self::RADIO_BUTTON => 'RADIO_BUTTON', + self::PBSWITCH => 'SWITCH', + self::DROPDOWN => 'DROPDOWN', + self::MULTI_SELECT => 'MULTI_SELECT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Card/V1/Suggestions.php b/AppsChat/src/Card/V1/Suggestions.php new file mode 100644 index 000000000000..7efd8f319cfc --- /dev/null +++ b/AppsChat/src/Card/V1/Suggestions.php @@ -0,0 +1,84 @@ +google.apps.card.v1.Suggestions + */ +class Suggestions extends \Google\Protobuf\Internal\Message +{ + /** + * A list of suggestions used for autocomplete recommendations in text input + * fields. + * + * Generated from protobuf field repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Apps\Card\V1\Suggestions\SuggestionItem>|\Google\Protobuf\Internal\RepeatedField $items + * A list of suggestions used for autocomplete recommendations in text input + * fields. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * A list of suggestions used for autocomplete recommendations in text input + * fields. + * + * Generated from protobuf field repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * A list of suggestions used for autocomplete recommendations in text input + * fields. + * + * Generated from protobuf field repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1; + * @param array<\Google\Apps\Card\V1\Suggestions\SuggestionItem>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Suggestions\SuggestionItem::class); + $this->items = $arr; + + return $this; + } + +} + diff --git a/AppsChat/src/Card/V1/Suggestions/SuggestionItem.php b/AppsChat/src/Card/V1/Suggestions/SuggestionItem.php new file mode 100644 index 000000000000..9a60812c03f7 --- /dev/null +++ b/AppsChat/src/Card/V1/Suggestions/SuggestionItem.php @@ -0,0 +1,81 @@ +google.apps.card.v1.Suggestions.SuggestionItem + */ +class SuggestionItem extends \Google\Protobuf\Internal\Message +{ + protected $content; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * The value of a suggested input to a text input field. This is + * equivalent to what users enter themselves. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The value of a suggested input to a text input field. This is + * equivalent to what users enter themselves. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->readOneof(1); + } + + public function hasText() + { + return $this->hasOneof(1); + } + + /** + * The value of a suggested input to a text input field. This is + * equivalent to what users enter themselves. + * + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getContent() + { + return $this->whichOneof("content"); + } + +} + + diff --git a/AppsChat/src/Card/V1/TextInput.php b/AppsChat/src/Card/V1/TextInput.php new file mode 100644 index 000000000000..60c7cfbed1c4 --- /dev/null +++ b/AppsChat/src/Card/V1/TextInput.php @@ -0,0 +1,532 @@ +google.apps.card.v1.TextInput + */ +class TextInput extends \Google\Protobuf\Internal\Message +{ + /** + * The name by which the text input is identified in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The text that appears above the text input field in the user interface. + * Specify text that helps the user enter the information your app needs. + * For example, if you are asking someone's name, but specifically need their + * surname, write `surname` instead of `name`. + * Required if `hintText` is unspecified. Otherwise, optional. + * + * Generated from protobuf field string label = 2; + */ + protected $label = ''; + /** + * Text that appears below the text input field meant to assist users by + * prompting them to enter a certain value. This text is always visible. + * Required if `label` is unspecified. Otherwise, optional. + * + * Generated from protobuf field string hint_text = 3; + */ + protected $hint_text = ''; + /** + * The value entered by a user, returned as part of a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string value = 4; + */ + protected $value = ''; + /** + * How a text input field appears in the user interface. + * For example, whether the field is single or multi-line. + * + * Generated from protobuf field .google.apps.card.v1.TextInput.Type type = 5; + */ + protected $type = 0; + /** + * What to do when a change occurs in the text input field. For example, a + * user adding to the field or deleting text. + * Examples of actions to take include running a custom function or opening + * a [dialog](https://developers.google.com/workspace/chat/dialogs) + * in Google Chat. + * + * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 6; + */ + protected $on_change_action = null; + /** + * Suggested values that users can enter. These values appear when users click + * inside the text input field. As users type, the suggested values + * dynamically filter to match what the users have typed. + * For example, a text input field for programming language might suggest + * Java, JavaScript, Python, and C++. When users start typing `Jav`, the list + * of suggestions filters to show just `Java` and `JavaScript`. + * Suggested values help guide users to enter values that your app can make + * sense of. When referring to JavaScript, some users might enter `javascript` + * and others `java script`. Suggesting `JavaScript` can standardize how users + * interact with your app. + * When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set + * to `MULTIPLE_LINE`. + * [Google Workspace + * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * + * Generated from protobuf field .google.apps.card.v1.Suggestions initial_suggestions = 7; + */ + protected $initial_suggestions = null; + /** + * Optional. Specify what action to take when the text input field provides + * suggestions to users who interact with it. + * If unspecified, the suggestions are set by `initialSuggestions` and + * are processed by the client. + * If specified, the app takes the action specified here, such as running + * a custom function. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Action auto_complete_action = 8; + */ + protected $auto_complete_action = null; + /** + * Text that appears in the text input field when the field is empty. + * Use this text to prompt users to enter a value. For example, `Enter a + * number from 0 to 100`. + * [Google Chat apps](https://developers.google.com/workspace/chat): + * + * Generated from protobuf field string placeholder_text = 12; + */ + protected $placeholder_text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name by which the text input is identified in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * @type string $label + * The text that appears above the text input field in the user interface. + * Specify text that helps the user enter the information your app needs. + * For example, if you are asking someone's name, but specifically need their + * surname, write `surname` instead of `name`. + * Required if `hintText` is unspecified. Otherwise, optional. + * @type string $hint_text + * Text that appears below the text input field meant to assist users by + * prompting them to enter a certain value. This text is always visible. + * Required if `label` is unspecified. Otherwise, optional. + * @type string $value + * The value entered by a user, returned as part of a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * @type int $type + * How a text input field appears in the user interface. + * For example, whether the field is single or multi-line. + * @type \Google\Apps\Card\V1\Action $on_change_action + * What to do when a change occurs in the text input field. For example, a + * user adding to the field or deleting text. + * Examples of actions to take include running a custom function or opening + * a [dialog](https://developers.google.com/workspace/chat/dialogs) + * in Google Chat. + * @type \Google\Apps\Card\V1\Suggestions $initial_suggestions + * Suggested values that users can enter. These values appear when users click + * inside the text input field. As users type, the suggested values + * dynamically filter to match what the users have typed. + * For example, a text input field for programming language might suggest + * Java, JavaScript, Python, and C++. When users start typing `Jav`, the list + * of suggestions filters to show just `Java` and `JavaScript`. + * Suggested values help guide users to enter values that your app can make + * sense of. When referring to JavaScript, some users might enter `javascript` + * and others `java script`. Suggesting `JavaScript` can standardize how users + * interact with your app. + * When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set + * to `MULTIPLE_LINE`. + * [Google Workspace + * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * @type \Google\Apps\Card\V1\Action $auto_complete_action + * Optional. Specify what action to take when the text input field provides + * suggestions to users who interact with it. + * If unspecified, the suggestions are set by `initialSuggestions` and + * are processed by the client. + * If specified, the app takes the action specified here, such as running + * a custom function. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * @type string $placeholder_text + * Text that appears in the text input field when the field is empty. + * Use this text to prompt users to enter a value. For example, `Enter a + * number from 0 to 100`. + * [Google Chat apps](https://developers.google.com/workspace/chat): + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The name by which the text input is identified in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name by which the text input is identified in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The text that appears above the text input field in the user interface. + * Specify text that helps the user enter the information your app needs. + * For example, if you are asking someone's name, but specifically need their + * surname, write `surname` instead of `name`. + * Required if `hintText` is unspecified. Otherwise, optional. + * + * Generated from protobuf field string label = 2; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * The text that appears above the text input field in the user interface. + * Specify text that helps the user enter the information your app needs. + * For example, if you are asking someone's name, but specifically need their + * surname, write `surname` instead of `name`. + * Required if `hintText` is unspecified. Otherwise, optional. + * + * Generated from protobuf field string label = 2; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * Text that appears below the text input field meant to assist users by + * prompting them to enter a certain value. This text is always visible. + * Required if `label` is unspecified. Otherwise, optional. + * + * Generated from protobuf field string hint_text = 3; + * @return string + */ + public function getHintText() + { + return $this->hint_text; + } + + /** + * Text that appears below the text input field meant to assist users by + * prompting them to enter a certain value. This text is always visible. + * Required if `label` is unspecified. Otherwise, optional. + * + * Generated from protobuf field string hint_text = 3; + * @param string $var + * @return $this + */ + public function setHintText($var) + { + GPBUtil::checkString($var, True); + $this->hint_text = $var; + + return $this; + } + + /** + * The value entered by a user, returned as part of a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string value = 4; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The value entered by a user, returned as part of a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string value = 4; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + + /** + * How a text input field appears in the user interface. + * For example, whether the field is single or multi-line. + * + * Generated from protobuf field .google.apps.card.v1.TextInput.Type type = 5; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * How a text input field appears in the user interface. + * For example, whether the field is single or multi-line. + * + * Generated from protobuf field .google.apps.card.v1.TextInput.Type type = 5; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\TextInput\Type::class); + $this->type = $var; + + return $this; + } + + /** + * What to do when a change occurs in the text input field. For example, a + * user adding to the field or deleting text. + * Examples of actions to take include running a custom function or opening + * a [dialog](https://developers.google.com/workspace/chat/dialogs) + * in Google Chat. + * + * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 6; + * @return \Google\Apps\Card\V1\Action|null + */ + public function getOnChangeAction() + { + return $this->on_change_action; + } + + public function hasOnChangeAction() + { + return isset($this->on_change_action); + } + + public function clearOnChangeAction() + { + unset($this->on_change_action); + } + + /** + * What to do when a change occurs in the text input field. For example, a + * user adding to the field or deleting text. + * Examples of actions to take include running a custom function or opening + * a [dialog](https://developers.google.com/workspace/chat/dialogs) + * in Google Chat. + * + * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 6; + * @param \Google\Apps\Card\V1\Action $var + * @return $this + */ + public function setOnChangeAction($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Action::class); + $this->on_change_action = $var; + + return $this; + } + + /** + * Suggested values that users can enter. These values appear when users click + * inside the text input field. As users type, the suggested values + * dynamically filter to match what the users have typed. + * For example, a text input field for programming language might suggest + * Java, JavaScript, Python, and C++. When users start typing `Jav`, the list + * of suggestions filters to show just `Java` and `JavaScript`. + * Suggested values help guide users to enter values that your app can make + * sense of. When referring to JavaScript, some users might enter `javascript` + * and others `java script`. Suggesting `JavaScript` can standardize how users + * interact with your app. + * When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set + * to `MULTIPLE_LINE`. + * [Google Workspace + * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * + * Generated from protobuf field .google.apps.card.v1.Suggestions initial_suggestions = 7; + * @return \Google\Apps\Card\V1\Suggestions|null + */ + public function getInitialSuggestions() + { + return $this->initial_suggestions; + } + + public function hasInitialSuggestions() + { + return isset($this->initial_suggestions); + } + + public function clearInitialSuggestions() + { + unset($this->initial_suggestions); + } + + /** + * Suggested values that users can enter. These values appear when users click + * inside the text input field. As users type, the suggested values + * dynamically filter to match what the users have typed. + * For example, a text input field for programming language might suggest + * Java, JavaScript, Python, and C++. When users start typing `Jav`, the list + * of suggestions filters to show just `Java` and `JavaScript`. + * Suggested values help guide users to enter values that your app can make + * sense of. When referring to JavaScript, some users might enter `javascript` + * and others `java script`. Suggesting `JavaScript` can standardize how users + * interact with your app. + * When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set + * to `MULTIPLE_LINE`. + * [Google Workspace + * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * + * Generated from protobuf field .google.apps.card.v1.Suggestions initial_suggestions = 7; + * @param \Google\Apps\Card\V1\Suggestions $var + * @return $this + */ + public function setInitialSuggestions($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Suggestions::class); + $this->initial_suggestions = $var; + + return $this; + } + + /** + * Optional. Specify what action to take when the text input field provides + * suggestions to users who interact with it. + * If unspecified, the suggestions are set by `initialSuggestions` and + * are processed by the client. + * If specified, the app takes the action specified here, such as running + * a custom function. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Action auto_complete_action = 8; + * @return \Google\Apps\Card\V1\Action|null + */ + public function getAutoCompleteAction() + { + return $this->auto_complete_action; + } + + public function hasAutoCompleteAction() + { + return isset($this->auto_complete_action); + } + + public function clearAutoCompleteAction() + { + unset($this->auto_complete_action); + } + + /** + * Optional. Specify what action to take when the text input field provides + * suggestions to users who interact with it. + * If unspecified, the suggestions are set by `initialSuggestions` and + * are processed by the client. + * If specified, the app takes the action specified here, such as running + * a custom function. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Action auto_complete_action = 8; + * @param \Google\Apps\Card\V1\Action $var + * @return $this + */ + public function setAutoCompleteAction($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Action::class); + $this->auto_complete_action = $var; + + return $this; + } + + /** + * Text that appears in the text input field when the field is empty. + * Use this text to prompt users to enter a value. For example, `Enter a + * number from 0 to 100`. + * [Google Chat apps](https://developers.google.com/workspace/chat): + * + * Generated from protobuf field string placeholder_text = 12; + * @return string + */ + public function getPlaceholderText() + { + return $this->placeholder_text; + } + + /** + * Text that appears in the text input field when the field is empty. + * Use this text to prompt users to enter a value. For example, `Enter a + * number from 0 to 100`. + * [Google Chat apps](https://developers.google.com/workspace/chat): + * + * Generated from protobuf field string placeholder_text = 12; + * @param string $var + * @return $this + */ + public function setPlaceholderText($var) + { + GPBUtil::checkString($var, True); + $this->placeholder_text = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Card/V1/TextInput/Type.php b/AppsChat/src/Card/V1/TextInput/Type.php new file mode 100644 index 000000000000..edb779e74918 --- /dev/null +++ b/AppsChat/src/Card/V1/TextInput/Type.php @@ -0,0 +1,60 @@ +google.apps.card.v1.TextInput.Type + */ +class Type +{ + /** + * The text input field has a fixed height of one line. + * + * Generated from protobuf enum SINGLE_LINE = 0; + */ + const SINGLE_LINE = 0; + /** + * The text input field has a fixed height of multiple lines. + * + * Generated from protobuf enum MULTIPLE_LINE = 1; + */ + const MULTIPLE_LINE = 1; + + private static $valueToName = [ + self::SINGLE_LINE => 'SINGLE_LINE', + self::MULTIPLE_LINE => 'MULTIPLE_LINE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Card/V1/TextParagraph.php b/AppsChat/src/Card/V1/TextParagraph.php new file mode 100644 index 000000000000..029cb54e8a3c --- /dev/null +++ b/AppsChat/src/Card/V1/TextParagraph.php @@ -0,0 +1,79 @@ +google.apps.card.v1.TextParagraph + */ +class TextParagraph extends \Google\Protobuf\Internal\Message +{ + /** + * The text that's shown in the widget. + * + * Generated from protobuf field string text = 1; + */ + protected $text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * The text that's shown in the widget. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The text that's shown in the widget. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * The text that's shown in the widget. + * + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Card/V1/Widget.php b/AppsChat/src/Card/V1/Widget.php new file mode 100644 index 000000000000..9299d133d355 --- /dev/null +++ b/AppsChat/src/Card/V1/Widget.php @@ -0,0 +1,1062 @@ +google.apps.card.v1.Widget + */ +class Widget extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies whether widgets align to the left, right, or center of a column. + * + * Generated from protobuf field .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 8; + */ + protected $horizontal_alignment = 0; + protected $data; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Card\V1\TextParagraph $text_paragraph + * Displays a text paragraph. Supports simple HTML formatted text. For more + * information about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * For example, the following JSON creates a bolded text: + * ``` + * "textParagraph": { + * "text": " bold text" + * } + * ``` + * @type \Google\Apps\Card\V1\Image $image + * Displays an image. + * For example, the following JSON creates an image with alternative text: + * ``` + * "image": { + * "imageUrl": + * "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", + * "altText": "Chat app avatar" + * } + * ``` + * @type \Google\Apps\Card\V1\DecoratedText $decorated_text + * Displays a decorated text item. + * For example, the following JSON creates a decorated text widget showing + * email address: + * ``` + * "decoratedText": { + * "icon": { + * "knownIcon": "EMAIL" + * }, + * "topLabel": "Email Address", + * "text": "sasha@example.com", + * "bottomLabel": "This is a new Email address!", + * "switchControl": { + * "name": "has_send_welcome_email_to_sasha", + * "selected": false, + * "controlType": "CHECKBOX" + * } + * } + * ``` + * @type \Google\Apps\Card\V1\ButtonList $button_list + * A list of buttons. + * For example, the following JSON creates two buttons. The first + * is a blue text button and the second is an image button that opens a + * link: + * ``` + * "buttonList": { + * "buttons": [ + * { + * "text": "Edit", + * "color": { + * "red": 0, + * "green": 0, + * "blue": 1, + * "alpha": 1 + * }, + * "disabled": true, + * }, + * { + * "icon": { + * "knownIcon": "INVITE", + * "altText": "check calendar" + * }, + * "onClick": { + * "openLink": { + * "url": "https://example.com/calendar" + * } + * } + * } + * ] + * } + * ``` + * @type \Google\Apps\Card\V1\TextInput $text_input + * Displays a text box that users can type into. + * For example, the following JSON creates a text input for an email + * address: + * ``` + * "textInput": { + * "name": "mailing_address", + * "label": "Mailing Address" + * } + * ``` + * As another example, the following JSON creates a text input for a + * programming language with static suggestions: + * ``` + * "textInput": { + * "name": "preferred_programing_language", + * "label": "Preferred Language", + * "initialSuggestions": { + * "items": [ + * { + * "text": "C++" + * }, + * { + * "text": "Java" + * }, + * { + * "text": "JavaScript" + * }, + * { + * "text": "Python" + * } + * ] + * } + * } + * ``` + * @type \Google\Apps\Card\V1\SelectionInput $selection_input + * Displays a selection control that lets users select items. Selection + * controls can be checkboxes, radio buttons, switches, or dropdown menus. + * For example, the following JSON creates a dropdown menu that lets users + * choose a size: + * ``` + * "selectionInput": { + * "name": "size", + * "label": "Size" + * "type": "DROPDOWN", + * "items": [ + * { + * "text": "S", + * "value": "small", + * "selected": false + * }, + * { + * "text": "M", + * "value": "medium", + * "selected": true + * }, + * { + * "text": "L", + * "value": "large", + * "selected": false + * }, + * { + * "text": "XL", + * "value": "extra_large", + * "selected": false + * } + * ] + * } + * ``` + * @type \Google\Apps\Card\V1\DateTimePicker $date_time_picker + * Displays a widget that lets users input a date, time, or date and time. + * For example, the following JSON creates a date time picker to schedule an + * appointment: + * ``` + * "dateTimePicker": { + * "name": "appointment_time", + * "label": "Book your appointment at:", + * "type": "DATE_AND_TIME", + * "valueMsEpoch": "796435200000" + * } + * ``` + * @type \Google\Apps\Card\V1\Divider $divider + * Displays a horizontal line divider between widgets. + * For example, the following JSON creates a divider: + * ``` + * "divider": { + * } + * ``` + * @type \Google\Apps\Card\V1\Grid $grid + * Displays a grid with a collection of items. + * A grid supports any number of columns and items. The number of rows is + * determined by the upper bounds of the number items divided by the number + * of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 + * items and 2 columns has 6 rows. + * [Google Workspace Add-ons and + * Chat apps](https://developers.google.com/workspace/extend): + * For example, the following JSON creates a 2 column grid with a single + * item: + * ``` + * "grid": { + * "title": "A fine collection of items", + * "columnCount": 2, + * "borderStyle": { + * "type": "STROKE", + * "cornerRadius": 4 + * }, + * "items": [ + * { + * "image": { + * "imageUri": "https://www.example.com/image.png", + * "cropStyle": { + * "type": "SQUARE" + * }, + * "borderStyle": { + * "type": "STROKE" + * } + * }, + * "title": "An item", + * "textAlignment": "CENTER" + * } + * ], + * "onClick": { + * "openLink": { + * "url": "https://www.example.com" + * } + * } + * } + * ``` + * @type \Google\Apps\Card\V1\Columns $columns + * Displays up to 2 columns. + * To include more than 2 columns, or to use rows, use the `Grid` widget. + * For example, the following JSON creates 2 columns that each contain + * text paragraphs: + * ``` + * "columns": { + * "columnItems": [ + * { + * "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", + * "horizontalAlignment": "CENTER", + * "verticalAlignment": "CENTER", + * "widgets": [ + * { + * "textParagraph": { + * "text": "First column text paragraph" + * } + * } + * ] + * }, + * { + * "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", + * "horizontalAlignment": "CENTER", + * "verticalAlignment": "CENTER", + * "widgets": [ + * { + * "textParagraph": { + * "text": "Second column text paragraph" + * } + * } + * ] + * } + * ] + * } + * ``` + * @type int $horizontal_alignment + * Specifies whether widgets align to the left, right, or center of a column. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * Displays a text paragraph. Supports simple HTML formatted text. For more + * information about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * For example, the following JSON creates a bolded text: + * ``` + * "textParagraph": { + * "text": " bold text" + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.TextParagraph text_paragraph = 1; + * @return \Google\Apps\Card\V1\TextParagraph|null + */ + public function getTextParagraph() + { + return $this->readOneof(1); + } + + public function hasTextParagraph() + { + return $this->hasOneof(1); + } + + /** + * Displays a text paragraph. Supports simple HTML formatted text. For more + * information about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * For example, the following JSON creates a bolded text: + * ``` + * "textParagraph": { + * "text": " bold text" + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.TextParagraph text_paragraph = 1; + * @param \Google\Apps\Card\V1\TextParagraph $var + * @return $this + */ + public function setTextParagraph($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\TextParagraph::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Displays an image. + * For example, the following JSON creates an image with alternative text: + * ``` + * "image": { + * "imageUrl": + * "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", + * "altText": "Chat app avatar" + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.Image image = 2; + * @return \Google\Apps\Card\V1\Image|null + */ + public function getImage() + { + return $this->readOneof(2); + } + + public function hasImage() + { + return $this->hasOneof(2); + } + + /** + * Displays an image. + * For example, the following JSON creates an image with alternative text: + * ``` + * "image": { + * "imageUrl": + * "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", + * "altText": "Chat app avatar" + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.Image image = 2; + * @param \Google\Apps\Card\V1\Image $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Image::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Displays a decorated text item. + * For example, the following JSON creates a decorated text widget showing + * email address: + * ``` + * "decoratedText": { + * "icon": { + * "knownIcon": "EMAIL" + * }, + * "topLabel": "Email Address", + * "text": "sasha@example.com", + * "bottomLabel": "This is a new Email address!", + * "switchControl": { + * "name": "has_send_welcome_email_to_sasha", + * "selected": false, + * "controlType": "CHECKBOX" + * } + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.DecoratedText decorated_text = 3; + * @return \Google\Apps\Card\V1\DecoratedText|null + */ + public function getDecoratedText() + { + return $this->readOneof(3); + } + + public function hasDecoratedText() + { + return $this->hasOneof(3); + } + + /** + * Displays a decorated text item. + * For example, the following JSON creates a decorated text widget showing + * email address: + * ``` + * "decoratedText": { + * "icon": { + * "knownIcon": "EMAIL" + * }, + * "topLabel": "Email Address", + * "text": "sasha@example.com", + * "bottomLabel": "This is a new Email address!", + * "switchControl": { + * "name": "has_send_welcome_email_to_sasha", + * "selected": false, + * "controlType": "CHECKBOX" + * } + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.DecoratedText decorated_text = 3; + * @param \Google\Apps\Card\V1\DecoratedText $var + * @return $this + */ + public function setDecoratedText($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\DecoratedText::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A list of buttons. + * For example, the following JSON creates two buttons. The first + * is a blue text button and the second is an image button that opens a + * link: + * ``` + * "buttonList": { + * "buttons": [ + * { + * "text": "Edit", + * "color": { + * "red": 0, + * "green": 0, + * "blue": 1, + * "alpha": 1 + * }, + * "disabled": true, + * }, + * { + * "icon": { + * "knownIcon": "INVITE", + * "altText": "check calendar" + * }, + * "onClick": { + * "openLink": { + * "url": "https://example.com/calendar" + * } + * } + * } + * ] + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.ButtonList button_list = 4; + * @return \Google\Apps\Card\V1\ButtonList|null + */ + public function getButtonList() + { + return $this->readOneof(4); + } + + public function hasButtonList() + { + return $this->hasOneof(4); + } + + /** + * A list of buttons. + * For example, the following JSON creates two buttons. The first + * is a blue text button and the second is an image button that opens a + * link: + * ``` + * "buttonList": { + * "buttons": [ + * { + * "text": "Edit", + * "color": { + * "red": 0, + * "green": 0, + * "blue": 1, + * "alpha": 1 + * }, + * "disabled": true, + * }, + * { + * "icon": { + * "knownIcon": "INVITE", + * "altText": "check calendar" + * }, + * "onClick": { + * "openLink": { + * "url": "https://example.com/calendar" + * } + * } + * } + * ] + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.ButtonList button_list = 4; + * @param \Google\Apps\Card\V1\ButtonList $var + * @return $this + */ + public function setButtonList($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\ButtonList::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Displays a text box that users can type into. + * For example, the following JSON creates a text input for an email + * address: + * ``` + * "textInput": { + * "name": "mailing_address", + * "label": "Mailing Address" + * } + * ``` + * As another example, the following JSON creates a text input for a + * programming language with static suggestions: + * ``` + * "textInput": { + * "name": "preferred_programing_language", + * "label": "Preferred Language", + * "initialSuggestions": { + * "items": [ + * { + * "text": "C++" + * }, + * { + * "text": "Java" + * }, + * { + * "text": "JavaScript" + * }, + * { + * "text": "Python" + * } + * ] + * } + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.TextInput text_input = 5; + * @return \Google\Apps\Card\V1\TextInput|null + */ + public function getTextInput() + { + return $this->readOneof(5); + } + + public function hasTextInput() + { + return $this->hasOneof(5); + } + + /** + * Displays a text box that users can type into. + * For example, the following JSON creates a text input for an email + * address: + * ``` + * "textInput": { + * "name": "mailing_address", + * "label": "Mailing Address" + * } + * ``` + * As another example, the following JSON creates a text input for a + * programming language with static suggestions: + * ``` + * "textInput": { + * "name": "preferred_programing_language", + * "label": "Preferred Language", + * "initialSuggestions": { + * "items": [ + * { + * "text": "C++" + * }, + * { + * "text": "Java" + * }, + * { + * "text": "JavaScript" + * }, + * { + * "text": "Python" + * } + * ] + * } + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.TextInput text_input = 5; + * @param \Google\Apps\Card\V1\TextInput $var + * @return $this + */ + public function setTextInput($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\TextInput::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Displays a selection control that lets users select items. Selection + * controls can be checkboxes, radio buttons, switches, or dropdown menus. + * For example, the following JSON creates a dropdown menu that lets users + * choose a size: + * ``` + * "selectionInput": { + * "name": "size", + * "label": "Size" + * "type": "DROPDOWN", + * "items": [ + * { + * "text": "S", + * "value": "small", + * "selected": false + * }, + * { + * "text": "M", + * "value": "medium", + * "selected": true + * }, + * { + * "text": "L", + * "value": "large", + * "selected": false + * }, + * { + * "text": "XL", + * "value": "extra_large", + * "selected": false + * } + * ] + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.SelectionInput selection_input = 6; + * @return \Google\Apps\Card\V1\SelectionInput|null + */ + public function getSelectionInput() + { + return $this->readOneof(6); + } + + public function hasSelectionInput() + { + return $this->hasOneof(6); + } + + /** + * Displays a selection control that lets users select items. Selection + * controls can be checkboxes, radio buttons, switches, or dropdown menus. + * For example, the following JSON creates a dropdown menu that lets users + * choose a size: + * ``` + * "selectionInput": { + * "name": "size", + * "label": "Size" + * "type": "DROPDOWN", + * "items": [ + * { + * "text": "S", + * "value": "small", + * "selected": false + * }, + * { + * "text": "M", + * "value": "medium", + * "selected": true + * }, + * { + * "text": "L", + * "value": "large", + * "selected": false + * }, + * { + * "text": "XL", + * "value": "extra_large", + * "selected": false + * } + * ] + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.SelectionInput selection_input = 6; + * @param \Google\Apps\Card\V1\SelectionInput $var + * @return $this + */ + public function setSelectionInput($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\SelectionInput::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Displays a widget that lets users input a date, time, or date and time. + * For example, the following JSON creates a date time picker to schedule an + * appointment: + * ``` + * "dateTimePicker": { + * "name": "appointment_time", + * "label": "Book your appointment at:", + * "type": "DATE_AND_TIME", + * "valueMsEpoch": "796435200000" + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.DateTimePicker date_time_picker = 7; + * @return \Google\Apps\Card\V1\DateTimePicker|null + */ + public function getDateTimePicker() + { + return $this->readOneof(7); + } + + public function hasDateTimePicker() + { + return $this->hasOneof(7); + } + + /** + * Displays a widget that lets users input a date, time, or date and time. + * For example, the following JSON creates a date time picker to schedule an + * appointment: + * ``` + * "dateTimePicker": { + * "name": "appointment_time", + * "label": "Book your appointment at:", + * "type": "DATE_AND_TIME", + * "valueMsEpoch": "796435200000" + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.DateTimePicker date_time_picker = 7; + * @param \Google\Apps\Card\V1\DateTimePicker $var + * @return $this + */ + public function setDateTimePicker($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\DateTimePicker::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Displays a horizontal line divider between widgets. + * For example, the following JSON creates a divider: + * ``` + * "divider": { + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.Divider divider = 9; + * @return \Google\Apps\Card\V1\Divider|null + */ + public function getDivider() + { + return $this->readOneof(9); + } + + public function hasDivider() + { + return $this->hasOneof(9); + } + + /** + * Displays a horizontal line divider between widgets. + * For example, the following JSON creates a divider: + * ``` + * "divider": { + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.Divider divider = 9; + * @param \Google\Apps\Card\V1\Divider $var + * @return $this + */ + public function setDivider($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Divider::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Displays a grid with a collection of items. + * A grid supports any number of columns and items. The number of rows is + * determined by the upper bounds of the number items divided by the number + * of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 + * items and 2 columns has 6 rows. + * [Google Workspace Add-ons and + * Chat apps](https://developers.google.com/workspace/extend): + * For example, the following JSON creates a 2 column grid with a single + * item: + * ``` + * "grid": { + * "title": "A fine collection of items", + * "columnCount": 2, + * "borderStyle": { + * "type": "STROKE", + * "cornerRadius": 4 + * }, + * "items": [ + * { + * "image": { + * "imageUri": "https://www.example.com/image.png", + * "cropStyle": { + * "type": "SQUARE" + * }, + * "borderStyle": { + * "type": "STROKE" + * } + * }, + * "title": "An item", + * "textAlignment": "CENTER" + * } + * ], + * "onClick": { + * "openLink": { + * "url": "https://www.example.com" + * } + * } + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.Grid grid = 10; + * @return \Google\Apps\Card\V1\Grid|null + */ + public function getGrid() + { + return $this->readOneof(10); + } + + public function hasGrid() + { + return $this->hasOneof(10); + } + + /** + * Displays a grid with a collection of items. + * A grid supports any number of columns and items. The number of rows is + * determined by the upper bounds of the number items divided by the number + * of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 + * items and 2 columns has 6 rows. + * [Google Workspace Add-ons and + * Chat apps](https://developers.google.com/workspace/extend): + * For example, the following JSON creates a 2 column grid with a single + * item: + * ``` + * "grid": { + * "title": "A fine collection of items", + * "columnCount": 2, + * "borderStyle": { + * "type": "STROKE", + * "cornerRadius": 4 + * }, + * "items": [ + * { + * "image": { + * "imageUri": "https://www.example.com/image.png", + * "cropStyle": { + * "type": "SQUARE" + * }, + * "borderStyle": { + * "type": "STROKE" + * } + * }, + * "title": "An item", + * "textAlignment": "CENTER" + * } + * ], + * "onClick": { + * "openLink": { + * "url": "https://www.example.com" + * } + * } + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.Grid grid = 10; + * @param \Google\Apps\Card\V1\Grid $var + * @return $this + */ + public function setGrid($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Grid::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Displays up to 2 columns. + * To include more than 2 columns, or to use rows, use the `Grid` widget. + * For example, the following JSON creates 2 columns that each contain + * text paragraphs: + * ``` + * "columns": { + * "columnItems": [ + * { + * "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", + * "horizontalAlignment": "CENTER", + * "verticalAlignment": "CENTER", + * "widgets": [ + * { + * "textParagraph": { + * "text": "First column text paragraph" + * } + * } + * ] + * }, + * { + * "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", + * "horizontalAlignment": "CENTER", + * "verticalAlignment": "CENTER", + * "widgets": [ + * { + * "textParagraph": { + * "text": "Second column text paragraph" + * } + * } + * ] + * } + * ] + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.Columns columns = 11; + * @return \Google\Apps\Card\V1\Columns|null + */ + public function getColumns() + { + return $this->readOneof(11); + } + + public function hasColumns() + { + return $this->hasOneof(11); + } + + /** + * Displays up to 2 columns. + * To include more than 2 columns, or to use rows, use the `Grid` widget. + * For example, the following JSON creates 2 columns that each contain + * text paragraphs: + * ``` + * "columns": { + * "columnItems": [ + * { + * "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", + * "horizontalAlignment": "CENTER", + * "verticalAlignment": "CENTER", + * "widgets": [ + * { + * "textParagraph": { + * "text": "First column text paragraph" + * } + * } + * ] + * }, + * { + * "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", + * "horizontalAlignment": "CENTER", + * "verticalAlignment": "CENTER", + * "widgets": [ + * { + * "textParagraph": { + * "text": "Second column text paragraph" + * } + * } + * ] + * } + * ] + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.Columns columns = 11; + * @param \Google\Apps\Card\V1\Columns $var + * @return $this + */ + public function setColumns($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Columns::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Specifies whether widgets align to the left, right, or center of a column. + * + * Generated from protobuf field .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 8; + * @return int + */ + public function getHorizontalAlignment() + { + return $this->horizontal_alignment; + } + + /** + * Specifies whether widgets align to the left, right, or center of a column. + * + * Generated from protobuf field .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 8; + * @param int $var + * @return $this + */ + public function setHorizontalAlignment($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Widget\HorizontalAlignment::class); + $this->horizontal_alignment = $var; + + return $this; + } + + /** + * @return string + */ + public function getData() + { + return $this->whichOneof("data"); + } + +} + diff --git a/AppsChat/src/Card/V1/Widget/HorizontalAlignment.php b/AppsChat/src/Card/V1/Widget/HorizontalAlignment.php new file mode 100644 index 000000000000..671c6ea5cf14 --- /dev/null +++ b/AppsChat/src/Card/V1/Widget/HorizontalAlignment.php @@ -0,0 +1,74 @@ +google.apps.card.v1.Widget.HorizontalAlignment + */ +class HorizontalAlignment +{ + /** + * Don't use. Unspecified. + * + * Generated from protobuf enum HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0; + */ + const HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0; + /** + * Default value. Aligns widgets to the start position of the column. For + * left-to-right layouts, aligns to the left. For right-to-left layouts, + * aligns to the right. + * + * Generated from protobuf enum START = 1; + */ + const START = 1; + /** + * Aligns widgets to the center of the column. + * + * Generated from protobuf enum CENTER = 2; + */ + const CENTER = 2; + /** + * Aligns widgets to the end position of the column. For left-to-right + * layouts, aligns widgets to the right. For right-to-left layouts, aligns + * widgets to the left. + * + * Generated from protobuf enum END = 3; + */ + const END = 3; + + private static $valueToName = [ + self::HORIZONTAL_ALIGNMENT_UNSPECIFIED => 'HORIZONTAL_ALIGNMENT_UNSPECIFIED', + self::START => 'START', + self::CENTER => 'CENTER', + self::END => 'END', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Card/V1/Widget/ImageType.php b/AppsChat/src/Card/V1/Widget/ImageType.php new file mode 100644 index 000000000000..6f928738546a --- /dev/null +++ b/AppsChat/src/Card/V1/Widget/ImageType.php @@ -0,0 +1,59 @@ +google.apps.card.v1.Widget.ImageType + */ +class ImageType +{ + /** + * Default value. Applies a square mask to the image. For example, a 4x3 + * image becomes 3x3. + * + * Generated from protobuf enum SQUARE = 0; + */ + const SQUARE = 0; + /** + * Applies a circular mask to the image. For example, a 4x3 image becomes a + * circle with a diameter of 3. + * + * Generated from protobuf enum CIRCLE = 1; + */ + const CIRCLE = 1; + + private static $valueToName = [ + self::SQUARE => 'SQUARE', + self::CIRCLE => 'CIRCLE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Chat/V1/AccessoryWidget.php b/AppsChat/src/Chat/V1/AccessoryWidget.php new file mode 100644 index 000000000000..f752a3ac9111 --- /dev/null +++ b/AppsChat/src/Chat/V1/AccessoryWidget.php @@ -0,0 +1,77 @@ +google.chat.v1.AccessoryWidget + */ +class AccessoryWidget extends \Google\Protobuf\Internal\Message +{ + protected $action; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Card\V1\ButtonList $button_list + * A list of buttons. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * A list of buttons. + * + * Generated from protobuf field .google.apps.card.v1.ButtonList button_list = 1; + * @return \Google\Apps\Card\V1\ButtonList|null + */ + public function getButtonList() + { + return $this->readOneof(1); + } + + public function hasButtonList() + { + return $this->hasOneof(1); + } + + /** + * A list of buttons. + * + * Generated from protobuf field .google.apps.card.v1.ButtonList button_list = 1; + * @param \Google\Apps\Card\V1\ButtonList $var + * @return $this + */ + public function setButtonList($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\ButtonList::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getAction() + { + return $this->whichOneof("action"); + } + +} + diff --git a/AppsChat/src/Chat/V1/ActionResponse.php b/AppsChat/src/Chat/V1/ActionResponse.php new file mode 100644 index 000000000000..ab29fb67f3d4 --- /dev/null +++ b/AppsChat/src/Chat/V1/ActionResponse.php @@ -0,0 +1,201 @@ +google.chat.v1.ActionResponse + */ +class ActionResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Input only. The type of Chat app response. + * + * Generated from protobuf field .google.chat.v1.ActionResponse.ResponseType type = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $type = 0; + /** + * Input only. URL for users to authenticate or configure. (Only for + * `REQUEST_CONFIG` response types.) + * + * Generated from protobuf field string url = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $url = ''; + /** + * Input only. A response to an interaction event related to a + * [dialog](https://developers.google.com/workspace/chat/dialogs). Must be + * accompanied by `ResponseType.Dialog`. + * + * Generated from protobuf field .google.chat.v1.DialogAction dialog_action = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $dialog_action = null; + /** + * Input only. The response of the updated widget. + * + * Generated from protobuf field .google.chat.v1.ActionResponse.UpdatedWidget updated_widget = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $updated_widget = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Input only. The type of Chat app response. + * @type string $url + * Input only. URL for users to authenticate or configure. (Only for + * `REQUEST_CONFIG` response types.) + * @type \Google\Apps\Chat\V1\DialogAction $dialog_action + * Input only. A response to an interaction event related to a + * [dialog](https://developers.google.com/workspace/chat/dialogs). Must be + * accompanied by `ResponseType.Dialog`. + * @type \Google\Apps\Chat\V1\ActionResponse\UpdatedWidget $updated_widget + * Input only. The response of the updated widget. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Input only. The type of Chat app response. + * + * Generated from protobuf field .google.chat.v1.ActionResponse.ResponseType type = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Input only. The type of Chat app response. + * + * Generated from protobuf field .google.chat.v1.ActionResponse.ResponseType type = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\ActionResponse\ResponseType::class); + $this->type = $var; + + return $this; + } + + /** + * Input only. URL for users to authenticate or configure. (Only for + * `REQUEST_CONFIG` response types.) + * + * Generated from protobuf field string url = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * Input only. URL for users to authenticate or configure. (Only for + * `REQUEST_CONFIG` response types.) + * + * Generated from protobuf field string url = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + + /** + * Input only. A response to an interaction event related to a + * [dialog](https://developers.google.com/workspace/chat/dialogs). Must be + * accompanied by `ResponseType.Dialog`. + * + * Generated from protobuf field .google.chat.v1.DialogAction dialog_action = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Apps\Chat\V1\DialogAction|null + */ + public function getDialogAction() + { + return $this->dialog_action; + } + + public function hasDialogAction() + { + return isset($this->dialog_action); + } + + public function clearDialogAction() + { + unset($this->dialog_action); + } + + /** + * Input only. A response to an interaction event related to a + * [dialog](https://developers.google.com/workspace/chat/dialogs). Must be + * accompanied by `ResponseType.Dialog`. + * + * Generated from protobuf field .google.chat.v1.DialogAction dialog_action = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Apps\Chat\V1\DialogAction $var + * @return $this + */ + public function setDialogAction($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\DialogAction::class); + $this->dialog_action = $var; + + return $this; + } + + /** + * Input only. The response of the updated widget. + * + * Generated from protobuf field .google.chat.v1.ActionResponse.UpdatedWidget updated_widget = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Apps\Chat\V1\ActionResponse\UpdatedWidget|null + */ + public function getUpdatedWidget() + { + return $this->updated_widget; + } + + public function hasUpdatedWidget() + { + return isset($this->updated_widget); + } + + public function clearUpdatedWidget() + { + unset($this->updated_widget); + } + + /** + * Input only. The response of the updated widget. + * + * Generated from protobuf field .google.chat.v1.ActionResponse.UpdatedWidget updated_widget = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Apps\Chat\V1\ActionResponse\UpdatedWidget $var + * @return $this + */ + public function setUpdatedWidget($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\ActionResponse\UpdatedWidget::class); + $this->updated_widget = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/ActionResponse/ResponseType.php b/AppsChat/src/Chat/V1/ActionResponse/ResponseType.php new file mode 100644 index 000000000000..0388bcef37bb --- /dev/null +++ b/AppsChat/src/Chat/V1/ActionResponse/ResponseType.php @@ -0,0 +1,94 @@ +google.chat.v1.ActionResponse.ResponseType + */ +class ResponseType +{ + /** + * Default type that's handled as `NEW_MESSAGE`. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Post as a new message in the topic. + * + * Generated from protobuf enum NEW_MESSAGE = 1; + */ + const NEW_MESSAGE = 1; + /** + * Update the Chat app's message. This is only permitted on a `CARD_CLICKED` + * event where the message sender type is `BOT`. + * + * Generated from protobuf enum UPDATE_MESSAGE = 2; + */ + const UPDATE_MESSAGE = 2; + /** + * Update the cards on a user's message. This is only permitted as a + * response to a `MESSAGE` event with a matched url, or a `CARD_CLICKED` + * event where the message sender type is `HUMAN`. Text is ignored. + * + * Generated from protobuf enum UPDATE_USER_MESSAGE_CARDS = 6; + */ + const UPDATE_USER_MESSAGE_CARDS = 6; + /** + * Privately ask the user for additional authentication or configuration. + * + * Generated from protobuf enum REQUEST_CONFIG = 3; + */ + const REQUEST_CONFIG = 3; + /** + * Presents a + * [dialog](https://developers.google.com/workspace/chat/dialogs). + * + * Generated from protobuf enum DIALOG = 4; + */ + const DIALOG = 4; + /** + * Widget text autocomplete options query. + * + * Generated from protobuf enum UPDATE_WIDGET = 7; + */ + const UPDATE_WIDGET = 7; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::NEW_MESSAGE => 'NEW_MESSAGE', + self::UPDATE_MESSAGE => 'UPDATE_MESSAGE', + self::UPDATE_USER_MESSAGE_CARDS => 'UPDATE_USER_MESSAGE_CARDS', + self::REQUEST_CONFIG => 'REQUEST_CONFIG', + self::DIALOG => 'DIALOG', + self::UPDATE_WIDGET => 'UPDATE_WIDGET', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Chat/V1/ActionResponse/SelectionItems.php b/AppsChat/src/Chat/V1/ActionResponse/SelectionItems.php new file mode 100644 index 000000000000..990c69dce3d1 --- /dev/null +++ b/AppsChat/src/Chat/V1/ActionResponse/SelectionItems.php @@ -0,0 +1,68 @@ +google.chat.v1.ActionResponse.SelectionItems + */ +class SelectionItems extends \Google\Protobuf\Internal\Message +{ + /** + * An array of the SelectionItem objects. + * + * Generated from protobuf field repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 1; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Apps\Card\V1\SelectionInput\SelectionItem>|\Google\Protobuf\Internal\RepeatedField $items + * An array of the SelectionItem objects. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * An array of the SelectionItem objects. + * + * Generated from protobuf field repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * An array of the SelectionItem objects. + * + * Generated from protobuf field repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 1; + * @param array<\Google\Apps\Card\V1\SelectionInput\SelectionItem>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\SelectionInput\SelectionItem::class); + $this->items = $arr; + + return $this; + } + +} + + diff --git a/AppsChat/src/Chat/V1/ActionResponse/UpdatedWidget.php b/AppsChat/src/Chat/V1/ActionResponse/UpdatedWidget.php new file mode 100644 index 000000000000..0d8dd3bb27ef --- /dev/null +++ b/AppsChat/src/Chat/V1/ActionResponse/UpdatedWidget.php @@ -0,0 +1,115 @@ +google.chat.v1.ActionResponse.UpdatedWidget + */ +class UpdatedWidget extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the updated widget. The ID must match the one for the + * widget that triggered the update request. + * + * Generated from protobuf field string widget = 2; + */ + protected $widget = ''; + protected $updated_widget; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\ActionResponse\SelectionItems $suggestions + * List of widget autocomplete results + * @type string $widget + * The ID of the updated widget. The ID must match the one for the + * widget that triggered the update request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * List of widget autocomplete results + * + * Generated from protobuf field .google.chat.v1.ActionResponse.SelectionItems suggestions = 1; + * @return \Google\Apps\Chat\V1\ActionResponse\SelectionItems|null + */ + public function getSuggestions() + { + return $this->readOneof(1); + } + + public function hasSuggestions() + { + return $this->hasOneof(1); + } + + /** + * List of widget autocomplete results + * + * Generated from protobuf field .google.chat.v1.ActionResponse.SelectionItems suggestions = 1; + * @param \Google\Apps\Chat\V1\ActionResponse\SelectionItems $var + * @return $this + */ + public function setSuggestions($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\ActionResponse\SelectionItems::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The ID of the updated widget. The ID must match the one for the + * widget that triggered the update request. + * + * Generated from protobuf field string widget = 2; + * @return string + */ + public function getWidget() + { + return $this->widget; + } + + /** + * The ID of the updated widget. The ID must match the one for the + * widget that triggered the update request. + * + * Generated from protobuf field string widget = 2; + * @param string $var + * @return $this + */ + public function setWidget($var) + { + GPBUtil::checkString($var, True); + $this->widget = $var; + + return $this; + } + + /** + * @return string + */ + public function getUpdatedWidget() + { + return $this->whichOneof("updated_widget"); + } + +} + + diff --git a/AppsChat/src/Chat/V1/ActionStatus.php b/AppsChat/src/Chat/V1/ActionStatus.php new file mode 100644 index 000000000000..687ef00ac63c --- /dev/null +++ b/AppsChat/src/Chat/V1/ActionStatus.php @@ -0,0 +1,106 @@ +google.chat.v1.ActionStatus + */ +class ActionStatus extends \Google\Protobuf\Internal\Message +{ + /** + * The status code. + * + * Generated from protobuf field .google.rpc.Code status_code = 1; + */ + protected $status_code = 0; + /** + * The message to send users about the status of their request. + * If unset, a generic message based on the `status_code` is sent. + * + * Generated from protobuf field string user_facing_message = 2; + */ + protected $user_facing_message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $status_code + * The status code. + * @type string $user_facing_message + * The message to send users about the status of their request. + * If unset, a generic message based on the `status_code` is sent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\ActionStatus::initOnce(); + parent::__construct($data); + } + + /** + * The status code. + * + * Generated from protobuf field .google.rpc.Code status_code = 1; + * @return int + */ + public function getStatusCode() + { + return $this->status_code; + } + + /** + * The status code. + * + * Generated from protobuf field .google.rpc.Code status_code = 1; + * @param int $var + * @return $this + */ + public function setStatusCode($var) + { + GPBUtil::checkEnum($var, \Google\Rpc\Code::class); + $this->status_code = $var; + + return $this; + } + + /** + * The message to send users about the status of their request. + * If unset, a generic message based on the `status_code` is sent. + * + * Generated from protobuf field string user_facing_message = 2; + * @return string + */ + public function getUserFacingMessage() + { + return $this->user_facing_message; + } + + /** + * The message to send users about the status of their request. + * If unset, a generic message based on the `status_code` is sent. + * + * Generated from protobuf field string user_facing_message = 2; + * @param string $var + * @return $this + */ + public function setUserFacingMessage($var) + { + GPBUtil::checkString($var, True); + $this->user_facing_message = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/Annotation.php b/AppsChat/src/Chat/V1/Annotation.php new file mode 100644 index 000000000000..7c9e10fdc422 --- /dev/null +++ b/AppsChat/src/Chat/V1/Annotation.php @@ -0,0 +1,285 @@ +google.chat.v1.Annotation + */ +class Annotation extends \Google\Protobuf\Internal\Message +{ + /** + * The type of this annotation. + * + * Generated from protobuf field .google.chat.v1.AnnotationType type = 1; + */ + protected $type = 0; + /** + * Start index (0-based, inclusive) in the plain-text message body this + * annotation corresponds to. + * + * Generated from protobuf field optional int32 start_index = 2; + */ + protected $start_index = null; + /** + * Length of the substring in the plain-text message body this annotation + * corresponds to. + * + * Generated from protobuf field int32 length = 3; + */ + protected $length = 0; + protected $metadata; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * The type of this annotation. + * @type int $start_index + * Start index (0-based, inclusive) in the plain-text message body this + * annotation corresponds to. + * @type int $length + * Length of the substring in the plain-text message body this annotation + * corresponds to. + * @type \Google\Apps\Chat\V1\UserMentionMetadata $user_mention + * The metadata of user mention. + * @type \Google\Apps\Chat\V1\SlashCommandMetadata $slash_command + * The metadata for a slash command. + * @type \Google\Apps\Chat\V1\RichLinkMetadata $rich_link_metadata + * The metadata for a rich link. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Annotation::initOnce(); + parent::__construct($data); + } + + /** + * The type of this annotation. + * + * Generated from protobuf field .google.chat.v1.AnnotationType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of this annotation. + * + * Generated from protobuf field .google.chat.v1.AnnotationType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\AnnotationType::class); + $this->type = $var; + + return $this; + } + + /** + * Start index (0-based, inclusive) in the plain-text message body this + * annotation corresponds to. + * + * Generated from protobuf field optional int32 start_index = 2; + * @return int + */ + public function getStartIndex() + { + return isset($this->start_index) ? $this->start_index : 0; + } + + public function hasStartIndex() + { + return isset($this->start_index); + } + + public function clearStartIndex() + { + unset($this->start_index); + } + + /** + * Start index (0-based, inclusive) in the plain-text message body this + * annotation corresponds to. + * + * Generated from protobuf field optional int32 start_index = 2; + * @param int $var + * @return $this + */ + public function setStartIndex($var) + { + GPBUtil::checkInt32($var); + $this->start_index = $var; + + return $this; + } + + /** + * Length of the substring in the plain-text message body this annotation + * corresponds to. + * + * Generated from protobuf field int32 length = 3; + * @return int + */ + public function getLength() + { + return $this->length; + } + + /** + * Length of the substring in the plain-text message body this annotation + * corresponds to. + * + * Generated from protobuf field int32 length = 3; + * @param int $var + * @return $this + */ + public function setLength($var) + { + GPBUtil::checkInt32($var); + $this->length = $var; + + return $this; + } + + /** + * The metadata of user mention. + * + * Generated from protobuf field .google.chat.v1.UserMentionMetadata user_mention = 4; + * @return \Google\Apps\Chat\V1\UserMentionMetadata|null + */ + public function getUserMention() + { + return $this->readOneof(4); + } + + public function hasUserMention() + { + return $this->hasOneof(4); + } + + /** + * The metadata of user mention. + * + * Generated from protobuf field .google.chat.v1.UserMentionMetadata user_mention = 4; + * @param \Google\Apps\Chat\V1\UserMentionMetadata $var + * @return $this + */ + public function setUserMention($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\UserMentionMetadata::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * The metadata for a slash command. + * + * Generated from protobuf field .google.chat.v1.SlashCommandMetadata slash_command = 5; + * @return \Google\Apps\Chat\V1\SlashCommandMetadata|null + */ + public function getSlashCommand() + { + return $this->readOneof(5); + } + + public function hasSlashCommand() + { + return $this->hasOneof(5); + } + + /** + * The metadata for a slash command. + * + * Generated from protobuf field .google.chat.v1.SlashCommandMetadata slash_command = 5; + * @param \Google\Apps\Chat\V1\SlashCommandMetadata $var + * @return $this + */ + public function setSlashCommand($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\SlashCommandMetadata::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * The metadata for a rich link. + * + * Generated from protobuf field .google.chat.v1.RichLinkMetadata rich_link_metadata = 6; + * @return \Google\Apps\Chat\V1\RichLinkMetadata|null + */ + public function getRichLinkMetadata() + { + return $this->readOneof(6); + } + + public function hasRichLinkMetadata() + { + return $this->hasOneof(6); + } + + /** + * The metadata for a rich link. + * + * Generated from protobuf field .google.chat.v1.RichLinkMetadata rich_link_metadata = 6; + * @param \Google\Apps\Chat\V1\RichLinkMetadata $var + * @return $this + */ + public function setRichLinkMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\RichLinkMetadata::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getMetadata() + { + return $this->whichOneof("metadata"); + } + +} + diff --git a/AppsChat/src/Chat/V1/AnnotationType.php b/AppsChat/src/Chat/V1/AnnotationType.php new file mode 100644 index 000000000000..c9b09b768c19 --- /dev/null +++ b/AppsChat/src/Chat/V1/AnnotationType.php @@ -0,0 +1,68 @@ +google.chat.v1.AnnotationType + */ +class AnnotationType +{ + /** + * Default value for the enum. Don't use. + * + * Generated from protobuf enum ANNOTATION_TYPE_UNSPECIFIED = 0; + */ + const ANNOTATION_TYPE_UNSPECIFIED = 0; + /** + * A user is mentioned. + * + * Generated from protobuf enum USER_MENTION = 1; + */ + const USER_MENTION = 1; + /** + * A slash command is invoked. + * + * Generated from protobuf enum SLASH_COMMAND = 2; + */ + const SLASH_COMMAND = 2; + /** + * A rich link annotation. + * + * Generated from protobuf enum RICH_LINK = 3; + */ + const RICH_LINK = 3; + + private static $valueToName = [ + self::ANNOTATION_TYPE_UNSPECIFIED => 'ANNOTATION_TYPE_UNSPECIFIED', + self::USER_MENTION => 'USER_MENTION', + self::SLASH_COMMAND => 'SLASH_COMMAND', + self::RICH_LINK => 'RICH_LINK', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/AppsChat/src/Chat/V1/AttachedGif.php b/AppsChat/src/Chat/V1/AttachedGif.php new file mode 100644 index 000000000000..0856cd583a48 --- /dev/null +++ b/AppsChat/src/Chat/V1/AttachedGif.php @@ -0,0 +1,67 @@ +google.chat.v1.AttachedGif + */ +class AttachedGif extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The URL that hosts the GIF image. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Output only. The URL that hosts the GIF image. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The URL that hosts the GIF image. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Output only. The URL that hosts the GIF image. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/Attachment.php b/AppsChat/src/Chat/V1/Attachment.php new file mode 100644 index 000000000000..dd041ff28c9d --- /dev/null +++ b/AppsChat/src/Chat/V1/Attachment.php @@ -0,0 +1,338 @@ +google.chat.v1.Attachment + */ +class Attachment extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the attachment, in the form + * `spaces/*/messages/*/attachments/*`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The original file name for the content, not the full path. + * + * Generated from protobuf field string content_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $content_name = ''; + /** + * Output only. The content type (MIME type) of the file. + * + * Generated from protobuf field string content_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $content_type = ''; + /** + * Output only. The thumbnail URL which should be used to preview the + * attachment to a human user. Chat apps shouldn't use this URL to download + * attachment content. + * + * Generated from protobuf field string thumbnail_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $thumbnail_uri = ''; + /** + * Output only. The download URL which should be used to allow a human user to + * download the attachment. Chat apps shouldn't use this URL to download + * attachment content. + * + * Generated from protobuf field string download_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $download_uri = ''; + /** + * Output only. The source of the attachment. + * + * Generated from protobuf field .google.chat.v1.Attachment.Source source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $source = 0; + protected $data_ref; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name of the attachment, in the form + * `spaces/*/messages/*/attachments/*`. + * @type string $content_name + * Output only. The original file name for the content, not the full path. + * @type string $content_type + * Output only. The content type (MIME type) of the file. + * @type \Google\Apps\Chat\V1\AttachmentDataRef $attachment_data_ref + * A reference to the attachment data. This field is used with the media API + * to download the attachment data. + * @type \Google\Apps\Chat\V1\DriveDataRef $drive_data_ref + * Output only. A reference to the Google Drive attachment. This field is + * used with the Google Drive API. + * @type string $thumbnail_uri + * Output only. The thumbnail URL which should be used to preview the + * attachment to a human user. Chat apps shouldn't use this URL to download + * attachment content. + * @type string $download_uri + * Output only. The download URL which should be used to allow a human user to + * download the attachment. Chat apps shouldn't use this URL to download + * attachment content. + * @type int $source + * Output only. The source of the attachment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Attachment::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the attachment, in the form + * `spaces/*/messages/*/attachments/*`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name of the attachment, in the form + * `spaces/*/messages/*/attachments/*`. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The original file name for the content, not the full path. + * + * Generated from protobuf field string content_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getContentName() + { + return $this->content_name; + } + + /** + * Output only. The original file name for the content, not the full path. + * + * Generated from protobuf field string content_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setContentName($var) + { + GPBUtil::checkString($var, True); + $this->content_name = $var; + + return $this; + } + + /** + * Output only. The content type (MIME type) of the file. + * + * Generated from protobuf field string content_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getContentType() + { + return $this->content_type; + } + + /** + * Output only. The content type (MIME type) of the file. + * + * Generated from protobuf field string content_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setContentType($var) + { + GPBUtil::checkString($var, True); + $this->content_type = $var; + + return $this; + } + + /** + * A reference to the attachment data. This field is used with the media API + * to download the attachment data. + * + * Generated from protobuf field .google.chat.v1.AttachmentDataRef attachment_data_ref = 4; + * @return \Google\Apps\Chat\V1\AttachmentDataRef|null + */ + public function getAttachmentDataRef() + { + return $this->readOneof(4); + } + + public function hasAttachmentDataRef() + { + return $this->hasOneof(4); + } + + /** + * A reference to the attachment data. This field is used with the media API + * to download the attachment data. + * + * Generated from protobuf field .google.chat.v1.AttachmentDataRef attachment_data_ref = 4; + * @param \Google\Apps\Chat\V1\AttachmentDataRef $var + * @return $this + */ + public function setAttachmentDataRef($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\AttachmentDataRef::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Output only. A reference to the Google Drive attachment. This field is + * used with the Google Drive API. + * + * Generated from protobuf field .google.chat.v1.DriveDataRef drive_data_ref = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Apps\Chat\V1\DriveDataRef|null + */ + public function getDriveDataRef() + { + return $this->readOneof(7); + } + + public function hasDriveDataRef() + { + return $this->hasOneof(7); + } + + /** + * Output only. A reference to the Google Drive attachment. This field is + * used with the Google Drive API. + * + * Generated from protobuf field .google.chat.v1.DriveDataRef drive_data_ref = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Apps\Chat\V1\DriveDataRef $var + * @return $this + */ + public function setDriveDataRef($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\DriveDataRef::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Output only. The thumbnail URL which should be used to preview the + * attachment to a human user. Chat apps shouldn't use this URL to download + * attachment content. + * + * Generated from protobuf field string thumbnail_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getThumbnailUri() + { + return $this->thumbnail_uri; + } + + /** + * Output only. The thumbnail URL which should be used to preview the + * attachment to a human user. Chat apps shouldn't use this URL to download + * attachment content. + * + * Generated from protobuf field string thumbnail_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setThumbnailUri($var) + { + GPBUtil::checkString($var, True); + $this->thumbnail_uri = $var; + + return $this; + } + + /** + * Output only. The download URL which should be used to allow a human user to + * download the attachment. Chat apps shouldn't use this URL to download + * attachment content. + * + * Generated from protobuf field string download_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDownloadUri() + { + return $this->download_uri; + } + + /** + * Output only. The download URL which should be used to allow a human user to + * download the attachment. Chat apps shouldn't use this URL to download + * attachment content. + * + * Generated from protobuf field string download_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDownloadUri($var) + { + GPBUtil::checkString($var, True); + $this->download_uri = $var; + + return $this; + } + + /** + * Output only. The source of the attachment. + * + * Generated from protobuf field .google.chat.v1.Attachment.Source source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getSource() + { + return $this->source; + } + + /** + * Output only. The source of the attachment. + * + * Generated from protobuf field .google.chat.v1.Attachment.Source source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\Attachment\Source::class); + $this->source = $var; + + return $this; + } + + /** + * @return string + */ + public function getDataRef() + { + return $this->whichOneof("data_ref"); + } + +} + diff --git a/AppsChat/src/Chat/V1/Attachment/Source.php b/AppsChat/src/Chat/V1/Attachment/Source.php new file mode 100644 index 000000000000..3d86c29161cc --- /dev/null +++ b/AppsChat/src/Chat/V1/Attachment/Source.php @@ -0,0 +1,62 @@ +google.chat.v1.Attachment.Source + */ +class Source +{ + /** + * Reserved. + * + * Generated from protobuf enum SOURCE_UNSPECIFIED = 0; + */ + const SOURCE_UNSPECIFIED = 0; + /** + * The file is a Google Drive file. + * + * Generated from protobuf enum DRIVE_FILE = 1; + */ + const DRIVE_FILE = 1; + /** + * The file is uploaded to Chat. + * + * Generated from protobuf enum UPLOADED_CONTENT = 2; + */ + const UPLOADED_CONTENT = 2; + + private static $valueToName = [ + self::SOURCE_UNSPECIFIED => 'SOURCE_UNSPECIFIED', + self::DRIVE_FILE => 'DRIVE_FILE', + self::UPLOADED_CONTENT => 'UPLOADED_CONTENT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Chat/V1/AttachmentDataRef.php b/AppsChat/src/Chat/V1/AttachmentDataRef.php new file mode 100644 index 000000000000..713e30068a9b --- /dev/null +++ b/AppsChat/src/Chat/V1/AttachmentDataRef.php @@ -0,0 +1,113 @@ +google.chat.v1.AttachmentDataRef + */ +class AttachmentDataRef extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the attachment data. This field is used with the media + * API to download the attachment data. + * + * Generated from protobuf field string resource_name = 1; + */ + protected $resource_name = ''; + /** + * Opaque token containing a reference to an uploaded attachment. Treated by + * clients as an opaque string and used to create or update Chat messages with + * attachments. + * + * Generated from protobuf field string attachment_upload_token = 2; + */ + protected $attachment_upload_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $resource_name + * The resource name of the attachment data. This field is used with the media + * API to download the attachment data. + * @type string $attachment_upload_token + * Opaque token containing a reference to an uploaded attachment. Treated by + * clients as an opaque string and used to create or update Chat messages with + * attachments. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Attachment::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the attachment data. This field is used with the media + * API to download the attachment data. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the attachment data. This field is used with the media + * API to download the attachment data. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + + /** + * Opaque token containing a reference to an uploaded attachment. Treated by + * clients as an opaque string and used to create or update Chat messages with + * attachments. + * + * Generated from protobuf field string attachment_upload_token = 2; + * @return string + */ + public function getAttachmentUploadToken() + { + return $this->attachment_upload_token; + } + + /** + * Opaque token containing a reference to an uploaded attachment. Treated by + * clients as an opaque string and used to create or update Chat messages with + * attachments. + * + * Generated from protobuf field string attachment_upload_token = 2; + * @param string $var + * @return $this + */ + public function setAttachmentUploadToken($var) + { + GPBUtil::checkString($var, True); + $this->attachment_upload_token = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/CardWithId.php b/AppsChat/src/Chat/V1/CardWithId.php new file mode 100644 index 000000000000..3d2235adb173 --- /dev/null +++ b/AppsChat/src/Chat/V1/CardWithId.php @@ -0,0 +1,121 @@ +google.chat.v1.CardWithId + */ +class CardWithId extends \Google\Protobuf\Internal\Message +{ + /** + * Required if the message contains multiple cards. A unique identifier for + * a card in a message. + * + * Generated from protobuf field string card_id = 1; + */ + protected $card_id = ''; + /** + * A card. Maximum size is 32 KB. + * + * Generated from protobuf field .google.apps.card.v1.Card card = 2; + */ + protected $card = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $card_id + * Required if the message contains multiple cards. A unique identifier for + * a card in a message. + * @type \Google\Apps\Card\V1\Card $card + * A card. Maximum size is 32 KB. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Required if the message contains multiple cards. A unique identifier for + * a card in a message. + * + * Generated from protobuf field string card_id = 1; + * @return string + */ + public function getCardId() + { + return $this->card_id; + } + + /** + * Required if the message contains multiple cards. A unique identifier for + * a card in a message. + * + * Generated from protobuf field string card_id = 1; + * @param string $var + * @return $this + */ + public function setCardId($var) + { + GPBUtil::checkString($var, True); + $this->card_id = $var; + + return $this; + } + + /** + * A card. Maximum size is 32 KB. + * + * Generated from protobuf field .google.apps.card.v1.Card card = 2; + * @return \Google\Apps\Card\V1\Card|null + */ + public function getCard() + { + return $this->card; + } + + public function hasCard() + { + return isset($this->card); + } + + public function clearCard() + { + unset($this->card); + } + + /** + * A card. Maximum size is 32 KB. + * + * Generated from protobuf field .google.apps.card.v1.Card card = 2; + * @param \Google\Apps\Card\V1\Card $var + * @return $this + */ + public function setCard($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Card::class); + $this->card = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/Client/ChatServiceClient.php b/AppsChat/src/Chat/V1/Client/ChatServiceClient.php new file mode 100644 index 000000000000..cfbe6d679e84 --- /dev/null +++ b/AppsChat/src/Chat/V1/Client/ChatServiceClient.php @@ -0,0 +1,1210 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/chat_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/chat_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/chat_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/chat_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a attachment + * resource. + * + * @param string $space + * @param string $message + * @param string $attachment + * + * @return string The formatted attachment resource. + */ + public static function attachmentName(string $space, string $message, string $attachment): string + { + return self::getPathTemplate('attachment')->render([ + 'space' => $space, + 'message' => $message, + 'attachment' => $attachment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a membership + * resource. + * + * @param string $space + * @param string $member + * + * @return string The formatted membership resource. + */ + public static function membershipName(string $space, string $member): string + { + return self::getPathTemplate('membership')->render([ + 'space' => $space, + 'member' => $member, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a message + * resource. + * + * @param string $space + * @param string $message + * + * @return string The formatted message resource. + */ + public static function messageName(string $space, string $message): string + { + return self::getPathTemplate('message')->render([ + 'space' => $space, + 'message' => $message, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * quoted_message_metadata resource. + * + * @param string $space + * @param string $message + * @param string $quotedMessageMetadata + * + * @return string The formatted quoted_message_metadata resource. + */ + public static function quotedMessageMetadataName( + string $space, + string $message, + string $quotedMessageMetadata + ): string { + return self::getPathTemplate('quotedMessageMetadata')->render([ + 'space' => $space, + 'message' => $message, + 'quoted_message_metadata' => $quotedMessageMetadata, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a reaction + * resource. + * + * @param string $space + * @param string $message + * @param string $reaction + * + * @return string The formatted reaction resource. + */ + public static function reactionName(string $space, string $message, string $reaction): string + { + return self::getPathTemplate('reaction')->render([ + 'space' => $space, + 'message' => $message, + 'reaction' => $reaction, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a space + * resource. + * + * @param string $space + * + * @return string The formatted space resource. + */ + public static function spaceName(string $space): string + { + return self::getPathTemplate('space')->render([ + 'space' => $space, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a thread + * resource. + * + * @param string $space + * @param string $thread + * + * @return string The formatted thread resource. + */ + public static function threadName(string $space, string $thread): string + { + return self::getPathTemplate('thread')->render([ + 'space' => $space, + 'thread' => $thread, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - attachment: spaces/{space}/messages/{message}/attachments/{attachment} + * - membership: spaces/{space}/members/{member} + * - message: spaces/{space}/messages/{message} + * - quotedMessageMetadata: spaces/{space}/messages/{message}/quotedMessageMetadata/{quoted_message_metadata} + * - reaction: spaces/{space}/messages/{message}/reactions/{reaction} + * - space: spaces/{space} + * - thread: spaces/{space}/threads/{thread} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'chat.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** 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); + } + + /** + * Completes the + * [import process](https://developers.google.com/workspace/chat/import-data) + * for the specified space and makes it visible to users. + * Requires app authentication and domain-wide delegation. For more + * information, see [Authorize Google Chat apps to import + * data](https://developers.google.com/workspace/chat/authorize-import). + * + * The async variant is {@see ChatServiceClient::completeImportSpaceAsync()} . + * + * @example samples/V1/ChatServiceClient/complete_import_space.php + * + * @param CompleteImportSpaceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CompleteImportSpaceResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function completeImportSpace( + CompleteImportSpaceRequest $request, + array $callOptions = [] + ): CompleteImportSpaceResponse { + return $this->startApiCall('CompleteImportSpace', $request, $callOptions)->wait(); + } + + /** + * Creates a human membership or app membership for the calling app. Creating + * memberships for other apps isn't supported. For an example, see + * [Invite or add a user or a Google Chat app to a + * space](https://developers.google.com/workspace/chat/create-members). + * When creating a membership, if the specified member has their auto-accept + * policy turned off, then they're invited, and must accept the space + * invitation before joining. Otherwise, creating a membership adds the member + * directly to the specified space. Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * To specify the member to add, set the `membership.member.name` in the + * `CreateMembershipRequest`: + * + * - To add the calling app to a space or a direct message between two human + * users, use `users/app`. Unable to add other + * apps to the space. + * + * - To add a human user, use `users/{user}`, where `{user}` can be the email + * address for the user. For users in the same Workspace organization `{user}` + * can also be the `id` for the person from the People API, or the `id` for + * the user in the Directory API. For example, if the People API Person + * profile ID for `user@example.com` is `123456789`, you can add the user to + * the space by setting the `membership.member.name` to + * `users/user@example.com` or `users/123456789`. + * + * The async variant is {@see ChatServiceClient::createMembershipAsync()} . + * + * @example samples/V1/ChatServiceClient/create_membership.php + * + * @param CreateMembershipRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Membership + * + * @throws ApiException Thrown if the API call fails. + */ + public function createMembership(CreateMembershipRequest $request, array $callOptions = []): Membership + { + return $this->startApiCall('CreateMembership', $request, $callOptions)->wait(); + } + + /** + * Creates a message in a Google Chat space. For an example, see [Send a + * message](https://developers.google.com/workspace/chat/create-messages). + * + * Calling this method requires + * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize) + * and supports the following authentication types: + * + * - For text messages, user authentication or app authentication are + * supported. + * - For card messages, only app authentication is supported. (Only Chat apps + * can create card messages.) + * + * The async variant is {@see ChatServiceClient::createMessageAsync()} . + * + * @example samples/V1/ChatServiceClient/create_message.php + * + * @param CreateMessageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Message + * + * @throws ApiException Thrown if the API call fails. + */ + public function createMessage(CreateMessageRequest $request, array $callOptions = []): Message + { + return $this->startApiCall('CreateMessage', $request, $callOptions)->wait(); + } + + /** + * Creates a reaction and adds it to a message. Only unicode emojis are + * supported. For an example, see + * [Add a reaction to a + * message](https://developers.google.com/workspace/chat/create-reactions). + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::createReactionAsync()} . + * + * @example samples/V1/ChatServiceClient/create_reaction.php + * + * @param CreateReactionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Reaction + * + * @throws ApiException Thrown if the API call fails. + */ + public function createReaction(CreateReactionRequest $request, array $callOptions = []): Reaction + { + return $this->startApiCall('CreateReaction', $request, $callOptions)->wait(); + } + + /** + * Creates a named space. Spaces grouped by topics aren't supported. For an + * example, see [Create a + * space](https://developers.google.com/workspace/chat/create-spaces). + * + * If you receive the error message `ALREADY_EXISTS` when creating + * a space, try a different `displayName`. An existing space within + * the Google Workspace organization might already use this display name. + * + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::createSpaceAsync()} . + * + * @example samples/V1/ChatServiceClient/create_space.php + * + * @param CreateSpaceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Space + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSpace(CreateSpaceRequest $request, array $callOptions = []): Space + { + return $this->startApiCall('CreateSpace', $request, $callOptions)->wait(); + } + + /** + * Deletes a membership. For an example, see + * [Remove a user or a Google Chat app from a + * space](https://developers.google.com/workspace/chat/delete-members). + * + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::deleteMembershipAsync()} . + * + * @example samples/V1/ChatServiceClient/delete_membership.php + * + * @param DeleteMembershipRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Membership + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteMembership(DeleteMembershipRequest $request, array $callOptions = []): Membership + { + return $this->startApiCall('DeleteMembership', $request, $callOptions)->wait(); + } + + /** + * Deletes a message. + * For an example, see [Delete a + * message](https://developers.google.com/workspace/chat/delete-messages). + * + * Requires + * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). + * Supports + * [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + * and [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * When using app authentication, requests can only delete messages + * created by the calling Chat app. + * + * The async variant is {@see ChatServiceClient::deleteMessageAsync()} . + * + * @example samples/V1/ChatServiceClient/delete_message.php + * + * @param DeleteMessageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteMessage(DeleteMessageRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteMessage', $request, $callOptions)->wait(); + } + + /** + * Deletes a reaction to a message. Only unicode emojis are supported. + * For an example, see + * [Delete a + * reaction](https://developers.google.com/workspace/chat/delete-reactions). + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::deleteReactionAsync()} . + * + * @example samples/V1/ChatServiceClient/delete_reaction.php + * + * @param DeleteReactionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteReaction(DeleteReactionRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteReaction', $request, $callOptions)->wait(); + } + + /** + * Deletes a named space. Always performs a cascading delete, which means + * that the space's child resources—like messages posted in the space and + * memberships in the space—are also deleted. For an example, see + * [Delete a + * space](https://developers.google.com/workspace/chat/delete-spaces). + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * from a user who has permission to delete the space. + * + * The async variant is {@see ChatServiceClient::deleteSpaceAsync()} . + * + * @example samples/V1/ChatServiceClient/delete_space.php + * + * @param DeleteSpaceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteSpace(DeleteSpaceRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteSpace', $request, $callOptions)->wait(); + } + + /** + * Returns the existing direct message with the specified user. If no direct + * message space is found, returns a `404 NOT_FOUND` error. For an example, + * see + * [Find a direct message](/chat/api/guides/v1/spaces/find-direct-message). + * + * With [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * returns the direct message space between the specified user and the + * authenticated user. + * + * With [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app), + * returns the direct message space between the specified user and the calling + * Chat app. + * + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * or [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + * + * The async variant is {@see ChatServiceClient::findDirectMessageAsync()} . + * + * @example samples/V1/ChatServiceClient/find_direct_message.php + * + * @param FindDirectMessageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Space + * + * @throws ApiException Thrown if the API call fails. + */ + public function findDirectMessage(FindDirectMessageRequest $request, array $callOptions = []): Space + { + return $this->startApiCall('FindDirectMessage', $request, $callOptions)->wait(); + } + + /** + * Gets the metadata of a message attachment. The attachment data is fetched + * using the [media + * API](https://developers.google.com/workspace/chat/api/reference/rest/v1/media/download). + * For an example, see + * [Get metadata about a message + * attachment](https://developers.google.com/workspace/chat/get-media-attachments). + * Requires [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + * + * The async variant is {@see ChatServiceClient::getAttachmentAsync()} . + * + * @example samples/V1/ChatServiceClient/get_attachment.php + * + * @param GetAttachmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Attachment + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAttachment(GetAttachmentRequest $request, array $callOptions = []): Attachment + { + return $this->startApiCall('GetAttachment', $request, $callOptions)->wait(); + } + + /** + * Returns details about a membership. For an example, see + * [Get details about a user's or Google Chat app's + * membership](https://developers.google.com/workspace/chat/get-members). + * + * Requires + * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). + * Supports + * [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + * and [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::getMembershipAsync()} . + * + * @example samples/V1/ChatServiceClient/get_membership.php + * + * @param GetMembershipRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Membership + * + * @throws ApiException Thrown if the API call fails. + */ + public function getMembership(GetMembershipRequest $request, array $callOptions = []): Membership + { + return $this->startApiCall('GetMembership', $request, $callOptions)->wait(); + } + + /** + * Returns details about a message. + * For an example, see [Get details about a + * message](https://developers.google.com/workspace/chat/get-messages). + * + * Requires + * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). + * Supports + * [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + * and [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * Note: Might return a message from a blocked member or space. + * + * The async variant is {@see ChatServiceClient::getMessageAsync()} . + * + * @example samples/V1/ChatServiceClient/get_message.php + * + * @param GetMessageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Message + * + * @throws ApiException Thrown if the API call fails. + */ + public function getMessage(GetMessageRequest $request, array $callOptions = []): Message + { + return $this->startApiCall('GetMessage', $request, $callOptions)->wait(); + } + + /** + * Returns details about a space. For an example, see + * [Get details about a + * space](https://developers.google.com/workspace/chat/get-spaces). + * + * Requires + * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). + * Supports + * [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + * and [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::getSpaceAsync()} . + * + * @example samples/V1/ChatServiceClient/get_space.php + * + * @param GetSpaceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Space + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSpace(GetSpaceRequest $request, array $callOptions = []): Space + { + return $this->startApiCall('GetSpace', $request, $callOptions)->wait(); + } + + /** + * Lists memberships in a space. For an example, see [List users and Google + * Chat apps in a + * space](https://developers.google.com/workspace/chat/list-members). Listing + * memberships with [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + * lists memberships in spaces that the Chat app has + * access to, but excludes Chat app memberships, + * including its own. Listing memberships with + * [User + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * lists memberships in spaces that the authenticated user has access to. + * + * Requires + * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). + * Supports + * [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + * and [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::listMembershipsAsync()} . + * + * @example samples/V1/ChatServiceClient/list_memberships.php + * + * @param ListMembershipsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listMemberships(ListMembershipsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListMemberships', $request, $callOptions); + } + + /** + * Lists messages in a space that the caller is a member of, including + * messages from blocked members and spaces. For an example, see + * [List messages](/chat/api/guides/v1/messages/list). + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::listMessagesAsync()} . + * + * @example samples/V1/ChatServiceClient/list_messages.php + * + * @param ListMessagesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listMessages(ListMessagesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListMessages', $request, $callOptions); + } + + /** + * Lists reactions to a message. For an example, see + * [List reactions for a + * message](https://developers.google.com/workspace/chat/list-reactions). + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::listReactionsAsync()} . + * + * @example samples/V1/ChatServiceClient/list_reactions.php + * + * @param ListReactionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listReactions(ListReactionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListReactions', $request, $callOptions); + } + + /** + * Lists spaces the caller is a member of. Group chats and DMs aren't listed + * until the first message is sent. For an example, see + * [List + * spaces](https://developers.google.com/workspace/chat/list-spaces). + * + * Requires + * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). + * Supports + * [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + * and [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * Lists spaces visible to the caller or authenticated user. Group chats + * and DMs aren't listed until the first message is sent. + * + * The async variant is {@see ChatServiceClient::listSpacesAsync()} . + * + * @example samples/V1/ChatServiceClient/list_spaces.php + * + * @param ListSpacesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listSpaces(ListSpacesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSpaces', $request, $callOptions); + } + + /** + * Creates a space and adds specified users to it. The calling user is + * automatically added to the space, and shouldn't be specified as a + * membership in the request. For an example, see + * [Set up a space with initial + * members](https://developers.google.com/workspace/chat/set-up-spaces). + * + * To specify the human members to add, add memberships with the appropriate + * `member.name` in the `SetUpSpaceRequest`. To add a human user, use + * `users/{user}`, where `{user}` can be the email address for the user. For + * users in the same Workspace organization `{user}` can also be the `id` for + * the person from the People API, or the `id` for the user in the Directory + * API. For example, if the People API Person profile ID for + * `user@example.com` is `123456789`, you can add the user to the space by + * setting the `membership.member.name` to `users/user@example.com` or + * `users/123456789`. + * + * For a space or group chat, if the caller blocks or is blocked by some + * members, then those members aren't added to the created space. + * + * To create a direct message (DM) between the calling user and another human + * user, specify exactly one membership to represent the human user. If + * one user blocks the other, the request fails and the DM isn't created. + * + * To create a DM between the calling user and the calling app, set + * `Space.singleUserBotDm` to `true` and don't specify any memberships. You + * can only use this method to set up a DM with the calling app. To add the + * calling app as a member of a space or an existing DM between two human + * users, see + * [Invite or add a user or app to a + * space](https://developers.google.com/workspace/chat/create-members). + * + * If a DM already exists between two users, even when one user blocks the + * other at the time a request is made, then the existing DM is returned. + * + * Spaces with threaded replies aren't supported. If you receive the error + * message `ALREADY_EXISTS` when setting up a space, try a different + * `displayName`. An existing space within the Google Workspace organization + * might already use this display name. + * + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::setUpSpaceAsync()} . + * + * @example samples/V1/ChatServiceClient/set_up_space.php + * + * @param SetUpSpaceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Space + * + * @throws ApiException Thrown if the API call fails. + */ + public function setUpSpace(SetUpSpaceRequest $request, array $callOptions = []): Space + { + return $this->startApiCall('SetUpSpace', $request, $callOptions)->wait(); + } + + /** + * Updates a message. There's a difference between the `patch` and `update` + * methods. The `patch` + * method uses a `patch` request while the `update` method uses a `put` + * request. We recommend using the `patch` method. For an example, see + * [Update a + * message](https://developers.google.com/workspace/chat/update-messages). + * + * Requires + * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). + * Supports + * [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + * and [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * When using app authentication, requests can only update messages + * created by the calling Chat app. + * + * The async variant is {@see ChatServiceClient::updateMessageAsync()} . + * + * @example samples/V1/ChatServiceClient/update_message.php + * + * @param UpdateMessageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Message + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateMessage(UpdateMessageRequest $request, array $callOptions = []): Message + { + return $this->startApiCall('UpdateMessage', $request, $callOptions)->wait(); + } + + /** + * Updates a space. For an example, see + * [Update a + * space](https://developers.google.com/workspace/chat/update-spaces). + * + * If you're updating the `displayName` field and receive the error message + * `ALREADY_EXISTS`, try a different display name.. An existing space within + * the Google Workspace organization might already use this display name. + * + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::updateSpaceAsync()} . + * + * @example samples/V1/ChatServiceClient/update_space.php + * + * @param UpdateSpaceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Space + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSpace(UpdateSpaceRequest $request, array $callOptions = []): Space + { + return $this->startApiCall('UpdateSpace', $request, $callOptions)->wait(); + } + + /** + * Uploads an attachment. For an example, see + * [Upload media as a file + * attachment](https://developers.google.com/workspace/chat/upload-media-attachments). + * Requires user + * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * You can upload attachments up to 200 MB. Certain file types aren't + * supported. For details, see [File types blocked by Google + * Chat](https://support.google.com/chat/answer/7651457?&co=GENIE.Platform%3DDesktop#File%20types%20blocked%20in%20Google%20Chat). + * + * The async variant is {@see ChatServiceClient::uploadAttachmentAsync()} . + * + * @example samples/V1/ChatServiceClient/upload_attachment.php + * + * @param UploadAttachmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UploadAttachmentResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function uploadAttachment( + UploadAttachmentRequest $request, + array $callOptions = [] + ): UploadAttachmentResponse { + return $this->startApiCall('UploadAttachment', $request, $callOptions)->wait(); + } +} diff --git a/AppsChat/src/Chat/V1/CompleteImportSpaceRequest.php b/AppsChat/src/Chat/V1/CompleteImportSpaceRequest.php new file mode 100644 index 000000000000..f6cddab25e0d --- /dev/null +++ b/AppsChat/src/Chat/V1/CompleteImportSpaceRequest.php @@ -0,0 +1,71 @@ +google.chat.v1.CompleteImportSpaceRequest + */ +class CompleteImportSpaceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the import mode space. + * Format: `spaces/{space}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the import mode space. + * Format: `spaces/{space}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the import mode space. + * Format: `spaces/{space}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the import mode space. + * Format: `spaces/{space}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/CompleteImportSpaceResponse.php b/AppsChat/src/Chat/V1/CompleteImportSpaceResponse.php new file mode 100644 index 000000000000..500dcf0d0fe4 --- /dev/null +++ b/AppsChat/src/Chat/V1/CompleteImportSpaceResponse.php @@ -0,0 +1,77 @@ +google.chat.v1.CompleteImportSpaceResponse + */ +class CompleteImportSpaceResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The import mode space. + * + * Generated from protobuf field .google.chat.v1.Space space = 1; + */ + protected $space = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Space $space + * The import mode space. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * The import mode space. + * + * Generated from protobuf field .google.chat.v1.Space space = 1; + * @return \Google\Apps\Chat\V1\Space|null + */ + public function getSpace() + { + return $this->space; + } + + public function hasSpace() + { + return isset($this->space); + } + + public function clearSpace() + { + unset($this->space); + } + + /** + * The import mode space. + * + * Generated from protobuf field .google.chat.v1.Space space = 1; + * @param \Google\Apps\Chat\V1\Space $var + * @return $this + */ + public function setSpace($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space::class); + $this->space = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/ContextualAddOnMarkup.php b/AppsChat/src/Chat/V1/ContextualAddOnMarkup.php new file mode 100644 index 000000000000..0eec00f28227 --- /dev/null +++ b/AppsChat/src/Chat/V1/ContextualAddOnMarkup.php @@ -0,0 +1,33 @@ +google.chat.v1.ContextualAddOnMarkup + */ +class ContextualAddOnMarkup extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\ContextualAddon::initOnce(); + parent::__construct($data); + } + +} + diff --git a/AppsChat/src/Chat/V1/ContextualAddOnMarkup/Card.php b/AppsChat/src/Chat/V1/ContextualAddOnMarkup/Card.php new file mode 100644 index 000000000000..9368f85fc88a --- /dev/null +++ b/AppsChat/src/Chat/V1/ContextualAddOnMarkup/Card.php @@ -0,0 +1,181 @@ +google.chat.v1.ContextualAddOnMarkup.Card + */ +class Card extends \Google\Protobuf\Internal\Message +{ + /** + * The header of the card. A header usually contains a title and an image. + * + * Generated from protobuf field .google.chat.v1.ContextualAddOnMarkup.Card.CardHeader header = 1; + */ + protected $header = null; + /** + * Sections are separated by a line divider. + * + * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2; + */ + private $sections; + /** + * The actions of this card. + * + * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3; + */ + private $card_actions; + /** + * Name of the card. + * + * Generated from protobuf field string name = 4; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\CardHeader $header + * The header of the card. A header usually contains a title and an image. + * @type array<\Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\Section>|\Google\Protobuf\Internal\RepeatedField $sections + * Sections are separated by a line divider. + * @type array<\Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\CardAction>|\Google\Protobuf\Internal\RepeatedField $card_actions + * The actions of this card. + * @type string $name + * Name of the card. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\ContextualAddon::initOnce(); + parent::__construct($data); + } + + /** + * The header of the card. A header usually contains a title and an image. + * + * Generated from protobuf field .google.chat.v1.ContextualAddOnMarkup.Card.CardHeader header = 1; + * @return \Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\CardHeader|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * The header of the card. A header usually contains a title and an image. + * + * Generated from protobuf field .google.chat.v1.ContextualAddOnMarkup.Card.CardHeader header = 1; + * @param \Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\CardHeader $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\CardHeader::class); + $this->header = $var; + + return $this; + } + + /** + * Sections are separated by a line divider. + * + * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSections() + { + return $this->sections; + } + + /** + * Sections are separated by a line divider. + * + * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2; + * @param array<\Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\Section>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\Section::class); + $this->sections = $arr; + + return $this; + } + + /** + * The actions of this card. + * + * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCardActions() + { + return $this->card_actions; + } + + /** + * The actions of this card. + * + * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3; + * @param array<\Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\CardAction>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCardActions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\CardAction::class); + $this->card_actions = $arr; + + return $this; + } + + /** + * Name of the card. + * + * Generated from protobuf field string name = 4; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the card. + * + * Generated from protobuf field string name = 4; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + + diff --git a/AppsChat/src/Chat/V1/ContextualAddOnMarkup/Card/CardAction.php b/AppsChat/src/Chat/V1/ContextualAddOnMarkup/Card/CardAction.php new file mode 100644 index 000000000000..671e2eaa670c --- /dev/null +++ b/AppsChat/src/Chat/V1/ContextualAddOnMarkup/Card/CardAction.php @@ -0,0 +1,116 @@ +google.chat.v1.ContextualAddOnMarkup.Card.CardAction + */ +class CardAction extends \Google\Protobuf\Internal\Message +{ + /** + * The label used to be displayed in the action menu item. + * + * Generated from protobuf field string action_label = 1; + */ + protected $action_label = ''; + /** + * The onclick action for this action item. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; + */ + protected $on_click = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $action_label + * The label used to be displayed in the action menu item. + * @type \Google\Apps\Chat\V1\WidgetMarkup\OnClick $on_click + * The onclick action for this action item. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\ContextualAddon::initOnce(); + parent::__construct($data); + } + + /** + * The label used to be displayed in the action menu item. + * + * Generated from protobuf field string action_label = 1; + * @return string + */ + public function getActionLabel() + { + return $this->action_label; + } + + /** + * The label used to be displayed in the action menu item. + * + * Generated from protobuf field string action_label = 1; + * @param string $var + * @return $this + */ + public function setActionLabel($var) + { + GPBUtil::checkString($var, True); + $this->action_label = $var; + + return $this; + } + + /** + * The onclick action for this action item. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; + * @return \Google\Apps\Chat\V1\WidgetMarkup\OnClick|null + */ + public function getOnClick() + { + return $this->on_click; + } + + public function hasOnClick() + { + return isset($this->on_click); + } + + public function clearOnClick() + { + unset($this->on_click); + } + + /** + * The onclick action for this action item. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; + * @param \Google\Apps\Chat\V1\WidgetMarkup\OnClick $var + * @return $this + */ + public function setOnClick($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\OnClick::class); + $this->on_click = $var; + + return $this; + } + +} + + diff --git a/AppsChat/src/Chat/V1/ContextualAddOnMarkup/Card/CardHeader.php b/AppsChat/src/Chat/V1/ContextualAddOnMarkup/Card/CardHeader.php new file mode 100644 index 000000000000..2ef7eed49c07 --- /dev/null +++ b/AppsChat/src/Chat/V1/ContextualAddOnMarkup/Card/CardHeader.php @@ -0,0 +1,176 @@ +google.chat.v1.ContextualAddOnMarkup.Card.CardHeader + */ +class CardHeader extends \Google\Protobuf\Internal\Message +{ + /** + * The title must be specified. The header has a fixed height: if both a + * title and subtitle is specified, each takes up one line. If only the + * title is specified, it takes up both lines. + * + * Generated from protobuf field string title = 1; + */ + protected $title = ''; + /** + * The subtitle of the card header. + * + * Generated from protobuf field string subtitle = 2; + */ + protected $subtitle = ''; + /** + * The image's type (for example, square border or circular border). + * + * Generated from protobuf field .google.chat.v1.ContextualAddOnMarkup.Card.CardHeader.ImageStyle image_style = 3; + */ + protected $image_style = 0; + /** + * The URL of the image in the card header. + * + * Generated from protobuf field string image_url = 4; + */ + protected $image_url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $title + * The title must be specified. The header has a fixed height: if both a + * title and subtitle is specified, each takes up one line. If only the + * title is specified, it takes up both lines. + * @type string $subtitle + * The subtitle of the card header. + * @type int $image_style + * The image's type (for example, square border or circular border). + * @type string $image_url + * The URL of the image in the card header. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\ContextualAddon::initOnce(); + parent::__construct($data); + } + + /** + * The title must be specified. The header has a fixed height: if both a + * title and subtitle is specified, each takes up one line. If only the + * title is specified, it takes up both lines. + * + * Generated from protobuf field string title = 1; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * The title must be specified. The header has a fixed height: if both a + * title and subtitle is specified, each takes up one line. If only the + * title is specified, it takes up both lines. + * + * Generated from protobuf field string title = 1; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * The subtitle of the card header. + * + * Generated from protobuf field string subtitle = 2; + * @return string + */ + public function getSubtitle() + { + return $this->subtitle; + } + + /** + * The subtitle of the card header. + * + * Generated from protobuf field string subtitle = 2; + * @param string $var + * @return $this + */ + public function setSubtitle($var) + { + GPBUtil::checkString($var, True); + $this->subtitle = $var; + + return $this; + } + + /** + * The image's type (for example, square border or circular border). + * + * Generated from protobuf field .google.chat.v1.ContextualAddOnMarkup.Card.CardHeader.ImageStyle image_style = 3; + * @return int + */ + public function getImageStyle() + { + return $this->image_style; + } + + /** + * The image's type (for example, square border or circular border). + * + * Generated from protobuf field .google.chat.v1.ContextualAddOnMarkup.Card.CardHeader.ImageStyle image_style = 3; + * @param int $var + * @return $this + */ + public function setImageStyle($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\CardHeader\ImageStyle::class); + $this->image_style = $var; + + return $this; + } + + /** + * The URL of the image in the card header. + * + * Generated from protobuf field string image_url = 4; + * @return string + */ + public function getImageUrl() + { + return $this->image_url; + } + + /** + * The URL of the image in the card header. + * + * Generated from protobuf field string image_url = 4; + * @param string $var + * @return $this + */ + public function setImageUrl($var) + { + GPBUtil::checkString($var, True); + $this->image_url = $var; + + return $this; + } + +} + + diff --git a/AppsChat/src/Chat/V1/ContextualAddOnMarkup/Card/CardHeader/ImageStyle.php b/AppsChat/src/Chat/V1/ContextualAddOnMarkup/Card/CardHeader/ImageStyle.php new file mode 100644 index 000000000000..9c0d30510390 --- /dev/null +++ b/AppsChat/src/Chat/V1/ContextualAddOnMarkup/Card/CardHeader/ImageStyle.php @@ -0,0 +1,58 @@ +google.chat.v1.ContextualAddOnMarkup.Card.CardHeader.ImageStyle + */ +class ImageStyle +{ + /** + * Generated from protobuf enum IMAGE_STYLE_UNSPECIFIED = 0; + */ + const IMAGE_STYLE_UNSPECIFIED = 0; + /** + * Square border. + * + * Generated from protobuf enum IMAGE = 1; + */ + const IMAGE = 1; + /** + * Circular border. + * + * Generated from protobuf enum AVATAR = 2; + */ + const AVATAR = 2; + + private static $valueToName = [ + self::IMAGE_STYLE_UNSPECIFIED => 'IMAGE_STYLE_UNSPECIFIED', + self::IMAGE => 'IMAGE', + self::AVATAR => 'AVATAR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Chat/V1/ContextualAddOnMarkup/Card/Section.php b/AppsChat/src/Chat/V1/ContextualAddOnMarkup/Card/Section.php new file mode 100644 index 000000000000..e6039ce3f556 --- /dev/null +++ b/AppsChat/src/Chat/V1/ContextualAddOnMarkup/Card/Section.php @@ -0,0 +1,137 @@ +google.chat.v1.ContextualAddOnMarkup.Card.Section + */ +class Section extends \Google\Protobuf\Internal\Message +{ + /** + * The header of the section. Formatted text is + * supported. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string header = 1; + */ + protected $header = ''; + /** + * A section must contain at least one widget. + * + * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup widgets = 2; + */ + private $widgets; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $header + * The header of the section. Formatted text is + * supported. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * @type array<\Google\Apps\Chat\V1\WidgetMarkup>|\Google\Protobuf\Internal\RepeatedField $widgets + * A section must contain at least one widget. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\ContextualAddon::initOnce(); + parent::__construct($data); + } + + /** + * The header of the section. Formatted text is + * supported. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string header = 1; + * @return string + */ + public function getHeader() + { + return $this->header; + } + + /** + * The header of the section. Formatted text is + * supported. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string header = 1; + * @param string $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkString($var, True); + $this->header = $var; + + return $this; + } + + /** + * A section must contain at least one widget. + * + * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup widgets = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWidgets() + { + return $this->widgets; + } + + /** + * A section must contain at least one widget. + * + * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup widgets = 2; + * @param array<\Google\Apps\Chat\V1\WidgetMarkup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWidgets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\WidgetMarkup::class); + $this->widgets = $arr; + + return $this; + } + +} + + diff --git a/AppsChat/src/Chat/V1/CreateMembershipRequest.php b/AppsChat/src/Chat/V1/CreateMembershipRequest.php new file mode 100644 index 000000000000..49c50f44ed88 --- /dev/null +++ b/AppsChat/src/Chat/V1/CreateMembershipRequest.php @@ -0,0 +1,213 @@ +google.chat.v1.CreateMembershipRequest + */ +class CreateMembershipRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the space for which to create the + * membership. + * Format: spaces/{space} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The membership relation to create. + * The `memberType` field must contain a user with the `user.name` and + * `user.type` fields populated. The server will assign a resource name + * and overwrite anything specified. + * When a Chat app creates a membership relation for a human user, it must use + * the `chat.memberships` scope, set `user.type` to `HUMAN`, and set + * `user.name` with format `users/{user}`, where `{user}` can be the email + * address for the user. For users in the same Workspace organization `{user}` + * can also be the `id` of the + * [person](https://developers.google.com/people/api/rest/v1/people) from the + * People API, or the `id` for the user in the Directory API. For example, if + * the People API Person profile ID for `user@example.com` is `123456789`, you + * can add the user to the space by setting the `membership.member.name` to + * `users/user@example.com` or `users/123456789`. When a Chat app creates a + * membership relation for itself, it must use the `chat.memberships.app` + * scope, set `user.type` to `BOT`, and set `user.name` to `users/app`. + * + * Generated from protobuf field .google.chat.v1.Membership membership = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $membership = null; + + /** + * @param string $parent Required. The resource name of the space for which to create the + * membership. + * + * Format: spaces/{space} + * Please see {@see ChatServiceClient::spaceName()} for help formatting this field. + * @param \Google\Apps\Chat\V1\Membership $membership Required. The membership relation to create. + * The `memberType` field must contain a user with the `user.name` and + * `user.type` fields populated. The server will assign a resource name + * and overwrite anything specified. + * When a Chat app creates a membership relation for a human user, it must use + * the `chat.memberships` scope, set `user.type` to `HUMAN`, and set + * `user.name` with format `users/{user}`, where `{user}` can be the email + * address for the user. For users in the same Workspace organization `{user}` + * can also be the `id` of the + * [person](https://developers.google.com/people/api/rest/v1/people) from the + * People API, or the `id` for the user in the Directory API. For example, if + * the People API Person profile ID for `user@example.com` is `123456789`, you + * can add the user to the space by setting the `membership.member.name` to + * `users/user@example.com` or `users/123456789`. When a Chat app creates a + * membership relation for itself, it must use the `chat.memberships.app` + * scope, set `user.type` to `BOT`, and set `user.name` to `users/app`. + * + * @return \Google\Apps\Chat\V1\CreateMembershipRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Apps\Chat\V1\Membership $membership): self + { + return (new self()) + ->setParent($parent) + ->setMembership($membership); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the space for which to create the + * membership. + * Format: spaces/{space} + * @type \Google\Apps\Chat\V1\Membership $membership + * Required. The membership relation to create. + * The `memberType` field must contain a user with the `user.name` and + * `user.type` fields populated. The server will assign a resource name + * and overwrite anything specified. + * When a Chat app creates a membership relation for a human user, it must use + * the `chat.memberships` scope, set `user.type` to `HUMAN`, and set + * `user.name` with format `users/{user}`, where `{user}` can be the email + * address for the user. For users in the same Workspace organization `{user}` + * can also be the `id` of the + * [person](https://developers.google.com/people/api/rest/v1/people) from the + * People API, or the `id` for the user in the Directory API. For example, if + * the People API Person profile ID for `user@example.com` is `123456789`, you + * can add the user to the space by setting the `membership.member.name` to + * `users/user@example.com` or `users/123456789`. When a Chat app creates a + * membership relation for itself, it must use the `chat.memberships.app` + * scope, set `user.type` to `BOT`, and set `user.name` to `users/app`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the space for which to create the + * membership. + * Format: spaces/{space} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the space for which to create the + * membership. + * Format: spaces/{space} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The membership relation to create. + * The `memberType` field must contain a user with the `user.name` and + * `user.type` fields populated. The server will assign a resource name + * and overwrite anything specified. + * When a Chat app creates a membership relation for a human user, it must use + * the `chat.memberships` scope, set `user.type` to `HUMAN`, and set + * `user.name` with format `users/{user}`, where `{user}` can be the email + * address for the user. For users in the same Workspace organization `{user}` + * can also be the `id` of the + * [person](https://developers.google.com/people/api/rest/v1/people) from the + * People API, or the `id` for the user in the Directory API. For example, if + * the People API Person profile ID for `user@example.com` is `123456789`, you + * can add the user to the space by setting the `membership.member.name` to + * `users/user@example.com` or `users/123456789`. When a Chat app creates a + * membership relation for itself, it must use the `chat.memberships.app` + * scope, set `user.type` to `BOT`, and set `user.name` to `users/app`. + * + * Generated from protobuf field .google.chat.v1.Membership membership = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Apps\Chat\V1\Membership|null + */ + public function getMembership() + { + return $this->membership; + } + + public function hasMembership() + { + return isset($this->membership); + } + + public function clearMembership() + { + unset($this->membership); + } + + /** + * Required. The membership relation to create. + * The `memberType` field must contain a user with the `user.name` and + * `user.type` fields populated. The server will assign a resource name + * and overwrite anything specified. + * When a Chat app creates a membership relation for a human user, it must use + * the `chat.memberships` scope, set `user.type` to `HUMAN`, and set + * `user.name` with format `users/{user}`, where `{user}` can be the email + * address for the user. For users in the same Workspace organization `{user}` + * can also be the `id` of the + * [person](https://developers.google.com/people/api/rest/v1/people) from the + * People API, or the `id` for the user in the Directory API. For example, if + * the People API Person profile ID for `user@example.com` is `123456789`, you + * can add the user to the space by setting the `membership.member.name` to + * `users/user@example.com` or `users/123456789`. When a Chat app creates a + * membership relation for itself, it must use the `chat.memberships.app` + * scope, set `user.type` to `BOT`, and set `user.name` to `users/app`. + * + * Generated from protobuf field .google.chat.v1.Membership membership = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Apps\Chat\V1\Membership $var + * @return $this + */ + public function setMembership($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Membership::class); + $this->membership = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/CreateMessageRequest.php b/AppsChat/src/Chat/V1/CreateMessageRequest.php new file mode 100644 index 000000000000..e90a569bc416 --- /dev/null +++ b/AppsChat/src/Chat/V1/CreateMessageRequest.php @@ -0,0 +1,370 @@ +google.chat.v1.CreateMessageRequest + */ +class CreateMessageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the space in which to create a message. + * Format: `spaces/{space}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Message body. + * + * Generated from protobuf field .google.chat.v1.Message message = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $message = null; + /** + * Optional. Deprecated: Use + * [thread.thread_key][google.chat.v1.Thread.thread_key] instead. ID for the + * thread. Supports up to 4000 characters. To start or add to a thread, create + * a message and specify a `threadKey` or the + * [thread.name][google.chat.v1.Thread.name]. For example usage, see [Start or + * reply to a message + * thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). + * + * Generated from protobuf field string thread_key = 6 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @deprecated + */ + protected $thread_key = ''; + /** + * Optional. A unique request ID for this message. Specifying an existing + * request ID returns the message created with that ID instead of creating a + * new message. + * + * Generated from protobuf field string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. Specifies whether a message starts a thread or replies to one. + * Only supported in named spaces. + * + * Generated from protobuf field .google.chat.v1.CreateMessageRequest.MessageReplyOption message_reply_option = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $message_reply_option = 0; + /** + * Optional. A custom ID for a message. Lets Chat apps get, update, or delete + * a message without needing to store the system-assigned ID in the message's + * resource name (represented in the message `name` field). + * The value for this field must meet the following requirements: + * * Begins with `client-`. For example, `client-custom-name` is a valid + * custom ID, but `custom-name` is not. + * * Contains up to 63 characters and only lowercase letters, numbers, and + * hyphens. + * * Is unique within a space. A Chat app can't use the same custom ID for + * different messages. + * For details, see [Name a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string message_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $message_id = ''; + + /** + * @param string $parent Required. The resource name of the space in which to create a message. + * + * Format: `spaces/{space}` + * Please see {@see ChatServiceClient::spaceName()} for help formatting this field. + * @param \Google\Apps\Chat\V1\Message $message Required. Message body. + * @param string $messageId Optional. A custom ID for a message. Lets Chat apps get, update, or delete + * a message without needing to store the system-assigned ID in the message's + * resource name (represented in the message `name` field). + * + * The value for this field must meet the following requirements: + * + * * Begins with `client-`. For example, `client-custom-name` is a valid + * custom ID, but `custom-name` is not. + * * Contains up to 63 characters and only lowercase letters, numbers, and + * hyphens. + * * Is unique within a space. A Chat app can't use the same custom ID for + * different messages. + * + * For details, see [Name a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * @return \Google\Apps\Chat\V1\CreateMessageRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Apps\Chat\V1\Message $message, string $messageId): self + { + return (new self()) + ->setParent($parent) + ->setMessage($message) + ->setMessageId($messageId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the space in which to create a message. + * Format: `spaces/{space}` + * @type \Google\Apps\Chat\V1\Message $message + * Required. Message body. + * @type string $thread_key + * Optional. Deprecated: Use + * [thread.thread_key][google.chat.v1.Thread.thread_key] instead. ID for the + * thread. Supports up to 4000 characters. To start or add to a thread, create + * a message and specify a `threadKey` or the + * [thread.name][google.chat.v1.Thread.name]. For example usage, see [Start or + * reply to a message + * thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). + * @type string $request_id + * Optional. A unique request ID for this message. Specifying an existing + * request ID returns the message created with that ID instead of creating a + * new message. + * @type int $message_reply_option + * Optional. Specifies whether a message starts a thread or replies to one. + * Only supported in named spaces. + * @type string $message_id + * Optional. A custom ID for a message. Lets Chat apps get, update, or delete + * a message without needing to store the system-assigned ID in the message's + * resource name (represented in the message `name` field). + * The value for this field must meet the following requirements: + * * Begins with `client-`. For example, `client-custom-name` is a valid + * custom ID, but `custom-name` is not. + * * Contains up to 63 characters and only lowercase letters, numbers, and + * hyphens. + * * Is unique within a space. A Chat app can't use the same custom ID for + * different messages. + * For details, see [Name a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the space in which to create a message. + * Format: `spaces/{space}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the space in which to create a message. + * Format: `spaces/{space}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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. Message body. + * + * Generated from protobuf field .google.chat.v1.Message message = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Apps\Chat\V1\Message|null + */ + public function getMessage() + { + return $this->message; + } + + public function hasMessage() + { + return isset($this->message); + } + + public function clearMessage() + { + unset($this->message); + } + + /** + * Required. Message body. + * + * Generated from protobuf field .google.chat.v1.Message message = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Apps\Chat\V1\Message $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Message::class); + $this->message = $var; + + return $this; + } + + /** + * Optional. Deprecated: Use + * [thread.thread_key][google.chat.v1.Thread.thread_key] instead. ID for the + * thread. Supports up to 4000 characters. To start or add to a thread, create + * a message and specify a `threadKey` or the + * [thread.name][google.chat.v1.Thread.name]. For example usage, see [Start or + * reply to a message + * thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). + * + * Generated from protobuf field string thread_key = 6 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @return string + * @deprecated + */ + public function getThreadKey() + { + @trigger_error('thread_key is deprecated.', E_USER_DEPRECATED); + return $this->thread_key; + } + + /** + * Optional. Deprecated: Use + * [thread.thread_key][google.chat.v1.Thread.thread_key] instead. ID for the + * thread. Supports up to 4000 characters. To start or add to a thread, create + * a message and specify a `threadKey` or the + * [thread.name][google.chat.v1.Thread.name]. For example usage, see [Start or + * reply to a message + * thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). + * + * Generated from protobuf field string thread_key = 6 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + * @deprecated + */ + public function setThreadKey($var) + { + @trigger_error('thread_key is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->thread_key = $var; + + return $this; + } + + /** + * Optional. A unique request ID for this message. Specifying an existing + * request ID returns the message created with that ID instead of creating a + * new message. + * + * Generated from protobuf field string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique request ID for this message. Specifying an existing + * request ID returns the message created with that ID instead of creating a + * new message. + * + * Generated from protobuf field string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. Specifies whether a message starts a thread or replies to one. + * Only supported in named spaces. + * + * Generated from protobuf field .google.chat.v1.CreateMessageRequest.MessageReplyOption message_reply_option = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMessageReplyOption() + { + return $this->message_reply_option; + } + + /** + * Optional. Specifies whether a message starts a thread or replies to one. + * Only supported in named spaces. + * + * Generated from protobuf field .google.chat.v1.CreateMessageRequest.MessageReplyOption message_reply_option = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMessageReplyOption($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\CreateMessageRequest\MessageReplyOption::class); + $this->message_reply_option = $var; + + return $this; + } + + /** + * Optional. A custom ID for a message. Lets Chat apps get, update, or delete + * a message without needing to store the system-assigned ID in the message's + * resource name (represented in the message `name` field). + * The value for this field must meet the following requirements: + * * Begins with `client-`. For example, `client-custom-name` is a valid + * custom ID, but `custom-name` is not. + * * Contains up to 63 characters and only lowercase letters, numbers, and + * hyphens. + * * Is unique within a space. A Chat app can't use the same custom ID for + * different messages. + * For details, see [Name a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string message_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMessageId() + { + return $this->message_id; + } + + /** + * Optional. A custom ID for a message. Lets Chat apps get, update, or delete + * a message without needing to store the system-assigned ID in the message's + * resource name (represented in the message `name` field). + * The value for this field must meet the following requirements: + * * Begins with `client-`. For example, `client-custom-name` is a valid + * custom ID, but `custom-name` is not. + * * Contains up to 63 characters and only lowercase letters, numbers, and + * hyphens. + * * Is unique within a space. A Chat app can't use the same custom ID for + * different messages. + * For details, see [Name a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string message_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMessageId($var) + { + GPBUtil::checkString($var, True); + $this->message_id = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/CreateMessageRequest/MessageReplyOption.php b/AppsChat/src/Chat/V1/CreateMessageRequest/MessageReplyOption.php new file mode 100644 index 000000000000..64d70a2fad81 --- /dev/null +++ b/AppsChat/src/Chat/V1/CreateMessageRequest/MessageReplyOption.php @@ -0,0 +1,72 @@ +google.chat.v1.CreateMessageRequest.MessageReplyOption + */ +class MessageReplyOption +{ + /** + * Default. Starts a new thread. Using this option ignores any [thread + * ID][google.chat.v1.Thread.name] or + * [`thread_key`][google.chat.v1.Thread.thread_key] that's included. + * + * Generated from protobuf enum MESSAGE_REPLY_OPTION_UNSPECIFIED = 0; + */ + const MESSAGE_REPLY_OPTION_UNSPECIFIED = 0; + /** + * Creates the message as a reply to the thread specified by [thread + * ID][google.chat.v1.Thread.name] or + * [`thread_key`][google.chat.v1.Thread.thread_key]. If it fails, the + * message starts a new thread instead. + * + * Generated from protobuf enum REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD = 1; + */ + const REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD = 1; + /** + * Creates the message as a reply to the thread specified by [thread + * ID][google.chat.v1.Thread.name] or + * [`thread_key`][google.chat.v1.Thread.thread_key]. If a new `thread_key` + * is used, a new thread is created. If the message creation fails, a + * `NOT_FOUND` error is returned instead. + * + * Generated from protobuf enum REPLY_MESSAGE_OR_FAIL = 2; + */ + const REPLY_MESSAGE_OR_FAIL = 2; + + private static $valueToName = [ + self::MESSAGE_REPLY_OPTION_UNSPECIFIED => 'MESSAGE_REPLY_OPTION_UNSPECIFIED', + self::REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD => 'REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD', + self::REPLY_MESSAGE_OR_FAIL => 'REPLY_MESSAGE_OR_FAIL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Chat/V1/CreateReactionRequest.php b/AppsChat/src/Chat/V1/CreateReactionRequest.php new file mode 100644 index 000000000000..97555cae7e06 --- /dev/null +++ b/AppsChat/src/Chat/V1/CreateReactionRequest.php @@ -0,0 +1,133 @@ +google.chat.v1.CreateReactionRequest + */ +class CreateReactionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The message where the reaction is created. + * Format: `spaces/{space}/messages/{message}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The reaction to create. + * + * Generated from protobuf field .google.chat.v1.Reaction reaction = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reaction = null; + + /** + * @param string $parent Required. The message where the reaction is created. + * + * Format: `spaces/{space}/messages/{message}` + * Please see {@see ChatServiceClient::messageName()} for help formatting this field. + * @param \Google\Apps\Chat\V1\Reaction $reaction Required. The reaction to create. + * + * @return \Google\Apps\Chat\V1\CreateReactionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Apps\Chat\V1\Reaction $reaction): self + { + return (new self()) + ->setParent($parent) + ->setReaction($reaction); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The message where the reaction is created. + * Format: `spaces/{space}/messages/{message}` + * @type \Google\Apps\Chat\V1\Reaction $reaction + * Required. The reaction to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Reaction::initOnce(); + parent::__construct($data); + } + + /** + * Required. The message where the reaction is created. + * Format: `spaces/{space}/messages/{message}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The message where the reaction is created. + * Format: `spaces/{space}/messages/{message}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The reaction to create. + * + * Generated from protobuf field .google.chat.v1.Reaction reaction = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Apps\Chat\V1\Reaction|null + */ + public function getReaction() + { + return $this->reaction; + } + + public function hasReaction() + { + return isset($this->reaction); + } + + public function clearReaction() + { + unset($this->reaction); + } + + /** + * Required. The reaction to create. + * + * Generated from protobuf field .google.chat.v1.Reaction reaction = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Apps\Chat\V1\Reaction $var + * @return $this + */ + public function setReaction($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Reaction::class); + $this->reaction = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/CreateSpaceRequest.php b/AppsChat/src/Chat/V1/CreateSpaceRequest.php new file mode 100644 index 000000000000..6de66b3cff27 --- /dev/null +++ b/AppsChat/src/Chat/V1/CreateSpaceRequest.php @@ -0,0 +1,176 @@ +google.chat.v1.CreateSpaceRequest + */ +class CreateSpaceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `displayName` and `spaceType` fields must be populated. Only + * `SpaceType.SPACE` is supported. + * If you receive the error message `ALREADY_EXISTS` when creating a space, + * try a different `displayName`. An existing space within the Google + * Workspace organization might already use this display name. + * The space `name` is assigned on the server so anything specified in this + * field will be ignored. + * + * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $space = null; + /** + * Optional. A unique identifier for this request. + * A random UUID is recommended. + * Specifying an existing request ID returns the space created with that ID + * instead of creating a new space. + * Specifying an existing request ID from the same Chat app with a different + * authenticated user returns an error. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Apps\Chat\V1\Space $space Required. The `displayName` and `spaceType` fields must be populated. Only + * `SpaceType.SPACE` is supported. + * + * If you receive the error message `ALREADY_EXISTS` when creating a space, + * try a different `displayName`. An existing space within the Google + * Workspace organization might already use this display name. + * + * The space `name` is assigned on the server so anything specified in this + * field will be ignored. + * + * @return \Google\Apps\Chat\V1\CreateSpaceRequest + * + * @experimental + */ + public static function build(\Google\Apps\Chat\V1\Space $space): self + { + return (new self()) + ->setSpace($space); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Space $space + * Required. The `displayName` and `spaceType` fields must be populated. Only + * `SpaceType.SPACE` is supported. + * If you receive the error message `ALREADY_EXISTS` when creating a space, + * try a different `displayName`. An existing space within the Google + * Workspace organization might already use this display name. + * The space `name` is assigned on the server so anything specified in this + * field will be ignored. + * @type string $request_id + * Optional. A unique identifier for this request. + * A random UUID is recommended. + * Specifying an existing request ID returns the space created with that ID + * instead of creating a new space. + * Specifying an existing request ID from the same Chat app with a different + * authenticated user returns an error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `displayName` and `spaceType` fields must be populated. Only + * `SpaceType.SPACE` is supported. + * If you receive the error message `ALREADY_EXISTS` when creating a space, + * try a different `displayName`. An existing space within the Google + * Workspace organization might already use this display name. + * The space `name` is assigned on the server so anything specified in this + * field will be ignored. + * + * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Apps\Chat\V1\Space|null + */ + public function getSpace() + { + return $this->space; + } + + public function hasSpace() + { + return isset($this->space); + } + + public function clearSpace() + { + unset($this->space); + } + + /** + * Required. The `displayName` and `spaceType` fields must be populated. Only + * `SpaceType.SPACE` is supported. + * If you receive the error message `ALREADY_EXISTS` when creating a space, + * try a different `displayName`. An existing space within the Google + * Workspace organization might already use this display name. + * The space `name` is assigned on the server so anything specified in this + * field will be ignored. + * + * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Apps\Chat\V1\Space $var + * @return $this + */ + public function setSpace($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space::class); + $this->space = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. + * A random UUID is recommended. + * Specifying an existing request ID returns the space created with that ID + * instead of creating a new space. + * Specifying an existing request ID from the same Chat app with a different + * authenticated user returns an error. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. + * A random UUID is recommended. + * Specifying an existing request ID returns the space created with that ID + * instead of creating a new space. + * Specifying an existing request ID from the same Chat app with a different + * authenticated user returns an error. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/CustomEmoji.php b/AppsChat/src/Chat/V1/CustomEmoji.php new file mode 100644 index 000000000000..3b3f7b630a5e --- /dev/null +++ b/AppsChat/src/Chat/V1/CustomEmoji.php @@ -0,0 +1,67 @@ +google.chat.v1.CustomEmoji + */ +class CustomEmoji extends \Google\Protobuf\Internal\Message +{ + /** + * Unique key for the custom emoji resource. + * + * Generated from protobuf field string uid = 1; + */ + protected $uid = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uid + * Unique key for the custom emoji resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Reaction::initOnce(); + parent::__construct($data); + } + + /** + * Unique key for the custom emoji resource. + * + * Generated from protobuf field string uid = 1; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Unique key for the custom emoji resource. + * + * Generated from protobuf field string uid = 1; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/DeleteMembershipRequest.php b/AppsChat/src/Chat/V1/DeleteMembershipRequest.php new file mode 100644 index 000000000000..9861837902c8 --- /dev/null +++ b/AppsChat/src/Chat/V1/DeleteMembershipRequest.php @@ -0,0 +1,134 @@ +google.chat.v1.DeleteMembershipRequest + */ +class DeleteMembershipRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the membership to delete. Chat apps can delete + * human users' or their own memberships. Chat apps can't delete other apps' + * memberships. + * When deleting a human membership, requires the `chat.memberships` scope and + * `spaces/{space}/members/{member}` format. You can use the email as an + * alias for `{member}`. For example, + * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the + * email of the Google Chat user. + * When deleting an app membership, requires the `chat.memberships.app` scope + * and `spaces/{space}/members/app` format. + * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the membership to delete. Chat apps can delete + * human users' or their own memberships. Chat apps can't delete other apps' + * memberships. + * + * When deleting a human membership, requires the `chat.memberships` scope and + * `spaces/{space}/members/{member}` format. You can use the email as an + * alias for `{member}`. For example, + * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the + * email of the Google Chat user. + * + * When deleting an app membership, requires the `chat.memberships.app` scope + * and `spaces/{space}/members/app` format. + * + * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`. Please see + * {@see ChatServiceClient::membershipName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\DeleteMembershipRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the membership to delete. Chat apps can delete + * human users' or their own memberships. Chat apps can't delete other apps' + * memberships. + * When deleting a human membership, requires the `chat.memberships` scope and + * `spaces/{space}/members/{member}` format. You can use the email as an + * alias for `{member}`. For example, + * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the + * email of the Google Chat user. + * When deleting an app membership, requires the `chat.memberships.app` scope + * and `spaces/{space}/members/app` format. + * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the membership to delete. Chat apps can delete + * human users' or their own memberships. Chat apps can't delete other apps' + * memberships. + * When deleting a human membership, requires the `chat.memberships` scope and + * `spaces/{space}/members/{member}` format. You can use the email as an + * alias for `{member}`. For example, + * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the + * email of the Google Chat user. + * When deleting an app membership, requires the `chat.memberships.app` scope + * and `spaces/{space}/members/app` format. + * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the membership to delete. Chat apps can delete + * human users' or their own memberships. Chat apps can't delete other apps' + * memberships. + * When deleting a human membership, requires the `chat.memberships` scope and + * `spaces/{space}/members/{member}` format. You can use the email as an + * alias for `{member}`. For example, + * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the + * email of the Google Chat user. + * When deleting an app membership, requires the `chat.memberships.app` scope + * and `spaces/{space}/members/app` format. + * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/DeleteMessageRequest.php b/AppsChat/src/Chat/V1/DeleteMessageRequest.php new file mode 100644 index 000000000000..37cb2a3434f7 --- /dev/null +++ b/AppsChat/src/Chat/V1/DeleteMessageRequest.php @@ -0,0 +1,162 @@ +google.chat.v1.DeleteMessageRequest + */ +class DeleteMessageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the message. + * Format: `spaces/{space}/messages/{message}` + * If you've set a custom ID for your message, you can use the value from the + * `clientAssignedMessageId` field for `{message}`. For details, see [Name a + * message] + * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * When `true`, deleting a message also deletes its threaded replies. When + * `false`, if a message has threaded replies, deletion fails. + * Only applies when [authenticating as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * Has no effect when [authenticating as a Chat app] + * (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + * + * Generated from protobuf field bool force = 2; + */ + protected $force = false; + + /** + * @param string $name Required. Resource name of the message. + * + * Format: `spaces/{space}/messages/{message}` + * + * If you've set a custom ID for your message, you can use the value from the + * `clientAssignedMessageId` field for `{message}`. For details, see [Name a + * message] + * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). Please see + * {@see ChatServiceClient::messageName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\DeleteMessageRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the message. + * Format: `spaces/{space}/messages/{message}` + * If you've set a custom ID for your message, you can use the value from the + * `clientAssignedMessageId` field for `{message}`. For details, see [Name a + * message] + * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * @type bool $force + * When `true`, deleting a message also deletes its threaded replies. When + * `false`, if a message has threaded replies, deletion fails. + * Only applies when [authenticating as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * Has no effect when [authenticating as a Chat app] + * (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the message. + * Format: `spaces/{space}/messages/{message}` + * If you've set a custom ID for your message, you can use the value from the + * `clientAssignedMessageId` field for `{message}`. For details, see [Name a + * message] + * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the message. + * Format: `spaces/{space}/messages/{message}` + * If you've set a custom ID for your message, you can use the value from the + * `clientAssignedMessageId` field for `{message}`. For details, see [Name a + * message] + * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * When `true`, deleting a message also deletes its threaded replies. When + * `false`, if a message has threaded replies, deletion fails. + * Only applies when [authenticating as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * Has no effect when [authenticating as a Chat app] + * (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + * + * Generated from protobuf field bool force = 2; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * When `true`, deleting a message also deletes its threaded replies. When + * `false`, if a message has threaded replies, deletion fails. + * Only applies when [authenticating as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * Has no effect when [authenticating as a Chat app] + * (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + * + * Generated from protobuf field bool force = 2; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/DeleteReactionRequest.php b/AppsChat/src/Chat/V1/DeleteReactionRequest.php new file mode 100644 index 000000000000..c7557ad1c0e4 --- /dev/null +++ b/AppsChat/src/Chat/V1/DeleteReactionRequest.php @@ -0,0 +1,87 @@ +google.chat.v1.DeleteReactionRequest + */ +class DeleteReactionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the reaction to delete. + * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the reaction to delete. + * + * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` + * Please see {@see ChatServiceClient::reactionName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\DeleteReactionRequest + * + * @experimental + */ + public static function 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 reaction to delete. + * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Reaction::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the reaction to delete. + * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` + * + * Generated 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 reaction to delete. + * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/DeleteSpaceRequest.php b/AppsChat/src/Chat/V1/DeleteSpaceRequest.php new file mode 100644 index 000000000000..62c7dedb9781 --- /dev/null +++ b/AppsChat/src/Chat/V1/DeleteSpaceRequest.php @@ -0,0 +1,87 @@ +google.chat.v1.DeleteSpaceRequest + */ +class DeleteSpaceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the space to delete. + * Format: `spaces/{space}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the space to delete. + * + * Format: `spaces/{space}` + * Please see {@see ChatServiceClient::spaceName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\DeleteSpaceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the space to delete. + * Format: `spaces/{space}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the space to delete. + * Format: `spaces/{space}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the space to delete. + * Format: `spaces/{space}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/DeletionMetadata.php b/AppsChat/src/Chat/V1/DeletionMetadata.php new file mode 100644 index 000000000000..cd50e1dc6aa7 --- /dev/null +++ b/AppsChat/src/Chat/V1/DeletionMetadata.php @@ -0,0 +1,68 @@ +google.chat.v1.DeletionMetadata + */ +class DeletionMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Indicates who deleted the message. + * + * Generated from protobuf field .google.chat.v1.DeletionMetadata.DeletionType deletion_type = 1; + */ + protected $deletion_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $deletion_type + * Indicates who deleted the message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\DeletionMetadata::initOnce(); + parent::__construct($data); + } + + /** + * Indicates who deleted the message. + * + * Generated from protobuf field .google.chat.v1.DeletionMetadata.DeletionType deletion_type = 1; + * @return int + */ + public function getDeletionType() + { + return $this->deletion_type; + } + + /** + * Indicates who deleted the message. + * + * Generated from protobuf field .google.chat.v1.DeletionMetadata.DeletionType deletion_type = 1; + * @param int $var + * @return $this + */ + public function setDeletionType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\DeletionMetadata\DeletionType::class); + $this->deletion_type = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/DeletionMetadata/DeletionType.php b/AppsChat/src/Chat/V1/DeletionMetadata/DeletionType.php new file mode 100644 index 000000000000..ac33dde93590 --- /dev/null +++ b/AppsChat/src/Chat/V1/DeletionMetadata/DeletionType.php @@ -0,0 +1,90 @@ +google.chat.v1.DeletionMetadata.DeletionType + */ +class DeletionType +{ + /** + * This value is unused. + * + * Generated from protobuf enum DELETION_TYPE_UNSPECIFIED = 0; + */ + const DELETION_TYPE_UNSPECIFIED = 0; + /** + * User deleted their own message. + * + * Generated from protobuf enum CREATOR = 1; + */ + const CREATOR = 1; + /** + * The space owner deleted the message. + * + * Generated from protobuf enum SPACE_OWNER = 2; + */ + const SPACE_OWNER = 2; + /** + * A Google Workspace admin deleted the message. + * + * Generated from protobuf enum ADMIN = 3; + */ + const ADMIN = 3; + /** + * A Chat app deleted its own message when it expired. + * + * Generated from protobuf enum APP_MESSAGE_EXPIRY = 4; + */ + const APP_MESSAGE_EXPIRY = 4; + /** + * A Chat app deleted the message on behalf of the user. + * + * Generated from protobuf enum CREATOR_VIA_APP = 5; + */ + const CREATOR_VIA_APP = 5; + /** + * A Chat app deleted the message on behalf of the space owner. + * + * Generated from protobuf enum SPACE_OWNER_VIA_APP = 6; + */ + const SPACE_OWNER_VIA_APP = 6; + + private static $valueToName = [ + self::DELETION_TYPE_UNSPECIFIED => 'DELETION_TYPE_UNSPECIFIED', + self::CREATOR => 'CREATOR', + self::SPACE_OWNER => 'SPACE_OWNER', + self::ADMIN => 'ADMIN', + self::APP_MESSAGE_EXPIRY => 'APP_MESSAGE_EXPIRY', + self::CREATOR_VIA_APP => 'CREATOR_VIA_APP', + self::SPACE_OWNER_VIA_APP => 'SPACE_OWNER_VIA_APP', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Chat/V1/Dialog.php b/AppsChat/src/Chat/V1/Dialog.php new file mode 100644 index 000000000000..86434601a751 --- /dev/null +++ b/AppsChat/src/Chat/V1/Dialog.php @@ -0,0 +1,85 @@ +google.chat.v1.Dialog + */ +class Dialog extends \Google\Protobuf\Internal\Message +{ + /** + * Input only. Body of the dialog, which is rendered in a modal. + * Google Chat apps don't support the following card entities: + * `DateTimePicker`, `OnChangeAction`. + * + * Generated from protobuf field .google.apps.card.v1.Card body = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Card\V1\Card $body + * Input only. Body of the dialog, which is rendered in a modal. + * Google Chat apps don't support the following card entities: + * `DateTimePicker`, `OnChangeAction`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Input only. Body of the dialog, which is rendered in a modal. + * Google Chat apps don't support the following card entities: + * `DateTimePicker`, `OnChangeAction`. + * + * Generated from protobuf field .google.apps.card.v1.Card body = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Apps\Card\V1\Card|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Input only. Body of the dialog, which is rendered in a modal. + * Google Chat apps don't support the following card entities: + * `DateTimePicker`, `OnChangeAction`. + * + * Generated from protobuf field .google.apps.card.v1.Card body = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Apps\Card\V1\Card $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Card::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/DialogAction.php b/AppsChat/src/Chat/V1/DialogAction.php new file mode 100644 index 000000000000..381110a1278f --- /dev/null +++ b/AppsChat/src/Chat/V1/DialogAction.php @@ -0,0 +1,139 @@ +google.chat.v1.DialogAction + */ +class DialogAction extends \Google\Protobuf\Internal\Message +{ + /** + * Input only. Status for a request to either invoke or submit a + * [dialog](https://developers.google.com/workspace/chat/dialogs). Displays + * a status and message to users, if necessary. + * For example, in case of an error or success. + * + * Generated from protobuf field .google.chat.v1.ActionStatus action_status = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $action_status = null; + protected $action; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Dialog $dialog + * Input only. + * [Dialog](https://developers.google.com/workspace/chat/dialogs) for the + * request. + * @type \Google\Apps\Chat\V1\ActionStatus $action_status + * Input only. Status for a request to either invoke or submit a + * [dialog](https://developers.google.com/workspace/chat/dialogs). Displays + * a status and message to users, if necessary. + * For example, in case of an error or success. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Input only. + * [Dialog](https://developers.google.com/workspace/chat/dialogs) for the + * request. + * + * Generated from protobuf field .google.chat.v1.Dialog dialog = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Apps\Chat\V1\Dialog|null + */ + public function getDialog() + { + return $this->readOneof(1); + } + + public function hasDialog() + { + return $this->hasOneof(1); + } + + /** + * Input only. + * [Dialog](https://developers.google.com/workspace/chat/dialogs) for the + * request. + * + * Generated from protobuf field .google.chat.v1.Dialog dialog = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Apps\Chat\V1\Dialog $var + * @return $this + */ + public function setDialog($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Dialog::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Input only. Status for a request to either invoke or submit a + * [dialog](https://developers.google.com/workspace/chat/dialogs). Displays + * a status and message to users, if necessary. + * For example, in case of an error or success. + * + * Generated from protobuf field .google.chat.v1.ActionStatus action_status = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Apps\Chat\V1\ActionStatus|null + */ + public function getActionStatus() + { + return $this->action_status; + } + + public function hasActionStatus() + { + return isset($this->action_status); + } + + public function clearActionStatus() + { + unset($this->action_status); + } + + /** + * Input only. Status for a request to either invoke or submit a + * [dialog](https://developers.google.com/workspace/chat/dialogs). Displays + * a status and message to users, if necessary. + * For example, in case of an error or success. + * + * Generated from protobuf field .google.chat.v1.ActionStatus action_status = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Apps\Chat\V1\ActionStatus $var + * @return $this + */ + public function setActionStatus($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\ActionStatus::class); + $this->action_status = $var; + + return $this; + } + + /** + * @return string + */ + public function getAction() + { + return $this->whichOneof("action"); + } + +} + diff --git a/AppsChat/src/Chat/V1/DriveDataRef.php b/AppsChat/src/Chat/V1/DriveDataRef.php new file mode 100644 index 000000000000..9c6bf3e9e6b9 --- /dev/null +++ b/AppsChat/src/Chat/V1/DriveDataRef.php @@ -0,0 +1,67 @@ +google.chat.v1.DriveDataRef + */ +class DriveDataRef extends \Google\Protobuf\Internal\Message +{ + /** + * The ID for the drive file. Use with the Drive API. + * + * Generated from protobuf field string drive_file_id = 2; + */ + protected $drive_file_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $drive_file_id + * The ID for the drive file. Use with the Drive API. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Attachment::initOnce(); + parent::__construct($data); + } + + /** + * The ID for the drive file. Use with the Drive API. + * + * Generated from protobuf field string drive_file_id = 2; + * @return string + */ + public function getDriveFileId() + { + return $this->drive_file_id; + } + + /** + * The ID for the drive file. Use with the Drive API. + * + * Generated from protobuf field string drive_file_id = 2; + * @param string $var + * @return $this + */ + public function setDriveFileId($var) + { + GPBUtil::checkString($var, True); + $this->drive_file_id = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/DriveLinkData.php b/AppsChat/src/Chat/V1/DriveLinkData.php new file mode 100644 index 000000000000..f27cfb2631df --- /dev/null +++ b/AppsChat/src/Chat/V1/DriveLinkData.php @@ -0,0 +1,119 @@ +google.chat.v1.DriveLinkData + */ +class DriveLinkData extends \Google\Protobuf\Internal\Message +{ + /** + * A + * [DriveDataRef](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments#drivedataref) + * which references a Google Drive file. + * + * Generated from protobuf field .google.chat.v1.DriveDataRef drive_data_ref = 1; + */ + protected $drive_data_ref = null; + /** + * The mime type of the linked Google Drive resource. + * + * Generated from protobuf field string mime_type = 2; + */ + protected $mime_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\DriveDataRef $drive_data_ref + * A + * [DriveDataRef](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments#drivedataref) + * which references a Google Drive file. + * @type string $mime_type + * The mime type of the linked Google Drive resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Annotation::initOnce(); + parent::__construct($data); + } + + /** + * A + * [DriveDataRef](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments#drivedataref) + * which references a Google Drive file. + * + * Generated from protobuf field .google.chat.v1.DriveDataRef drive_data_ref = 1; + * @return \Google\Apps\Chat\V1\DriveDataRef|null + */ + public function getDriveDataRef() + { + return $this->drive_data_ref; + } + + public function hasDriveDataRef() + { + return isset($this->drive_data_ref); + } + + public function clearDriveDataRef() + { + unset($this->drive_data_ref); + } + + /** + * A + * [DriveDataRef](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments#drivedataref) + * which references a Google Drive file. + * + * Generated from protobuf field .google.chat.v1.DriveDataRef drive_data_ref = 1; + * @param \Google\Apps\Chat\V1\DriveDataRef $var + * @return $this + */ + public function setDriveDataRef($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\DriveDataRef::class); + $this->drive_data_ref = $var; + + return $this; + } + + /** + * The mime type of the linked Google Drive resource. + * + * Generated from protobuf field string mime_type = 2; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * The mime type of the linked Google Drive resource. + * + * Generated from protobuf field string mime_type = 2; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/Emoji.php b/AppsChat/src/Chat/V1/Emoji.php new file mode 100644 index 000000000000..c4efb005ee19 --- /dev/null +++ b/AppsChat/src/Chat/V1/Emoji.php @@ -0,0 +1,108 @@ +google.chat.v1.Emoji + */ +class Emoji extends \Google\Protobuf\Internal\Message +{ + protected $content; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $unicode + * A basic emoji represented by a unicode string. + * @type \Google\Apps\Chat\V1\CustomEmoji $custom_emoji + * Output only. A custom emoji. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Reaction::initOnce(); + parent::__construct($data); + } + + /** + * A basic emoji represented by a unicode string. + * + * Generated from protobuf field string unicode = 1; + * @return string + */ + public function getUnicode() + { + return $this->readOneof(1); + } + + public function hasUnicode() + { + return $this->hasOneof(1); + } + + /** + * A basic emoji represented by a unicode string. + * + * Generated from protobuf field string unicode = 1; + * @param string $var + * @return $this + */ + public function setUnicode($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Output only. A custom emoji. + * + * Generated from protobuf field .google.chat.v1.CustomEmoji custom_emoji = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Apps\Chat\V1\CustomEmoji|null + */ + public function getCustomEmoji() + { + return $this->readOneof(2); + } + + public function hasCustomEmoji() + { + return $this->hasOneof(2); + } + + /** + * Output only. A custom emoji. + * + * Generated from protobuf field .google.chat.v1.CustomEmoji custom_emoji = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Apps\Chat\V1\CustomEmoji $var + * @return $this + */ + public function setCustomEmoji($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\CustomEmoji::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getContent() + { + return $this->whichOneof("content"); + } + +} + diff --git a/AppsChat/src/Chat/V1/EmojiReactionSummary.php b/AppsChat/src/Chat/V1/EmojiReactionSummary.php new file mode 100644 index 000000000000..c607da712f81 --- /dev/null +++ b/AppsChat/src/Chat/V1/EmojiReactionSummary.php @@ -0,0 +1,121 @@ +google.chat.v1.EmojiReactionSummary + */ +class EmojiReactionSummary extends \Google\Protobuf\Internal\Message +{ + /** + * Emoji associated with the reactions. + * + * Generated from protobuf field .google.chat.v1.Emoji emoji = 1; + */ + protected $emoji = null; + /** + * The total number of reactions using the associated emoji. + * + * Generated from protobuf field optional int32 reaction_count = 2; + */ + protected $reaction_count = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Emoji $emoji + * Emoji associated with the reactions. + * @type int $reaction_count + * The total number of reactions using the associated emoji. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Reaction::initOnce(); + parent::__construct($data); + } + + /** + * Emoji associated with the reactions. + * + * Generated from protobuf field .google.chat.v1.Emoji emoji = 1; + * @return \Google\Apps\Chat\V1\Emoji|null + */ + public function getEmoji() + { + return $this->emoji; + } + + public function hasEmoji() + { + return isset($this->emoji); + } + + public function clearEmoji() + { + unset($this->emoji); + } + + /** + * Emoji associated with the reactions. + * + * Generated from protobuf field .google.chat.v1.Emoji emoji = 1; + * @param \Google\Apps\Chat\V1\Emoji $var + * @return $this + */ + public function setEmoji($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Emoji::class); + $this->emoji = $var; + + return $this; + } + + /** + * The total number of reactions using the associated emoji. + * + * Generated from protobuf field optional int32 reaction_count = 2; + * @return int + */ + public function getReactionCount() + { + return isset($this->reaction_count) ? $this->reaction_count : 0; + } + + public function hasReactionCount() + { + return isset($this->reaction_count); + } + + public function clearReactionCount() + { + unset($this->reaction_count); + } + + /** + * The total number of reactions using the associated emoji. + * + * Generated from protobuf field optional int32 reaction_count = 2; + * @param int $var + * @return $this + */ + public function setReactionCount($var) + { + GPBUtil::checkInt32($var); + $this->reaction_count = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/FindDirectMessageRequest.php b/AppsChat/src/Chat/V1/FindDirectMessageRequest.php new file mode 100644 index 000000000000..d8347a58af0b --- /dev/null +++ b/AppsChat/src/Chat/V1/FindDirectMessageRequest.php @@ -0,0 +1,111 @@ +google.chat.v1.FindDirectMessageRequest + */ +class FindDirectMessageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the user to find direct message with. + * Format: `users/{user}`, where `{user}` is either the `id` for the + * [person](https://developers.google.com/people/api/rest/v1/people) from the + * People API, or the `id` for the + * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) + * in the Directory API. For example, if the People API profile ID is + * `123456789`, you can find a direct message with that person by using + * `users/123456789` as the `name`. When [authenticated as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can use the email as an alias for `{user}`. For example, + * `users/example@gmail.com` where `example@gmail.com` is the email of the + * Google Chat user. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the user to find direct message with. + * Format: `users/{user}`, where `{user}` is either the `id` for the + * [person](https://developers.google.com/people/api/rest/v1/people) from the + * People API, or the `id` for the + * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) + * in the Directory API. For example, if the People API profile ID is + * `123456789`, you can find a direct message with that person by using + * `users/123456789` as the `name`. When [authenticated as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can use the email as an alias for `{user}`. For example, + * `users/example@gmail.com` where `example@gmail.com` is the email of the + * Google Chat user. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the user to find direct message with. + * Format: `users/{user}`, where `{user}` is either the `id` for the + * [person](https://developers.google.com/people/api/rest/v1/people) from the + * People API, or the `id` for the + * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) + * in the Directory API. For example, if the People API profile ID is + * `123456789`, you can find a direct message with that person by using + * `users/123456789` as the `name`. When [authenticated as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can use the email as an alias for `{user}`. For example, + * `users/example@gmail.com` where `example@gmail.com` is the email of the + * Google Chat user. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the user to find direct message with. + * Format: `users/{user}`, where `{user}` is either the `id` for the + * [person](https://developers.google.com/people/api/rest/v1/people) from the + * People API, or the `id` for the + * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) + * in the Directory API. For example, if the People API profile ID is + * `123456789`, you can find a direct message with that person by using + * `users/123456789` as the `name`. When [authenticated as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can use the email as an alias for `{user}`. For example, + * `users/example@gmail.com` where `example@gmail.com` is the email of the + * Google Chat user. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/GetAttachmentRequest.php b/AppsChat/src/Chat/V1/GetAttachmentRequest.php new file mode 100644 index 000000000000..85bd441331c2 --- /dev/null +++ b/AppsChat/src/Chat/V1/GetAttachmentRequest.php @@ -0,0 +1,86 @@ +google.chat.v1.GetAttachmentRequest + */ +class GetAttachmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the attachment, in the form + * `spaces/*/messages/*/attachments/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the attachment, in the form + * `spaces/*/messages/*/attachments/*`. Please see + * {@see ChatServiceClient::attachmentName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\GetAttachmentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the attachment, in the form + * `spaces/*/messages/*/attachments/*`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Attachment::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the attachment, in the form + * `spaces/*/messages/*/attachments/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the attachment, in the form + * `spaces/*/messages/*/attachments/*`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/GetMembershipRequest.php b/AppsChat/src/Chat/V1/GetMembershipRequest.php new file mode 100644 index 000000000000..bd46f59d7711 --- /dev/null +++ b/AppsChat/src/Chat/V1/GetMembershipRequest.php @@ -0,0 +1,124 @@ +google.chat.v1.GetMembershipRequest + */ +class GetMembershipRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the membership to retrieve. + * To get the app's own membership, you can optionally use + * `spaces/{space}/members/app`. + * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app` + * When [authenticated as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can use the user's email as an alias for `{member}`. For example, + * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the + * email of the Google Chat user. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the membership to retrieve. + * + * To get the app's own membership, you can optionally use + * `spaces/{space}/members/app`. + * + * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app` + * + * When [authenticated as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can use the user's email as an alias for `{member}`. For example, + * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the + * email of the Google Chat user. Please see + * {@see ChatServiceClient::membershipName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\GetMembershipRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the membership to retrieve. + * To get the app's own membership, you can optionally use + * `spaces/{space}/members/app`. + * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app` + * When [authenticated as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can use the user's email as an alias for `{member}`. For example, + * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the + * email of the Google Chat user. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the membership to retrieve. + * To get the app's own membership, you can optionally use + * `spaces/{space}/members/app`. + * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app` + * When [authenticated as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can use the user's email as an alias for `{member}`. For example, + * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the + * email of the Google Chat user. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the membership to retrieve. + * To get the app's own membership, you can optionally use + * `spaces/{space}/members/app`. + * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app` + * When [authenticated as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can use the user's email as an alias for `{member}`. For example, + * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the + * email of the Google Chat user. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/GetMessageRequest.php b/AppsChat/src/Chat/V1/GetMessageRequest.php new file mode 100644 index 000000000000..99403d2bead6 --- /dev/null +++ b/AppsChat/src/Chat/V1/GetMessageRequest.php @@ -0,0 +1,108 @@ +google.chat.v1.GetMessageRequest + */ +class GetMessageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the message. + * Format: `spaces/{space}/messages/{message}` + * If you've set a custom ID for your message, you can use the value from the + * `clientAssignedMessageId` field for `{message}`. For details, see [Name a + * message] + * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the message. + * + * Format: `spaces/{space}/messages/{message}` + * + * If you've set a custom ID for your message, you can use the value from the + * `clientAssignedMessageId` field for `{message}`. For details, see [Name a + * message] + * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). Please see + * {@see ChatServiceClient::messageName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\GetMessageRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the message. + * Format: `spaces/{space}/messages/{message}` + * If you've set a custom ID for your message, you can use the value from the + * `clientAssignedMessageId` field for `{message}`. For details, see [Name a + * message] + * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the message. + * Format: `spaces/{space}/messages/{message}` + * If you've set a custom ID for your message, you can use the value from the + * `clientAssignedMessageId` field for `{message}`. For details, see [Name a + * message] + * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the message. + * Format: `spaces/{space}/messages/{message}` + * If you've set a custom ID for your message, you can use the value from the + * `clientAssignedMessageId` field for `{message}`. For details, see [Name a + * message] + * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/GetSpaceRequest.php b/AppsChat/src/Chat/V1/GetSpaceRequest.php new file mode 100644 index 000000000000..834cb7758444 --- /dev/null +++ b/AppsChat/src/Chat/V1/GetSpaceRequest.php @@ -0,0 +1,87 @@ +google.chat.v1.GetSpaceRequest + */ +class GetSpaceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the space, in the form "spaces/*". + * Format: `spaces/{space}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the space, in the form "spaces/*". + * + * Format: `spaces/{space}` + * Please see {@see ChatServiceClient::spaceName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\GetSpaceRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the space, in the form "spaces/*". + * Format: `spaces/{space}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the space, in the form "spaces/*". + * Format: `spaces/{space}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the space, in the form "spaces/*". + * Format: `spaces/{space}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/Group.php b/AppsChat/src/Chat/V1/Group.php new file mode 100644 index 000000000000..abd3dff79c75 --- /dev/null +++ b/AppsChat/src/Chat/V1/Group.php @@ -0,0 +1,83 @@ +google.chat.v1.Group + */ +class Group extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name for a Google Group. + * Represents a + * [group](https://cloud.google.com/identity/docs/reference/rest/v1/groups) in + * Cloud Identity Groups API. + * Format: groups/{group} + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name for a Google Group. + * Represents a + * [group](https://cloud.google.com/identity/docs/reference/rest/v1/groups) in + * Cloud Identity Groups API. + * Format: groups/{group} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Group::initOnce(); + parent::__construct($data); + } + + /** + * Resource name for a Google Group. + * Represents a + * [group](https://cloud.google.com/identity/docs/reference/rest/v1/groups) in + * Cloud Identity Groups API. + * Format: groups/{group} + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name for a Google Group. + * Represents a + * [group](https://cloud.google.com/identity/docs/reference/rest/v1/groups) in + * Cloud Identity Groups API. + * Format: groups/{group} + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/HistoryState.php b/AppsChat/src/Chat/V1/HistoryState.php new file mode 100644 index 000000000000..2dadcbc53b5f --- /dev/null +++ b/AppsChat/src/Chat/V1/HistoryState.php @@ -0,0 +1,65 @@ +google.chat.v1.HistoryState + */ +class HistoryState +{ + /** + * Default value. Do not use. + * + * Generated from protobuf enum HISTORY_STATE_UNSPECIFIED = 0; + */ + const HISTORY_STATE_UNSPECIFIED = 0; + /** + * History off. [Messages and threads are kept for 24 + * hours](https://support.google.com/chat/answer/7664687). + * + * Generated from protobuf enum HISTORY_OFF = 1; + */ + const HISTORY_OFF = 1; + /** + * History on. The organization's [Vault retention + * rules](https://support.google.com/vault/answer/7657597) specify for + * how long messages and threads are kept. + * + * Generated from protobuf enum HISTORY_ON = 2; + */ + const HISTORY_ON = 2; + + private static $valueToName = [ + self::HISTORY_STATE_UNSPECIFIED => 'HISTORY_STATE_UNSPECIFIED', + self::HISTORY_OFF => 'HISTORY_OFF', + self::HISTORY_ON => 'HISTORY_ON', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/AppsChat/src/Chat/V1/ListMembershipsRequest.php b/AppsChat/src/Chat/V1/ListMembershipsRequest.php new file mode 100644 index 000000000000..aa13f8f92d44 --- /dev/null +++ b/AppsChat/src/Chat/V1/ListMembershipsRequest.php @@ -0,0 +1,426 @@ +google.chat.v1.ListMembershipsRequest + */ +class ListMembershipsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the space for which to fetch a membership + * list. + * Format: spaces/{space} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of memberships to return. The service might + * return fewer than this value. + * If unspecified, at most 100 memberships are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * Negative values return an `INVALID_ARGUMENT` error. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous call to list memberships. + * Provide this parameter to retrieve the subsequent page. + * When paginating, all other parameters provided should match the call that + * provided the page token. Passing different values to the other parameters + * might lead to unexpected results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. A query filter. + * You can filter memberships by a member's role + * ([`role`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole)) + * and type + * ([`member.type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)). + * To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. + * To filter by type, set `member.type` to `HUMAN` or `BOT`. + * To filter by both role and type, use the `AND` operator. To filter by + * either role or type, use the `OR` operator. + * For example, the following queries are valid: + * ``` + * role = "ROLE_MANAGER" OR role = "ROLE_MEMBER" + * member.type = "HUMAN" AND role = "ROLE_MANAGER" + * ``` + * The following queries are invalid: + * ``` + * member.type = "HUMAN" AND member.type = "BOT" + * role = "ROLE_MANAGER" AND role = "ROLE_MEMBER" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. When `true`, also returns memberships associated with a + * [Google Group][google.chat.v1.Membership.group_member], in + * addition to other types of memberships. If a + * [filter][google.chat.v1.ListMembershipsRequest.filter] is set, + * [Google Group][google.chat.v1.Membership.group_member] + * memberships that don't match the filter criteria aren't returned. + * + * Generated from protobuf field bool show_groups = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $show_groups = false; + /** + * Optional. When `true`, also returns memberships associated with + * [invited][google.chat.v1.Membership.MembershipState.INVITED] members, in + * addition to other types of memberships. If a + * filter is set, + * [invited][google.chat.v1.Membership.MembershipState.INVITED] memberships + * that don't match the filter criteria aren't returned. + * Currently requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * Generated from protobuf field bool show_invited = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $show_invited = false; + + /** + * @param string $parent Required. The resource name of the space for which to fetch a membership + * list. + * + * Format: spaces/{space} + * Please see {@see ChatServiceClient::spaceName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\ListMembershipsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the space for which to fetch a membership + * list. + * Format: spaces/{space} + * @type int $page_size + * Optional. The maximum number of memberships to return. The service might + * return fewer than this value. + * If unspecified, at most 100 memberships are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * Negative values return an `INVALID_ARGUMENT` error. + * @type string $page_token + * Optional. A page token, received from a previous call to list memberships. + * Provide this parameter to retrieve the subsequent page. + * When paginating, all other parameters provided should match the call that + * provided the page token. Passing different values to the other parameters + * might lead to unexpected results. + * @type string $filter + * Optional. A query filter. + * You can filter memberships by a member's role + * ([`role`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole)) + * and type + * ([`member.type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)). + * To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. + * To filter by type, set `member.type` to `HUMAN` or `BOT`. + * To filter by both role and type, use the `AND` operator. To filter by + * either role or type, use the `OR` operator. + * For example, the following queries are valid: + * ``` + * role = "ROLE_MANAGER" OR role = "ROLE_MEMBER" + * member.type = "HUMAN" AND role = "ROLE_MANAGER" + * ``` + * The following queries are invalid: + * ``` + * member.type = "HUMAN" AND member.type = "BOT" + * role = "ROLE_MANAGER" AND role = "ROLE_MEMBER" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * @type bool $show_groups + * Optional. When `true`, also returns memberships associated with a + * [Google Group][google.chat.v1.Membership.group_member], in + * addition to other types of memberships. If a + * [filter][google.chat.v1.ListMembershipsRequest.filter] is set, + * [Google Group][google.chat.v1.Membership.group_member] + * memberships that don't match the filter criteria aren't returned. + * @type bool $show_invited + * Optional. When `true`, also returns memberships associated with + * [invited][google.chat.v1.Membership.MembershipState.INVITED] members, in + * addition to other types of memberships. If a + * filter is set, + * [invited][google.chat.v1.Membership.MembershipState.INVITED] memberships + * that don't match the filter criteria aren't returned. + * Currently requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the space for which to fetch a membership + * list. + * Format: spaces/{space} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the space for which to fetch a membership + * list. + * Format: spaces/{space} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of memberships to return. The service might + * return fewer than this value. + * If unspecified, at most 100 memberships are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * Negative values return an `INVALID_ARGUMENT` error. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of memberships to return. The service might + * return fewer than this value. + * If unspecified, at most 100 memberships are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * Negative values return an `INVALID_ARGUMENT` error. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous call to list memberships. + * Provide this parameter to retrieve the subsequent page. + * When paginating, all other parameters provided should match the call that + * provided the page token. Passing different values to the other parameters + * might lead to unexpected results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous call to list memberships. + * Provide this parameter to retrieve the subsequent page. + * When paginating, all other parameters provided should match the call that + * provided the page token. Passing different values to the other parameters + * might lead to unexpected results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. A query filter. + * You can filter memberships by a member's role + * ([`role`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole)) + * and type + * ([`member.type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)). + * To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. + * To filter by type, set `member.type` to `HUMAN` or `BOT`. + * To filter by both role and type, use the `AND` operator. To filter by + * either role or type, use the `OR` operator. + * For example, the following queries are valid: + * ``` + * role = "ROLE_MANAGER" OR role = "ROLE_MEMBER" + * member.type = "HUMAN" AND role = "ROLE_MANAGER" + * ``` + * The following queries are invalid: + * ``` + * member.type = "HUMAN" AND member.type = "BOT" + * role = "ROLE_MANAGER" AND role = "ROLE_MEMBER" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. A query filter. + * You can filter memberships by a member's role + * ([`role`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole)) + * and type + * ([`member.type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)). + * To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. + * To filter by type, set `member.type` to `HUMAN` or `BOT`. + * To filter by both role and type, use the `AND` operator. To filter by + * either role or type, use the `OR` operator. + * For example, the following queries are valid: + * ``` + * role = "ROLE_MANAGER" OR role = "ROLE_MEMBER" + * member.type = "HUMAN" AND role = "ROLE_MANAGER" + * ``` + * The following queries are invalid: + * ``` + * member.type = "HUMAN" AND member.type = "BOT" + * role = "ROLE_MANAGER" AND role = "ROLE_MEMBER" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. When `true`, also returns memberships associated with a + * [Google Group][google.chat.v1.Membership.group_member], in + * addition to other types of memberships. If a + * [filter][google.chat.v1.ListMembershipsRequest.filter] is set, + * [Google Group][google.chat.v1.Membership.group_member] + * memberships that don't match the filter criteria aren't returned. + * + * Generated from protobuf field bool show_groups = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getShowGroups() + { + return $this->show_groups; + } + + /** + * Optional. When `true`, also returns memberships associated with a + * [Google Group][google.chat.v1.Membership.group_member], in + * addition to other types of memberships. If a + * [filter][google.chat.v1.ListMembershipsRequest.filter] is set, + * [Google Group][google.chat.v1.Membership.group_member] + * memberships that don't match the filter criteria aren't returned. + * + * Generated from protobuf field bool show_groups = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setShowGroups($var) + { + GPBUtil::checkBool($var); + $this->show_groups = $var; + + return $this; + } + + /** + * Optional. When `true`, also returns memberships associated with + * [invited][google.chat.v1.Membership.MembershipState.INVITED] members, in + * addition to other types of memberships. If a + * filter is set, + * [invited][google.chat.v1.Membership.MembershipState.INVITED] memberships + * that don't match the filter criteria aren't returned. + * Currently requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * Generated from protobuf field bool show_invited = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getShowInvited() + { + return $this->show_invited; + } + + /** + * Optional. When `true`, also returns memberships associated with + * [invited][google.chat.v1.Membership.MembershipState.INVITED] members, in + * addition to other types of memberships. If a + * filter is set, + * [invited][google.chat.v1.Membership.MembershipState.INVITED] memberships + * that don't match the filter criteria aren't returned. + * Currently requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * Generated from protobuf field bool show_invited = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setShowInvited($var) + { + GPBUtil::checkBool($var); + $this->show_invited = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/ListMembershipsResponse.php b/AppsChat/src/Chat/V1/ListMembershipsResponse.php new file mode 100644 index 000000000000..683786ade983 --- /dev/null +++ b/AppsChat/src/Chat/V1/ListMembershipsResponse.php @@ -0,0 +1,105 @@ +google.chat.v1.ListMembershipsResponse + */ +class ListMembershipsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Unordered list. List of memberships in the requested (or first) page. + * + * Generated from protobuf field repeated .google.chat.v1.Membership memberships = 1 [(.google.api.field_behavior) = UNORDERED_LIST]; + */ + private $memberships; + /** + * A token that you can send as `pageToken` to retrieve the next page of + * results. If empty, 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\Apps\Chat\V1\Membership>|\Google\Protobuf\Internal\RepeatedField $memberships + * Unordered list. List of memberships in the requested (or first) page. + * @type string $next_page_token + * A token that you can send as `pageToken` to retrieve the next page of + * results. If empty, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Unordered list. List of memberships in the requested (or first) page. + * + * Generated from protobuf field repeated .google.chat.v1.Membership memberships = 1 [(.google.api.field_behavior) = UNORDERED_LIST]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMemberships() + { + return $this->memberships; + } + + /** + * Unordered list. List of memberships in the requested (or first) page. + * + * Generated from protobuf field repeated .google.chat.v1.Membership memberships = 1 [(.google.api.field_behavior) = UNORDERED_LIST]; + * @param array<\Google\Apps\Chat\V1\Membership>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMemberships($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Membership::class); + $this->memberships = $arr; + + return $this; + } + + /** + * A token that you can send as `pageToken` to retrieve the next page of + * results. If empty, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token that you can send as `pageToken` to retrieve the next page of + * results. If empty, 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/AppsChat/src/Chat/V1/ListMessagesRequest.php b/AppsChat/src/Chat/V1/ListMessagesRequest.php new file mode 100644 index 000000000000..ab83af2f4080 --- /dev/null +++ b/AppsChat/src/Chat/V1/ListMessagesRequest.php @@ -0,0 +1,421 @@ +google.chat.v1.ListMessagesRequest + */ +class ListMessagesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the space to list messages from. + * Format: `spaces/{space}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of messages returned. The service might return fewer + * messages than this value. + * If unspecified, at most 25 are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * Negative values return an `INVALID_ARGUMENT` error. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Optional, if resuming from a previous query. + * A page token received from a previous list messages call. Provide this + * parameter to retrieve the subsequent page. + * When paginating, all other parameters provided should match the call that + * provided the page token. Passing different values to the other parameters + * might lead to unexpected results. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A query filter. + * You can filter messages by date (`create_time`) and thread (`thread.name`). + * To filter messages by the date they were created, specify the `create_time` + * with a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) + * format and double quotation marks. For example, + * `"2023-04-21T11:30:00-04:00"`. You can use the greater than operator `>` to + * list messages that were created after a timestamp, or the less than + * operator `<` to list messages that were created before a timestamp. To + * filter messages within a time interval, use the `AND` operator between two + * timestamps. + * To filter by thread, specify the `thread.name`, formatted as + * `spaces/{space}/threads/{thread}`. You can only specify one + * `thread.name` per query. + * To filter by both thread and date, use the `AND` operator in your query. + * For example, the following queries are valid: + * ``` + * create_time > "2012-04-21T11:30:00-04:00" + * create_time > "2012-04-21T11:30:00-04:00" AND + * thread.name = spaces/AAAAAAAAAAA/threads/123 + * create_time > "2012-04-21T11:30:00+00:00" AND + * create_time < "2013-01-01T00:00:00+00:00" AND + * thread.name = spaces/AAAAAAAAAAA/threads/123 + * thread.name = spaces/AAAAAAAAAAA/threads/123 + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Optional, if resuming from a previous query. + * How the list of messages is ordered. Specify a value to order by an + * ordering operation. Valid ordering operation values are as follows: + * - `ASC` for ascending. + * - `DESC` for descending. + * The default ordering is `create_time ASC`. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + /** + * Whether to include deleted messages. Deleted messages include deleted time + * and metadata about their deletion, but message content is unavailable. + * + * Generated from protobuf field bool show_deleted = 6; + */ + protected $show_deleted = false; + + /** + * @param string $parent Required. The resource name of the space to list messages from. + * + * Format: `spaces/{space}` + * Please see {@see ChatServiceClient::spaceName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\ListMessagesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the space to list messages from. + * Format: `spaces/{space}` + * @type int $page_size + * The maximum number of messages returned. The service might return fewer + * messages than this value. + * If unspecified, at most 25 are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * Negative values return an `INVALID_ARGUMENT` error. + * @type string $page_token + * Optional, if resuming from a previous query. + * A page token received from a previous list messages call. Provide this + * parameter to retrieve the subsequent page. + * When paginating, all other parameters provided should match the call that + * provided the page token. Passing different values to the other parameters + * might lead to unexpected results. + * @type string $filter + * A query filter. + * You can filter messages by date (`create_time`) and thread (`thread.name`). + * To filter messages by the date they were created, specify the `create_time` + * with a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) + * format and double quotation marks. For example, + * `"2023-04-21T11:30:00-04:00"`. You can use the greater than operator `>` to + * list messages that were created after a timestamp, or the less than + * operator `<` to list messages that were created before a timestamp. To + * filter messages within a time interval, use the `AND` operator between two + * timestamps. + * To filter by thread, specify the `thread.name`, formatted as + * `spaces/{space}/threads/{thread}`. You can only specify one + * `thread.name` per query. + * To filter by both thread and date, use the `AND` operator in your query. + * For example, the following queries are valid: + * ``` + * create_time > "2012-04-21T11:30:00-04:00" + * create_time > "2012-04-21T11:30:00-04:00" AND + * thread.name = spaces/AAAAAAAAAAA/threads/123 + * create_time > "2012-04-21T11:30:00+00:00" AND + * create_time < "2013-01-01T00:00:00+00:00" AND + * thread.name = spaces/AAAAAAAAAAA/threads/123 + * thread.name = spaces/AAAAAAAAAAA/threads/123 + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * @type string $order_by + * Optional, if resuming from a previous query. + * How the list of messages is ordered. Specify a value to order by an + * ordering operation. Valid ordering operation values are as follows: + * - `ASC` for ascending. + * - `DESC` for descending. + * The default ordering is `create_time ASC`. + * @type bool $show_deleted + * Whether to include deleted messages. Deleted messages include deleted time + * and metadata about their deletion, but message content is unavailable. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the space to list messages from. + * Format: `spaces/{space}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the space to list messages from. + * Format: `spaces/{space}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of messages returned. The service might return fewer + * messages than this value. + * If unspecified, at most 25 are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * Negative values return an `INVALID_ARGUMENT` error. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of messages returned. The service might return fewer + * messages than this value. + * If unspecified, at most 25 are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * Negative values return an `INVALID_ARGUMENT` error. + * + * 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; + } + + /** + * Optional, if resuming from a previous query. + * A page token received from a previous list messages call. Provide this + * parameter to retrieve the subsequent page. + * When paginating, all other parameters provided should match the call that + * provided the page token. Passing different values to the other parameters + * might lead to unexpected results. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional, if resuming from a previous query. + * A page token received from a previous list messages call. Provide this + * parameter to retrieve the subsequent page. + * When paginating, all other parameters provided should match the call that + * provided the page token. Passing different values to the other parameters + * might lead to unexpected results. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * A query filter. + * You can filter messages by date (`create_time`) and thread (`thread.name`). + * To filter messages by the date they were created, specify the `create_time` + * with a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) + * format and double quotation marks. For example, + * `"2023-04-21T11:30:00-04:00"`. You can use the greater than operator `>` to + * list messages that were created after a timestamp, or the less than + * operator `<` to list messages that were created before a timestamp. To + * filter messages within a time interval, use the `AND` operator between two + * timestamps. + * To filter by thread, specify the `thread.name`, formatted as + * `spaces/{space}/threads/{thread}`. You can only specify one + * `thread.name` per query. + * To filter by both thread and date, use the `AND` operator in your query. + * For example, the following queries are valid: + * ``` + * create_time > "2012-04-21T11:30:00-04:00" + * create_time > "2012-04-21T11:30:00-04:00" AND + * thread.name = spaces/AAAAAAAAAAA/threads/123 + * create_time > "2012-04-21T11:30:00+00:00" AND + * create_time < "2013-01-01T00:00:00+00:00" AND + * thread.name = spaces/AAAAAAAAAAA/threads/123 + * thread.name = spaces/AAAAAAAAAAA/threads/123 + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A query filter. + * You can filter messages by date (`create_time`) and thread (`thread.name`). + * To filter messages by the date they were created, specify the `create_time` + * with a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) + * format and double quotation marks. For example, + * `"2023-04-21T11:30:00-04:00"`. You can use the greater than operator `>` to + * list messages that were created after a timestamp, or the less than + * operator `<` to list messages that were created before a timestamp. To + * filter messages within a time interval, use the `AND` operator between two + * timestamps. + * To filter by thread, specify the `thread.name`, formatted as + * `spaces/{space}/threads/{thread}`. You can only specify one + * `thread.name` per query. + * To filter by both thread and date, use the `AND` operator in your query. + * For example, the following queries are valid: + * ``` + * create_time > "2012-04-21T11:30:00-04:00" + * create_time > "2012-04-21T11:30:00-04:00" AND + * thread.name = spaces/AAAAAAAAAAA/threads/123 + * create_time > "2012-04-21T11:30:00+00:00" AND + * create_time < "2013-01-01T00:00:00+00:00" AND + * thread.name = spaces/AAAAAAAAAAA/threads/123 + * thread.name = spaces/AAAAAAAAAAA/threads/123 + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional, if resuming from a previous query. + * How the list of messages is ordered. Specify a value to order by an + * ordering operation. Valid ordering operation values are as follows: + * - `ASC` for ascending. + * - `DESC` for descending. + * The default ordering is `create_time ASC`. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional, if resuming from a previous query. + * How the list of messages is ordered. Specify a value to order by an + * ordering operation. Valid ordering operation values are as follows: + * - `ASC` for ascending. + * - `DESC` for descending. + * The default ordering is `create_time ASC`. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Whether to include deleted messages. Deleted messages include deleted time + * and metadata about their deletion, but message content is unavailable. + * + * Generated from protobuf field bool show_deleted = 6; + * @return bool + */ + public function getShowDeleted() + { + return $this->show_deleted; + } + + /** + * Whether to include deleted messages. Deleted messages include deleted time + * and metadata about their deletion, but message content is unavailable. + * + * Generated from protobuf field bool show_deleted = 6; + * @param bool $var + * @return $this + */ + public function setShowDeleted($var) + { + GPBUtil::checkBool($var); + $this->show_deleted = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/ListMessagesResponse.php b/AppsChat/src/Chat/V1/ListMessagesResponse.php new file mode 100644 index 000000000000..2b34fab21efd --- /dev/null +++ b/AppsChat/src/Chat/V1/ListMessagesResponse.php @@ -0,0 +1,105 @@ +google.chat.v1.ListMessagesResponse + */ +class ListMessagesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of messages. + * + * Generated from protobuf field repeated .google.chat.v1.Message messages = 1; + */ + private $messages; + /** + * You can send a token as `pageToken` to retrieve the next page of + * results. If empty, 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\Apps\Chat\V1\Message>|\Google\Protobuf\Internal\RepeatedField $messages + * List of messages. + * @type string $next_page_token + * You can send a token as `pageToken` to retrieve the next page of + * results. If empty, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * List of messages. + * + * Generated from protobuf field repeated .google.chat.v1.Message messages = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMessages() + { + return $this->messages; + } + + /** + * List of messages. + * + * Generated from protobuf field repeated .google.chat.v1.Message messages = 1; + * @param array<\Google\Apps\Chat\V1\Message>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMessages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Message::class); + $this->messages = $arr; + + return $this; + } + + /** + * You can send a token as `pageToken` to retrieve the next page of + * results. If empty, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * You can send a token as `pageToken` to retrieve the next page of + * results. If empty, 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/AppsChat/src/Chat/V1/ListReactionsRequest.php b/AppsChat/src/Chat/V1/ListReactionsRequest.php new file mode 100644 index 000000000000..57ee4da7a254 --- /dev/null +++ b/AppsChat/src/Chat/V1/ListReactionsRequest.php @@ -0,0 +1,349 @@ +google.chat.v1.ListReactionsRequest + */ +class ListReactionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The message users reacted to. + * Format: `spaces/{space}/messages/{message}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of reactions returned. The service can return + * fewer reactions than this value. If unspecified, the default value is 25. + * The maximum value is 200; values above 200 are changed to 200. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. (If resuming from a previous query.) + * A page token received from a previous list reactions call. Provide this + * to retrieve the subsequent page. + * When paginating, the filter value should match the call that provided the + * page token. Passing a different value might lead to unexpected results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. A query filter. + * You can filter reactions by + * [emoji](https://developers.google.com/workspace/chat/api/reference/rest/v1/Emoji) + * (either `emoji.unicode` or `emoji.custom_emoji.uid`) and + * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) + * (`user.name`). + * To filter reactions for multiple emojis or users, join similar fields + * with the `OR` operator, such as `emoji.unicode = "🙂" OR emoji.unicode = + * "ðŸ‘"` and `user.name = "users/AAAAAA" OR user.name = "users/BBBBBB"`. + * To filter reactions by emoji and user, use the `AND` operator, such as + * `emoji.unicode = "🙂" AND user.name = "users/AAAAAA"`. + * If your query uses both `AND` and `OR`, group them with parentheses. + * For example, the following queries are valid: + * ``` + * user.name = "users/{user}" + * emoji.unicode = "🙂" + * emoji.custom_emoji.uid = "{uid}" + * emoji.unicode = "🙂" OR emoji.unicode = "ðŸ‘" + * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" + * emoji.unicode = "🙂" AND user.name = "users/{user}" + * (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}") + * AND user.name = "users/{user}" + * ``` + * The following queries are invalid: + * ``` + * emoji.unicode = "🙂" AND emoji.unicode = "ðŸ‘" + * emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}" + * emoji.unicode = "🙂" OR user.name = "users/{user}" + * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR + * user.name = "users/{user}" + * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" + * AND user.name = "users/{user}" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The message users reacted to. + * + * Format: `spaces/{space}/messages/{message}` + * Please see {@see ChatServiceClient::messageName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\ListReactionsRequest + * + * @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 message users reacted to. + * Format: `spaces/{space}/messages/{message}` + * @type int $page_size + * Optional. The maximum number of reactions returned. The service can return + * fewer reactions than this value. If unspecified, the default value is 25. + * The maximum value is 200; values above 200 are changed to 200. + * @type string $page_token + * Optional. (If resuming from a previous query.) + * A page token received from a previous list reactions call. Provide this + * to retrieve the subsequent page. + * When paginating, the filter value should match the call that provided the + * page token. Passing a different value might lead to unexpected results. + * @type string $filter + * Optional. A query filter. + * You can filter reactions by + * [emoji](https://developers.google.com/workspace/chat/api/reference/rest/v1/Emoji) + * (either `emoji.unicode` or `emoji.custom_emoji.uid`) and + * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) + * (`user.name`). + * To filter reactions for multiple emojis or users, join similar fields + * with the `OR` operator, such as `emoji.unicode = "🙂" OR emoji.unicode = + * "ðŸ‘"` and `user.name = "users/AAAAAA" OR user.name = "users/BBBBBB"`. + * To filter reactions by emoji and user, use the `AND` operator, such as + * `emoji.unicode = "🙂" AND user.name = "users/AAAAAA"`. + * If your query uses both `AND` and `OR`, group them with parentheses. + * For example, the following queries are valid: + * ``` + * user.name = "users/{user}" + * emoji.unicode = "🙂" + * emoji.custom_emoji.uid = "{uid}" + * emoji.unicode = "🙂" OR emoji.unicode = "ðŸ‘" + * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" + * emoji.unicode = "🙂" AND user.name = "users/{user}" + * (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}") + * AND user.name = "users/{user}" + * ``` + * The following queries are invalid: + * ``` + * emoji.unicode = "🙂" AND emoji.unicode = "ðŸ‘" + * emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}" + * emoji.unicode = "🙂" OR user.name = "users/{user}" + * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR + * user.name = "users/{user}" + * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" + * AND user.name = "users/{user}" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Reaction::initOnce(); + parent::__construct($data); + } + + /** + * Required. The message users reacted to. + * Format: `spaces/{space}/messages/{message}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The message users reacted to. + * Format: `spaces/{space}/messages/{message}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of reactions returned. The service can return + * fewer reactions than this value. If unspecified, the default value is 25. + * The maximum value is 200; values above 200 are changed to 200. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of reactions returned. The service can return + * fewer reactions than this value. If unspecified, the default value is 25. + * The maximum value is 200; values above 200 are changed to 200. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. (If resuming from a previous query.) + * A page token received from a previous list reactions call. Provide this + * to retrieve the subsequent page. + * When paginating, the filter value should match the call that provided the + * page token. Passing a different value might lead to unexpected results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. (If resuming from a previous query.) + * A page token received from a previous list reactions call. Provide this + * to retrieve the subsequent page. + * When paginating, the filter value should match the call that provided the + * page token. Passing a different value might lead to unexpected results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. A query filter. + * You can filter reactions by + * [emoji](https://developers.google.com/workspace/chat/api/reference/rest/v1/Emoji) + * (either `emoji.unicode` or `emoji.custom_emoji.uid`) and + * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) + * (`user.name`). + * To filter reactions for multiple emojis or users, join similar fields + * with the `OR` operator, such as `emoji.unicode = "🙂" OR emoji.unicode = + * "ðŸ‘"` and `user.name = "users/AAAAAA" OR user.name = "users/BBBBBB"`. + * To filter reactions by emoji and user, use the `AND` operator, such as + * `emoji.unicode = "🙂" AND user.name = "users/AAAAAA"`. + * If your query uses both `AND` and `OR`, group them with parentheses. + * For example, the following queries are valid: + * ``` + * user.name = "users/{user}" + * emoji.unicode = "🙂" + * emoji.custom_emoji.uid = "{uid}" + * emoji.unicode = "🙂" OR emoji.unicode = "ðŸ‘" + * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" + * emoji.unicode = "🙂" AND user.name = "users/{user}" + * (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}") + * AND user.name = "users/{user}" + * ``` + * The following queries are invalid: + * ``` + * emoji.unicode = "🙂" AND emoji.unicode = "ðŸ‘" + * emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}" + * emoji.unicode = "🙂" OR user.name = "users/{user}" + * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR + * user.name = "users/{user}" + * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" + * AND user.name = "users/{user}" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. A query filter. + * You can filter reactions by + * [emoji](https://developers.google.com/workspace/chat/api/reference/rest/v1/Emoji) + * (either `emoji.unicode` or `emoji.custom_emoji.uid`) and + * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) + * (`user.name`). + * To filter reactions for multiple emojis or users, join similar fields + * with the `OR` operator, such as `emoji.unicode = "🙂" OR emoji.unicode = + * "ðŸ‘"` and `user.name = "users/AAAAAA" OR user.name = "users/BBBBBB"`. + * To filter reactions by emoji and user, use the `AND` operator, such as + * `emoji.unicode = "🙂" AND user.name = "users/AAAAAA"`. + * If your query uses both `AND` and `OR`, group them with parentheses. + * For example, the following queries are valid: + * ``` + * user.name = "users/{user}" + * emoji.unicode = "🙂" + * emoji.custom_emoji.uid = "{uid}" + * emoji.unicode = "🙂" OR emoji.unicode = "ðŸ‘" + * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" + * emoji.unicode = "🙂" AND user.name = "users/{user}" + * (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}") + * AND user.name = "users/{user}" + * ``` + * The following queries are invalid: + * ``` + * emoji.unicode = "🙂" AND emoji.unicode = "ðŸ‘" + * emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}" + * emoji.unicode = "🙂" OR user.name = "users/{user}" + * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR + * user.name = "users/{user}" + * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" + * AND user.name = "users/{user}" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/ListReactionsResponse.php b/AppsChat/src/Chat/V1/ListReactionsResponse.php new file mode 100644 index 000000000000..429f5e5b5565 --- /dev/null +++ b/AppsChat/src/Chat/V1/ListReactionsResponse.php @@ -0,0 +1,105 @@ +google.chat.v1.ListReactionsResponse + */ +class ListReactionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of reactions in the requested (or first) page. + * + * Generated from protobuf field repeated .google.chat.v1.Reaction reactions = 1; + */ + private $reactions; + /** + * Continuation token to retrieve the next page of results. It's empty + * for the last 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\Apps\Chat\V1\Reaction>|\Google\Protobuf\Internal\RepeatedField $reactions + * List of reactions in the requested (or first) page. + * @type string $next_page_token + * Continuation token to retrieve the next page of results. It's empty + * for the last page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Reaction::initOnce(); + parent::__construct($data); + } + + /** + * List of reactions in the requested (or first) page. + * + * Generated from protobuf field repeated .google.chat.v1.Reaction reactions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReactions() + { + return $this->reactions; + } + + /** + * List of reactions in the requested (or first) page. + * + * Generated from protobuf field repeated .google.chat.v1.Reaction reactions = 1; + * @param array<\Google\Apps\Chat\V1\Reaction>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReactions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Reaction::class); + $this->reactions = $arr; + + return $this; + } + + /** + * Continuation token to retrieve the next page of results. It's empty + * for the last page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Continuation token to retrieve the next page of results. It's empty + * for the last 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/AppsChat/src/Chat/V1/ListSpacesRequest.php b/AppsChat/src/Chat/V1/ListSpacesRequest.php new file mode 100644 index 000000000000..b1764b3e4d93 --- /dev/null +++ b/AppsChat/src/Chat/V1/ListSpacesRequest.php @@ -0,0 +1,219 @@ +google.chat.v1.ListSpacesRequest + */ +class ListSpacesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The maximum number of spaces to return. The service might return + * fewer than this value. + * If unspecified, at most 100 spaces are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * Negative values return an `INVALID_ARGUMENT` error. + * + * Generated from protobuf field int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous list spaces call. + * Provide this parameter to retrieve the subsequent page. + * When paginating, the filter value should match the call that provided the + * page token. Passing a different value may lead to unexpected results. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. A query filter. + * You can filter spaces by the space type + * ([`space_type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)). + * To filter by space type, you must specify valid enum value, such as + * `SPACE` or `GROUP_CHAT` (the `space_type` can't be + * `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR` + * operator. + * For example, the following queries are valid: + * ``` + * space_type = "SPACE" + * spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $page_size + * Optional. The maximum number of spaces to return. The service might return + * fewer than this value. + * If unspecified, at most 100 spaces are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * Negative values return an `INVALID_ARGUMENT` error. + * @type string $page_token + * Optional. A page token, received from a previous list spaces call. + * Provide this parameter to retrieve the subsequent page. + * When paginating, the filter value should match the call that provided the + * page token. Passing a different value may lead to unexpected results. + * @type string $filter + * Optional. A query filter. + * You can filter spaces by the space type + * ([`space_type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)). + * To filter by space type, you must specify valid enum value, such as + * `SPACE` or `GROUP_CHAT` (the `space_type` can't be + * `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR` + * operator. + * For example, the following queries are valid: + * ``` + * space_type = "SPACE" + * spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The maximum number of spaces to return. The service might return + * fewer than this value. + * If unspecified, at most 100 spaces are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * Negative values return an `INVALID_ARGUMENT` error. + * + * Generated from protobuf field int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of spaces to return. The service might return + * fewer than this value. + * If unspecified, at most 100 spaces are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * Negative values return an `INVALID_ARGUMENT` error. + * + * Generated from protobuf field int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous list spaces call. + * Provide this parameter to retrieve the subsequent page. + * When paginating, the filter value should match the call that provided the + * page token. Passing a different value may lead to unexpected results. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous list spaces call. + * Provide this parameter to retrieve the subsequent page. + * When paginating, the filter value should match the call that provided the + * page token. Passing a different value may lead to unexpected results. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. A query filter. + * You can filter spaces by the space type + * ([`space_type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)). + * To filter by space type, you must specify valid enum value, such as + * `SPACE` or `GROUP_CHAT` (the `space_type` can't be + * `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR` + * operator. + * For example, the following queries are valid: + * ``` + * space_type = "SPACE" + * spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. A query filter. + * You can filter spaces by the space type + * ([`space_type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)). + * To filter by space type, you must specify valid enum value, such as + * `SPACE` or `GROUP_CHAT` (the `space_type` can't be + * `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR` + * operator. + * For example, the following queries are valid: + * ``` + * space_type = "SPACE" + * spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/ListSpacesResponse.php b/AppsChat/src/Chat/V1/ListSpacesResponse.php new file mode 100644 index 000000000000..64406b36ad8f --- /dev/null +++ b/AppsChat/src/Chat/V1/ListSpacesResponse.php @@ -0,0 +1,105 @@ +google.chat.v1.ListSpacesResponse + */ +class ListSpacesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of spaces in the requested (or first) page. + * + * Generated from protobuf field repeated .google.chat.v1.Space spaces = 1; + */ + private $spaces; + /** + * You can send a token as `pageToken` to retrieve the next page of + * results. If empty, 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\Apps\Chat\V1\Space>|\Google\Protobuf\Internal\RepeatedField $spaces + * List of spaces in the requested (or first) page. + * @type string $next_page_token + * You can send a token as `pageToken` to retrieve the next page of + * results. If empty, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * List of spaces in the requested (or first) page. + * + * Generated from protobuf field repeated .google.chat.v1.Space spaces = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSpaces() + { + return $this->spaces; + } + + /** + * List of spaces in the requested (or first) page. + * + * Generated from protobuf field repeated .google.chat.v1.Space spaces = 1; + * @param array<\Google\Apps\Chat\V1\Space>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSpaces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Space::class); + $this->spaces = $arr; + + return $this; + } + + /** + * You can send a token as `pageToken` to retrieve the next page of + * results. If empty, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * You can send a token as `pageToken` to retrieve the next page of + * results. If empty, 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/AppsChat/src/Chat/V1/MatchedUrl.php b/AppsChat/src/Chat/V1/MatchedUrl.php new file mode 100644 index 000000000000..2500f22c05fc --- /dev/null +++ b/AppsChat/src/Chat/V1/MatchedUrl.php @@ -0,0 +1,69 @@ +google.chat.v1.MatchedUrl + */ +class MatchedUrl extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The URL that was matched. + * + * Generated from protobuf field string url = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * Output only. The URL that was matched. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\MatchedUrl::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The URL that was matched. + * + * Generated from protobuf field string url = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * Output only. The URL that was matched. + * + * Generated from protobuf field string url = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/Membership.php b/AppsChat/src/Chat/V1/Membership.php new file mode 100644 index 000000000000..4361e9ab1970 --- /dev/null +++ b/AppsChat/src/Chat/V1/Membership.php @@ -0,0 +1,352 @@ +google.chat.v1.Membership + */ +class Membership extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the membership, assigned by the server. + * Format: `spaces/{space}/members/{member}` + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Output only. State of the membership. + * + * Generated from protobuf field .google.chat.v1.Membership.MembershipState state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Optional. User's role within a Chat space, which determines their permitted + * actions in the space. + * [Developer Preview](https://developers.google.com/workspace/preview): + * This field can only be used as input in `UpdateMembership`. + * + * Generated from protobuf field .google.chat.v1.Membership.MembershipRole role = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $role = 0; + /** + * Optional. Immutable. The creation time of the membership, such as when a + * member joined or was invited to join a space. This field is output only, + * except when used to import historical memberships in import mode spaces. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $create_time = null; + /** + * Optional. Immutable. The deletion time of the membership, such as when a + * member left or was removed from a space. This field is output only, except + * when used to import historical memberships in import mode spaces. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $delete_time = null; + protected $memberType; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name of the membership, assigned by the server. + * Format: `spaces/{space}/members/{member}` + * @type int $state + * Output only. State of the membership. + * @type int $role + * Optional. User's role within a Chat space, which determines their permitted + * actions in the space. + * [Developer Preview](https://developers.google.com/workspace/preview): + * This field can only be used as input in `UpdateMembership`. + * @type \Google\Apps\Chat\V1\User $member + * The Google Chat user or app the membership corresponds to. + * If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the output populates the + * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) + * `name` and `type`. + * @type \Google\Apps\Chat\V1\Group $group_member + * The Google Group the membership corresponds to. + * Only supports read operations. Other operations, like creating or + * updating a membership, aren't currently supported. + * @type \Google\Protobuf\Timestamp $create_time + * Optional. Immutable. The creation time of the membership, such as when a + * member joined or was invited to join a space. This field is output only, + * except when used to import historical memberships in import mode spaces. + * @type \Google\Protobuf\Timestamp $delete_time + * Optional. Immutable. The deletion time of the membership, such as when a + * member left or was removed from a space. This field is output only, except + * when used to import historical memberships in import mode spaces. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the membership, assigned by the server. + * Format: `spaces/{space}/members/{member}` + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name of the membership, assigned by the server. + * Format: `spaces/{space}/members/{member}` + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. State of the membership. + * + * Generated from protobuf field .google.chat.v1.Membership.MembershipState state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the membership. + * + * Generated from protobuf field .google.chat.v1.Membership.MembershipState state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\Membership\MembershipState::class); + $this->state = $var; + + return $this; + } + + /** + * Optional. User's role within a Chat space, which determines their permitted + * actions in the space. + * [Developer Preview](https://developers.google.com/workspace/preview): + * This field can only be used as input in `UpdateMembership`. + * + * Generated from protobuf field .google.chat.v1.Membership.MembershipRole role = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getRole() + { + return $this->role; + } + + /** + * Optional. User's role within a Chat space, which determines their permitted + * actions in the space. + * [Developer Preview](https://developers.google.com/workspace/preview): + * This field can only be used as input in `UpdateMembership`. + * + * Generated from protobuf field .google.chat.v1.Membership.MembershipRole role = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setRole($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\Membership\MembershipRole::class); + $this->role = $var; + + return $this; + } + + /** + * The Google Chat user or app the membership corresponds to. + * If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the output populates the + * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) + * `name` and `type`. + * + * Generated from protobuf field .google.chat.v1.User member = 3; + * @return \Google\Apps\Chat\V1\User|null + */ + public function getMember() + { + return $this->readOneof(3); + } + + public function hasMember() + { + return $this->hasOneof(3); + } + + /** + * The Google Chat user or app the membership corresponds to. + * If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the output populates the + * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) + * `name` and `type`. + * + * Generated from protobuf field .google.chat.v1.User member = 3; + * @param \Google\Apps\Chat\V1\User $var + * @return $this + */ + public function setMember($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\User::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The Google Group the membership corresponds to. + * Only supports read operations. Other operations, like creating or + * updating a membership, aren't currently supported. + * + * Generated from protobuf field .google.chat.v1.Group group_member = 5; + * @return \Google\Apps\Chat\V1\Group|null + */ + public function getGroupMember() + { + return $this->readOneof(5); + } + + public function hasGroupMember() + { + return $this->hasOneof(5); + } + + /** + * The Google Group the membership corresponds to. + * Only supports read operations. Other operations, like creating or + * updating a membership, aren't currently supported. + * + * Generated from protobuf field .google.chat.v1.Group group_member = 5; + * @param \Google\Apps\Chat\V1\Group $var + * @return $this + */ + public function setGroupMember($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Group::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Optional. Immutable. The creation time of the membership, such as when a + * member joined or was invited to join a space. This field is output only, + * except when used to import historical memberships in import mode spaces. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. Immutable. The creation time of the membership, such as when a + * member joined or was invited to join a space. This field is output only, + * except when used to import historical memberships in import mode spaces. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Optional. Immutable. The deletion time of the membership, such as when a + * member left or was removed from a space. This field is output only, except + * when used to import historical memberships in import mode spaces. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Optional. Immutable. The deletion time of the membership, such as when a + * member left or was removed from a space. This field is output only, except + * when used to import historical memberships in import mode spaces. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getMemberType() + { + return $this->whichOneof("memberType"); + } + +} + diff --git a/AppsChat/src/Chat/V1/Membership/MembershipRole.php b/AppsChat/src/Chat/V1/Membership/MembershipRole.php new file mode 100644 index 000000000000..e29f81a860bc --- /dev/null +++ b/AppsChat/src/Chat/V1/Membership/MembershipRole.php @@ -0,0 +1,71 @@ +google.chat.v1.Membership.MembershipRole + */ +class MembershipRole +{ + /** + * Default value. For [users][google.chat.v1.Membership.member]: they + * aren't a member of the space, but can be invited. For + * [Google Groups][google.chat.v1.Membership.group_member]: they're always + * assigned this role (other enum values might be used in the future). + * + * Generated from protobuf enum MEMBERSHIP_ROLE_UNSPECIFIED = 0; + */ + const MEMBERSHIP_ROLE_UNSPECIFIED = 0; + /** + * A member of the space. The user has basic permissions, like sending + * messages to the space. In 1:1 and unnamed group conversations, everyone + * has this role. + * + * Generated from protobuf enum ROLE_MEMBER = 1; + */ + const ROLE_MEMBER = 1; + /** + * A space manager. The user has all basic permissions plus administrative + * permissions that let them manage the space, like adding or removing + * members. Only supported in + * [SpaceType.SPACE][google.chat.v1.Space.SpaceType]. + * + * Generated from protobuf enum ROLE_MANAGER = 2; + */ + const ROLE_MANAGER = 2; + + private static $valueToName = [ + self::MEMBERSHIP_ROLE_UNSPECIFIED => 'MEMBERSHIP_ROLE_UNSPECIFIED', + self::ROLE_MEMBER => 'ROLE_MEMBER', + self::ROLE_MANAGER => 'ROLE_MANAGER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Chat/V1/Membership/MembershipState.php b/AppsChat/src/Chat/V1/Membership/MembershipState.php new file mode 100644 index 000000000000..e830b4d27258 --- /dev/null +++ b/AppsChat/src/Chat/V1/Membership/MembershipState.php @@ -0,0 +1,71 @@ +google.chat.v1.Membership.MembershipState + */ +class MembershipState +{ + /** + * Default value. Don't use. + * + * Generated from protobuf enum MEMBERSHIP_STATE_UNSPECIFIED = 0; + */ + const MEMBERSHIP_STATE_UNSPECIFIED = 0; + /** + * The user is added to the space, and can participate in the space. + * + * Generated from protobuf enum JOINED = 1; + */ + const JOINED = 1; + /** + * The user is invited to join the space, but hasn't joined it. + * + * Generated from protobuf enum INVITED = 2; + */ + const INVITED = 2; + /** + * The user doesn't belong to the space and doesn't have a pending + * invitation to join the space. + * + * Generated from protobuf enum NOT_A_MEMBER = 3; + */ + const NOT_A_MEMBER = 3; + + private static $valueToName = [ + self::MEMBERSHIP_STATE_UNSPECIFIED => 'MEMBERSHIP_STATE_UNSPECIFIED', + self::JOINED => 'JOINED', + self::INVITED => 'INVITED', + self::NOT_A_MEMBER => 'NOT_A_MEMBER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Chat/V1/Message.php b/AppsChat/src/Chat/V1/Message.php new file mode 100644 index 000000000000..881bdf2e84a0 --- /dev/null +++ b/AppsChat/src/Chat/V1/Message.php @@ -0,0 +1,1422 @@ +google.chat.v1.Message + */ +class Message extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the message. + * Format: `spaces/{space}/messages/{message}` + * Where `{space}` is the ID of the space where the message is posted and + * `{message}` is a system-assigned ID for the message. For example, + * `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. + * If you set a custom ID when you create a message, you can use this ID to + * specify the message in a request by replacing `{message}` with the value + * from the `clientAssignedMessageId` field. For example, + * `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name + * a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The user who created the message. + * If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the output populates the + * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) + * `name` and `type`. + * + * Generated from protobuf field .google.chat.v1.User sender = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $sender = null; + /** + * Optional. Immutable. For spaces created in Chat, the time at which the + * message was created. This field is output only, except when used in import + * mode spaces. + * For import mode spaces, set this field to the historical timestamp at which + * the message was created in the source in order to preserve the original + * creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $create_time = null; + /** + * Output only. The time at which the message was last edited by a user. If + * the message has never been edited, this field is empty. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_update_time = null; + /** + * Output only. The time at which the message was deleted in + * Google Chat. If the message is never deleted, this field is empty. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * Plain-text body of the message. The first link to an image, video, or web + * page generates a + * [preview chip](https://developers.google.com/workspace/chat/preview-links). + * You can also [@mention a Google Chat + * user](https://developers.google.com/workspace/chat/format-messages#messages-@mention), + * or everyone in the space. + * To learn about creating text messages, see [Send a text + * message](https://developers.google.com/workspace/chat/create-messages#create-text-messages). + * + * Generated from protobuf field string text = 4; + */ + protected $text = ''; + /** + * Output only. Contains the message `text` with markups added to communicate + * formatting. This field might not capture all formatting visible in the UI, + * but includes the following: + * * [Markup + * syntax](https://developers.google.com/workspace/chat/format-messages) + * for bold, italic, strikethrough, monospace, monospace block, and bulleted + * list. + * * [User + * mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention) + * using the format ``. + * * Custom hyperlinks using the format `<{url}|{rendered_text}>` where the + * first string is the URL and the second is the rendered text—for example, + * ``. + * * Custom emoji using the format `:{emoji_name}:`—for example, `:smile:`. + * This doesn't apply to Unicode emoji, such as `U+1F600` for a grinning + * face emoji. + * For more information, see [View text formatting sent in a + * message](https://developers.google.com/workspace/chat/format-messages#view_text_formatting_sent_in_a_message) + * + * Generated from protobuf field string formatted_text = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $formatted_text = ''; + /** + * Deprecated: Use `cards_v2` instead. + * Rich, formatted, and interactive cards that you can use to display UI + * elements such as: formatted texts, buttons, and clickable images. Cards are + * normally displayed below the plain-text body of the message. `cards` and + * `cards_v2` can have a maximum size of 32 KB. + * + * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card cards = 5 [deprecated = true]; + * @deprecated + */ + private $cards; + /** + * An array of + * [cards](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards). + * Only Chat apps can create cards. If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the messages can't contain cards. + * To learn about cards and how to create them, see [Send card + * messages](https://developers.google.com/workspace/chat/create-messages#create). + * [Card builder](https://addons.gsuite.google.com/uikit/builder) + * + * Generated from protobuf field repeated .google.chat.v1.CardWithId cards_v2 = 22; + */ + private $cards_v2; + /** + * Output only. Annotations associated with the `text` in this message. + * + * Generated from protobuf field repeated .google.chat.v1.Annotation annotations = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $annotations; + /** + * The thread the message belongs to. For example usage, see + * [Start or reply to a message + * thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). + * + * Generated from protobuf field .google.chat.v1.Thread thread = 11; + */ + protected $thread = null; + /** + * If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the output populates the + * [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) + * `name`. + * + * Generated from protobuf field .google.chat.v1.Space space = 12; + */ + protected $space = null; + /** + * A plain-text description of the message's cards, used when the actual cards + * can't be displayed—for example, mobile notifications. + * + * Generated from protobuf field string fallback_text = 13; + */ + protected $fallback_text = ''; + /** + * Input only. Parameters that a Chat app can use to configure how its + * response is posted. + * + * Generated from protobuf field .google.chat.v1.ActionResponse action_response = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $action_response = null; + /** + * Output only. Plain-text body of the message with all Chat app mentions + * stripped out. + * + * Generated from protobuf field string argument_text = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $argument_text = ''; + /** + * Output only. Slash command information, if applicable. + * + * Generated from protobuf field .google.chat.v1.SlashCommand slash_command = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $slash_command = null; + /** + * User-uploaded attachment. + * + * Generated from protobuf field repeated .google.chat.v1.Attachment attachment = 18; + */ + private $attachment; + /** + * Output only. A URL in `spaces.messages.text` that matches a link preview + * pattern. For more information, see [Preview + * links](https://developers.google.com/workspace/chat/preview-links). + * + * Generated from protobuf field .google.chat.v1.MatchedUrl matched_url = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $matched_url = null; + /** + * Output only. When `true`, the message is a response in a reply thread. When + * `false`, the message is visible in the space's top-level conversation as + * either the first message of a thread or a message with no threaded replies. + * If the space doesn't support reply in threads, this field is always + * `false`. + * + * Generated from protobuf field bool thread_reply = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $thread_reply = false; + /** + * Optional. A custom ID for the message. You can use field to identify a + * message, or to get, delete, or update a message. To set a custom ID, + * specify the + * [`messageId`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id) + * field when you create the message. For details, see [Name a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string client_assigned_message_id = 32; + */ + protected $client_assigned_message_id = ''; + /** + * Output only. The list of emoji reaction summaries on the message. + * + * Generated from protobuf field repeated .google.chat.v1.EmojiReactionSummary emoji_reaction_summaries = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $emoji_reaction_summaries; + /** + * Immutable. Input for creating a message, otherwise output only. The user + * that can view the message. When set, the message is private and only + * visible to the specified user and the Chat app. Link previews and + * attachments aren't supported for private messages. + * Only Chat apps can send private messages. If your Chat app [authenticates + * as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * to send a message, the message can't be private and must omit this field. + * For details, see [Send private messages to Google Chat + * users](https://developers.google.com/workspace/chat/private-messages). + * + * Generated from protobuf field .google.chat.v1.User private_message_viewer = 36 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $private_message_viewer = null; + /** + * Output only. Information about a deleted message. A message is deleted when + * `delete_time` is set. + * + * Generated from protobuf field .google.chat.v1.DeletionMetadata deletion_metadata = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $deletion_metadata = null; + /** + * Output only. Information about a message that's quoted by a Google Chat + * user in a space. Google Chat users can quote a message to reply to it. + * + * Generated from protobuf field .google.chat.v1.QuotedMessageMetadata quoted_message_metadata = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $quoted_message_metadata = null; + /** + * Output only. GIF images that are attached to the message. + * + * Generated from protobuf field repeated .google.chat.v1.AttachedGif attached_gifs = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $attached_gifs; + /** + * One or more interactive widgets that appear at the bottom of a message. + * You can add accessory widgets to messages that contain text, cards, or both + * text and cards. Not supported for messages that contain dialogs. For + * details, see [Add interactive widgets at the bottom of a + * message](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets). + * Creating a message with accessory widgets requires [app + * authentication] + * (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + * + * Generated from protobuf field repeated .google.chat.v1.AccessoryWidget accessory_widgets = 44; + */ + private $accessory_widgets; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name of the message. + * Format: `spaces/{space}/messages/{message}` + * Where `{space}` is the ID of the space where the message is posted and + * `{message}` is a system-assigned ID for the message. For example, + * `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. + * If you set a custom ID when you create a message, you can use this ID to + * specify the message in a request by replacing `{message}` with the value + * from the `clientAssignedMessageId` field. For example, + * `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name + * a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * @type \Google\Apps\Chat\V1\User $sender + * Output only. The user who created the message. + * If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the output populates the + * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) + * `name` and `type`. + * @type \Google\Protobuf\Timestamp $create_time + * Optional. Immutable. For spaces created in Chat, the time at which the + * message was created. This field is output only, except when used in import + * mode spaces. + * For import mode spaces, set this field to the historical timestamp at which + * the message was created in the source in order to preserve the original + * creation time. + * @type \Google\Protobuf\Timestamp $last_update_time + * Output only. The time at which the message was last edited by a user. If + * the message has never been edited, this field is empty. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. The time at which the message was deleted in + * Google Chat. If the message is never deleted, this field is empty. + * @type string $text + * Plain-text body of the message. The first link to an image, video, or web + * page generates a + * [preview chip](https://developers.google.com/workspace/chat/preview-links). + * You can also [@mention a Google Chat + * user](https://developers.google.com/workspace/chat/format-messages#messages-@mention), + * or everyone in the space. + * To learn about creating text messages, see [Send a text + * message](https://developers.google.com/workspace/chat/create-messages#create-text-messages). + * @type string $formatted_text + * Output only. Contains the message `text` with markups added to communicate + * formatting. This field might not capture all formatting visible in the UI, + * but includes the following: + * * [Markup + * syntax](https://developers.google.com/workspace/chat/format-messages) + * for bold, italic, strikethrough, monospace, monospace block, and bulleted + * list. + * * [User + * mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention) + * using the format ``. + * * Custom hyperlinks using the format `<{url}|{rendered_text}>` where the + * first string is the URL and the second is the rendered text—for example, + * ``. + * * Custom emoji using the format `:{emoji_name}:`—for example, `:smile:`. + * This doesn't apply to Unicode emoji, such as `U+1F600` for a grinning + * face emoji. + * For more information, see [View text formatting sent in a + * message](https://developers.google.com/workspace/chat/format-messages#view_text_formatting_sent_in_a_message) + * @type array<\Google\Apps\Chat\V1\ContextualAddOnMarkup\Card>|\Google\Protobuf\Internal\RepeatedField $cards + * Deprecated: Use `cards_v2` instead. + * Rich, formatted, and interactive cards that you can use to display UI + * elements such as: formatted texts, buttons, and clickable images. Cards are + * normally displayed below the plain-text body of the message. `cards` and + * `cards_v2` can have a maximum size of 32 KB. + * @type array<\Google\Apps\Chat\V1\CardWithId>|\Google\Protobuf\Internal\RepeatedField $cards_v2 + * An array of + * [cards](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards). + * Only Chat apps can create cards. If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the messages can't contain cards. + * To learn about cards and how to create them, see [Send card + * messages](https://developers.google.com/workspace/chat/create-messages#create). + * [Card builder](https://addons.gsuite.google.com/uikit/builder) + * @type array<\Google\Apps\Chat\V1\Annotation>|\Google\Protobuf\Internal\RepeatedField $annotations + * Output only. Annotations associated with the `text` in this message. + * @type \Google\Apps\Chat\V1\Thread $thread + * The thread the message belongs to. For example usage, see + * [Start or reply to a message + * thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). + * @type \Google\Apps\Chat\V1\Space $space + * If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the output populates the + * [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) + * `name`. + * @type string $fallback_text + * A plain-text description of the message's cards, used when the actual cards + * can't be displayed—for example, mobile notifications. + * @type \Google\Apps\Chat\V1\ActionResponse $action_response + * Input only. Parameters that a Chat app can use to configure how its + * response is posted. + * @type string $argument_text + * Output only. Plain-text body of the message with all Chat app mentions + * stripped out. + * @type \Google\Apps\Chat\V1\SlashCommand $slash_command + * Output only. Slash command information, if applicable. + * @type array<\Google\Apps\Chat\V1\Attachment>|\Google\Protobuf\Internal\RepeatedField $attachment + * User-uploaded attachment. + * @type \Google\Apps\Chat\V1\MatchedUrl $matched_url + * Output only. A URL in `spaces.messages.text` that matches a link preview + * pattern. For more information, see [Preview + * links](https://developers.google.com/workspace/chat/preview-links). + * @type bool $thread_reply + * Output only. When `true`, the message is a response in a reply thread. When + * `false`, the message is visible in the space's top-level conversation as + * either the first message of a thread or a message with no threaded replies. + * If the space doesn't support reply in threads, this field is always + * `false`. + * @type string $client_assigned_message_id + * Optional. A custom ID for the message. You can use field to identify a + * message, or to get, delete, or update a message. To set a custom ID, + * specify the + * [`messageId`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id) + * field when you create the message. For details, see [Name a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * @type array<\Google\Apps\Chat\V1\EmojiReactionSummary>|\Google\Protobuf\Internal\RepeatedField $emoji_reaction_summaries + * Output only. The list of emoji reaction summaries on the message. + * @type \Google\Apps\Chat\V1\User $private_message_viewer + * Immutable. Input for creating a message, otherwise output only. The user + * that can view the message. When set, the message is private and only + * visible to the specified user and the Chat app. Link previews and + * attachments aren't supported for private messages. + * Only Chat apps can send private messages. If your Chat app [authenticates + * as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * to send a message, the message can't be private and must omit this field. + * For details, see [Send private messages to Google Chat + * users](https://developers.google.com/workspace/chat/private-messages). + * @type \Google\Apps\Chat\V1\DeletionMetadata $deletion_metadata + * Output only. Information about a deleted message. A message is deleted when + * `delete_time` is set. + * @type \Google\Apps\Chat\V1\QuotedMessageMetadata $quoted_message_metadata + * Output only. Information about a message that's quoted by a Google Chat + * user in a space. Google Chat users can quote a message to reply to it. + * @type array<\Google\Apps\Chat\V1\AttachedGif>|\Google\Protobuf\Internal\RepeatedField $attached_gifs + * Output only. GIF images that are attached to the message. + * @type array<\Google\Apps\Chat\V1\AccessoryWidget>|\Google\Protobuf\Internal\RepeatedField $accessory_widgets + * One or more interactive widgets that appear at the bottom of a message. + * You can add accessory widgets to messages that contain text, cards, or both + * text and cards. Not supported for messages that contain dialogs. For + * details, see [Add interactive widgets at the bottom of a + * message](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets). + * Creating a message with accessory widgets requires [app + * authentication] + * (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the message. + * Format: `spaces/{space}/messages/{message}` + * Where `{space}` is the ID of the space where the message is posted and + * `{message}` is a system-assigned ID for the message. For example, + * `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. + * If you set a custom ID when you create a message, you can use this ID to + * specify the message in a request by replacing `{message}` with the value + * from the `clientAssignedMessageId` field. For example, + * `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name + * a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name of the message. + * Format: `spaces/{space}/messages/{message}` + * Where `{space}` is the ID of the space where the message is posted and + * `{message}` is a system-assigned ID for the message. For example, + * `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. + * If you set a custom ID when you create a message, you can use this ID to + * specify the message in a request by replacing `{message}` with the value + * from the `clientAssignedMessageId` field. For example, + * `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name + * a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The user who created the message. + * If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the output populates the + * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) + * `name` and `type`. + * + * Generated from protobuf field .google.chat.v1.User sender = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Apps\Chat\V1\User|null + */ + public function getSender() + { + return $this->sender; + } + + public function hasSender() + { + return isset($this->sender); + } + + public function clearSender() + { + unset($this->sender); + } + + /** + * Output only. The user who created the message. + * If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the output populates the + * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) + * `name` and `type`. + * + * Generated from protobuf field .google.chat.v1.User sender = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Apps\Chat\V1\User $var + * @return $this + */ + public function setSender($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\User::class); + $this->sender = $var; + + return $this; + } + + /** + * Optional. Immutable. For spaces created in Chat, the time at which the + * message was created. This field is output only, except when used in import + * mode spaces. + * For import mode spaces, set this field to the historical timestamp at which + * the message was created in the source in order to preserve the original + * creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. Immutable. For spaces created in Chat, the time at which the + * message was created. This field is output only, except when used in import + * mode spaces. + * For import mode spaces, set this field to the historical timestamp at which + * the message was created in the source in order to preserve the original + * creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time at which the message was last edited by a user. If + * the message has never been edited, this field is empty. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastUpdateTime() + { + return $this->last_update_time; + } + + public function hasLastUpdateTime() + { + return isset($this->last_update_time); + } + + public function clearLastUpdateTime() + { + unset($this->last_update_time); + } + + /** + * Output only. The time at which the message was last edited by a user. If + * the message has never been edited, this field is empty. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_update_time = $var; + + return $this; + } + + /** + * Output only. The time at which the message was deleted in + * Google Chat. If the message is never deleted, this field is empty. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. The time at which the message was deleted in + * Google Chat. If the message is never deleted, this field is empty. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * Plain-text body of the message. The first link to an image, video, or web + * page generates a + * [preview chip](https://developers.google.com/workspace/chat/preview-links). + * You can also [@mention a Google Chat + * user](https://developers.google.com/workspace/chat/format-messages#messages-@mention), + * or everyone in the space. + * To learn about creating text messages, see [Send a text + * message](https://developers.google.com/workspace/chat/create-messages#create-text-messages). + * + * Generated from protobuf field string text = 4; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Plain-text body of the message. The first link to an image, video, or web + * page generates a + * [preview chip](https://developers.google.com/workspace/chat/preview-links). + * You can also [@mention a Google Chat + * user](https://developers.google.com/workspace/chat/format-messages#messages-@mention), + * or everyone in the space. + * To learn about creating text messages, see [Send a text + * message](https://developers.google.com/workspace/chat/create-messages#create-text-messages). + * + * Generated from protobuf field string text = 4; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * Output only. Contains the message `text` with markups added to communicate + * formatting. This field might not capture all formatting visible in the UI, + * but includes the following: + * * [Markup + * syntax](https://developers.google.com/workspace/chat/format-messages) + * for bold, italic, strikethrough, monospace, monospace block, and bulleted + * list. + * * [User + * mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention) + * using the format ``. + * * Custom hyperlinks using the format `<{url}|{rendered_text}>` where the + * first string is the URL and the second is the rendered text—for example, + * ``. + * * Custom emoji using the format `:{emoji_name}:`—for example, `:smile:`. + * This doesn't apply to Unicode emoji, such as `U+1F600` for a grinning + * face emoji. + * For more information, see [View text formatting sent in a + * message](https://developers.google.com/workspace/chat/format-messages#view_text_formatting_sent_in_a_message) + * + * Generated from protobuf field string formatted_text = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getFormattedText() + { + return $this->formatted_text; + } + + /** + * Output only. Contains the message `text` with markups added to communicate + * formatting. This field might not capture all formatting visible in the UI, + * but includes the following: + * * [Markup + * syntax](https://developers.google.com/workspace/chat/format-messages) + * for bold, italic, strikethrough, monospace, monospace block, and bulleted + * list. + * * [User + * mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention) + * using the format ``. + * * Custom hyperlinks using the format `<{url}|{rendered_text}>` where the + * first string is the URL and the second is the rendered text—for example, + * ``. + * * Custom emoji using the format `:{emoji_name}:`—for example, `:smile:`. + * This doesn't apply to Unicode emoji, such as `U+1F600` for a grinning + * face emoji. + * For more information, see [View text formatting sent in a + * message](https://developers.google.com/workspace/chat/format-messages#view_text_formatting_sent_in_a_message) + * + * Generated from protobuf field string formatted_text = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setFormattedText($var) + { + GPBUtil::checkString($var, True); + $this->formatted_text = $var; + + return $this; + } + + /** + * Deprecated: Use `cards_v2` instead. + * Rich, formatted, and interactive cards that you can use to display UI + * elements such as: formatted texts, buttons, and clickable images. Cards are + * normally displayed below the plain-text body of the message. `cards` and + * `cards_v2` can have a maximum size of 32 KB. + * + * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card cards = 5 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getCards() + { + @trigger_error('cards is deprecated.', E_USER_DEPRECATED); + return $this->cards; + } + + /** + * Deprecated: Use `cards_v2` instead. + * Rich, formatted, and interactive cards that you can use to display UI + * elements such as: formatted texts, buttons, and clickable images. Cards are + * normally displayed below the plain-text body of the message. `cards` and + * `cards_v2` can have a maximum size of 32 KB. + * + * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card cards = 5 [deprecated = true]; + * @param array<\Google\Apps\Chat\V1\ContextualAddOnMarkup\Card>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setCards($var) + { + @trigger_error('cards is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\ContextualAddOnMarkup\Card::class); + $this->cards = $arr; + + return $this; + } + + /** + * An array of + * [cards](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards). + * Only Chat apps can create cards. If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the messages can't contain cards. + * To learn about cards and how to create them, see [Send card + * messages](https://developers.google.com/workspace/chat/create-messages#create). + * [Card builder](https://addons.gsuite.google.com/uikit/builder) + * + * Generated from protobuf field repeated .google.chat.v1.CardWithId cards_v2 = 22; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCardsV2() + { + return $this->cards_v2; + } + + /** + * An array of + * [cards](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards). + * Only Chat apps can create cards. If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the messages can't contain cards. + * To learn about cards and how to create them, see [Send card + * messages](https://developers.google.com/workspace/chat/create-messages#create). + * [Card builder](https://addons.gsuite.google.com/uikit/builder) + * + * Generated from protobuf field repeated .google.chat.v1.CardWithId cards_v2 = 22; + * @param array<\Google\Apps\Chat\V1\CardWithId>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCardsV2($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\CardWithId::class); + $this->cards_v2 = $arr; + + return $this; + } + + /** + * Output only. Annotations associated with the `text` in this message. + * + * Generated from protobuf field repeated .google.chat.v1.Annotation annotations = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Output only. Annotations associated with the `text` in this message. + * + * Generated from protobuf field repeated .google.chat.v1.Annotation annotations = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Apps\Chat\V1\Annotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Annotation::class); + $this->annotations = $arr; + + return $this; + } + + /** + * The thread the message belongs to. For example usage, see + * [Start or reply to a message + * thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). + * + * Generated from protobuf field .google.chat.v1.Thread thread = 11; + * @return \Google\Apps\Chat\V1\Thread|null + */ + public function getThread() + { + return $this->thread; + } + + public function hasThread() + { + return isset($this->thread); + } + + public function clearThread() + { + unset($this->thread); + } + + /** + * The thread the message belongs to. For example usage, see + * [Start or reply to a message + * thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). + * + * Generated from protobuf field .google.chat.v1.Thread thread = 11; + * @param \Google\Apps\Chat\V1\Thread $var + * @return $this + */ + public function setThread($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Thread::class); + $this->thread = $var; + + return $this; + } + + /** + * If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the output populates the + * [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) + * `name`. + * + * Generated from protobuf field .google.chat.v1.Space space = 12; + * @return \Google\Apps\Chat\V1\Space|null + */ + public function getSpace() + { + return $this->space; + } + + public function hasSpace() + { + return isset($this->space); + } + + public function clearSpace() + { + unset($this->space); + } + + /** + * If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the output populates the + * [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) + * `name`. + * + * Generated from protobuf field .google.chat.v1.Space space = 12; + * @param \Google\Apps\Chat\V1\Space $var + * @return $this + */ + public function setSpace($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space::class); + $this->space = $var; + + return $this; + } + + /** + * A plain-text description of the message's cards, used when the actual cards + * can't be displayed—for example, mobile notifications. + * + * Generated from protobuf field string fallback_text = 13; + * @return string + */ + public function getFallbackText() + { + return $this->fallback_text; + } + + /** + * A plain-text description of the message's cards, used when the actual cards + * can't be displayed—for example, mobile notifications. + * + * Generated from protobuf field string fallback_text = 13; + * @param string $var + * @return $this + */ + public function setFallbackText($var) + { + GPBUtil::checkString($var, True); + $this->fallback_text = $var; + + return $this; + } + + /** + * Input only. Parameters that a Chat app can use to configure how its + * response is posted. + * + * Generated from protobuf field .google.chat.v1.ActionResponse action_response = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Apps\Chat\V1\ActionResponse|null + */ + public function getActionResponse() + { + return $this->action_response; + } + + public function hasActionResponse() + { + return isset($this->action_response); + } + + public function clearActionResponse() + { + unset($this->action_response); + } + + /** + * Input only. Parameters that a Chat app can use to configure how its + * response is posted. + * + * Generated from protobuf field .google.chat.v1.ActionResponse action_response = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Apps\Chat\V1\ActionResponse $var + * @return $this + */ + public function setActionResponse($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\ActionResponse::class); + $this->action_response = $var; + + return $this; + } + + /** + * Output only. Plain-text body of the message with all Chat app mentions + * stripped out. + * + * Generated from protobuf field string argument_text = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getArgumentText() + { + return $this->argument_text; + } + + /** + * Output only. Plain-text body of the message with all Chat app mentions + * stripped out. + * + * Generated from protobuf field string argument_text = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setArgumentText($var) + { + GPBUtil::checkString($var, True); + $this->argument_text = $var; + + return $this; + } + + /** + * Output only. Slash command information, if applicable. + * + * Generated from protobuf field .google.chat.v1.SlashCommand slash_command = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Apps\Chat\V1\SlashCommand|null + */ + public function getSlashCommand() + { + return $this->slash_command; + } + + public function hasSlashCommand() + { + return isset($this->slash_command); + } + + public function clearSlashCommand() + { + unset($this->slash_command); + } + + /** + * Output only. Slash command information, if applicable. + * + * Generated from protobuf field .google.chat.v1.SlashCommand slash_command = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Apps\Chat\V1\SlashCommand $var + * @return $this + */ + public function setSlashCommand($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\SlashCommand::class); + $this->slash_command = $var; + + return $this; + } + + /** + * User-uploaded attachment. + * + * Generated from protobuf field repeated .google.chat.v1.Attachment attachment = 18; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAttachment() + { + return $this->attachment; + } + + /** + * User-uploaded attachment. + * + * Generated from protobuf field repeated .google.chat.v1.Attachment attachment = 18; + * @param array<\Google\Apps\Chat\V1\Attachment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAttachment($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Attachment::class); + $this->attachment = $arr; + + return $this; + } + + /** + * Output only. A URL in `spaces.messages.text` that matches a link preview + * pattern. For more information, see [Preview + * links](https://developers.google.com/workspace/chat/preview-links). + * + * Generated from protobuf field .google.chat.v1.MatchedUrl matched_url = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Apps\Chat\V1\MatchedUrl|null + */ + public function getMatchedUrl() + { + return $this->matched_url; + } + + public function hasMatchedUrl() + { + return isset($this->matched_url); + } + + public function clearMatchedUrl() + { + unset($this->matched_url); + } + + /** + * Output only. A URL in `spaces.messages.text` that matches a link preview + * pattern. For more information, see [Preview + * links](https://developers.google.com/workspace/chat/preview-links). + * + * Generated from protobuf field .google.chat.v1.MatchedUrl matched_url = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Apps\Chat\V1\MatchedUrl $var + * @return $this + */ + public function setMatchedUrl($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MatchedUrl::class); + $this->matched_url = $var; + + return $this; + } + + /** + * Output only. When `true`, the message is a response in a reply thread. When + * `false`, the message is visible in the space's top-level conversation as + * either the first message of a thread or a message with no threaded replies. + * If the space doesn't support reply in threads, this field is always + * `false`. + * + * Generated from protobuf field bool thread_reply = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getThreadReply() + { + return $this->thread_reply; + } + + /** + * Output only. When `true`, the message is a response in a reply thread. When + * `false`, the message is visible in the space's top-level conversation as + * either the first message of a thread or a message with no threaded replies. + * If the space doesn't support reply in threads, this field is always + * `false`. + * + * Generated from protobuf field bool thread_reply = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setThreadReply($var) + { + GPBUtil::checkBool($var); + $this->thread_reply = $var; + + return $this; + } + + /** + * Optional. A custom ID for the message. You can use field to identify a + * message, or to get, delete, or update a message. To set a custom ID, + * specify the + * [`messageId`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id) + * field when you create the message. For details, see [Name a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string client_assigned_message_id = 32; + * @return string + */ + public function getClientAssignedMessageId() + { + return $this->client_assigned_message_id; + } + + /** + * Optional. A custom ID for the message. You can use field to identify a + * message, or to get, delete, or update a message. To set a custom ID, + * specify the + * [`messageId`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id) + * field when you create the message. For details, see [Name a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string client_assigned_message_id = 32; + * @param string $var + * @return $this + */ + public function setClientAssignedMessageId($var) + { + GPBUtil::checkString($var, True); + $this->client_assigned_message_id = $var; + + return $this; + } + + /** + * Output only. The list of emoji reaction summaries on the message. + * + * Generated from protobuf field repeated .google.chat.v1.EmojiReactionSummary emoji_reaction_summaries = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEmojiReactionSummaries() + { + return $this->emoji_reaction_summaries; + } + + /** + * Output only. The list of emoji reaction summaries on the message. + * + * Generated from protobuf field repeated .google.chat.v1.EmojiReactionSummary emoji_reaction_summaries = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Apps\Chat\V1\EmojiReactionSummary>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEmojiReactionSummaries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\EmojiReactionSummary::class); + $this->emoji_reaction_summaries = $arr; + + return $this; + } + + /** + * Immutable. Input for creating a message, otherwise output only. The user + * that can view the message. When set, the message is private and only + * visible to the specified user and the Chat app. Link previews and + * attachments aren't supported for private messages. + * Only Chat apps can send private messages. If your Chat app [authenticates + * as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * to send a message, the message can't be private and must omit this field. + * For details, see [Send private messages to Google Chat + * users](https://developers.google.com/workspace/chat/private-messages). + * + * Generated from protobuf field .google.chat.v1.User private_message_viewer = 36 [(.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Apps\Chat\V1\User|null + */ + public function getPrivateMessageViewer() + { + return $this->private_message_viewer; + } + + public function hasPrivateMessageViewer() + { + return isset($this->private_message_viewer); + } + + public function clearPrivateMessageViewer() + { + unset($this->private_message_viewer); + } + + /** + * Immutable. Input for creating a message, otherwise output only. The user + * that can view the message. When set, the message is private and only + * visible to the specified user and the Chat app. Link previews and + * attachments aren't supported for private messages. + * Only Chat apps can send private messages. If your Chat app [authenticates + * as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * to send a message, the message can't be private and must omit this field. + * For details, see [Send private messages to Google Chat + * users](https://developers.google.com/workspace/chat/private-messages). + * + * Generated from protobuf field .google.chat.v1.User private_message_viewer = 36 [(.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Apps\Chat\V1\User $var + * @return $this + */ + public function setPrivateMessageViewer($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\User::class); + $this->private_message_viewer = $var; + + return $this; + } + + /** + * Output only. Information about a deleted message. A message is deleted when + * `delete_time` is set. + * + * Generated from protobuf field .google.chat.v1.DeletionMetadata deletion_metadata = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Apps\Chat\V1\DeletionMetadata|null + */ + public function getDeletionMetadata() + { + return $this->deletion_metadata; + } + + public function hasDeletionMetadata() + { + return isset($this->deletion_metadata); + } + + public function clearDeletionMetadata() + { + unset($this->deletion_metadata); + } + + /** + * Output only. Information about a deleted message. A message is deleted when + * `delete_time` is set. + * + * Generated from protobuf field .google.chat.v1.DeletionMetadata deletion_metadata = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Apps\Chat\V1\DeletionMetadata $var + * @return $this + */ + public function setDeletionMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\DeletionMetadata::class); + $this->deletion_metadata = $var; + + return $this; + } + + /** + * Output only. Information about a message that's quoted by a Google Chat + * user in a space. Google Chat users can quote a message to reply to it. + * + * Generated from protobuf field .google.chat.v1.QuotedMessageMetadata quoted_message_metadata = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Apps\Chat\V1\QuotedMessageMetadata|null + */ + public function getQuotedMessageMetadata() + { + return $this->quoted_message_metadata; + } + + public function hasQuotedMessageMetadata() + { + return isset($this->quoted_message_metadata); + } + + public function clearQuotedMessageMetadata() + { + unset($this->quoted_message_metadata); + } + + /** + * Output only. Information about a message that's quoted by a Google Chat + * user in a space. Google Chat users can quote a message to reply to it. + * + * Generated from protobuf field .google.chat.v1.QuotedMessageMetadata quoted_message_metadata = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Apps\Chat\V1\QuotedMessageMetadata $var + * @return $this + */ + public function setQuotedMessageMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\QuotedMessageMetadata::class); + $this->quoted_message_metadata = $var; + + return $this; + } + + /** + * Output only. GIF images that are attached to the message. + * + * Generated from protobuf field repeated .google.chat.v1.AttachedGif attached_gifs = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAttachedGifs() + { + return $this->attached_gifs; + } + + /** + * Output only. GIF images that are attached to the message. + * + * Generated from protobuf field repeated .google.chat.v1.AttachedGif attached_gifs = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Apps\Chat\V1\AttachedGif>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAttachedGifs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\AttachedGif::class); + $this->attached_gifs = $arr; + + return $this; + } + + /** + * One or more interactive widgets that appear at the bottom of a message. + * You can add accessory widgets to messages that contain text, cards, or both + * text and cards. Not supported for messages that contain dialogs. For + * details, see [Add interactive widgets at the bottom of a + * message](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets). + * Creating a message with accessory widgets requires [app + * authentication] + * (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + * + * Generated from protobuf field repeated .google.chat.v1.AccessoryWidget accessory_widgets = 44; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAccessoryWidgets() + { + return $this->accessory_widgets; + } + + /** + * One or more interactive widgets that appear at the bottom of a message. + * You can add accessory widgets to messages that contain text, cards, or both + * text and cards. Not supported for messages that contain dialogs. For + * details, see [Add interactive widgets at the bottom of a + * message](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets). + * Creating a message with accessory widgets requires [app + * authentication] + * (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + * + * Generated from protobuf field repeated .google.chat.v1.AccessoryWidget accessory_widgets = 44; + * @param array<\Google\Apps\Chat\V1\AccessoryWidget>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAccessoryWidgets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\AccessoryWidget::class); + $this->accessory_widgets = $arr; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/QuotedMessageMetadata.php b/AppsChat/src/Chat/V1/QuotedMessageMetadata.php new file mode 100644 index 000000000000..776a4ab987d7 --- /dev/null +++ b/AppsChat/src/Chat/V1/QuotedMessageMetadata.php @@ -0,0 +1,119 @@ +google.chat.v1.QuotedMessageMetadata + */ +class QuotedMessageMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Resource name of the quoted message. + * Format: `spaces/{space}/messages/{message}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Output only. The timestamp when the quoted message was created or when the + * quoted message was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Resource name of the quoted message. + * Format: `spaces/{space}/messages/{message}` + * @type \Google\Protobuf\Timestamp $last_update_time + * Output only. The timestamp when the quoted message was created or when the + * quoted message was last updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Resource name of the quoted message. + * Format: `spaces/{space}/messages/{message}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Resource name of the quoted message. + * Format: `spaces/{space}/messages/{message}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The timestamp when the quoted message was created or when the + * quoted message was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastUpdateTime() + { + return $this->last_update_time; + } + + public function hasLastUpdateTime() + { + return isset($this->last_update_time); + } + + public function clearLastUpdateTime() + { + unset($this->last_update_time); + } + + /** + * Output only. The timestamp when the quoted message was created or when the + * quoted message was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_update_time = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/Reaction.php b/AppsChat/src/Chat/V1/Reaction.php new file mode 100644 index 000000000000..373aec899eaf --- /dev/null +++ b/AppsChat/src/Chat/V1/Reaction.php @@ -0,0 +1,159 @@ +google.chat.v1.Reaction + */ +class Reaction extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the reaction. + * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The user who created the reaction. + * + * Generated from protobuf field .google.chat.v1.User user = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $user = null; + /** + * The emoji used in the reaction. + * + * Generated from protobuf field .google.chat.v1.Emoji emoji = 3; + */ + protected $emoji = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the reaction. + * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` + * @type \Google\Apps\Chat\V1\User $user + * Output only. The user who created the reaction. + * @type \Google\Apps\Chat\V1\Emoji $emoji + * The emoji used in the reaction. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Reaction::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the reaction. + * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the reaction. + * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The user who created the reaction. + * + * Generated from protobuf field .google.chat.v1.User user = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Apps\Chat\V1\User|null + */ + public function getUser() + { + return $this->user; + } + + public function hasUser() + { + return isset($this->user); + } + + public function clearUser() + { + unset($this->user); + } + + /** + * Output only. The user who created the reaction. + * + * Generated from protobuf field .google.chat.v1.User user = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Apps\Chat\V1\User $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\User::class); + $this->user = $var; + + return $this; + } + + /** + * The emoji used in the reaction. + * + * Generated from protobuf field .google.chat.v1.Emoji emoji = 3; + * @return \Google\Apps\Chat\V1\Emoji|null + */ + public function getEmoji() + { + return $this->emoji; + } + + public function hasEmoji() + { + return isset($this->emoji); + } + + public function clearEmoji() + { + unset($this->emoji); + } + + /** + * The emoji used in the reaction. + * + * Generated from protobuf field .google.chat.v1.Emoji emoji = 3; + * @param \Google\Apps\Chat\V1\Emoji $var + * @return $this + */ + public function setEmoji($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Emoji::class); + $this->emoji = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/RichLinkMetadata.php b/AppsChat/src/Chat/V1/RichLinkMetadata.php new file mode 100644 index 000000000000..bd348864d3a0 --- /dev/null +++ b/AppsChat/src/Chat/V1/RichLinkMetadata.php @@ -0,0 +1,143 @@ +google.chat.v1.RichLinkMetadata + */ +class RichLinkMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The URI of this link. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + /** + * The rich link type. + * + * Generated from protobuf field .google.chat.v1.RichLinkMetadata.RichLinkType rich_link_type = 2; + */ + protected $rich_link_type = 0; + protected $data; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * The URI of this link. + * @type int $rich_link_type + * The rich link type. + * @type \Google\Apps\Chat\V1\DriveLinkData $drive_link_data + * Data for a drive link. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Annotation::initOnce(); + parent::__construct($data); + } + + /** + * The URI of this link. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * The URI of this link. + * + * Generated from protobuf field string uri = 1; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * The rich link type. + * + * Generated from protobuf field .google.chat.v1.RichLinkMetadata.RichLinkType rich_link_type = 2; + * @return int + */ + public function getRichLinkType() + { + return $this->rich_link_type; + } + + /** + * The rich link type. + * + * Generated from protobuf field .google.chat.v1.RichLinkMetadata.RichLinkType rich_link_type = 2; + * @param int $var + * @return $this + */ + public function setRichLinkType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\RichLinkMetadata\RichLinkType::class); + $this->rich_link_type = $var; + + return $this; + } + + /** + * Data for a drive link. + * + * Generated from protobuf field .google.chat.v1.DriveLinkData drive_link_data = 3; + * @return \Google\Apps\Chat\V1\DriveLinkData|null + */ + public function getDriveLinkData() + { + return $this->readOneof(3); + } + + public function hasDriveLinkData() + { + return $this->hasOneof(3); + } + + /** + * Data for a drive link. + * + * Generated from protobuf field .google.chat.v1.DriveLinkData drive_link_data = 3; + * @param \Google\Apps\Chat\V1\DriveLinkData $var + * @return $this + */ + public function setDriveLinkData($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\DriveLinkData::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getData() + { + return $this->whichOneof("data"); + } + +} + diff --git a/AppsChat/src/Chat/V1/RichLinkMetadata/RichLinkType.php b/AppsChat/src/Chat/V1/RichLinkMetadata/RichLinkType.php new file mode 100644 index 000000000000..f77ded10b072 --- /dev/null +++ b/AppsChat/src/Chat/V1/RichLinkMetadata/RichLinkType.php @@ -0,0 +1,55 @@ +google.chat.v1.RichLinkMetadata.RichLinkType + */ +class RichLinkType +{ + /** + * Default value for the enum. Don't use. + * + * Generated from protobuf enum RICH_LINK_TYPE_UNSPECIFIED = 0; + */ + const RICH_LINK_TYPE_UNSPECIFIED = 0; + /** + * A Google Drive rich link type. + * + * Generated from protobuf enum DRIVE_FILE = 1; + */ + const DRIVE_FILE = 1; + + private static $valueToName = [ + self::RICH_LINK_TYPE_UNSPECIFIED => 'RICH_LINK_TYPE_UNSPECIFIED', + self::DRIVE_FILE => 'DRIVE_FILE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Chat/V1/SetUpSpaceRequest.php b/AppsChat/src/Chat/V1/SetUpSpaceRequest.php new file mode 100644 index 000000000000..5051e3a70944 --- /dev/null +++ b/AppsChat/src/Chat/V1/SetUpSpaceRequest.php @@ -0,0 +1,305 @@ +google.chat.v1.SetUpSpaceRequest + */ +class SetUpSpaceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `Space.spaceType` field is required. + * To create a space, set `Space.spaceType` to `SPACE` and set + * `Space.displayName`. If you receive the error message `ALREADY_EXISTS` when + * setting up a space, try a different `displayName`. An existing space + * within the Google Workspace organization might already use this display + * name. + * To create a group chat, set `Space.spaceType` to + * `GROUP_CHAT`. Don't set `Space.displayName`. + * To create a 1:1 conversation between humans, + * set `Space.spaceType` to `DIRECT_MESSAGE` and set + * `Space.singleUserBotDm` to `false`. Don't set `Space.displayName` or + * `Space.spaceDetails`. + * To create an 1:1 conversation between a human and the calling Chat app, set + * `Space.spaceType` to `DIRECT_MESSAGE` and + * `Space.singleUserBotDm` to `true`. Don't set `Space.displayName` or + * `Space.spaceDetails`. + * If a `DIRECT_MESSAGE` space already exists, that space is returned instead + * of creating a new space. + * + * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $space = null; + /** + * Optional. A unique identifier for this request. + * A random UUID is recommended. + * Specifying an existing request ID returns the space created with that ID + * instead of creating a new space. + * Specifying an existing request ID from the same Chat app with a different + * authenticated user returns an error. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. The Google Chat users to invite to join the space. Omit the + * calling user, as they are added automatically. + * The set currently allows up to 20 memberships (in addition to the caller). + * The `Membership.member` field must contain a `user` with `name` populated + * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only + * add human users when setting up a space (adding Chat apps is only supported + * for direct message setup with the calling app). You can also add members + * using the user's email as an alias for {user}. For example, the `user.name` + * can be `users/example@gmail.com`." To invite Gmail users or users from + * external Google Workspace domains, user's email must be used for + * `{user}`. + * Optional when setting `Space.spaceType` to `SPACE`. + * Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at + * least two memberships. + * Required when setting `Space.spaceType` to `DIRECT_MESSAGE` with a human + * user, along with exactly one membership. + * Must be empty when creating a 1:1 conversation between a human and the + * calling Chat app (when setting `Space.spaceType` to + * `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`). + * + * Generated from protobuf field repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $memberships; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Space $space + * Required. The `Space.spaceType` field is required. + * To create a space, set `Space.spaceType` to `SPACE` and set + * `Space.displayName`. If you receive the error message `ALREADY_EXISTS` when + * setting up a space, try a different `displayName`. An existing space + * within the Google Workspace organization might already use this display + * name. + * To create a group chat, set `Space.spaceType` to + * `GROUP_CHAT`. Don't set `Space.displayName`. + * To create a 1:1 conversation between humans, + * set `Space.spaceType` to `DIRECT_MESSAGE` and set + * `Space.singleUserBotDm` to `false`. Don't set `Space.displayName` or + * `Space.spaceDetails`. + * To create an 1:1 conversation between a human and the calling Chat app, set + * `Space.spaceType` to `DIRECT_MESSAGE` and + * `Space.singleUserBotDm` to `true`. Don't set `Space.displayName` or + * `Space.spaceDetails`. + * If a `DIRECT_MESSAGE` space already exists, that space is returned instead + * of creating a new space. + * @type string $request_id + * Optional. A unique identifier for this request. + * A random UUID is recommended. + * Specifying an existing request ID returns the space created with that ID + * instead of creating a new space. + * Specifying an existing request ID from the same Chat app with a different + * authenticated user returns an error. + * @type array<\Google\Apps\Chat\V1\Membership>|\Google\Protobuf\Internal\RepeatedField $memberships + * Optional. The Google Chat users to invite to join the space. Omit the + * calling user, as they are added automatically. + * The set currently allows up to 20 memberships (in addition to the caller). + * The `Membership.member` field must contain a `user` with `name` populated + * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only + * add human users when setting up a space (adding Chat apps is only supported + * for direct message setup with the calling app). You can also add members + * using the user's email as an alias for {user}. For example, the `user.name` + * can be `users/example@gmail.com`." To invite Gmail users or users from + * external Google Workspace domains, user's email must be used for + * `{user}`. + * Optional when setting `Space.spaceType` to `SPACE`. + * Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at + * least two memberships. + * Required when setting `Space.spaceType` to `DIRECT_MESSAGE` with a human + * user, along with exactly one membership. + * Must be empty when creating a 1:1 conversation between a human and the + * calling Chat app (when setting `Space.spaceType` to + * `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\SpaceSetup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `Space.spaceType` field is required. + * To create a space, set `Space.spaceType` to `SPACE` and set + * `Space.displayName`. If you receive the error message `ALREADY_EXISTS` when + * setting up a space, try a different `displayName`. An existing space + * within the Google Workspace organization might already use this display + * name. + * To create a group chat, set `Space.spaceType` to + * `GROUP_CHAT`. Don't set `Space.displayName`. + * To create a 1:1 conversation between humans, + * set `Space.spaceType` to `DIRECT_MESSAGE` and set + * `Space.singleUserBotDm` to `false`. Don't set `Space.displayName` or + * `Space.spaceDetails`. + * To create an 1:1 conversation between a human and the calling Chat app, set + * `Space.spaceType` to `DIRECT_MESSAGE` and + * `Space.singleUserBotDm` to `true`. Don't set `Space.displayName` or + * `Space.spaceDetails`. + * If a `DIRECT_MESSAGE` space already exists, that space is returned instead + * of creating a new space. + * + * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Apps\Chat\V1\Space|null + */ + public function getSpace() + { + return $this->space; + } + + public function hasSpace() + { + return isset($this->space); + } + + public function clearSpace() + { + unset($this->space); + } + + /** + * Required. The `Space.spaceType` field is required. + * To create a space, set `Space.spaceType` to `SPACE` and set + * `Space.displayName`. If you receive the error message `ALREADY_EXISTS` when + * setting up a space, try a different `displayName`. An existing space + * within the Google Workspace organization might already use this display + * name. + * To create a group chat, set `Space.spaceType` to + * `GROUP_CHAT`. Don't set `Space.displayName`. + * To create a 1:1 conversation between humans, + * set `Space.spaceType` to `DIRECT_MESSAGE` and set + * `Space.singleUserBotDm` to `false`. Don't set `Space.displayName` or + * `Space.spaceDetails`. + * To create an 1:1 conversation between a human and the calling Chat app, set + * `Space.spaceType` to `DIRECT_MESSAGE` and + * `Space.singleUserBotDm` to `true`. Don't set `Space.displayName` or + * `Space.spaceDetails`. + * If a `DIRECT_MESSAGE` space already exists, that space is returned instead + * of creating a new space. + * + * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Apps\Chat\V1\Space $var + * @return $this + */ + public function setSpace($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space::class); + $this->space = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. + * A random UUID is recommended. + * Specifying an existing request ID returns the space created with that ID + * instead of creating a new space. + * Specifying an existing request ID from the same Chat app with a different + * authenticated user returns an error. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. + * A random UUID is recommended. + * Specifying an existing request ID returns the space created with that ID + * instead of creating a new space. + * Specifying an existing request ID from the same Chat app with a different + * authenticated user returns an error. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. The Google Chat users to invite to join the space. Omit the + * calling user, as they are added automatically. + * The set currently allows up to 20 memberships (in addition to the caller). + * The `Membership.member` field must contain a `user` with `name` populated + * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only + * add human users when setting up a space (adding Chat apps is only supported + * for direct message setup with the calling app). You can also add members + * using the user's email as an alias for {user}. For example, the `user.name` + * can be `users/example@gmail.com`." To invite Gmail users or users from + * external Google Workspace domains, user's email must be used for + * `{user}`. + * Optional when setting `Space.spaceType` to `SPACE`. + * Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at + * least two memberships. + * Required when setting `Space.spaceType` to `DIRECT_MESSAGE` with a human + * user, along with exactly one membership. + * Must be empty when creating a 1:1 conversation between a human and the + * calling Chat app (when setting `Space.spaceType` to + * `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`). + * + * Generated from protobuf field repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMemberships() + { + return $this->memberships; + } + + /** + * Optional. The Google Chat users to invite to join the space. Omit the + * calling user, as they are added automatically. + * The set currently allows up to 20 memberships (in addition to the caller). + * The `Membership.member` field must contain a `user` with `name` populated + * (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only + * add human users when setting up a space (adding Chat apps is only supported + * for direct message setup with the calling app). You can also add members + * using the user's email as an alias for {user}. For example, the `user.name` + * can be `users/example@gmail.com`." To invite Gmail users or users from + * external Google Workspace domains, user's email must be used for + * `{user}`. + * Optional when setting `Space.spaceType` to `SPACE`. + * Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at + * least two memberships. + * Required when setting `Space.spaceType` to `DIRECT_MESSAGE` with a human + * user, along with exactly one membership. + * Must be empty when creating a 1:1 conversation between a human and the + * calling Chat app (when setting `Space.spaceType` to + * `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`). + * + * Generated from protobuf field repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Apps\Chat\V1\Membership>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMemberships($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Membership::class); + $this->memberships = $arr; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/SlashCommand.php b/AppsChat/src/Chat/V1/SlashCommand.php new file mode 100644 index 000000000000..07f44423d3b2 --- /dev/null +++ b/AppsChat/src/Chat/V1/SlashCommand.php @@ -0,0 +1,69 @@ +google.chat.v1.SlashCommand + */ +class SlashCommand extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the slash command invoked. + * + * Generated from protobuf field int64 command_id = 1; + */ + protected $command_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $command_id + * The ID of the slash command invoked. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\SlashCommand::initOnce(); + parent::__construct($data); + } + + /** + * The ID of the slash command invoked. + * + * Generated from protobuf field int64 command_id = 1; + * @return int|string + */ + public function getCommandId() + { + return $this->command_id; + } + + /** + * The ID of the slash command invoked. + * + * Generated from protobuf field int64 command_id = 1; + * @param int|string $var + * @return $this + */ + public function setCommandId($var) + { + GPBUtil::checkInt64($var); + $this->command_id = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/SlashCommandMetadata.php b/AppsChat/src/Chat/V1/SlashCommandMetadata.php new file mode 100644 index 000000000000..316532e5b3ee --- /dev/null +++ b/AppsChat/src/Chat/V1/SlashCommandMetadata.php @@ -0,0 +1,213 @@ +google.chat.v1.SlashCommandMetadata + */ +class SlashCommandMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The Chat app whose command was invoked. + * + * Generated from protobuf field .google.chat.v1.User bot = 1; + */ + protected $bot = null; + /** + * The type of slash command. + * + * Generated from protobuf field .google.chat.v1.SlashCommandMetadata.Type type = 2; + */ + protected $type = 0; + /** + * The name of the invoked slash command. + * + * Generated from protobuf field string command_name = 3; + */ + protected $command_name = ''; + /** + * The command ID of the invoked slash command. + * + * Generated from protobuf field int64 command_id = 4; + */ + protected $command_id = 0; + /** + * Indicates whether the slash command is for a dialog. + * + * Generated from protobuf field bool triggers_dialog = 5; + */ + protected $triggers_dialog = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\User $bot + * The Chat app whose command was invoked. + * @type int $type + * The type of slash command. + * @type string $command_name + * The name of the invoked slash command. + * @type int|string $command_id + * The command ID of the invoked slash command. + * @type bool $triggers_dialog + * Indicates whether the slash command is for a dialog. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Annotation::initOnce(); + parent::__construct($data); + } + + /** + * The Chat app whose command was invoked. + * + * Generated from protobuf field .google.chat.v1.User bot = 1; + * @return \Google\Apps\Chat\V1\User|null + */ + public function getBot() + { + return $this->bot; + } + + public function hasBot() + { + return isset($this->bot); + } + + public function clearBot() + { + unset($this->bot); + } + + /** + * The Chat app whose command was invoked. + * + * Generated from protobuf field .google.chat.v1.User bot = 1; + * @param \Google\Apps\Chat\V1\User $var + * @return $this + */ + public function setBot($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\User::class); + $this->bot = $var; + + return $this; + } + + /** + * The type of slash command. + * + * Generated from protobuf field .google.chat.v1.SlashCommandMetadata.Type type = 2; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of slash command. + * + * Generated from protobuf field .google.chat.v1.SlashCommandMetadata.Type type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\SlashCommandMetadata\Type::class); + $this->type = $var; + + return $this; + } + + /** + * The name of the invoked slash command. + * + * Generated from protobuf field string command_name = 3; + * @return string + */ + public function getCommandName() + { + return $this->command_name; + } + + /** + * The name of the invoked slash command. + * + * Generated from protobuf field string command_name = 3; + * @param string $var + * @return $this + */ + public function setCommandName($var) + { + GPBUtil::checkString($var, True); + $this->command_name = $var; + + return $this; + } + + /** + * The command ID of the invoked slash command. + * + * Generated from protobuf field int64 command_id = 4; + * @return int|string + */ + public function getCommandId() + { + return $this->command_id; + } + + /** + * The command ID of the invoked slash command. + * + * Generated from protobuf field int64 command_id = 4; + * @param int|string $var + * @return $this + */ + public function setCommandId($var) + { + GPBUtil::checkInt64($var); + $this->command_id = $var; + + return $this; + } + + /** + * Indicates whether the slash command is for a dialog. + * + * Generated from protobuf field bool triggers_dialog = 5; + * @return bool + */ + public function getTriggersDialog() + { + return $this->triggers_dialog; + } + + /** + * Indicates whether the slash command is for a dialog. + * + * Generated from protobuf field bool triggers_dialog = 5; + * @param bool $var + * @return $this + */ + public function setTriggersDialog($var) + { + GPBUtil::checkBool($var); + $this->triggers_dialog = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/SlashCommandMetadata/Type.php b/AppsChat/src/Chat/V1/SlashCommandMetadata/Type.php new file mode 100644 index 000000000000..b96b8e408023 --- /dev/null +++ b/AppsChat/src/Chat/V1/SlashCommandMetadata/Type.php @@ -0,0 +1,60 @@ +google.chat.v1.SlashCommandMetadata.Type + */ +class Type +{ + /** + * Default value for the enum. Don't use. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Add Chat app to space. + * + * Generated from protobuf enum ADD = 1; + */ + const ADD = 1; + /** + * Invoke slash command in space. + * + * Generated from protobuf enum INVOKE = 2; + */ + const INVOKE = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::ADD => 'ADD', + self::INVOKE => 'INVOKE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Chat/V1/Space.php b/AppsChat/src/Chat/V1/Space.php new file mode 100644 index 000000000000..9164e82839b9 --- /dev/null +++ b/AppsChat/src/Chat/V1/Space.php @@ -0,0 +1,658 @@ +google.chat.v1.Space + */ +class Space extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the space. + * Format: `spaces/{space}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. Deprecated: Use `space_type` instead. + * The type of a space. + * + * Generated from protobuf field .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @deprecated + */ + protected $type = 0; + /** + * The type of space. Required when creating a space or updating the space + * type of a space. Output only for other usage. + * + * Generated from protobuf field .google.chat.v1.Space.SpaceType space_type = 10; + */ + protected $space_type = 0; + /** + * Optional. Whether the space is a DM between a Chat app and a single + * human. + * + * Generated from protobuf field bool single_user_bot_dm = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $single_user_bot_dm = false; + /** + * Output only. Deprecated: Use `spaceThreadingState` instead. + * Whether messages are threaded in this space. + * + * Generated from protobuf field bool threaded = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @deprecated + */ + protected $threaded = false; + /** + * The space's display name. Required when [creating a + * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create). + * If you receive the error message `ALREADY_EXISTS` when creating a space or + * updating the `displayName`, try a different `displayName`. An + * existing space within the Google Workspace organization might already use + * this display name. + * For direct messages, this field might be empty. + * Supports up to 128 characters. + * + * Generated from protobuf field string display_name = 3; + */ + protected $display_name = ''; + /** + * Immutable. Whether this space permits any Google Chat user as a member. + * Input when creating a space in a Google Workspace organization. Omit this + * field when creating spaces in the following conditions: + * * The authenticated user uses a consumer account (unmanaged user + * account). By default, a space created by a consumer account permits any + * Google Chat user. + * * The space is used to [import data to Google Chat] + * (https://developers.google.com/chat/api/guides/import-data-overview) + * because import mode spaces must only permit members from the same + * Google Workspace organization. However, as part of the [Google + * Workspace Developer Preview + * Program](https://developers.google.com/workspace/preview), import mode + * spaces can permit any Google Chat user so this field can then be set + * for import mode spaces. + * For existing spaces, this field is output only. + * + * Generated from protobuf field bool external_user_allowed = 8 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $external_user_allowed = false; + /** + * Output only. The threading state in the Chat space. + * + * Generated from protobuf field .google.chat.v1.Space.SpaceThreadingState space_threading_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $space_threading_state = 0; + /** + * Details about the space including description and rules. + * + * Generated from protobuf field .google.chat.v1.Space.SpaceDetails space_details = 11; + */ + protected $space_details = null; + /** + * The message history state for messages and threads in this space. + * + * Generated from protobuf field .google.chat.v1.HistoryState space_history_state = 13; + */ + protected $space_history_state = 0; + /** + * Optional. Whether this space is created in `Import Mode` as part of a data + * migration into Google Workspace. While spaces are being imported, they + * aren't visible to users until the import is complete. + * + * Generated from protobuf field bool import_mode = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $import_mode = false; + /** + * Optional. Immutable. For spaces created in Chat, the time the space was + * created. This field is output only, except when used in import mode spaces. + * For import mode spaces, set this field to the historical timestamp at which + * the space was created in the source in order to preserve the original + * creation time. + * Only populated in the output when `spaceType` is `GROUP_CHAT` or `SPACE`. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $create_time = null; + /** + * Output only. Whether the Chat app was installed by a Google Workspace + * administrator. Administrators can install a Chat app for their domain, + * organizational unit, or a group of users. + * Administrators can only install Chat apps for direct messaging between + * users and the app. To support admin install, your app must feature direct + * messaging. + * + * Generated from protobuf field bool admin_installed = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $admin_installed = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name of the space. + * Format: `spaces/{space}` + * @type int $type + * Output only. Deprecated: Use `space_type` instead. + * The type of a space. + * @type int $space_type + * The type of space. Required when creating a space or updating the space + * type of a space. Output only for other usage. + * @type bool $single_user_bot_dm + * Optional. Whether the space is a DM between a Chat app and a single + * human. + * @type bool $threaded + * Output only. Deprecated: Use `spaceThreadingState` instead. + * Whether messages are threaded in this space. + * @type string $display_name + * The space's display name. Required when [creating a + * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create). + * If you receive the error message `ALREADY_EXISTS` when creating a space or + * updating the `displayName`, try a different `displayName`. An + * existing space within the Google Workspace organization might already use + * this display name. + * For direct messages, this field might be empty. + * Supports up to 128 characters. + * @type bool $external_user_allowed + * Immutable. Whether this space permits any Google Chat user as a member. + * Input when creating a space in a Google Workspace organization. Omit this + * field when creating spaces in the following conditions: + * * The authenticated user uses a consumer account (unmanaged user + * account). By default, a space created by a consumer account permits any + * Google Chat user. + * * The space is used to [import data to Google Chat] + * (https://developers.google.com/chat/api/guides/import-data-overview) + * because import mode spaces must only permit members from the same + * Google Workspace organization. However, as part of the [Google + * Workspace Developer Preview + * Program](https://developers.google.com/workspace/preview), import mode + * spaces can permit any Google Chat user so this field can then be set + * for import mode spaces. + * For existing spaces, this field is output only. + * @type int $space_threading_state + * Output only. The threading state in the Chat space. + * @type \Google\Apps\Chat\V1\Space\SpaceDetails $space_details + * Details about the space including description and rules. + * @type int $space_history_state + * The message history state for messages and threads in this space. + * @type bool $import_mode + * Optional. Whether this space is created in `Import Mode` as part of a data + * migration into Google Workspace. While spaces are being imported, they + * aren't visible to users until the import is complete. + * @type \Google\Protobuf\Timestamp $create_time + * Optional. Immutable. For spaces created in Chat, the time the space was + * created. This field is output only, except when used in import mode spaces. + * For import mode spaces, set this field to the historical timestamp at which + * the space was created in the source in order to preserve the original + * creation time. + * Only populated in the output when `spaceType` is `GROUP_CHAT` or `SPACE`. + * @type bool $admin_installed + * Output only. Whether the Chat app was installed by a Google Workspace + * administrator. Administrators can install a Chat app for their domain, + * organizational unit, or a group of users. + * Administrators can only install Chat apps for direct messaging between + * users and the app. To support admin install, your app must feature direct + * messaging. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the space. + * Format: `spaces/{space}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name of the space. + * Format: `spaces/{space}` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Deprecated: Use `space_type` instead. + * The type of a space. + * + * Generated from protobuf field .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + * @deprecated + */ + public function getType() + { + @trigger_error('type is deprecated.', E_USER_DEPRECATED); + return $this->type; + } + + /** + * Output only. Deprecated: Use `space_type` instead. + * The type of a space. + * + * Generated from protobuf field .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + * @deprecated + */ + public function setType($var) + { + @trigger_error('type is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\Space\Type::class); + $this->type = $var; + + return $this; + } + + /** + * The type of space. Required when creating a space or updating the space + * type of a space. Output only for other usage. + * + * Generated from protobuf field .google.chat.v1.Space.SpaceType space_type = 10; + * @return int + */ + public function getSpaceType() + { + return $this->space_type; + } + + /** + * The type of space. Required when creating a space or updating the space + * type of a space. Output only for other usage. + * + * Generated from protobuf field .google.chat.v1.Space.SpaceType space_type = 10; + * @param int $var + * @return $this + */ + public function setSpaceType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\Space\SpaceType::class); + $this->space_type = $var; + + return $this; + } + + /** + * Optional. Whether the space is a DM between a Chat app and a single + * human. + * + * Generated from protobuf field bool single_user_bot_dm = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSingleUserBotDm() + { + return $this->single_user_bot_dm; + } + + /** + * Optional. Whether the space is a DM between a Chat app and a single + * human. + * + * Generated from protobuf field bool single_user_bot_dm = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSingleUserBotDm($var) + { + GPBUtil::checkBool($var); + $this->single_user_bot_dm = $var; + + return $this; + } + + /** + * Output only. Deprecated: Use `spaceThreadingState` instead. + * Whether messages are threaded in this space. + * + * Generated from protobuf field bool threaded = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + * @deprecated + */ + public function getThreaded() + { + @trigger_error('threaded is deprecated.', E_USER_DEPRECATED); + return $this->threaded; + } + + /** + * Output only. Deprecated: Use `spaceThreadingState` instead. + * Whether messages are threaded in this space. + * + * Generated from protobuf field bool threaded = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setThreaded($var) + { + @trigger_error('threaded is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->threaded = $var; + + return $this; + } + + /** + * The space's display name. Required when [creating a + * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create). + * If you receive the error message `ALREADY_EXISTS` when creating a space or + * updating the `displayName`, try a different `displayName`. An + * existing space within the Google Workspace organization might already use + * this display name. + * For direct messages, this field might be empty. + * Supports up to 128 characters. + * + * Generated from protobuf field string display_name = 3; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The space's display name. Required when [creating a + * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create). + * If you receive the error message `ALREADY_EXISTS` when creating a space or + * updating the `displayName`, try a different `displayName`. An + * existing space within the Google Workspace organization might already use + * this display name. + * For direct messages, this field might be empty. + * Supports up to 128 characters. + * + * Generated from protobuf field string display_name = 3; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Immutable. Whether this space permits any Google Chat user as a member. + * Input when creating a space in a Google Workspace organization. Omit this + * field when creating spaces in the following conditions: + * * The authenticated user uses a consumer account (unmanaged user + * account). By default, a space created by a consumer account permits any + * Google Chat user. + * * The space is used to [import data to Google Chat] + * (https://developers.google.com/chat/api/guides/import-data-overview) + * because import mode spaces must only permit members from the same + * Google Workspace organization. However, as part of the [Google + * Workspace Developer Preview + * Program](https://developers.google.com/workspace/preview), import mode + * spaces can permit any Google Chat user so this field can then be set + * for import mode spaces. + * For existing spaces, this field is output only. + * + * Generated from protobuf field bool external_user_allowed = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * @return bool + */ + public function getExternalUserAllowed() + { + return $this->external_user_allowed; + } + + /** + * Immutable. Whether this space permits any Google Chat user as a member. + * Input when creating a space in a Google Workspace organization. Omit this + * field when creating spaces in the following conditions: + * * The authenticated user uses a consumer account (unmanaged user + * account). By default, a space created by a consumer account permits any + * Google Chat user. + * * The space is used to [import data to Google Chat] + * (https://developers.google.com/chat/api/guides/import-data-overview) + * because import mode spaces must only permit members from the same + * Google Workspace organization. However, as part of the [Google + * Workspace Developer Preview + * Program](https://developers.google.com/workspace/preview), import mode + * spaces can permit any Google Chat user so this field can then be set + * for import mode spaces. + * For existing spaces, this field is output only. + * + * Generated from protobuf field bool external_user_allowed = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * @param bool $var + * @return $this + */ + public function setExternalUserAllowed($var) + { + GPBUtil::checkBool($var); + $this->external_user_allowed = $var; + + return $this; + } + + /** + * Output only. The threading state in the Chat space. + * + * Generated from protobuf field .google.chat.v1.Space.SpaceThreadingState space_threading_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getSpaceThreadingState() + { + return $this->space_threading_state; + } + + /** + * Output only. The threading state in the Chat space. + * + * Generated from protobuf field .google.chat.v1.Space.SpaceThreadingState space_threading_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setSpaceThreadingState($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\Space\SpaceThreadingState::class); + $this->space_threading_state = $var; + + return $this; + } + + /** + * Details about the space including description and rules. + * + * Generated from protobuf field .google.chat.v1.Space.SpaceDetails space_details = 11; + * @return \Google\Apps\Chat\V1\Space\SpaceDetails|null + */ + public function getSpaceDetails() + { + return $this->space_details; + } + + public function hasSpaceDetails() + { + return isset($this->space_details); + } + + public function clearSpaceDetails() + { + unset($this->space_details); + } + + /** + * Details about the space including description and rules. + * + * Generated from protobuf field .google.chat.v1.Space.SpaceDetails space_details = 11; + * @param \Google\Apps\Chat\V1\Space\SpaceDetails $var + * @return $this + */ + public function setSpaceDetails($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\SpaceDetails::class); + $this->space_details = $var; + + return $this; + } + + /** + * The message history state for messages and threads in this space. + * + * Generated from protobuf field .google.chat.v1.HistoryState space_history_state = 13; + * @return int + */ + public function getSpaceHistoryState() + { + return $this->space_history_state; + } + + /** + * The message history state for messages and threads in this space. + * + * Generated from protobuf field .google.chat.v1.HistoryState space_history_state = 13; + * @param int $var + * @return $this + */ + public function setSpaceHistoryState($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\HistoryState::class); + $this->space_history_state = $var; + + return $this; + } + + /** + * Optional. Whether this space is created in `Import Mode` as part of a data + * migration into Google Workspace. While spaces are being imported, they + * aren't visible to users until the import is complete. + * + * Generated from protobuf field bool import_mode = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getImportMode() + { + return $this->import_mode; + } + + /** + * Optional. Whether this space is created in `Import Mode` as part of a data + * migration into Google Workspace. While spaces are being imported, they + * aren't visible to users until the import is complete. + * + * Generated from protobuf field bool import_mode = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setImportMode($var) + { + GPBUtil::checkBool($var); + $this->import_mode = $var; + + return $this; + } + + /** + * Optional. Immutable. For spaces created in Chat, the time the space was + * created. This field is output only, except when used in import mode spaces. + * For import mode spaces, set this field to the historical timestamp at which + * the space was created in the source in order to preserve the original + * creation time. + * Only populated in the output when `spaceType` is `GROUP_CHAT` or `SPACE`. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. Immutable. For spaces created in Chat, the time the space was + * created. This field is output only, except when used in import mode spaces. + * For import mode spaces, set this field to the historical timestamp at which + * the space was created in the source in order to preserve the original + * creation time. + * Only populated in the output when `spaceType` is `GROUP_CHAT` or `SPACE`. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @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. Whether the Chat app was installed by a Google Workspace + * administrator. Administrators can install a Chat app for their domain, + * organizational unit, or a group of users. + * Administrators can only install Chat apps for direct messaging between + * users and the app. To support admin install, your app must feature direct + * messaging. + * + * Generated from protobuf field bool admin_installed = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getAdminInstalled() + { + return $this->admin_installed; + } + + /** + * Output only. Whether the Chat app was installed by a Google Workspace + * administrator. Administrators can install a Chat app for their domain, + * organizational unit, or a group of users. + * Administrators can only install Chat apps for direct messaging between + * users and the app. To support admin install, your app must feature direct + * messaging. + * + * Generated from protobuf field bool admin_installed = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setAdminInstalled($var) + { + GPBUtil::checkBool($var); + $this->admin_installed = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/Space/SpaceDetails.php b/AppsChat/src/Chat/V1/Space/SpaceDetails.php new file mode 100644 index 000000000000..92ae7537b62c --- /dev/null +++ b/AppsChat/src/Chat/V1/Space/SpaceDetails.php @@ -0,0 +1,114 @@ +google.chat.v1.Space.SpaceDetails + */ +class SpaceDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A description of the space. For example, describe the space's + * discussion topic, functional purpose, or participants. + * Supports up to 150 characters. + * + * Generated from protobuf field string description = 1; + */ + protected $description = ''; + /** + * Optional. The space's rules, expectations, and etiquette. + * Supports up to 5,000 characters. + * + * Generated from protobuf field string guidelines = 2; + */ + protected $guidelines = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $description + * Optional. A description of the space. For example, describe the space's + * discussion topic, functional purpose, or participants. + * Supports up to 150 characters. + * @type string $guidelines + * Optional. The space's rules, expectations, and etiquette. + * Supports up to 5,000 characters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A description of the space. For example, describe the space's + * discussion topic, functional purpose, or participants. + * Supports up to 150 characters. + * + * Generated from protobuf field string description = 1; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A description of the space. For example, describe the space's + * discussion topic, functional purpose, or participants. + * Supports up to 150 characters. + * + * Generated from protobuf field string description = 1; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. The space's rules, expectations, and etiquette. + * Supports up to 5,000 characters. + * + * Generated from protobuf field string guidelines = 2; + * @return string + */ + public function getGuidelines() + { + return $this->guidelines; + } + + /** + * Optional. The space's rules, expectations, and etiquette. + * Supports up to 5,000 characters. + * + * Generated from protobuf field string guidelines = 2; + * @param string $var + * @return $this + */ + public function setGuidelines($var) + { + GPBUtil::checkString($var, True); + $this->guidelines = $var; + + return $this; + } + +} + + diff --git a/AppsChat/src/Chat/V1/Space/SpaceThreadingState.php b/AppsChat/src/Chat/V1/Space/SpaceThreadingState.php new file mode 100644 index 000000000000..445c079d953a --- /dev/null +++ b/AppsChat/src/Chat/V1/Space/SpaceThreadingState.php @@ -0,0 +1,73 @@ +google.chat.v1.Space.SpaceThreadingState + */ +class SpaceThreadingState +{ + /** + * Reserved. + * + * Generated from protobuf enum SPACE_THREADING_STATE_UNSPECIFIED = 0; + */ + const SPACE_THREADING_STATE_UNSPECIFIED = 0; + /** + * Named spaces that support message threads. When users respond to a + * message, they can reply in-thread, which keeps their response in the + * context of the original message. + * + * Generated from protobuf enum THREADED_MESSAGES = 2; + */ + const THREADED_MESSAGES = 2; + /** + * Named spaces where the conversation is organized by topic. Topics and + * their replies are grouped together. + * + * Generated from protobuf enum GROUPED_MESSAGES = 3; + */ + const GROUPED_MESSAGES = 3; + /** + * Direct messages (DMs) between two people and group conversations between + * 3 or more people. + * + * Generated from protobuf enum UNTHREADED_MESSAGES = 4; + */ + const UNTHREADED_MESSAGES = 4; + + private static $valueToName = [ + self::SPACE_THREADING_STATE_UNSPECIFIED => 'SPACE_THREADING_STATE_UNSPECIFIED', + self::THREADED_MESSAGES => 'THREADED_MESSAGES', + self::GROUPED_MESSAGES => 'GROUPED_MESSAGES', + self::UNTHREADED_MESSAGES => 'UNTHREADED_MESSAGES', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Chat/V1/Space/SpaceType.php b/AppsChat/src/Chat/V1/Space/SpaceType.php new file mode 100644 index 000000000000..88e12bba4c49 --- /dev/null +++ b/AppsChat/src/Chat/V1/Space/SpaceType.php @@ -0,0 +1,72 @@ +google.chat.v1.Space.SpaceType + */ +class SpaceType +{ + /** + * Reserved. + * + * Generated from protobuf enum SPACE_TYPE_UNSPECIFIED = 0; + */ + const SPACE_TYPE_UNSPECIFIED = 0; + /** + * A place where people send messages, share files, and collaborate. + * A `SPACE` can include Chat apps. + * + * Generated from protobuf enum SPACE = 1; + */ + const SPACE = 1; + /** + * Group conversations between 3 or more people. + * A `GROUP_CHAT` can include Chat apps. + * + * Generated from protobuf enum GROUP_CHAT = 2; + */ + const GROUP_CHAT = 2; + /** + * 1:1 messages between two humans or a human and a Chat app. + * + * Generated from protobuf enum DIRECT_MESSAGE = 3; + */ + const DIRECT_MESSAGE = 3; + + private static $valueToName = [ + self::SPACE_TYPE_UNSPECIFIED => 'SPACE_TYPE_UNSPECIFIED', + self::SPACE => 'SPACE', + self::GROUP_CHAT => 'GROUP_CHAT', + self::DIRECT_MESSAGE => 'DIRECT_MESSAGE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Chat/V1/Space/Type.php b/AppsChat/src/Chat/V1/Space/Type.php new file mode 100644 index 000000000000..3abc63374c1c --- /dev/null +++ b/AppsChat/src/Chat/V1/Space/Type.php @@ -0,0 +1,63 @@ +google.chat.v1.Space.Type + */ +class Type +{ + /** + * Reserved. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Conversations between two or more humans. + * + * Generated from protobuf enum ROOM = 1; + */ + const ROOM = 1; + /** + * 1:1 Direct Message between a human and a Chat app, where all messages are + * flat. Note that this doesn't include direct messages between two humans. + * + * Generated from protobuf enum DM = 2; + */ + const DM = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::ROOM => 'ROOM', + self::DM => 'DM', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Chat/V1/Thread.php b/AppsChat/src/Chat/V1/Thread.php new file mode 100644 index 000000000000..199a101cc358 --- /dev/null +++ b/AppsChat/src/Chat/V1/Thread.php @@ -0,0 +1,134 @@ +google.chat.v1.Thread + */ +class Thread extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Resource name of the thread. + * Example: `spaces/{space}/threads/{thread}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Optional. Input for creating or updating a thread. Otherwise, output only. + * ID for the thread. Supports up to 4000 characters. + * This ID is unique to the Chat app that sets it. For example, if + * multiple Chat apps create a message using the same thread key, + * the messages are posted in different threads. To reply in a + * thread created by a person or another Chat app, specify the thread `name` + * field instead. + * + * Generated from protobuf field string thread_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $thread_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Resource name of the thread. + * Example: `spaces/{space}/threads/{thread}` + * @type string $thread_key + * Optional. Input for creating or updating a thread. Otherwise, output only. + * ID for the thread. Supports up to 4000 characters. + * This ID is unique to the Chat app that sets it. For example, if + * multiple Chat apps create a message using the same thread key, + * the messages are posted in different threads. To reply in a + * thread created by a person or another Chat app, specify the thread `name` + * field instead. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Resource name of the thread. + * Example: `spaces/{space}/threads/{thread}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Resource name of the thread. + * Example: `spaces/{space}/threads/{thread}` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Input for creating or updating a thread. Otherwise, output only. + * ID for the thread. Supports up to 4000 characters. + * This ID is unique to the Chat app that sets it. For example, if + * multiple Chat apps create a message using the same thread key, + * the messages are posted in different threads. To reply in a + * thread created by a person or another Chat app, specify the thread `name` + * field instead. + * + * Generated from protobuf field string thread_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getThreadKey() + { + return $this->thread_key; + } + + /** + * Optional. Input for creating or updating a thread. Otherwise, output only. + * ID for the thread. Supports up to 4000 characters. + * This ID is unique to the Chat app that sets it. For example, if + * multiple Chat apps create a message using the same thread key, + * the messages are posted in different threads. To reply in a + * thread created by a person or another Chat app, specify the thread `name` + * field instead. + * + * Generated from protobuf field string thread_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setThreadKey($var) + { + GPBUtil::checkString($var, True); + $this->thread_key = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/UpdateMessageRequest.php b/AppsChat/src/Chat/V1/UpdateMessageRequest.php new file mode 100644 index 000000000000..338ec6bf863c --- /dev/null +++ b/AppsChat/src/Chat/V1/UpdateMessageRequest.php @@ -0,0 +1,238 @@ +google.chat.v1.UpdateMessageRequest + */ +class UpdateMessageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Message with fields updated. + * + * Generated from protobuf field .google.chat.v1.Message message = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $message = null; + /** + * Required. The field paths to update. Separate multiple values with commas + * or use `*` to update all field paths. + * Currently supported field paths: + * - `text` + * - `attachment` + * - `cards` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * - `cards_v2` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * - `accessory_widgets` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + /** + * Optional. If `true` and the message isn't found, a new message is created + * and `updateMask` is ignored. The specified message ID must be + * [client-assigned](https://developers.google.com/workspace/chat/create-messages#name_a_created_message) + * or the request fails. + * + * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $allow_missing = false; + + /** + * @param \Google\Apps\Chat\V1\Message $message Required. Message with fields updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. The field paths to update. Separate multiple values with commas + * or use `*` to update all field paths. + * + * Currently supported field paths: + * + * - `text` + * + * - `attachment` + * + * - `cards` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * + * - `cards_v2` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * + * - `accessory_widgets` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * + * @return \Google\Apps\Chat\V1\UpdateMessageRequest + * + * @experimental + */ + public static function build(\Google\Apps\Chat\V1\Message $message, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setMessage($message) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Message $message + * Required. Message with fields updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The field paths to update. Separate multiple values with commas + * or use `*` to update all field paths. + * Currently supported field paths: + * - `text` + * - `attachment` + * - `cards` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * - `cards_v2` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * - `accessory_widgets` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * @type bool $allow_missing + * Optional. If `true` and the message isn't found, a new message is created + * and `updateMask` is ignored. The specified message ID must be + * [client-assigned](https://developers.google.com/workspace/chat/create-messages#name_a_created_message) + * or the request fails. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Required. Message with fields updated. + * + * Generated from protobuf field .google.chat.v1.Message message = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Apps\Chat\V1\Message|null + */ + public function getMessage() + { + return $this->message; + } + + public function hasMessage() + { + return isset($this->message); + } + + public function clearMessage() + { + unset($this->message); + } + + /** + * Required. Message with fields updated. + * + * Generated from protobuf field .google.chat.v1.Message message = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Apps\Chat\V1\Message $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Message::class); + $this->message = $var; + + return $this; + } + + /** + * Required. The field paths to update. Separate multiple values with commas + * or use `*` to update all field paths. + * Currently supported field paths: + * - `text` + * - `attachment` + * - `cards` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * - `cards_v2` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * - `accessory_widgets` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The field paths to update. Separate multiple values with commas + * or use `*` to update all field paths. + * Currently supported field paths: + * - `text` + * - `attachment` + * - `cards` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * - `cards_v2` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * - `accessory_widgets` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Optional. If `true` and the message isn't found, a new message is created + * and `updateMask` is ignored. The specified message ID must be + * [client-assigned](https://developers.google.com/workspace/chat/create-messages#name_a_created_message) + * or the request fails. + * + * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * Optional. If `true` and the message isn't found, a new message is created + * and `updateMask` is ignored. The specified message ID must be + * [client-assigned](https://developers.google.com/workspace/chat/create-messages#name_a_created_message) + * or the request fails. + * + * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/UpdateSpaceRequest.php b/AppsChat/src/Chat/V1/UpdateSpaceRequest.php new file mode 100644 index 000000000000..b612dda4892f --- /dev/null +++ b/AppsChat/src/Chat/V1/UpdateSpaceRequest.php @@ -0,0 +1,292 @@ +google.chat.v1.UpdateSpaceRequest + */ +class UpdateSpaceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Space with fields to be updated. `Space.name` must be + * populated in the form of `spaces/{space}`. Only fields + * specified by `update_mask` are updated. + * + * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $space = null; + /** + * Required. The updated field paths, comma separated if there are + * multiple. + * Currently supported field paths: + * - `display_name` (Only supports changing the display name of a space with + * the `SPACE` type, or when also including the `space_type` mask to change a + * `GROUP_CHAT` space type to `SPACE`. Trying to update the display name of a + * `GROUP_CHAT` or a `DIRECT_MESSAGE` space results in an invalid argument + * error. If you receive the error message `ALREADY_EXISTS` when updating the + * `displayName`, try a different `displayName`. An existing space within the + * Google Workspace organization might already use this display name.) + * - `space_type` (Only supports changing a `GROUP_CHAT` space type to + * `SPACE`. Include `display_name` together + * with `space_type` in the update mask and ensure that the specified space + * has a non-empty display name and the `SPACE` space type. Including the + * `space_type` mask and the `SPACE` type in the specified space when updating + * the display name is optional if the existing space already has the `SPACE` + * type. Trying to update the space type in other ways results in an invalid + * argument error). + * - `space_details` + * - `space_history_state` (Supports [turning history on or off for the + * space](https://support.google.com/chat/answer/7664687) if [the organization + * allows users to change their history + * setting](https://support.google.com/a/answer/7664184). + * Warning: mutually exclusive with all other field paths.) + * - Developer Preview: `access_settings.audience` (Supports changing the + * [access setting](https://support.google.com/chat/answer/11971020) of a + * space. If no audience is specified in the access setting, the space's + * access setting is updated to restricted. Warning: mutually exclusive with + * all other field paths.) + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Apps\Chat\V1\Space $space Required. Space with fields to be updated. `Space.name` must be + * populated in the form of `spaces/{space}`. Only fields + * specified by `update_mask` are updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. The updated field paths, comma separated if there are + * multiple. + * + * Currently supported field paths: + * + * - `display_name` (Only supports changing the display name of a space with + * the `SPACE` type, or when also including the `space_type` mask to change a + * `GROUP_CHAT` space type to `SPACE`. Trying to update the display name of a + * `GROUP_CHAT` or a `DIRECT_MESSAGE` space results in an invalid argument + * error. If you receive the error message `ALREADY_EXISTS` when updating the + * `displayName`, try a different `displayName`. An existing space within the + * Google Workspace organization might already use this display name.) + * + * - `space_type` (Only supports changing a `GROUP_CHAT` space type to + * `SPACE`. Include `display_name` together + * with `space_type` in the update mask and ensure that the specified space + * has a non-empty display name and the `SPACE` space type. Including the + * `space_type` mask and the `SPACE` type in the specified space when updating + * the display name is optional if the existing space already has the `SPACE` + * type. Trying to update the space type in other ways results in an invalid + * argument error). + * + * - `space_details` + * + * - `space_history_state` (Supports [turning history on or off for the + * space](https://support.google.com/chat/answer/7664687) if [the organization + * allows users to change their history + * setting](https://support.google.com/a/answer/7664184). + * Warning: mutually exclusive with all other field paths.) + * + * - Developer Preview: `access_settings.audience` (Supports changing the + * [access setting](https://support.google.com/chat/answer/11971020) of a + * space. If no audience is specified in the access setting, the space's + * access setting is updated to restricted. Warning: mutually exclusive with + * all other field paths.) + * + * @return \Google\Apps\Chat\V1\UpdateSpaceRequest + * + * @experimental + */ + public static function build(\Google\Apps\Chat\V1\Space $space, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSpace($space) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Space $space + * Required. Space with fields to be updated. `Space.name` must be + * populated in the form of `spaces/{space}`. Only fields + * specified by `update_mask` are updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The updated field paths, comma separated if there are + * multiple. + * Currently supported field paths: + * - `display_name` (Only supports changing the display name of a space with + * the `SPACE` type, or when also including the `space_type` mask to change a + * `GROUP_CHAT` space type to `SPACE`. Trying to update the display name of a + * `GROUP_CHAT` or a `DIRECT_MESSAGE` space results in an invalid argument + * error. If you receive the error message `ALREADY_EXISTS` when updating the + * `displayName`, try a different `displayName`. An existing space within the + * Google Workspace organization might already use this display name.) + * - `space_type` (Only supports changing a `GROUP_CHAT` space type to + * `SPACE`. Include `display_name` together + * with `space_type` in the update mask and ensure that the specified space + * has a non-empty display name and the `SPACE` space type. Including the + * `space_type` mask and the `SPACE` type in the specified space when updating + * the display name is optional if the existing space already has the `SPACE` + * type. Trying to update the space type in other ways results in an invalid + * argument error). + * - `space_details` + * - `space_history_state` (Supports [turning history on or off for the + * space](https://support.google.com/chat/answer/7664687) if [the organization + * allows users to change their history + * setting](https://support.google.com/a/answer/7664184). + * Warning: mutually exclusive with all other field paths.) + * - Developer Preview: `access_settings.audience` (Supports changing the + * [access setting](https://support.google.com/chat/answer/11971020) of a + * space. If no audience is specified in the access setting, the space's + * access setting is updated to restricted. Warning: mutually exclusive with + * all other field paths.) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * Required. Space with fields to be updated. `Space.name` must be + * populated in the form of `spaces/{space}`. Only fields + * specified by `update_mask` are updated. + * + * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Apps\Chat\V1\Space|null + */ + public function getSpace() + { + return $this->space; + } + + public function hasSpace() + { + return isset($this->space); + } + + public function clearSpace() + { + unset($this->space); + } + + /** + * Required. Space with fields to be updated. `Space.name` must be + * populated in the form of `spaces/{space}`. Only fields + * specified by `update_mask` are updated. + * + * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Apps\Chat\V1\Space $var + * @return $this + */ + public function setSpace($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space::class); + $this->space = $var; + + return $this; + } + + /** + * Required. The updated field paths, comma separated if there are + * multiple. + * Currently supported field paths: + * - `display_name` (Only supports changing the display name of a space with + * the `SPACE` type, or when also including the `space_type` mask to change a + * `GROUP_CHAT` space type to `SPACE`. Trying to update the display name of a + * `GROUP_CHAT` or a `DIRECT_MESSAGE` space results in an invalid argument + * error. If you receive the error message `ALREADY_EXISTS` when updating the + * `displayName`, try a different `displayName`. An existing space within the + * Google Workspace organization might already use this display name.) + * - `space_type` (Only supports changing a `GROUP_CHAT` space type to + * `SPACE`. Include `display_name` together + * with `space_type` in the update mask and ensure that the specified space + * has a non-empty display name and the `SPACE` space type. Including the + * `space_type` mask and the `SPACE` type in the specified space when updating + * the display name is optional if the existing space already has the `SPACE` + * type. Trying to update the space type in other ways results in an invalid + * argument error). + * - `space_details` + * - `space_history_state` (Supports [turning history on or off for the + * space](https://support.google.com/chat/answer/7664687) if [the organization + * allows users to change their history + * setting](https://support.google.com/a/answer/7664184). + * Warning: mutually exclusive with all other field paths.) + * - Developer Preview: `access_settings.audience` (Supports changing the + * [access setting](https://support.google.com/chat/answer/11971020) of a + * space. If no audience is specified in the access setting, the space's + * access setting is updated to restricted. Warning: mutually exclusive with + * all other field paths.) + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The updated field paths, comma separated if there are + * multiple. + * Currently supported field paths: + * - `display_name` (Only supports changing the display name of a space with + * the `SPACE` type, or when also including the `space_type` mask to change a + * `GROUP_CHAT` space type to `SPACE`. Trying to update the display name of a + * `GROUP_CHAT` or a `DIRECT_MESSAGE` space results in an invalid argument + * error. If you receive the error message `ALREADY_EXISTS` when updating the + * `displayName`, try a different `displayName`. An existing space within the + * Google Workspace organization might already use this display name.) + * - `space_type` (Only supports changing a `GROUP_CHAT` space type to + * `SPACE`. Include `display_name` together + * with `space_type` in the update mask and ensure that the specified space + * has a non-empty display name and the `SPACE` space type. Including the + * `space_type` mask and the `SPACE` type in the specified space when updating + * the display name is optional if the existing space already has the `SPACE` + * type. Trying to update the space type in other ways results in an invalid + * argument error). + * - `space_details` + * - `space_history_state` (Supports [turning history on or off for the + * space](https://support.google.com/chat/answer/7664687) if [the organization + * allows users to change their history + * setting](https://support.google.com/a/answer/7664184). + * Warning: mutually exclusive with all other field paths.) + * - Developer Preview: `access_settings.audience` (Supports changing the + * [access setting](https://support.google.com/chat/answer/11971020) of a + * space. If no audience is specified in the access setting, the space's + * access setting is updated to restricted. Warning: mutually exclusive with + * all other field paths.) + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/UploadAttachmentRequest.php b/AppsChat/src/Chat/V1/UploadAttachmentRequest.php new file mode 100644 index 000000000000..2afa91efd97d --- /dev/null +++ b/AppsChat/src/Chat/V1/UploadAttachmentRequest.php @@ -0,0 +1,105 @@ +google.chat.v1.UploadAttachmentRequest + */ +class UploadAttachmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the Chat space in which the attachment is + * uploaded. Format "spaces/{space}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The filename of the attachment, including the file extension. + * + * Generated from protobuf field string filename = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $filename = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the Chat space in which the attachment is + * uploaded. Format "spaces/{space}". + * @type string $filename + * Required. The filename of the attachment, including the file extension. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Attachment::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the Chat space in which the attachment is + * uploaded. Format "spaces/{space}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Resource name of the Chat space in which the attachment is + * uploaded. Format "spaces/{space}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The filename of the attachment, including the file extension. + * + * Generated from protobuf field string filename = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFilename() + { + return $this->filename; + } + + /** + * Required. The filename of the attachment, including the file extension. + * + * Generated from protobuf field string filename = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFilename($var) + { + GPBUtil::checkString($var, True); + $this->filename = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/UploadAttachmentResponse.php b/AppsChat/src/Chat/V1/UploadAttachmentResponse.php new file mode 100644 index 000000000000..942c71f0fe3b --- /dev/null +++ b/AppsChat/src/Chat/V1/UploadAttachmentResponse.php @@ -0,0 +1,77 @@ +google.chat.v1.UploadAttachmentResponse + */ +class UploadAttachmentResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Reference to the uploaded attachment. + * + * Generated from protobuf field .google.chat.v1.AttachmentDataRef attachment_data_ref = 1; + */ + protected $attachment_data_ref = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\AttachmentDataRef $attachment_data_ref + * Reference to the uploaded attachment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Attachment::initOnce(); + parent::__construct($data); + } + + /** + * Reference to the uploaded attachment. + * + * Generated from protobuf field .google.chat.v1.AttachmentDataRef attachment_data_ref = 1; + * @return \Google\Apps\Chat\V1\AttachmentDataRef|null + */ + public function getAttachmentDataRef() + { + return $this->attachment_data_ref; + } + + public function hasAttachmentDataRef() + { + return isset($this->attachment_data_ref); + } + + public function clearAttachmentDataRef() + { + unset($this->attachment_data_ref); + } + + /** + * Reference to the uploaded attachment. + * + * Generated from protobuf field .google.chat.v1.AttachmentDataRef attachment_data_ref = 1; + * @param \Google\Apps\Chat\V1\AttachmentDataRef $var + * @return $this + */ + public function setAttachmentDataRef($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\AttachmentDataRef::class); + $this->attachment_data_ref = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/User.php b/AppsChat/src/Chat/V1/User.php new file mode 100644 index 000000000000..87cb7134117f --- /dev/null +++ b/AppsChat/src/Chat/V1/User.php @@ -0,0 +1,275 @@ +google.chat.v1.User + */ +class User extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name for a Google Chat [user][google.chat.v1.User]. + * Format: `users/{user}`. `users/app` can be used as an alias for the calling + * app [bot][google.chat.v1.User.Type.BOT] user. + * For [human users][google.chat.v1.User.Type.HUMAN], `{user}` is the same + * user identifier as: + * - the `id` for the + * [Person](https://developers.google.com/people/api/rest/v1/people) in the + * People API. For example, `users/123456789` in Chat API represents the same + * person as the `123456789` Person profile ID in People API. + * - the `id` for a + * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) + * in the Admin SDK Directory API. + * - the user's email address can be used as an alias for `{user}` in API + * requests. For example, if the People API Person profile ID for + * `user@example.com` is `123456789`, you can use `users/user@example.com` as + * an alias to reference `users/123456789`. Only the canonical resource name + * (for example `users/123456789`) will be returned from the API. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The user's display name. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Unique identifier of the user's Google Workspace domain. + * + * Generated from protobuf field string domain_id = 6; + */ + protected $domain_id = ''; + /** + * User type. + * + * Generated from protobuf field .google.chat.v1.User.Type type = 5; + */ + protected $type = 0; + /** + * Output only. When `true`, the user is deleted or their profile is not + * visible. + * + * Generated from protobuf field bool is_anonymous = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $is_anonymous = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name for a Google Chat [user][google.chat.v1.User]. + * Format: `users/{user}`. `users/app` can be used as an alias for the calling + * app [bot][google.chat.v1.User.Type.BOT] user. + * For [human users][google.chat.v1.User.Type.HUMAN], `{user}` is the same + * user identifier as: + * - the `id` for the + * [Person](https://developers.google.com/people/api/rest/v1/people) in the + * People API. For example, `users/123456789` in Chat API represents the same + * person as the `123456789` Person profile ID in People API. + * - the `id` for a + * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) + * in the Admin SDK Directory API. + * - the user's email address can be used as an alias for `{user}` in API + * requests. For example, if the People API Person profile ID for + * `user@example.com` is `123456789`, you can use `users/user@example.com` as + * an alias to reference `users/123456789`. Only the canonical resource name + * (for example `users/123456789`) will be returned from the API. + * @type string $display_name + * Output only. The user's display name. + * @type string $domain_id + * Unique identifier of the user's Google Workspace domain. + * @type int $type + * User type. + * @type bool $is_anonymous + * Output only. When `true`, the user is deleted or their profile is not + * visible. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\User::initOnce(); + parent::__construct($data); + } + + /** + * Resource name for a Google Chat [user][google.chat.v1.User]. + * Format: `users/{user}`. `users/app` can be used as an alias for the calling + * app [bot][google.chat.v1.User.Type.BOT] user. + * For [human users][google.chat.v1.User.Type.HUMAN], `{user}` is the same + * user identifier as: + * - the `id` for the + * [Person](https://developers.google.com/people/api/rest/v1/people) in the + * People API. For example, `users/123456789` in Chat API represents the same + * person as the `123456789` Person profile ID in People API. + * - the `id` for a + * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) + * in the Admin SDK Directory API. + * - the user's email address can be used as an alias for `{user}` in API + * requests. For example, if the People API Person profile ID for + * `user@example.com` is `123456789`, you can use `users/user@example.com` as + * an alias to reference `users/123456789`. Only the canonical resource name + * (for example `users/123456789`) will be returned from the API. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name for a Google Chat [user][google.chat.v1.User]. + * Format: `users/{user}`. `users/app` can be used as an alias for the calling + * app [bot][google.chat.v1.User.Type.BOT] user. + * For [human users][google.chat.v1.User.Type.HUMAN], `{user}` is the same + * user identifier as: + * - the `id` for the + * [Person](https://developers.google.com/people/api/rest/v1/people) in the + * People API. For example, `users/123456789` in Chat API represents the same + * person as the `123456789` Person profile ID in People API. + * - the `id` for a + * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) + * in the Admin SDK Directory API. + * - the user's email address can be used as an alias for `{user}` in API + * requests. For example, if the People API Person profile ID for + * `user@example.com` is `123456789`, you can use `users/user@example.com` as + * an alias to reference `users/123456789`. Only the canonical resource name + * (for example `users/123456789`) will be returned from the API. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The user's display name. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. The user's display name. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Unique identifier of the user's Google Workspace domain. + * + * Generated from protobuf field string domain_id = 6; + * @return string + */ + public function getDomainId() + { + return $this->domain_id; + } + + /** + * Unique identifier of the user's Google Workspace domain. + * + * Generated from protobuf field string domain_id = 6; + * @param string $var + * @return $this + */ + public function setDomainId($var) + { + GPBUtil::checkString($var, True); + $this->domain_id = $var; + + return $this; + } + + /** + * User type. + * + * Generated from protobuf field .google.chat.v1.User.Type type = 5; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * User type. + * + * Generated from protobuf field .google.chat.v1.User.Type type = 5; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\User\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Output only. When `true`, the user is deleted or their profile is not + * visible. + * + * Generated from protobuf field bool is_anonymous = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getIsAnonymous() + { + return $this->is_anonymous; + } + + /** + * Output only. When `true`, the user is deleted or their profile is not + * visible. + * + * Generated from protobuf field bool is_anonymous = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setIsAnonymous($var) + { + GPBUtil::checkBool($var); + $this->is_anonymous = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/User/Type.php b/AppsChat/src/Chat/V1/User/Type.php new file mode 100644 index 000000000000..7d1767886f98 --- /dev/null +++ b/AppsChat/src/Chat/V1/User/Type.php @@ -0,0 +1,60 @@ +google.chat.v1.User.Type + */ +class Type +{ + /** + * Default value for the enum. DO NOT USE. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Human user. + * + * Generated from protobuf enum HUMAN = 1; + */ + const HUMAN = 1; + /** + * Chat app user. + * + * Generated from protobuf enum BOT = 2; + */ + const BOT = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::HUMAN => 'HUMAN', + self::BOT => 'BOT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Chat/V1/UserMentionMetadata.php b/AppsChat/src/Chat/V1/UserMentionMetadata.php new file mode 100644 index 000000000000..2ac7ee99c979 --- /dev/null +++ b/AppsChat/src/Chat/V1/UserMentionMetadata.php @@ -0,0 +1,111 @@ +google.chat.v1.UserMentionMetadata + */ +class UserMentionMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The user mentioned. + * + * Generated from protobuf field .google.chat.v1.User user = 1; + */ + protected $user = null; + /** + * The type of user mention. + * + * Generated from protobuf field .google.chat.v1.UserMentionMetadata.Type type = 2; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\User $user + * The user mentioned. + * @type int $type + * The type of user mention. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Annotation::initOnce(); + parent::__construct($data); + } + + /** + * The user mentioned. + * + * Generated from protobuf field .google.chat.v1.User user = 1; + * @return \Google\Apps\Chat\V1\User|null + */ + public function getUser() + { + return $this->user; + } + + public function hasUser() + { + return isset($this->user); + } + + public function clearUser() + { + unset($this->user); + } + + /** + * The user mentioned. + * + * Generated from protobuf field .google.chat.v1.User user = 1; + * @param \Google\Apps\Chat\V1\User $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\User::class); + $this->user = $var; + + return $this; + } + + /** + * The type of user mention. + * + * Generated from protobuf field .google.chat.v1.UserMentionMetadata.Type type = 2; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of user mention. + * + * Generated from protobuf field .google.chat.v1.UserMentionMetadata.Type type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\UserMentionMetadata\Type::class); + $this->type = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/UserMentionMetadata/Type.php b/AppsChat/src/Chat/V1/UserMentionMetadata/Type.php new file mode 100644 index 000000000000..d49e4e9330a3 --- /dev/null +++ b/AppsChat/src/Chat/V1/UserMentionMetadata/Type.php @@ -0,0 +1,60 @@ +google.chat.v1.UserMentionMetadata.Type + */ +class Type +{ + /** + * Default value for the enum. Don't use. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Add user to space. + * + * Generated from protobuf enum ADD = 1; + */ + const ADD = 1; + /** + * Mention user in space. + * + * Generated from protobuf enum MENTION = 2; + */ + const MENTION = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::ADD => 'ADD', + self::MENTION => 'MENTION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Chat/V1/WidgetMarkup.php b/AppsChat/src/Chat/V1/WidgetMarkup.php new file mode 100644 index 000000000000..e247cc73adae --- /dev/null +++ b/AppsChat/src/Chat/V1/WidgetMarkup.php @@ -0,0 +1,179 @@ +google.chat.v1.WidgetMarkup + */ +class WidgetMarkup extends \Google\Protobuf\Internal\Message +{ + /** + * A list of buttons. Buttons is also `oneof data` and only one of these + * fields should be set. + * + * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup.Button buttons = 6; + */ + private $buttons; + protected $data; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\WidgetMarkup\TextParagraph $text_paragraph + * Display a text paragraph in this widget. + * @type \Google\Apps\Chat\V1\WidgetMarkup\Image $image + * Display an image in this widget. + * @type \Google\Apps\Chat\V1\WidgetMarkup\KeyValue $key_value + * Display a key value item in this widget. + * @type array<\Google\Apps\Chat\V1\WidgetMarkup\Button>|\Google\Protobuf\Internal\RepeatedField $buttons + * A list of buttons. Buttons is also `oneof data` and only one of these + * fields should be set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); + parent::__construct($data); + } + + /** + * Display a text paragraph in this widget. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.TextParagraph text_paragraph = 1; + * @return \Google\Apps\Chat\V1\WidgetMarkup\TextParagraph|null + */ + public function getTextParagraph() + { + return $this->readOneof(1); + } + + public function hasTextParagraph() + { + return $this->hasOneof(1); + } + + /** + * Display a text paragraph in this widget. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.TextParagraph text_paragraph = 1; + * @param \Google\Apps\Chat\V1\WidgetMarkup\TextParagraph $var + * @return $this + */ + public function setTextParagraph($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\TextParagraph::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Display an image in this widget. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.Image image = 2; + * @return \Google\Apps\Chat\V1\WidgetMarkup\Image|null + */ + public function getImage() + { + return $this->readOneof(2); + } + + public function hasImage() + { + return $this->hasOneof(2); + } + + /** + * Display an image in this widget. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.Image image = 2; + * @param \Google\Apps\Chat\V1\WidgetMarkup\Image $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\Image::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Display a key value item in this widget. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.KeyValue key_value = 3; + * @return \Google\Apps\Chat\V1\WidgetMarkup\KeyValue|null + */ + public function getKeyValue() + { + return $this->readOneof(3); + } + + public function hasKeyValue() + { + return $this->hasOneof(3); + } + + /** + * Display a key value item in this widget. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.KeyValue key_value = 3; + * @param \Google\Apps\Chat\V1\WidgetMarkup\KeyValue $var + * @return $this + */ + public function setKeyValue($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\KeyValue::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A list of buttons. Buttons is also `oneof data` and only one of these + * fields should be set. + * + * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup.Button buttons = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getButtons() + { + return $this->buttons; + } + + /** + * A list of buttons. Buttons is also `oneof data` and only one of these + * fields should be set. + * + * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup.Button buttons = 6; + * @param array<\Google\Apps\Chat\V1\WidgetMarkup\Button>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setButtons($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\WidgetMarkup\Button::class); + $this->buttons = $arr; + + return $this; + } + + /** + * @return string + */ + public function getData() + { + return $this->whichOneof("data"); + } + +} + diff --git a/AppsChat/src/Chat/V1/WidgetMarkup/Button.php b/AppsChat/src/Chat/V1/WidgetMarkup/Button.php new file mode 100644 index 000000000000..1a89528a0894 --- /dev/null +++ b/AppsChat/src/Chat/V1/WidgetMarkup/Button.php @@ -0,0 +1,109 @@ +google.chat.v1.WidgetMarkup.Button + */ +class Button extends \Google\Protobuf\Internal\Message +{ + protected $type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\WidgetMarkup\TextButton $text_button + * A button with text and `onclick` action. + * @type \Google\Apps\Chat\V1\WidgetMarkup\ImageButton $image_button + * A button with image and `onclick` action. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); + parent::__construct($data); + } + + /** + * A button with text and `onclick` action. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.TextButton text_button = 1; + * @return \Google\Apps\Chat\V1\WidgetMarkup\TextButton|null + */ + public function getTextButton() + { + return $this->readOneof(1); + } + + public function hasTextButton() + { + return $this->hasOneof(1); + } + + /** + * A button with text and `onclick` action. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.TextButton text_button = 1; + * @param \Google\Apps\Chat\V1\WidgetMarkup\TextButton $var + * @return $this + */ + public function setTextButton($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\TextButton::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A button with image and `onclick` action. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.ImageButton image_button = 2; + * @return \Google\Apps\Chat\V1\WidgetMarkup\ImageButton|null + */ + public function getImageButton() + { + return $this->readOneof(2); + } + + public function hasImageButton() + { + return $this->hasOneof(2); + } + + /** + * A button with image and `onclick` action. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.ImageButton image_button = 2; + * @param \Google\Apps\Chat\V1\WidgetMarkup\ImageButton $var + * @return $this + */ + public function setImageButton($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\ImageButton::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getType() + { + return $this->whichOneof("type"); + } + +} + + diff --git a/AppsChat/src/Chat/V1/WidgetMarkup/FormAction.php b/AppsChat/src/Chat/V1/WidgetMarkup/FormAction.php new file mode 100644 index 000000000000..8d8e7aa7cebe --- /dev/null +++ b/AppsChat/src/Chat/V1/WidgetMarkup/FormAction.php @@ -0,0 +1,115 @@ +google.chat.v1.WidgetMarkup.FormAction + */ +class FormAction extends \Google\Protobuf\Internal\Message +{ + /** + * The method name is used to identify which part of the form triggered the + * form submission. This information is echoed back to the Chat app as part + * of the card click event. You can use the same method name for several + * elements that trigger a common behavior. + * + * Generated from protobuf field string action_method_name = 1; + */ + protected $action_method_name = ''; + /** + * List of action parameters. + * + * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup.FormAction.ActionParameter parameters = 2; + */ + private $parameters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $action_method_name + * The method name is used to identify which part of the form triggered the + * form submission. This information is echoed back to the Chat app as part + * of the card click event. You can use the same method name for several + * elements that trigger a common behavior. + * @type array<\Google\Apps\Chat\V1\WidgetMarkup\FormAction\ActionParameter>|\Google\Protobuf\Internal\RepeatedField $parameters + * List of action parameters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); + parent::__construct($data); + } + + /** + * The method name is used to identify which part of the form triggered the + * form submission. This information is echoed back to the Chat app as part + * of the card click event. You can use the same method name for several + * elements that trigger a common behavior. + * + * Generated from protobuf field string action_method_name = 1; + * @return string + */ + public function getActionMethodName() + { + return $this->action_method_name; + } + + /** + * The method name is used to identify which part of the form triggered the + * form submission. This information is echoed back to the Chat app as part + * of the card click event. You can use the same method name for several + * elements that trigger a common behavior. + * + * Generated from protobuf field string action_method_name = 1; + * @param string $var + * @return $this + */ + public function setActionMethodName($var) + { + GPBUtil::checkString($var, True); + $this->action_method_name = $var; + + return $this; + } + + /** + * List of action parameters. + * + * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup.FormAction.ActionParameter parameters = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getParameters() + { + return $this->parameters; + } + + /** + * List of action parameters. + * + * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup.FormAction.ActionParameter parameters = 2; + * @param array<\Google\Apps\Chat\V1\WidgetMarkup\FormAction\ActionParameter>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setParameters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\WidgetMarkup\FormAction\ActionParameter::class); + $this->parameters = $arr; + + return $this; + } + +} + + diff --git a/AppsChat/src/Chat/V1/WidgetMarkup/FormAction/ActionParameter.php b/AppsChat/src/Chat/V1/WidgetMarkup/FormAction/ActionParameter.php new file mode 100644 index 000000000000..2777a10e24c4 --- /dev/null +++ b/AppsChat/src/Chat/V1/WidgetMarkup/FormAction/ActionParameter.php @@ -0,0 +1,105 @@ +google.chat.v1.WidgetMarkup.FormAction.ActionParameter + */ +class ActionParameter extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the parameter for the action script. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * The value of the parameter. + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * The name of the parameter for the action script. + * @type string $value + * The value of the parameter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); + parent::__construct($data); + } + + /** + * The name of the parameter for the action script. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * The name of the parameter for the action script. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * The value of the parameter. + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The value of the parameter. + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + + diff --git a/AppsChat/src/Chat/V1/WidgetMarkup/Icon.php b/AppsChat/src/Chat/V1/WidgetMarkup/Icon.php new file mode 100644 index 000000000000..19bc217126ef --- /dev/null +++ b/AppsChat/src/Chat/V1/WidgetMarkup/Icon.php @@ -0,0 +1,196 @@ +google.chat.v1.WidgetMarkup.Icon + */ +class Icon +{ + /** + * Generated from protobuf enum ICON_UNSPECIFIED = 0; + */ + const ICON_UNSPECIFIED = 0; + /** + * Generated from protobuf enum AIRPLANE = 1; + */ + const AIRPLANE = 1; + /** + * Generated from protobuf enum BOOKMARK = 26; + */ + const BOOKMARK = 26; + /** + * Generated from protobuf enum BUS = 25; + */ + const BUS = 25; + /** + * Generated from protobuf enum CAR = 9; + */ + const CAR = 9; + /** + * Generated from protobuf enum CLOCK = 2; + */ + const CLOCK = 2; + /** + * Generated from protobuf enum CONFIRMATION_NUMBER_ICON = 12; + */ + const CONFIRMATION_NUMBER_ICON = 12; + /** + * Generated from protobuf enum DOLLAR = 14; + */ + const DOLLAR = 14; + /** + * Generated from protobuf enum DESCRIPTION = 27; + */ + const DESCRIPTION = 27; + /** + * Generated from protobuf enum EMAIL = 10; + */ + const EMAIL = 10; + /** + * Generated from protobuf enum EVENT_PERFORMER = 20; + */ + const EVENT_PERFORMER = 20; + /** + * Generated from protobuf enum EVENT_SEAT = 21; + */ + const EVENT_SEAT = 21; + /** + * Generated from protobuf enum FLIGHT_ARRIVAL = 16; + */ + const FLIGHT_ARRIVAL = 16; + /** + * Generated from protobuf enum FLIGHT_DEPARTURE = 15; + */ + const FLIGHT_DEPARTURE = 15; + /** + * Generated from protobuf enum HOTEL = 6; + */ + const HOTEL = 6; + /** + * Generated from protobuf enum HOTEL_ROOM_TYPE = 17; + */ + const HOTEL_ROOM_TYPE = 17; + /** + * Generated from protobuf enum INVITE = 19; + */ + const INVITE = 19; + /** + * Generated from protobuf enum MAP_PIN = 3; + */ + const MAP_PIN = 3; + /** + * Generated from protobuf enum MEMBERSHIP = 24; + */ + const MEMBERSHIP = 24; + /** + * Generated from protobuf enum MULTIPLE_PEOPLE = 18; + */ + const MULTIPLE_PEOPLE = 18; + /** + * Generated from protobuf enum OFFER = 30; + */ + const OFFER = 30; + /** + * Generated from protobuf enum PERSON = 11; + */ + const PERSON = 11; + /** + * Generated from protobuf enum PHONE = 13; + */ + const PHONE = 13; + /** + * Generated from protobuf enum RESTAURANT_ICON = 7; + */ + const RESTAURANT_ICON = 7; + /** + * Generated from protobuf enum SHOPPING_CART = 8; + */ + const SHOPPING_CART = 8; + /** + * Generated from protobuf enum STAR = 5; + */ + const STAR = 5; + /** + * Generated from protobuf enum STORE = 22; + */ + const STORE = 22; + /** + * Generated from protobuf enum TICKET = 4; + */ + const TICKET = 4; + /** + * Generated from protobuf enum TRAIN = 23; + */ + const TRAIN = 23; + /** + * Generated from protobuf enum VIDEO_CAMERA = 28; + */ + const VIDEO_CAMERA = 28; + /** + * Generated from protobuf enum VIDEO_PLAY = 29; + */ + const VIDEO_PLAY = 29; + + private static $valueToName = [ + self::ICON_UNSPECIFIED => 'ICON_UNSPECIFIED', + self::AIRPLANE => 'AIRPLANE', + self::BOOKMARK => 'BOOKMARK', + self::BUS => 'BUS', + self::CAR => 'CAR', + self::CLOCK => 'CLOCK', + self::CONFIRMATION_NUMBER_ICON => 'CONFIRMATION_NUMBER_ICON', + self::DOLLAR => 'DOLLAR', + self::DESCRIPTION => 'DESCRIPTION', + self::EMAIL => 'EMAIL', + self::EVENT_PERFORMER => 'EVENT_PERFORMER', + self::EVENT_SEAT => 'EVENT_SEAT', + self::FLIGHT_ARRIVAL => 'FLIGHT_ARRIVAL', + self::FLIGHT_DEPARTURE => 'FLIGHT_DEPARTURE', + self::HOTEL => 'HOTEL', + self::HOTEL_ROOM_TYPE => 'HOTEL_ROOM_TYPE', + self::INVITE => 'INVITE', + self::MAP_PIN => 'MAP_PIN', + self::MEMBERSHIP => 'MEMBERSHIP', + self::MULTIPLE_PEOPLE => 'MULTIPLE_PEOPLE', + self::OFFER => 'OFFER', + self::PERSON => 'PERSON', + self::PHONE => 'PHONE', + self::RESTAURANT_ICON => 'RESTAURANT_ICON', + self::SHOPPING_CART => 'SHOPPING_CART', + self::STAR => 'STAR', + self::STORE => 'STORE', + self::TICKET => 'TICKET', + self::TRAIN => 'TRAIN', + self::VIDEO_CAMERA => 'VIDEO_CAMERA', + self::VIDEO_PLAY => 'VIDEO_PLAY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/AppsChat/src/Chat/V1/WidgetMarkup/Image.php b/AppsChat/src/Chat/V1/WidgetMarkup/Image.php new file mode 100644 index 000000000000..e73d78caa4c1 --- /dev/null +++ b/AppsChat/src/Chat/V1/WidgetMarkup/Image.php @@ -0,0 +1,158 @@ +google.chat.v1.WidgetMarkup.Image + */ +class Image extends \Google\Protobuf\Internal\Message +{ + /** + * The URL of the image. + * + * Generated from protobuf field string image_url = 1; + */ + protected $image_url = ''; + /** + * The `onclick` action. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; + */ + protected $on_click = null; + /** + * The aspect ratio of this image (width and height). This field lets you + * reserve the right height for the image while waiting for it to load. + * It's not meant to override the built-in aspect ratio of the image. + * If unset, the server fills it by prefetching the image. + * + * Generated from protobuf field double aspect_ratio = 3; + */ + protected $aspect_ratio = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $image_url + * The URL of the image. + * @type \Google\Apps\Chat\V1\WidgetMarkup\OnClick $on_click + * The `onclick` action. + * @type float $aspect_ratio + * The aspect ratio of this image (width and height). This field lets you + * reserve the right height for the image while waiting for it to load. + * It's not meant to override the built-in aspect ratio of the image. + * If unset, the server fills it by prefetching the image. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); + parent::__construct($data); + } + + /** + * The URL of the image. + * + * Generated from protobuf field string image_url = 1; + * @return string + */ + public function getImageUrl() + { + return $this->image_url; + } + + /** + * The URL of the image. + * + * Generated from protobuf field string image_url = 1; + * @param string $var + * @return $this + */ + public function setImageUrl($var) + { + GPBUtil::checkString($var, True); + $this->image_url = $var; + + return $this; + } + + /** + * The `onclick` action. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; + * @return \Google\Apps\Chat\V1\WidgetMarkup\OnClick|null + */ + public function getOnClick() + { + return $this->on_click; + } + + public function hasOnClick() + { + return isset($this->on_click); + } + + public function clearOnClick() + { + unset($this->on_click); + } + + /** + * The `onclick` action. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; + * @param \Google\Apps\Chat\V1\WidgetMarkup\OnClick $var + * @return $this + */ + public function setOnClick($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\OnClick::class); + $this->on_click = $var; + + return $this; + } + + /** + * The aspect ratio of this image (width and height). This field lets you + * reserve the right height for the image while waiting for it to load. + * It's not meant to override the built-in aspect ratio of the image. + * If unset, the server fills it by prefetching the image. + * + * Generated from protobuf field double aspect_ratio = 3; + * @return float + */ + public function getAspectRatio() + { + return $this->aspect_ratio; + } + + /** + * The aspect ratio of this image (width and height). This field lets you + * reserve the right height for the image while waiting for it to load. + * It's not meant to override the built-in aspect ratio of the image. + * If unset, the server fills it by prefetching the image. + * + * Generated from protobuf field double aspect_ratio = 3; + * @param float $var + * @return $this + */ + public function setAspectRatio($var) + { + GPBUtil::checkDouble($var); + $this->aspect_ratio = $var; + + return $this; + } + +} + + diff --git a/AppsChat/src/Chat/V1/WidgetMarkup/ImageButton.php b/AppsChat/src/Chat/V1/WidgetMarkup/ImageButton.php new file mode 100644 index 000000000000..b53e4aafde23 --- /dev/null +++ b/AppsChat/src/Chat/V1/WidgetMarkup/ImageButton.php @@ -0,0 +1,194 @@ +google.chat.v1.WidgetMarkup.ImageButton + */ +class ImageButton extends \Google\Protobuf\Internal\Message +{ + /** + * The `onclick` action. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; + */ + protected $on_click = null; + /** + * The name of this `image_button` that's used for accessibility. + * Default value is provided if this name isn't specified. + * + * Generated from protobuf field string name = 4; + */ + protected $name = ''; + protected $icons; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $icon + * The icon specified by an `enum` that indices to an icon provided by + * Chat API. + * @type string $icon_url + * The icon specified by a URL. + * @type \Google\Apps\Chat\V1\WidgetMarkup\OnClick $on_click + * The `onclick` action. + * @type string $name + * The name of this `image_button` that's used for accessibility. + * Default value is provided if this name isn't specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); + parent::__construct($data); + } + + /** + * The icon specified by an `enum` that indices to an icon provided by + * Chat API. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.Icon icon = 1; + * @return int + */ + public function getIcon() + { + return $this->readOneof(1); + } + + public function hasIcon() + { + return $this->hasOneof(1); + } + + /** + * The icon specified by an `enum` that indices to an icon provided by + * Chat API. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.Icon icon = 1; + * @param int $var + * @return $this + */ + public function setIcon($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\WidgetMarkup\Icon::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The icon specified by a URL. + * + * Generated from protobuf field string icon_url = 3; + * @return string + */ + public function getIconUrl() + { + return $this->readOneof(3); + } + + public function hasIconUrl() + { + return $this->hasOneof(3); + } + + /** + * The icon specified by a URL. + * + * Generated from protobuf field string icon_url = 3; + * @param string $var + * @return $this + */ + public function setIconUrl($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The `onclick` action. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; + * @return \Google\Apps\Chat\V1\WidgetMarkup\OnClick|null + */ + public function getOnClick() + { + return $this->on_click; + } + + public function hasOnClick() + { + return isset($this->on_click); + } + + public function clearOnClick() + { + unset($this->on_click); + } + + /** + * The `onclick` action. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; + * @param \Google\Apps\Chat\V1\WidgetMarkup\OnClick $var + * @return $this + */ + public function setOnClick($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\OnClick::class); + $this->on_click = $var; + + return $this; + } + + /** + * The name of this `image_button` that's used for accessibility. + * Default value is provided if this name isn't specified. + * + * Generated from protobuf field string name = 4; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of this `image_button` that's used for accessibility. + * Default value is provided if this name isn't specified. + * + * Generated from protobuf field string name = 4; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * @return string + */ + public function getIcons() + { + return $this->whichOneof("icons"); + } + +} + + diff --git a/AppsChat/src/Chat/V1/WidgetMarkup/KeyValue.php b/AppsChat/src/Chat/V1/WidgetMarkup/KeyValue.php new file mode 100644 index 000000000000..61aa4b92e409 --- /dev/null +++ b/AppsChat/src/Chat/V1/WidgetMarkup/KeyValue.php @@ -0,0 +1,423 @@ +google.chat.v1.WidgetMarkup.KeyValue + */ +class KeyValue extends \Google\Protobuf\Internal\Message +{ + /** + * The text of the top label. Formatted text supported. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string top_label = 3; + */ + protected $top_label = ''; + /** + * The text of the content. Formatted text supported and always required. + * For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string content = 4; + */ + protected $content = ''; + /** + * If the content should be multiline. + * + * Generated from protobuf field bool content_multiline = 9; + */ + protected $content_multiline = false; + /** + * The text of the bottom label. Formatted text supported. For more + * information about formatting text, see [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string bottom_label = 5; + */ + protected $bottom_label = ''; + /** + * The `onclick` action. Only the top label, bottom label, and content + * region are clickable. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 6; + */ + protected $on_click = null; + protected $icons; + protected $control; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $icon + * An enum value that's replaced by the Chat API with the + * corresponding icon image. + * @type string $icon_url + * The icon specified by a URL. + * @type string $top_label + * The text of the top label. Formatted text supported. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * @type string $content + * The text of the content. Formatted text supported and always required. + * For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * @type bool $content_multiline + * If the content should be multiline. + * @type string $bottom_label + * The text of the bottom label. Formatted text supported. For more + * information about formatting text, see [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * @type \Google\Apps\Chat\V1\WidgetMarkup\OnClick $on_click + * The `onclick` action. Only the top label, bottom label, and content + * region are clickable. + * @type \Google\Apps\Chat\V1\WidgetMarkup\Button $button + * A button that can be clicked to trigger an action. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); + parent::__construct($data); + } + + /** + * An enum value that's replaced by the Chat API with the + * corresponding icon image. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.Icon icon = 1; + * @return int + */ + public function getIcon() + { + return $this->readOneof(1); + } + + public function hasIcon() + { + return $this->hasOneof(1); + } + + /** + * An enum value that's replaced by the Chat API with the + * corresponding icon image. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.Icon icon = 1; + * @param int $var + * @return $this + */ + public function setIcon($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\WidgetMarkup\Icon::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The icon specified by a URL. + * + * Generated from protobuf field string icon_url = 2; + * @return string + */ + public function getIconUrl() + { + return $this->readOneof(2); + } + + public function hasIconUrl() + { + return $this->hasOneof(2); + } + + /** + * The icon specified by a URL. + * + * Generated from protobuf field string icon_url = 2; + * @param string $var + * @return $this + */ + public function setIconUrl($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The text of the top label. Formatted text supported. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string top_label = 3; + * @return string + */ + public function getTopLabel() + { + return $this->top_label; + } + + /** + * The text of the top label. Formatted text supported. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string top_label = 3; + * @param string $var + * @return $this + */ + public function setTopLabel($var) + { + GPBUtil::checkString($var, True); + $this->top_label = $var; + + return $this; + } + + /** + * The text of the content. Formatted text supported and always required. + * For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string content = 4; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * The text of the content. Formatted text supported and always required. + * For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string content = 4; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, True); + $this->content = $var; + + return $this; + } + + /** + * If the content should be multiline. + * + * Generated from protobuf field bool content_multiline = 9; + * @return bool + */ + public function getContentMultiline() + { + return $this->content_multiline; + } + + /** + * If the content should be multiline. + * + * Generated from protobuf field bool content_multiline = 9; + * @param bool $var + * @return $this + */ + public function setContentMultiline($var) + { + GPBUtil::checkBool($var); + $this->content_multiline = $var; + + return $this; + } + + /** + * The text of the bottom label. Formatted text supported. For more + * information about formatting text, see [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string bottom_label = 5; + * @return string + */ + public function getBottomLabel() + { + return $this->bottom_label; + } + + /** + * The text of the bottom label. Formatted text supported. For more + * information about formatting text, see [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string bottom_label = 5; + * @param string $var + * @return $this + */ + public function setBottomLabel($var) + { + GPBUtil::checkString($var, True); + $this->bottom_label = $var; + + return $this; + } + + /** + * The `onclick` action. Only the top label, bottom label, and content + * region are clickable. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 6; + * @return \Google\Apps\Chat\V1\WidgetMarkup\OnClick|null + */ + public function getOnClick() + { + return $this->on_click; + } + + public function hasOnClick() + { + return isset($this->on_click); + } + + public function clearOnClick() + { + unset($this->on_click); + } + + /** + * The `onclick` action. Only the top label, bottom label, and content + * region are clickable. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 6; + * @param \Google\Apps\Chat\V1\WidgetMarkup\OnClick $var + * @return $this + */ + public function setOnClick($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\OnClick::class); + $this->on_click = $var; + + return $this; + } + + /** + * A button that can be clicked to trigger an action. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.Button button = 7; + * @return \Google\Apps\Chat\V1\WidgetMarkup\Button|null + */ + public function getButton() + { + return $this->readOneof(7); + } + + public function hasButton() + { + return $this->hasOneof(7); + } + + /** + * A button that can be clicked to trigger an action. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.Button button = 7; + * @param \Google\Apps\Chat\V1\WidgetMarkup\Button $var + * @return $this + */ + public function setButton($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\Button::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * @return string + */ + public function getIcons() + { + return $this->whichOneof("icons"); + } + + /** + * @return string + */ + public function getControl() + { + return $this->whichOneof("control"); + } + +} + + diff --git a/AppsChat/src/Chat/V1/WidgetMarkup/OnClick.php b/AppsChat/src/Chat/V1/WidgetMarkup/OnClick.php new file mode 100644 index 000000000000..12acdb4d9ed7 --- /dev/null +++ b/AppsChat/src/Chat/V1/WidgetMarkup/OnClick.php @@ -0,0 +1,109 @@ +google.chat.v1.WidgetMarkup.OnClick + */ +class OnClick extends \Google\Protobuf\Internal\Message +{ + protected $data; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\WidgetMarkup\FormAction $action + * A form action is triggered by this `onclick` action if specified. + * @type \Google\Apps\Chat\V1\WidgetMarkup\OpenLink $open_link + * This `onclick` action triggers an open link action if specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); + parent::__construct($data); + } + + /** + * A form action is triggered by this `onclick` action if specified. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.FormAction action = 1; + * @return \Google\Apps\Chat\V1\WidgetMarkup\FormAction|null + */ + public function getAction() + { + return $this->readOneof(1); + } + + public function hasAction() + { + return $this->hasOneof(1); + } + + /** + * A form action is triggered by this `onclick` action if specified. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.FormAction action = 1; + * @param \Google\Apps\Chat\V1\WidgetMarkup\FormAction $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\FormAction::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * This `onclick` action triggers an open link action if specified. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OpenLink open_link = 2; + * @return \Google\Apps\Chat\V1\WidgetMarkup\OpenLink|null + */ + public function getOpenLink() + { + return $this->readOneof(2); + } + + public function hasOpenLink() + { + return $this->hasOneof(2); + } + + /** + * This `onclick` action triggers an open link action if specified. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OpenLink open_link = 2; + * @param \Google\Apps\Chat\V1\WidgetMarkup\OpenLink $var + * @return $this + */ + public function setOpenLink($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\OpenLink::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getData() + { + return $this->whichOneof("data"); + } + +} + + diff --git a/AppsChat/src/Chat/V1/WidgetMarkup/OpenLink.php b/AppsChat/src/Chat/V1/WidgetMarkup/OpenLink.php new file mode 100644 index 000000000000..3f7fca309f7d --- /dev/null +++ b/AppsChat/src/Chat/V1/WidgetMarkup/OpenLink.php @@ -0,0 +1,68 @@ +google.chat.v1.WidgetMarkup.OpenLink + */ +class OpenLink extends \Google\Protobuf\Internal\Message +{ + /** + * The URL to open. + * + * Generated from protobuf field string url = 1; + */ + protected $url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * The URL to open. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); + parent::__construct($data); + } + + /** + * The URL to open. + * + * Generated from protobuf field string url = 1; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * The URL to open. + * + * Generated from protobuf field string url = 1; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + +} + + diff --git a/AppsChat/src/Chat/V1/WidgetMarkup/TextButton.php b/AppsChat/src/Chat/V1/WidgetMarkup/TextButton.php new file mode 100644 index 000000000000..7a6b10d65b94 --- /dev/null +++ b/AppsChat/src/Chat/V1/WidgetMarkup/TextButton.php @@ -0,0 +1,112 @@ +google.chat.v1.WidgetMarkup.TextButton + */ +class TextButton extends \Google\Protobuf\Internal\Message +{ + /** + * The text of the button. + * + * Generated from protobuf field string text = 1; + */ + protected $text = ''; + /** + * The `onclick` action of the button. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; + */ + protected $on_click = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * The text of the button. + * @type \Google\Apps\Chat\V1\WidgetMarkup\OnClick $on_click + * The `onclick` action of the button. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); + parent::__construct($data); + } + + /** + * The text of the button. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * The text of the button. + * + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * The `onclick` action of the button. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; + * @return \Google\Apps\Chat\V1\WidgetMarkup\OnClick|null + */ + public function getOnClick() + { + return $this->on_click; + } + + public function hasOnClick() + { + return isset($this->on_click); + } + + public function clearOnClick() + { + unset($this->on_click); + } + + /** + * The `onclick` action of the button. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; + * @param \Google\Apps\Chat\V1\WidgetMarkup\OnClick $var + * @return $this + */ + public function setOnClick($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\OnClick::class); + $this->on_click = $var; + + return $this; + } + +} + + diff --git a/AppsChat/src/Chat/V1/WidgetMarkup/TextParagraph.php b/AppsChat/src/Chat/V1/WidgetMarkup/TextParagraph.php new file mode 100644 index 000000000000..3c124c0da7a8 --- /dev/null +++ b/AppsChat/src/Chat/V1/WidgetMarkup/TextParagraph.php @@ -0,0 +1,68 @@ +google.chat.v1.WidgetMarkup.TextParagraph + */ +class TextParagraph extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string text = 1; + */ + protected $text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + +} + + diff --git a/AppsChat/src/Chat/V1/gapic_metadata.json b/AppsChat/src/Chat/V1/gapic_metadata.json new file mode 100644 index 000000000000..8d2fed5a4092 --- /dev/null +++ b/AppsChat/src/Chat/V1/gapic_metadata.json @@ -0,0 +1,128 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.chat.v1", + "libraryPackage": "Google\\Apps\\Chat\\V1", + "services": { + "ChatService": { + "clients": { + "grpc": { + "libraryClient": "ChatServiceGapicClient", + "rpcs": { + "CompleteImportSpace": { + "methods": [ + "completeImportSpace" + ] + }, + "CreateMembership": { + "methods": [ + "createMembership" + ] + }, + "CreateMessage": { + "methods": [ + "createMessage" + ] + }, + "CreateReaction": { + "methods": [ + "createReaction" + ] + }, + "CreateSpace": { + "methods": [ + "createSpace" + ] + }, + "DeleteMembership": { + "methods": [ + "deleteMembership" + ] + }, + "DeleteMessage": { + "methods": [ + "deleteMessage" + ] + }, + "DeleteReaction": { + "methods": [ + "deleteReaction" + ] + }, + "DeleteSpace": { + "methods": [ + "deleteSpace" + ] + }, + "FindDirectMessage": { + "methods": [ + "findDirectMessage" + ] + }, + "GetAttachment": { + "methods": [ + "getAttachment" + ] + }, + "GetMembership": { + "methods": [ + "getMembership" + ] + }, + "GetMessage": { + "methods": [ + "getMessage" + ] + }, + "GetSpace": { + "methods": [ + "getSpace" + ] + }, + "ListMemberships": { + "methods": [ + "listMemberships" + ] + }, + "ListMessages": { + "methods": [ + "listMessages" + ] + }, + "ListReactions": { + "methods": [ + "listReactions" + ] + }, + "ListSpaces": { + "methods": [ + "listSpaces" + ] + }, + "SetUpSpace": { + "methods": [ + "setUpSpace" + ] + }, + "UpdateMessage": { + "methods": [ + "updateMessage" + ] + }, + "UpdateSpace": { + "methods": [ + "updateSpace" + ] + }, + "UploadAttachment": { + "methods": [ + "uploadAttachment" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/AppsChat/src/Chat/V1/resources/chat_service_client_config.json b/AppsChat/src/Chat/V1/resources/chat_service_client_config.json new file mode 100644 index 000000000000..dfc25d11fb1d --- /dev/null +++ b/AppsChat/src/Chat/V1/resources/chat_service_client_config.json @@ -0,0 +1,144 @@ +{ + "interfaces": { + "google.chat.v1.ChatService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + } + }, + "methods": { + "CompleteImportSpace": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateMembership": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateMessage": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateReaction": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateSpace": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteMembership": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteMessage": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteReaction": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteSpace": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "FindDirectMessage": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetAttachment": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetMembership": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetMessage": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetSpace": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListMemberships": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListMessages": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListReactions": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListSpaces": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SetUpSpace": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateMessage": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateSpace": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UploadAttachment": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/AppsChat/src/Chat/V1/resources/chat_service_descriptor_config.php b/AppsChat/src/Chat/V1/resources/chat_service_descriptor_config.php new file mode 100644 index 000000000000..9e77fdd75081 --- /dev/null +++ b/AppsChat/src/Chat/V1/resources/chat_service_descriptor_config.php @@ -0,0 +1,303 @@ + [ + 'google.chat.v1.ChatService' => [ + 'CompleteImportSpace' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\CompleteImportSpaceResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateMembership' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Membership', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateMessage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Message', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateReaction' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Reaction', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSpace' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Space', + ], + 'DeleteMembership' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Membership', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMessage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteReaction' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSpace' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'FindDirectMessage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Space', + ], + 'GetAttachment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Attachment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetMembership' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Membership', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetMessage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Message', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSpace' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Space', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListMemberships' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getMemberships', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Apps\Chat\V1\ListMembershipsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListMessages' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getMessages', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Apps\Chat\V1\ListMessagesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListReactions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getReactions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Apps\Chat\V1\ListReactionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSpaces' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSpaces', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Apps\Chat\V1\ListSpacesResponse', + ], + 'SetUpSpace' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Space', + ], + 'UpdateMessage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Message', + 'headerParams' => [ + [ + 'keyName' => 'message.name', + 'fieldAccessors' => [ + 'getMessage', + 'getName', + ], + ], + ], + ], + 'UpdateSpace' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Space', + 'headerParams' => [ + [ + 'keyName' => 'space.name', + 'fieldAccessors' => [ + 'getSpace', + 'getName', + ], + ], + ], + ], + 'UploadAttachment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\UploadAttachmentResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'attachment' => 'spaces/{space}/messages/{message}/attachments/{attachment}', + 'membership' => 'spaces/{space}/members/{member}', + 'message' => 'spaces/{space}/messages/{message}', + 'quotedMessageMetadata' => 'spaces/{space}/messages/{message}/quotedMessageMetadata/{quoted_message_metadata}', + 'reaction' => 'spaces/{space}/messages/{message}/reactions/{reaction}', + 'space' => 'spaces/{space}', + 'thread' => 'spaces/{space}/threads/{thread}', + ], + ], + ], +]; diff --git a/AppsChat/src/Chat/V1/resources/chat_service_rest_client_config.php b/AppsChat/src/Chat/V1/resources/chat_service_rest_client_config.php new file mode 100644 index 000000000000..591234af557b --- /dev/null +++ b/AppsChat/src/Chat/V1/resources/chat_service_rest_client_config.php @@ -0,0 +1,261 @@ + [ + 'google.chat.v1.ChatService' => [ + 'CompleteImportSpace' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=spaces/*}:completeImport', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateMembership' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=spaces/*}/members', + 'body' => 'membership', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateMessage' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=spaces/*}/messages', + 'body' => 'message', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateReaction' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=spaces/*/messages/*}/reactions', + 'body' => 'reaction', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSpace' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/spaces', + 'body' => 'space', + ], + 'DeleteMembership' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=spaces/*/members/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMessage' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=spaces/*/messages/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteReaction' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=spaces/*/messages/*/reactions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSpace' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=spaces/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'FindDirectMessage' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/spaces:findDirectMessage', + ], + 'GetAttachment' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=spaces/*/messages/*/attachments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetMembership' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=spaces/*/members/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetMessage' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=spaces/*/messages/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSpace' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=spaces/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListMemberships' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=spaces/*}/members', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListMessages' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=spaces/*}/messages', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListReactions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=spaces/*/messages/*}/reactions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListSpaces' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/spaces', + ], + 'SetUpSpace' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/spaces:setup', + 'body' => '*', + ], + 'UpdateMessage' => [ + 'method' => 'put', + 'uriTemplate' => '/v1/{message.name=spaces/*/messages/*}', + 'body' => 'message', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{message.name=spaces/*/messages/*}', + 'body' => 'message', + ], + ], + 'placeholders' => [ + 'message.name' => [ + 'getters' => [ + 'getMessage', + 'getName', + ], + ], + ], + ], + 'UpdateSpace' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{space.name=spaces/*}', + 'body' => 'space', + 'placeholders' => [ + 'space.name' => [ + 'getters' => [ + 'getSpace', + 'getName', + ], + ], + ], + ], + 'UploadAttachment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=spaces/*}/attachments:upload', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AppsChat/tests/Unit/V1/Client/ChatServiceClientTest.php b/AppsChat/tests/Unit/V1/Client/ChatServiceClientTest.php new file mode 100644 index 000000000000..39b216d86be8 --- /dev/null +++ b/AppsChat/tests/Unit/V1/Client/ChatServiceClientTest.php @@ -0,0 +1,1677 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return ChatServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ChatServiceClient($options); + } + + /** @test */ + public function completeImportSpaceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new CompleteImportSpaceResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->spaceName('[SPACE]'); + $request = (new CompleteImportSpaceRequest())->setName($formattedName); + $response = $gapicClient->completeImportSpace($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/CompleteImportSpace', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function completeImportSpaceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->spaceName('[SPACE]'); + $request = (new CompleteImportSpaceRequest())->setName($formattedName); + try { + $gapicClient->completeImportSpace($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createMembershipTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Membership(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->spaceName('[SPACE]'); + $membership = new Membership(); + $request = (new CreateMembershipRequest())->setParent($formattedParent)->setMembership($membership); + $response = $gapicClient->createMembership($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/CreateMembership', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getMembership(); + $this->assertProtobufEquals($membership, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createMembershipExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->spaceName('[SPACE]'); + $membership = new Membership(); + $request = (new CreateMembershipRequest())->setParent($formattedParent)->setMembership($membership); + try { + $gapicClient->createMembership($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createMessageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $text = 'text3556653'; + $formattedText = 'formattedText-1686936880'; + $fallbackText = 'fallbackText563106922'; + $argumentText = 'argumentText-39826065'; + $threadReply = false; + $clientAssignedMessageId = 'clientAssignedMessageId-1116632848'; + $expectedResponse = new Message(); + $expectedResponse->setName($name); + $expectedResponse->setText($text); + $expectedResponse->setFormattedText($formattedText); + $expectedResponse->setFallbackText($fallbackText); + $expectedResponse->setArgumentText($argumentText); + $expectedResponse->setThreadReply($threadReply); + $expectedResponse->setClientAssignedMessageId($clientAssignedMessageId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->spaceName('[SPACE]'); + $message = new Message(); + $request = (new CreateMessageRequest())->setParent($formattedParent)->setMessage($message); + $response = $gapicClient->createMessage($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/CreateMessage', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getMessage(); + $this->assertProtobufEquals($message, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createMessageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->spaceName('[SPACE]'); + $message = new Message(); + $request = (new CreateMessageRequest())->setParent($formattedParent)->setMessage($message); + try { + $gapicClient->createMessage($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createReactionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Reaction(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->messageName('[SPACE]', '[MESSAGE]'); + $reaction = new Reaction(); + $request = (new CreateReactionRequest())->setParent($formattedParent)->setReaction($reaction); + $response = $gapicClient->createReaction($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/CreateReaction', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getReaction(); + $this->assertProtobufEquals($reaction, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createReactionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->messageName('[SPACE]', '[MESSAGE]'); + $reaction = new Reaction(); + $request = (new CreateReactionRequest())->setParent($formattedParent)->setReaction($reaction); + try { + $gapicClient->createReaction($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSpaceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $singleUserBotDm = true; + $threaded = false; + $displayName = 'displayName1615086568'; + $externalUserAllowed = true; + $importMode = false; + $adminInstalled = true; + $expectedResponse = new Space(); + $expectedResponse->setName($name); + $expectedResponse->setSingleUserBotDm($singleUserBotDm); + $expectedResponse->setThreaded($threaded); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setExternalUserAllowed($externalUserAllowed); + $expectedResponse->setImportMode($importMode); + $expectedResponse->setAdminInstalled($adminInstalled); + $transport->addResponse($expectedResponse); + // Mock request + $space = new Space(); + $request = (new CreateSpaceRequest())->setSpace($space); + $response = $gapicClient->createSpace($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/CreateSpace', $actualFuncCall); + $actualValue = $actualRequestObject->getSpace(); + $this->assertProtobufEquals($space, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSpaceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $space = new Space(); + $request = (new CreateSpaceRequest())->setSpace($space); + try { + $gapicClient->createSpace($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteMembershipTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Membership(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->membershipName('[SPACE]', '[MEMBER]'); + $request = (new DeleteMembershipRequest())->setName($formattedName); + $response = $gapicClient->deleteMembership($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/DeleteMembership', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteMembershipExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->membershipName('[SPACE]', '[MEMBER]'); + $request = (new DeleteMembershipRequest())->setName($formattedName); + try { + $gapicClient->deleteMembership($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteMessageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->messageName('[SPACE]', '[MESSAGE]'); + $request = (new DeleteMessageRequest())->setName($formattedName); + $gapicClient->deleteMessage($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/DeleteMessage', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteMessageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->messageName('[SPACE]', '[MESSAGE]'); + $request = (new DeleteMessageRequest())->setName($formattedName); + try { + $gapicClient->deleteMessage($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteReactionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->reactionName('[SPACE]', '[MESSAGE]', '[REACTION]'); + $request = (new DeleteReactionRequest())->setName($formattedName); + $gapicClient->deleteReaction($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/DeleteReaction', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteReactionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->reactionName('[SPACE]', '[MESSAGE]', '[REACTION]'); + $request = (new DeleteReactionRequest())->setName($formattedName); + try { + $gapicClient->deleteReaction($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSpaceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->spaceName('[SPACE]'); + $request = (new DeleteSpaceRequest())->setName($formattedName); + $gapicClient->deleteSpace($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/DeleteSpace', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSpaceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->spaceName('[SPACE]'); + $request = (new DeleteSpaceRequest())->setName($formattedName); + try { + $gapicClient->deleteSpace($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function findDirectMessageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $singleUserBotDm = true; + $threaded = false; + $displayName = 'displayName1615086568'; + $externalUserAllowed = true; + $importMode = false; + $adminInstalled = true; + $expectedResponse = new Space(); + $expectedResponse->setName($name2); + $expectedResponse->setSingleUserBotDm($singleUserBotDm); + $expectedResponse->setThreaded($threaded); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setExternalUserAllowed($externalUserAllowed); + $expectedResponse->setImportMode($importMode); + $expectedResponse->setAdminInstalled($adminInstalled); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $request = (new FindDirectMessageRequest())->setName($name); + $response = $gapicClient->findDirectMessage($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/FindDirectMessage', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function findDirectMessageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new FindDirectMessageRequest())->setName($name); + try { + $gapicClient->findDirectMessage($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAttachmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $contentName = 'contentName831644305'; + $contentType = 'contentType831846208'; + $thumbnailUri = 'thumbnailUri1825632153'; + $downloadUri = 'downloadUri1109408053'; + $expectedResponse = new Attachment(); + $expectedResponse->setName($name2); + $expectedResponse->setContentName($contentName); + $expectedResponse->setContentType($contentType); + $expectedResponse->setThumbnailUri($thumbnailUri); + $expectedResponse->setDownloadUri($downloadUri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->attachmentName('[SPACE]', '[MESSAGE]', '[ATTACHMENT]'); + $request = (new GetAttachmentRequest())->setName($formattedName); + $response = $gapicClient->getAttachment($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/GetAttachment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAttachmentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->attachmentName('[SPACE]', '[MESSAGE]', '[ATTACHMENT]'); + $request = (new GetAttachmentRequest())->setName($formattedName); + try { + $gapicClient->getAttachment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMembershipTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Membership(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->membershipName('[SPACE]', '[MEMBER]'); + $request = (new GetMembershipRequest())->setName($formattedName); + $response = $gapicClient->getMembership($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/GetMembership', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMembershipExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->membershipName('[SPACE]', '[MEMBER]'); + $request = (new GetMembershipRequest())->setName($formattedName); + try { + $gapicClient->getMembership($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMessageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $text = 'text3556653'; + $formattedText = 'formattedText-1686936880'; + $fallbackText = 'fallbackText563106922'; + $argumentText = 'argumentText-39826065'; + $threadReply = false; + $clientAssignedMessageId = 'clientAssignedMessageId-1116632848'; + $expectedResponse = new Message(); + $expectedResponse->setName($name2); + $expectedResponse->setText($text); + $expectedResponse->setFormattedText($formattedText); + $expectedResponse->setFallbackText($fallbackText); + $expectedResponse->setArgumentText($argumentText); + $expectedResponse->setThreadReply($threadReply); + $expectedResponse->setClientAssignedMessageId($clientAssignedMessageId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->messageName('[SPACE]', '[MESSAGE]'); + $request = (new GetMessageRequest())->setName($formattedName); + $response = $gapicClient->getMessage($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/GetMessage', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMessageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->messageName('[SPACE]', '[MESSAGE]'); + $request = (new GetMessageRequest())->setName($formattedName); + try { + $gapicClient->getMessage($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSpaceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $singleUserBotDm = true; + $threaded = false; + $displayName = 'displayName1615086568'; + $externalUserAllowed = true; + $importMode = false; + $adminInstalled = true; + $expectedResponse = new Space(); + $expectedResponse->setName($name2); + $expectedResponse->setSingleUserBotDm($singleUserBotDm); + $expectedResponse->setThreaded($threaded); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setExternalUserAllowed($externalUserAllowed); + $expectedResponse->setImportMode($importMode); + $expectedResponse->setAdminInstalled($adminInstalled); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->spaceName('[SPACE]'); + $request = (new GetSpaceRequest())->setName($formattedName); + $response = $gapicClient->getSpace($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/GetSpace', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSpaceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->spaceName('[SPACE]'); + $request = (new GetSpaceRequest())->setName($formattedName); + try { + $gapicClient->getSpace($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMembershipsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $membershipsElement = new Membership(); + $memberships = [$membershipsElement]; + $expectedResponse = new ListMembershipsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setMemberships($memberships); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->spaceName('[SPACE]'); + $request = (new ListMembershipsRequest())->setParent($formattedParent); + $response = $gapicClient->listMemberships($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMemberships()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/ListMemberships', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMembershipsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->spaceName('[SPACE]'); + $request = (new ListMembershipsRequest())->setParent($formattedParent); + try { + $gapicClient->listMemberships($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMessagesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $messagesElement = new Message(); + $messages = [$messagesElement]; + $expectedResponse = new ListMessagesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setMessages($messages); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->spaceName('[SPACE]'); + $request = (new ListMessagesRequest())->setParent($formattedParent); + $response = $gapicClient->listMessages($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMessages()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/ListMessages', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMessagesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->spaceName('[SPACE]'); + $request = (new ListMessagesRequest())->setParent($formattedParent); + try { + $gapicClient->listMessages($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReactionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $reactionsElement = new Reaction(); + $reactions = [$reactionsElement]; + $expectedResponse = new ListReactionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setReactions($reactions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->messageName('[SPACE]', '[MESSAGE]'); + $request = (new ListReactionsRequest())->setParent($formattedParent); + $response = $gapicClient->listReactions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getReactions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/ListReactions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReactionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->messageName('[SPACE]', '[MESSAGE]'); + $request = (new ListReactionsRequest())->setParent($formattedParent); + try { + $gapicClient->listReactions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSpacesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $spacesElement = new Space(); + $spaces = [$spacesElement]; + $expectedResponse = new ListSpacesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSpaces($spaces); + $transport->addResponse($expectedResponse); + $request = new ListSpacesRequest(); + $response = $gapicClient->listSpaces($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSpaces()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/ListSpaces', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSpacesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + $request = new ListSpacesRequest(); + try { + $gapicClient->listSpaces($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setUpSpaceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $singleUserBotDm = true; + $threaded = false; + $displayName = 'displayName1615086568'; + $externalUserAllowed = true; + $importMode = false; + $adminInstalled = true; + $expectedResponse = new Space(); + $expectedResponse->setName($name); + $expectedResponse->setSingleUserBotDm($singleUserBotDm); + $expectedResponse->setThreaded($threaded); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setExternalUserAllowed($externalUserAllowed); + $expectedResponse->setImportMode($importMode); + $expectedResponse->setAdminInstalled($adminInstalled); + $transport->addResponse($expectedResponse); + // Mock request + $space = new Space(); + $request = (new SetUpSpaceRequest())->setSpace($space); + $response = $gapicClient->setUpSpace($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/SetUpSpace', $actualFuncCall); + $actualValue = $actualRequestObject->getSpace(); + $this->assertProtobufEquals($space, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setUpSpaceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $space = new Space(); + $request = (new SetUpSpaceRequest())->setSpace($space); + try { + $gapicClient->setUpSpace($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateMessageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $text = 'text3556653'; + $formattedText = 'formattedText-1686936880'; + $fallbackText = 'fallbackText563106922'; + $argumentText = 'argumentText-39826065'; + $threadReply = false; + $clientAssignedMessageId = 'clientAssignedMessageId-1116632848'; + $expectedResponse = new Message(); + $expectedResponse->setName($name); + $expectedResponse->setText($text); + $expectedResponse->setFormattedText($formattedText); + $expectedResponse->setFallbackText($fallbackText); + $expectedResponse->setArgumentText($argumentText); + $expectedResponse->setThreadReply($threadReply); + $expectedResponse->setClientAssignedMessageId($clientAssignedMessageId); + $transport->addResponse($expectedResponse); + // Mock request + $message = new Message(); + $request = (new UpdateMessageRequest())->setMessage($message); + $response = $gapicClient->updateMessage($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/UpdateMessage', $actualFuncCall); + $actualValue = $actualRequestObject->getMessage(); + $this->assertProtobufEquals($message, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateMessageExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $message = new Message(); + $request = (new UpdateMessageRequest())->setMessage($message); + try { + $gapicClient->updateMessage($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSpaceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $singleUserBotDm = true; + $threaded = false; + $displayName = 'displayName1615086568'; + $externalUserAllowed = true; + $importMode = false; + $adminInstalled = true; + $expectedResponse = new Space(); + $expectedResponse->setName($name); + $expectedResponse->setSingleUserBotDm($singleUserBotDm); + $expectedResponse->setThreaded($threaded); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setExternalUserAllowed($externalUserAllowed); + $expectedResponse->setImportMode($importMode); + $expectedResponse->setAdminInstalled($adminInstalled); + $transport->addResponse($expectedResponse); + // Mock request + $space = new Space(); + $request = (new UpdateSpaceRequest())->setSpace($space); + $response = $gapicClient->updateSpace($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/UpdateSpace', $actualFuncCall); + $actualValue = $actualRequestObject->getSpace(); + $this->assertProtobufEquals($space, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSpaceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $space = new Space(); + $request = (new UpdateSpaceRequest())->setSpace($space); + try { + $gapicClient->updateSpace($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function uploadAttachmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new UploadAttachmentResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->spaceName('[SPACE]'); + $filename = 'filename-734768633'; + $request = (new UploadAttachmentRequest())->setParent($formattedParent)->setFilename($filename); + $response = $gapicClient->uploadAttachment($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/UploadAttachment', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getFilename(); + $this->assertProtobufEquals($filename, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function uploadAttachmentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->spaceName('[SPACE]'); + $filename = 'filename-734768633'; + $request = (new UploadAttachmentRequest())->setParent($formattedParent)->setFilename($filename); + try { + $gapicClient->uploadAttachment($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function completeImportSpaceAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new CompleteImportSpaceResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->spaceName('[SPACE]'); + $request = (new CompleteImportSpaceRequest())->setName($formattedName); + $response = $gapicClient->completeImportSpaceAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/CompleteImportSpace', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/composer.json b/composer.json index 1030316b57ec..ea6d094edf64 100644 --- a/composer.json +++ b/composer.json @@ -74,6 +74,7 @@ "google/analytics-admin": "0.22.2", "google/analytics-data": "0.16.2", "google/apps-events-subscriptions": "0.1.0", + "google/apps-chat": "0.0.0", "google/apps-meet": "0.2.0", "google/cloud-access-approval": "1.2.2", "google/cloud-advisorynotifications": "0.8.0", @@ -264,6 +265,8 @@ "GPBMetadata\\Google\\Apps\\Meet\\": "AppsMeet/metadata", "GPBMetadata\\Google\\Apps\\Script\\Type\\": "GSuiteAddOns/external/metadata", "GPBMetadata\\Google\\Bigtable\\": "Bigtable/metadata", + "GPBMetadata\\Google\\Chat\\": "AppsChat/metadata/Chat", + "GPBMetadata\\Google\\Apps\\Card\\": "AppsChat/metadata/Card", "GPBMetadata\\Google\\Cloud\\Accessapproval\\": "AccessApproval/metadata", "GPBMetadata\\Google\\Cloud\\Advisorynotifications\\": "AdvisoryNotifications/metadata", "GPBMetadata\\Google\\Cloud\\Aiplatform\\": "AiPlatform/metadata", @@ -436,6 +439,8 @@ "Google\\Analytics\\Admin\\": "AnalyticsAdmin/src", "Google\\Analytics\\Data\\": "AnalyticsData/src", "Google\\ApiCore\\LongRunning\\": "LongRunning/src/ApiCore/LongRunning", + "Google\\Apps\\Chat\\": "AppsChat/src/Chat", + "Google\\Apps\\Card\\": "AppsChat/src/Card", "Google\\Apps\\Events\\Subscriptions\\": "AppsEventsSubscriptions/src", "Google\\Apps\\Meet\\": "AppsMeet/src", "Google\\Apps\\Script\\Type\\": "GSuiteAddOns/external/protos", From 6da93edc3278a11d99fe9a8c23bb58456cecc543 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Apr 2024 09:19:41 -0700 Subject: [PATCH 45/86] chore(deps): bump idna from 3.6 to 3.7 in /.kokoro/docs/docker (#7217) Bumps [idna](https://github.com/kjd/idna) from 3.6 to 3.7. - [Release notes](https://github.com/kjd/idna/releases) - [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst) - [Commits](https://github.com/kjd/idna/compare/v3.6...v3.7) --- updated-dependencies: - dependency-name: idna dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .kokoro/docs/docker/requirements.txt | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.kokoro/docs/docker/requirements.txt b/.kokoro/docs/docker/requirements.txt index 3dbd6907a442..18b5be46f10c 100644 --- a/.kokoro/docs/docker/requirements.txt +++ b/.kokoro/docs/docker/requirements.txt @@ -118,7 +118,9 @@ google-crc32c==1.5.0 \ --hash=sha256:f583edb943cf2e09c60441b910d6a20b4d9d626c75a36c8fcac01a6c96c01183 \ --hash=sha256:fd8536e902db7e365f49e7d9029283403974ccf29b13fc7028b97e2295b33556 \ --hash=sha256:fe70e325aa68fa4b5edf7d1a4b6f691eb04bbccac0ace68e34820d283b5f80d4 - # via google-resumable-media + # via + # google-cloud-storage + # google-resumable-media google-resumable-media==2.7.0 \ --hash=sha256:5f18f5fa9836f4b083162064a1c2c98c17239bfda9ca50ad970ccf905f3e625b \ --hash=sha256:79543cfe433b63fd81c0844b7803aba1bb8950b47bedf7d980c38fa123937e08 @@ -127,9 +129,9 @@ googleapis-common-protos==1.62.0 \ --hash=sha256:4750113612205514f9f6aa4cb00d523a94f3e8c06c5ad2fee466387dc4875f07 \ --hash=sha256:83f0ece9f94e5672cced82f592d2a5edf527a96ed1794f0bab36d5735c996277 # via google-api-core -idna==3.6 \ - --hash=sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca \ - --hash=sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f +idna==3.7 \ + --hash=sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc \ + --hash=sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0 # via requests protobuf==4.25.2 \ --hash=sha256:10894a2885b7175d3984f2be8d9850712c57d5e7587a2410720af8be56cdaf62 \ @@ -170,12 +172,8 @@ rsa==4.9 \ six==1.16.0 \ --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 - # via - # gcp-docuploader - # google-auth + # via gcp-docuploader urllib3==1.26.18 \ --hash=sha256:34b97092d7e0a3a8cf7cd10e386f401b3737364026c45e622aa02903dffe0f07 \ --hash=sha256:f8ecc1bba5667413457c529ab955bf8c67b45db799d159066261719e328580a0 - # via - # google-auth - # requests + # via requests From 8b4e1d46e477554a37884295ae099557b2b61d3e Mon Sep 17 00:00:00 2001 From: Vishwaraj Anand Date: Fri, 19 Apr 2024 12:15:55 +0000 Subject: [PATCH 46/86] chore(Storage): move soft delete test to its own bucket (#7205) --- Storage/tests/System/ManageObjectsTest.php | 53 +++++++++++++--------- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/Storage/tests/System/ManageObjectsTest.php b/Storage/tests/System/ManageObjectsTest.php index 406c9013c572..07ec7450e34e 100644 --- a/Storage/tests/System/ManageObjectsTest.php +++ b/Storage/tests/System/ManageObjectsTest.php @@ -287,33 +287,33 @@ public function testComposeObjects($object) return $composedObject; } - /** - * @depends testComposeObjects - */ - public function testSoftDeleteObject($object) + public function testSoftDeleteObject() { - // Set soft delete policy - self::$bucket->update([ - 'softDeletePolicy' => [ - 'retentionDurationSeconds' => 8*24*60*60 - ] - ]); - - $this->assertStorageObjectExists($object); + $softDeleteBucketName = "soft-delete-bucket-" . uniqid(); + $softDeleteBucket = self::createBucket( + self::$client, + $softDeleteBucketName, + [ + 'location' => 'us-west1', + 'softDeletePolicy' => ['retentionDurationSeconds' => 8*24*60*60] + ] + ); + $object = $softDeleteBucket->upload(self::DATA, ['name' => uniqid(self::TESTING_PREFIX)]); + $this->assertStorageObjectExists($softDeleteBucket, $object); $generation = $object->info()['generation']; $object->delete(); - $this->assertStorageObjectNotExists($object); - $this->assertStorageObjectExists($object, [ + $this->assertStorageObjectNotExists($softDeleteBucket, $object); + $this->assertStorageObjectExists($softDeleteBucket, $object, [ 'softDeleted' => true, 'generation' => $generation ]); - $restoredObject = self::$bucket->restore($object->name(), $generation); + $restoredObject = $softDeleteBucket->restore($object->name(), $generation); $this->assertNotEquals($generation, $restoredObject->info()['generation']); - $this->assertStorageObjectExists($restoredObject); + $this->assertStorageObjectExists($softDeleteBucket, $restoredObject); } public function testRotatesCustomerSuppliedEncrpytion() @@ -445,20 +445,31 @@ public function testStringNormalization() } } - private function assertStorageObjectExists($object, $options = [], $isPresent = true) + /** + * Asserts that a provided StorageObject exists. + * + * A StorageObject can be created via several methods, including but not limited to: + * Directly via constructor such as during object creation, + * Or lazily by providing name to bucket object, + * Or by listing objects in a bucket. + */ + private function assertStorageObjectExists($bucket, $object, $options = [], $isPresent = true) { + // validate provided object exists $this->assertEquals($isPresent, $object->exists($options)); - $object = self::$bucket->object($object->name(), $options); + // validate object returned from $bucket->object() exists + $object = $bucket->object($object->name(), $options); $this->assertEquals($isPresent, $object->exists($options)); - $objects = self::$bucket->objects($options); + // validate object exists in $bucket->objects() exists + $objects = $bucket->objects($options); $objects = array_map(function ($o) { return $o->name(); }, iterator_to_array($objects)); $this->assertEquals($isPresent, in_array($object->name(), $objects)); } - private function assertStorageObjectNotExists($object, $options = []) + private function assertStorageObjectNotExists($bucket, $object, $options = []) { - $this->assertStorageObjectExists($object, $options, false); + $this->assertStorageObjectExists($bucket, $object, $options, false); } } From 10e53e78e48aab887edea903521e9909dc0d7cc1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 19 Apr 2024 11:42:00 -0700 Subject: [PATCH 47/86] docs: Update contact_email doc to not check permission of the email account (#7247) PiperOrigin-RevId: 625944337 Source-Link: https://github.com/googleapis/googleapis/commit/e09657e96e82c854790eff19c11f2ec6eacb545c Source-Link: https://github.com/googleapis/googleapis-gen/commit/dedcb04140614337b611f510dfe3c3a8cc1b87d7 Copy-Tag: eyJwIjoiUXVvdGFzLy5Pd2xCb3QueWFtbCIsImgiOiJkZWRjYjA0MTQwNjE0MzM3YjYxMWY1MTBkZmUzYzNhOGNjMWI4N2Q3In0= --- Quotas/src/V1/QuotaPreference.php | 68 +++++++++++++++---------------- 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/Quotas/src/V1/QuotaPreference.php b/Quotas/src/V1/QuotaPreference.php index 8d6834043a21..fde3b44c65a7 100644 --- a/Quotas/src/V1/QuotaPreference.php +++ b/Quotas/src/V1/QuotaPreference.php @@ -97,15 +97,14 @@ class QuotaPreference extends \Google\Protobuf\Internal\Message */ protected $justification = ''; /** - * Input only. An email address that can be used for quota related - * communication between the Google Cloud and the user in case the Google - * Cloud needs further information to make a decision on whether the user - * preferred quota can be granted. - * The email address is optional for decrease quota preferences. In another - * word, QuotaConfig.preferred_value is smaller than the - * QuotaDetails.reset_value. It is required for increase quota preferences. - * The Google account for the email address must have quota update permission - * for the project, folder or organization this quota preference is for. + * Input only. An email address that can be used to contact the the user, in + * case Google Cloud needs more information to make a decision before + * additional quota can be granted. + * When requesting a quota increase, the email address is required. + * When requesting a quota decrease, the email address is optional. + * For example, the email address is optional when the + * `QuotaConfig.preferred_value` is smaller than the + * `QuotaDetails.reset_value`. * * Generated from protobuf field string contact_email = 12 [(.google.api.field_behavior) = INPUT_ONLY]; */ @@ -157,15 +156,14 @@ class QuotaPreference extends \Google\Protobuf\Internal\Message * @type string $justification * The reason / justification for this quota preference. * @type string $contact_email - * Input only. An email address that can be used for quota related - * communication between the Google Cloud and the user in case the Google - * Cloud needs further information to make a decision on whether the user - * preferred quota can be granted. - * The email address is optional for decrease quota preferences. In another - * word, QuotaConfig.preferred_value is smaller than the - * QuotaDetails.reset_value. It is required for increase quota preferences. - * The Google account for the email address must have quota update permission - * for the project, folder or organization this quota preference is for. + * Input only. An email address that can be used to contact the the user, in + * case Google Cloud needs more information to make a decision before + * additional quota can be granted. + * When requesting a quota increase, the email address is required. + * When requesting a quota decrease, the email address is optional. + * For example, the email address is optional when the + * `QuotaConfig.preferred_value` is smaller than the + * `QuotaDetails.reset_value`. * } */ public function __construct($data = NULL) { @@ -502,15 +500,14 @@ public function setJustification($var) } /** - * Input only. An email address that can be used for quota related - * communication between the Google Cloud and the user in case the Google - * Cloud needs further information to make a decision on whether the user - * preferred quota can be granted. - * The email address is optional for decrease quota preferences. In another - * word, QuotaConfig.preferred_value is smaller than the - * QuotaDetails.reset_value. It is required for increase quota preferences. - * The Google account for the email address must have quota update permission - * for the project, folder or organization this quota preference is for. + * Input only. An email address that can be used to contact the the user, in + * case Google Cloud needs more information to make a decision before + * additional quota can be granted. + * When requesting a quota increase, the email address is required. + * When requesting a quota decrease, the email address is optional. + * For example, the email address is optional when the + * `QuotaConfig.preferred_value` is smaller than the + * `QuotaDetails.reset_value`. * * Generated from protobuf field string contact_email = 12 [(.google.api.field_behavior) = INPUT_ONLY]; * @return string @@ -521,15 +518,14 @@ public function getContactEmail() } /** - * Input only. An email address that can be used for quota related - * communication between the Google Cloud and the user in case the Google - * Cloud needs further information to make a decision on whether the user - * preferred quota can be granted. - * The email address is optional for decrease quota preferences. In another - * word, QuotaConfig.preferred_value is smaller than the - * QuotaDetails.reset_value. It is required for increase quota preferences. - * The Google account for the email address must have quota update permission - * for the project, folder or organization this quota preference is for. + * Input only. An email address that can be used to contact the the user, in + * case Google Cloud needs more information to make a decision before + * additional quota can be granted. + * When requesting a quota increase, the email address is required. + * When requesting a quota decrease, the email address is optional. + * For example, the email address is optional when the + * `QuotaConfig.preferred_value` is smaller than the + * `QuotaDetails.reset_value`. * * Generated from protobuf field string contact_email = 12 [(.google.api.field_behavior) = INPUT_ONLY]; * @param string $var From 297615a04871d366d425ede8a20a456f41d88bb9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 19 Apr 2024 11:42:19 -0700 Subject: [PATCH 48/86] feat: add Skaffold remote config support for GCB repos (#7248) docs: clarified related comments PiperOrigin-RevId: 626346409 Source-Link: https://github.com/googleapis/googleapis/commit/357c057a1b8d298a49a5d0c7210e64dcf4ffb45f Source-Link: https://github.com/googleapis/googleapis-gen/commit/06261c124a8434edf0d0ca70f86d1d2f2aec1851 Copy-Tag: eyJwIjoiRGVwbG95Ly5Pd2xCb3QueWFtbCIsImgiOiIwNjI2MWMxMjRhODQzNGVkZjBkMGNhNzBmODZkMWQyZjJhZWMxODUxIn0= --- Deploy/metadata/V1/CloudDeploy.php | Bin 43422 -> 43782 bytes Deploy/src/V1/Client/CloudDeployClient.php | 22 +++ .../src/V1/Gapic/CloudDeployGapicClient.php | 40 +++++ Deploy/src/V1/SkaffoldModules.php | 33 ++++ .../SkaffoldModules/SkaffoldGCBRepoSource.php | 148 ++++++++++++++++++ .../V1/SkaffoldModules/SkaffoldGitSource.php | 8 +- .../cloud_deploy_descriptor_config.php | 1 + .../cloud_deploy_rest_client_config.php | 9 ++ 8 files changed, 257 insertions(+), 4 deletions(-) create mode 100644 Deploy/src/V1/SkaffoldModules/SkaffoldGCBRepoSource.php diff --git a/Deploy/metadata/V1/CloudDeploy.php b/Deploy/metadata/V1/CloudDeploy.php index bb95f91b8ba55e02ecd7fd4364757d2a2ed11fc3..0aaa65011208c3d243fe9d10bcaa5b03ec5aa56b 100644 GIT binary patch delta 240 zcmbPtnW^m>(*{`Vha2qmHfiiGj0render([ + 'project' => $project, + 'location' => $location, + 'connection' => $connection, + 'repository' => $repository, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a rollout * resource. @@ -573,6 +594,7 @@ public static function workerPoolName(string $project, string $location, string * - location: projects/{project}/locations/{location} * - membership: projects/{project}/locations/{location}/memberships/{membership} * - release: projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release} + * - repository: projects/{project}/locations/{location}/connections/{connection}/repositories/{repository} * - rollout: projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout} * - service: projects/{project}/locations/{location}/services/{service} * - target: projects/{project}/locations/{location}/targets/{target} diff --git a/Deploy/src/V1/Gapic/CloudDeployGapicClient.php b/Deploy/src/V1/Gapic/CloudDeployGapicClient.php index 9232e942df16..f8135096c136 100644 --- a/Deploy/src/V1/Gapic/CloudDeployGapicClient.php +++ b/Deploy/src/V1/Gapic/CloudDeployGapicClient.php @@ -192,6 +192,8 @@ class CloudDeployGapicClient private static $releaseNameTemplate; + private static $repositoryNameTemplate; + private static $rolloutNameTemplate; private static $serviceNameTemplate; @@ -361,6 +363,17 @@ private static function getReleaseNameTemplate() return self::$releaseNameTemplate; } + private static function getRepositoryNameTemplate() + { + if (self::$repositoryNameTemplate == null) { + self::$repositoryNameTemplate = new PathTemplate( + 'projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}' + ); + } + + return self::$repositoryNameTemplate; + } + private static function getRolloutNameTemplate() { if (self::$rolloutNameTemplate == null) { @@ -421,6 +434,7 @@ private static function getPathTemplateMap() 'location' => self::getLocationNameTemplate(), 'membership' => self::getMembershipNameTemplate(), 'release' => self::getReleaseNameTemplate(), + 'repository' => self::getRepositoryNameTemplate(), 'rollout' => self::getRolloutNameTemplate(), 'service' => self::getServiceNameTemplate(), 'target' => self::getTargetNameTemplate(), @@ -691,6 +705,31 @@ public static function releaseName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a repository + * resource. + * + * @param string $project + * @param string $location + * @param string $connection + * @param string $repository + * + * @return string The formatted repository resource. + */ + public static function repositoryName( + $project, + $location, + $connection, + $repository + ) { + return self::getRepositoryNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'connection' => $connection, + 'repository' => $repository, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a rollout * resource. @@ -792,6 +831,7 @@ public static function workerPoolName($project, $location, $workerPool) * - location: projects/{project}/locations/{location} * - membership: projects/{project}/locations/{location}/memberships/{membership} * - release: projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release} + * - repository: projects/{project}/locations/{location}/connections/{connection}/repositories/{repository} * - rollout: projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout} * - service: projects/{project}/locations/{location}/services/{service} * - target: projects/{project}/locations/{location}/targets/{target} diff --git a/Deploy/src/V1/SkaffoldModules.php b/Deploy/src/V1/SkaffoldModules.php index cf6a9eb7228d..80cd38b13c24 100644 --- a/Deploy/src/V1/SkaffoldModules.php +++ b/Deploy/src/V1/SkaffoldModules.php @@ -35,6 +35,8 @@ class SkaffoldModules extends \Google\Protobuf\Internal\Message * Remote git repository containing the Skaffold Config modules. * @type \Google\Cloud\Deploy\V1\SkaffoldModules\SkaffoldGCSSource $google_cloud_storage * Cloud Storage bucket containing the Skaffold Config modules. + * @type \Google\Cloud\Deploy\V1\SkaffoldModules\SkaffoldGCBRepoSource $google_cloud_build_repo + * Cloud Build V2 repository containing the Skaffold Config modules. * } */ public function __construct($data = NULL) { @@ -130,6 +132,37 @@ public function setGoogleCloudStorage($var) return $this; } + /** + * Cloud Build V2 repository containing the Skaffold Config modules. + * + * Generated from protobuf field .google.cloud.deploy.v1.SkaffoldModules.SkaffoldGCBRepoSource google_cloud_build_repo = 4; + * @return \Google\Cloud\Deploy\V1\SkaffoldModules\SkaffoldGCBRepoSource|null + */ + public function getGoogleCloudBuildRepo() + { + return $this->readOneof(4); + } + + public function hasGoogleCloudBuildRepo() + { + return $this->hasOneof(4); + } + + /** + * Cloud Build V2 repository containing the Skaffold Config modules. + * + * Generated from protobuf field .google.cloud.deploy.v1.SkaffoldModules.SkaffoldGCBRepoSource google_cloud_build_repo = 4; + * @param \Google\Cloud\Deploy\V1\SkaffoldModules\SkaffoldGCBRepoSource $var + * @return $this + */ + public function setGoogleCloudBuildRepo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Deploy\V1\SkaffoldModules\SkaffoldGCBRepoSource::class); + $this->writeOneof(4, $var); + + return $this; + } + /** * @return string */ diff --git a/Deploy/src/V1/SkaffoldModules/SkaffoldGCBRepoSource.php b/Deploy/src/V1/SkaffoldModules/SkaffoldGCBRepoSource.php new file mode 100644 index 000000000000..0f4734229729 --- /dev/null +++ b/Deploy/src/V1/SkaffoldModules/SkaffoldGCBRepoSource.php @@ -0,0 +1,148 @@ +google.cloud.deploy.v1.SkaffoldModules.SkaffoldGCBRepoSource + */ +class SkaffoldGCBRepoSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the Cloud Build V2 Repository. + * Format is + * projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}. + * + * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $repository = ''; + /** + * Optional. Relative path from the repository root to the Skaffold Config + * file. + * + * Generated from protobuf field string path = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $path = ''; + /** + * Optional. Branch or tag to use when cloning the repository. + * + * Generated from protobuf field string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $ref = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $repository + * Required. Name of the Cloud Build V2 Repository. + * Format is + * projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}. + * @type string $path + * Optional. Relative path from the repository root to the Skaffold Config + * file. + * @type string $ref + * Optional. Branch or tag to use when cloning the repository. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Deploy\V1\CloudDeploy::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the Cloud Build V2 Repository. + * Format is + * projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}. + * + * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getRepository() + { + return $this->repository; + } + + /** + * Required. Name of the Cloud Build V2 Repository. + * Format is + * projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}. + * + * Generated from protobuf field string repository = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setRepository($var) + { + GPBUtil::checkString($var, True); + $this->repository = $var; + + return $this; + } + + /** + * Optional. Relative path from the repository root to the Skaffold Config + * file. + * + * Generated from protobuf field string path = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPath() + { + return $this->path; + } + + /** + * Optional. Relative path from the repository root to the Skaffold Config + * file. + * + * Generated from protobuf field string path = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPath($var) + { + GPBUtil::checkString($var, True); + $this->path = $var; + + return $this; + } + + /** + * Optional. Branch or tag to use when cloning the repository. + * + * Generated from protobuf field string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRef() + { + return $this->ref; + } + + /** + * Optional. Branch or tag to use when cloning the repository. + * + * Generated from protobuf field string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRef($var) + { + GPBUtil::checkString($var, True); + $this->ref = $var; + + return $this; + } + +} + + diff --git a/Deploy/src/V1/SkaffoldModules/SkaffoldGitSource.php b/Deploy/src/V1/SkaffoldModules/SkaffoldGitSource.php index 423da6038864..53ae74f44aca 100644 --- a/Deploy/src/V1/SkaffoldModules/SkaffoldGitSource.php +++ b/Deploy/src/V1/SkaffoldModules/SkaffoldGitSource.php @@ -28,7 +28,7 @@ class SkaffoldGitSource extends \Google\Protobuf\Internal\Message */ private $path = ''; /** - * Optional. Git ref the package should be cloned from. + * Optional. Git branch or tag to use when cloning the repository. * * Generated from protobuf field string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -45,7 +45,7 @@ class SkaffoldGitSource extends \Google\Protobuf\Internal\Message * @type string $path * Optional. Relative path from the repository root to the Skaffold file. * @type string $ref - * Optional. Git ref the package should be cloned from. + * Optional. Git branch or tag to use when cloning the repository. * } */ public function __construct($data = NULL) { @@ -106,7 +106,7 @@ public function setPath($var) } /** - * Optional. Git ref the package should be cloned from. + * Optional. Git branch or tag to use when cloning the repository. * * Generated from protobuf field string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -117,7 +117,7 @@ public function getRef() } /** - * Optional. Git ref the package should be cloned from. + * Optional. Git branch or tag to use when cloning the repository. * * Generated from protobuf field string ref = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var diff --git a/Deploy/src/V1/resources/cloud_deploy_descriptor_config.php b/Deploy/src/V1/resources/cloud_deploy_descriptor_config.php index 159ec0077d96..1b7b7bbc3ac4 100644 --- a/Deploy/src/V1/resources/cloud_deploy_descriptor_config.php +++ b/Deploy/src/V1/resources/cloud_deploy_descriptor_config.php @@ -755,6 +755,7 @@ 'location' => 'projects/{project}/locations/{location}', 'membership' => 'projects/{project}/locations/{location}/memberships/{membership}', 'release' => 'projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}', + 'repository' => 'projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}', 'rollout' => 'projects/{project}/locations/{location}/deliveryPipelines/{delivery_pipeline}/releases/{release}/rollouts/{rollout}', 'service' => 'projects/{project}/locations/{location}/services/{service}', 'target' => 'projects/{project}/locations/{location}/targets/{target}', diff --git a/Deploy/src/V1/resources/cloud_deploy_rest_client_config.php b/Deploy/src/V1/resources/cloud_deploy_rest_client_config.php index 0efb87a7775f..febaff6b324f 100644 --- a/Deploy/src/V1/resources/cloud_deploy_rest_client_config.php +++ b/Deploy/src/V1/resources/cloud_deploy_rest_client_config.php @@ -550,6 +550,10 @@ 'method' => 'get', 'uriTemplate' => '/v1/{resource=projects/*/locations/*/targets/*}:getIamPolicy', ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/customTargetTypes/*}:getIamPolicy', + ], ], 'placeholders' => [ 'resource' => [ @@ -569,6 +573,11 @@ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/targets/*}:setIamPolicy', 'body' => '*', ], + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/customTargetTypes/*}:setIamPolicy', + 'body' => '*', + ], ], 'placeholders' => [ 'resource' => [ From 4ecd8bca61b0308dc301130b370f7574a91a36f6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 19 Apr 2024 11:42:48 -0700 Subject: [PATCH 49/86] chore: migrate onto non-legacy config (#7244) PiperOrigin-RevId: 625735306 Source-Link: https://github.com/googleapis/googleapis/commit/ec123eb792cf357847f6d85e4f80fc85e62a53eb Source-Link: https://github.com/googleapis/googleapis-gen/commit/cc295b597d3b5afebe89c9779090ab66725748a8 Copy-Tag: eyJwIjoiVmlkZW9JbnRlbGxpZ2VuY2UvLk93bEJvdC55YW1sIiwiaCI6ImNjMjk1YjU5N2QzYjVhZmViZTg5Yzk3NzkwOTBhYjY2NzI1NzQ4YTgifQ== --- ...eo_intelligence_service_client_config.json | 37 ++++++++++++------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/VideoIntelligence/src/V1/resources/video_intelligence_service_client_config.json b/VideoIntelligence/src/V1/resources/video_intelligence_service_client_config.json index 5ed73df197b6..7bf68af5fc25 100644 --- a/VideoIntelligence/src/V1/resources/video_intelligence_service_client_config.json +++ b/VideoIntelligence/src/V1/resources/video_intelligence_service_client_config.json @@ -2,28 +2,37 @@ "interfaces": { "google.cloud.videointelligence.v1.VideoIntelligenceService": { "retry_codes": { - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "non_idempotent": [] + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] }, "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "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": 20000, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 2.5, + "max_retry_delay_millis": 120000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, "total_timeout_millis": 600000 } }, "methods": { "AnnotateVideo": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" } } } From 06be47c5a18ccec2953962672e4cebe5c7735f6f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 19 Apr 2024 11:43:04 -0700 Subject: [PATCH 50/86] feat: Add cloud_armor field to finding's list of attributes (#7242) PiperOrigin-RevId: 625555619 Source-Link: https://github.com/googleapis/googleapis/commit/42c6f0016d1331765f99d7e51fdfb29e09335c04 Source-Link: https://github.com/googleapis/googleapis-gen/commit/113f042d116f4388434de0e7d4116bd89ef769c3 Copy-Tag: eyJwIjoiU2VjdXJpdHlDZW50ZXIvLk93bEJvdC55YW1sIiwiaCI6IjExM2YwNDJkMTE2ZjQzODg0MzRkZTBlN2Q0MTE2YmQ4OWVmNzY5YzMifQ== --- SecurityCenter/metadata/V1/CloudArmor.php | 54 ++++ SecurityCenter/metadata/V1/Finding.php | Bin 7948 -> 8139 bytes SecurityCenter/src/V1/AdaptiveProtection.php | 84 +++++ SecurityCenter/src/V1/Attack.php | 135 ++++++++ SecurityCenter/src/V1/CloudArmor.php | 323 +++++++++++++++++++ SecurityCenter/src/V1/Finding.php | 44 +++ SecurityCenter/src/V1/Requests.php | 177 ++++++++++ SecurityCenter/src/V1/SecurityPolicy.php | 149 +++++++++ 8 files changed, 966 insertions(+) create mode 100644 SecurityCenter/metadata/V1/CloudArmor.php create mode 100644 SecurityCenter/src/V1/AdaptiveProtection.php create mode 100644 SecurityCenter/src/V1/Attack.php create mode 100644 SecurityCenter/src/V1/CloudArmor.php create mode 100644 SecurityCenter/src/V1/Requests.php create mode 100644 SecurityCenter/src/V1/SecurityPolicy.php diff --git a/SecurityCenter/metadata/V1/CloudArmor.php b/SecurityCenter/metadata/V1/CloudArmor.php new file mode 100644 index 000000000000..1831a22fd0be --- /dev/null +++ b/SecurityCenter/metadata/V1/CloudArmor.php @@ -0,0 +1,54 @@ +internalAddGeneratedFile( + ' +Æ +0google/cloud/securitycenter/v1/cloud_armor.protogoogle.cloud.securitycenter.v1"Þ + +CloudArmorG +security_policy ( 2..google.cloud.securitycenter.v1.SecurityPolicy: +requests ( 2(.google.cloud.securitycenter.v1.RequestsO +adaptive_protection ( 22.google.cloud.securitycenter.v1.AdaptiveProtection6 +attack ( 2&.google.cloud.securitycenter.v1.Attack + threat_vector ( + +duration ( 2.google.protobuf.Duration"= +SecurityPolicy +name (  +type (  +preview ("j +Requests +ratio ( +short_term_allowed ( +long_term_allowed ( +long_term_denied ("( +AdaptiveProtection + +confidence ("H +Attack + +volume_pps ( + +volume_bps ( +classification ( Bé +"com.google.cloud.securitycenter.v1BCloudArmorProtoPZJcloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpbªGoogle.Cloud.SecurityCenter.V1ÊGoogle\\Cloud\\SecurityCenter\\V1ê!Google::Cloud::SecurityCenter::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/SecurityCenter/metadata/V1/Finding.php b/SecurityCenter/metadata/V1/Finding.php index a9d14dc3739cf71c68e7bad14743661c230d490b..ee34cc1657bc5ebf6a3894fe218f12467170795e 100644 GIT binary patch delta 102 zcmeCNJ8i$gm6_GCC^x@ovLKVwW(Vdpc9vdEE}h96x#cHj@lL+Rb!+lwUWLgQxY<|} zLCQ9-Q10=v@<5 diff --git a/SecurityCenter/src/V1/AdaptiveProtection.php b/SecurityCenter/src/V1/AdaptiveProtection.php new file mode 100644 index 000000000000..b713bf04f0c7 --- /dev/null +++ b/SecurityCenter/src/V1/AdaptiveProtection.php @@ -0,0 +1,84 @@ +google.cloud.securitycenter.v1.AdaptiveProtection + */ +class AdaptiveProtection extends \Google\Protobuf\Internal\Message +{ + /** + * A score of 0 means that there is low confidence that the detected event is + * an actual attack. A score of 1 means that there is high confidence that the + * detected event is an attack. See the [Adaptive Protection + * documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) + * for further explanation. + * + * Generated from protobuf field double confidence = 1; + */ + private $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $confidence + * A score of 0 means that there is low confidence that the detected event is + * an actual attack. A score of 1 means that there is high confidence that the + * detected event is an attack. See the [Adaptive Protection + * documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) + * for further explanation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\CloudArmor::initOnce(); + parent::__construct($data); + } + + /** + * A score of 0 means that there is low confidence that the detected event is + * an actual attack. A score of 1 means that there is high confidence that the + * detected event is an attack. See the [Adaptive Protection + * documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) + * for further explanation. + * + * Generated from protobuf field double confidence = 1; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * A score of 0 means that there is low confidence that the detected event is + * an actual attack. A score of 1 means that there is high confidence that the + * detected event is an attack. See the [Adaptive Protection + * documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) + * for further explanation. + * + * Generated from protobuf field double confidence = 1; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkDouble($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/SecurityCenter/src/V1/Attack.php b/SecurityCenter/src/V1/Attack.php new file mode 100644 index 000000000000..e6edb1e67b03 --- /dev/null +++ b/SecurityCenter/src/V1/Attack.php @@ -0,0 +1,135 @@ +google.cloud.securitycenter.v1.Attack + */ +class Attack extends \Google\Protobuf\Internal\Message +{ + /** + * Total PPS (packets per second) volume of attack. + * + * Generated from protobuf field int32 volume_pps = 1; + */ + private $volume_pps = 0; + /** + * Total BPS (bytes per second) volume of attack. + * + * Generated from protobuf field int32 volume_bps = 2; + */ + private $volume_bps = 0; + /** + * Type of attack, for example, ‘SYN-flood’, ‘NTP-udp’, or ‘CHARGEN-udp’. + * + * Generated from protobuf field string classification = 3; + */ + private $classification = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $volume_pps + * Total PPS (packets per second) volume of attack. + * @type int $volume_bps + * Total BPS (bytes per second) volume of attack. + * @type string $classification + * Type of attack, for example, ‘SYN-flood’, ‘NTP-udp’, or ‘CHARGEN-udp’. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\CloudArmor::initOnce(); + parent::__construct($data); + } + + /** + * Total PPS (packets per second) volume of attack. + * + * Generated from protobuf field int32 volume_pps = 1; + * @return int + */ + public function getVolumePps() + { + return $this->volume_pps; + } + + /** + * Total PPS (packets per second) volume of attack. + * + * Generated from protobuf field int32 volume_pps = 1; + * @param int $var + * @return $this + */ + public function setVolumePps($var) + { + GPBUtil::checkInt32($var); + $this->volume_pps = $var; + + return $this; + } + + /** + * Total BPS (bytes per second) volume of attack. + * + * Generated from protobuf field int32 volume_bps = 2; + * @return int + */ + public function getVolumeBps() + { + return $this->volume_bps; + } + + /** + * Total BPS (bytes per second) volume of attack. + * + * Generated from protobuf field int32 volume_bps = 2; + * @param int $var + * @return $this + */ + public function setVolumeBps($var) + { + GPBUtil::checkInt32($var); + $this->volume_bps = $var; + + return $this; + } + + /** + * Type of attack, for example, ‘SYN-flood’, ‘NTP-udp’, or ‘CHARGEN-udp’. + * + * Generated from protobuf field string classification = 3; + * @return string + */ + public function getClassification() + { + return $this->classification; + } + + /** + * Type of attack, for example, ‘SYN-flood’, ‘NTP-udp’, or ‘CHARGEN-udp’. + * + * Generated from protobuf field string classification = 3; + * @param string $var + * @return $this + */ + public function setClassification($var) + { + GPBUtil::checkString($var, True); + $this->classification = $var; + + return $this; + } + +} + diff --git a/SecurityCenter/src/V1/CloudArmor.php b/SecurityCenter/src/V1/CloudArmor.php new file mode 100644 index 000000000000..2105262a4baf --- /dev/null +++ b/SecurityCenter/src/V1/CloudArmor.php @@ -0,0 +1,323 @@ +google.cloud.securitycenter.v1.CloudArmor + */ +class CloudArmor extends \Google\Protobuf\Internal\Message +{ + /** + * Information about the [Google Cloud Armor security + * policy](https://cloud.google.com/armor/docs/security-policy-overview) + * relevant to the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityPolicy security_policy = 1; + */ + private $security_policy = null; + /** + * Information about incoming requests evaluated by [Google Cloud Armor + * security + * policies](https://cloud.google.com/armor/docs/security-policy-overview). + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Requests requests = 2; + */ + private $requests = null; + /** + * Information about potential Layer 7 DDoS attacks identified by [Google + * Cloud Armor Adaptive + * Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview). + * + * Generated from protobuf field .google.cloud.securitycenter.v1.AdaptiveProtection adaptive_protection = 3; + */ + private $adaptive_protection = null; + /** + * Information about DDoS attack volume and classification. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Attack attack = 4; + */ + private $attack = null; + /** + * Distinguish between volumetric & protocol DDoS attack and + * application layer attacks. For example, “L3_4†for Layer 3 and Layer 4 DDoS + * attacks, or “L_7†for Layer 7 DDoS attacks. + * + * Generated from protobuf field string threat_vector = 5; + */ + private $threat_vector = ''; + /** + * Duration of attack from the start until the current moment (updated every 5 + * minutes). + * + * Generated from protobuf field .google.protobuf.Duration duration = 6; + */ + private $duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\SecurityCenter\V1\SecurityPolicy $security_policy + * Information about the [Google Cloud Armor security + * policy](https://cloud.google.com/armor/docs/security-policy-overview) + * relevant to the finding. + * @type \Google\Cloud\SecurityCenter\V1\Requests $requests + * Information about incoming requests evaluated by [Google Cloud Armor + * security + * policies](https://cloud.google.com/armor/docs/security-policy-overview). + * @type \Google\Cloud\SecurityCenter\V1\AdaptiveProtection $adaptive_protection + * Information about potential Layer 7 DDoS attacks identified by [Google + * Cloud Armor Adaptive + * Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview). + * @type \Google\Cloud\SecurityCenter\V1\Attack $attack + * Information about DDoS attack volume and classification. + * @type string $threat_vector + * Distinguish between volumetric & protocol DDoS attack and + * application layer attacks. For example, “L3_4†for Layer 3 and Layer 4 DDoS + * attacks, or “L_7†for Layer 7 DDoS attacks. + * @type \Google\Protobuf\Duration $duration + * Duration of attack from the start until the current moment (updated every 5 + * minutes). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\CloudArmor::initOnce(); + parent::__construct($data); + } + + /** + * Information about the [Google Cloud Armor security + * policy](https://cloud.google.com/armor/docs/security-policy-overview) + * relevant to the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityPolicy security_policy = 1; + * @return \Google\Cloud\SecurityCenter\V1\SecurityPolicy|null + */ + public function getSecurityPolicy() + { + return $this->security_policy; + } + + public function hasSecurityPolicy() + { + return isset($this->security_policy); + } + + public function clearSecurityPolicy() + { + unset($this->security_policy); + } + + /** + * Information about the [Google Cloud Armor security + * policy](https://cloud.google.com/armor/docs/security-policy-overview) + * relevant to the finding. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.SecurityPolicy security_policy = 1; + * @param \Google\Cloud\SecurityCenter\V1\SecurityPolicy $var + * @return $this + */ + public function setSecurityPolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\SecurityPolicy::class); + $this->security_policy = $var; + + return $this; + } + + /** + * Information about incoming requests evaluated by [Google Cloud Armor + * security + * policies](https://cloud.google.com/armor/docs/security-policy-overview). + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Requests requests = 2; + * @return \Google\Cloud\SecurityCenter\V1\Requests|null + */ + public function getRequests() + { + return $this->requests; + } + + public function hasRequests() + { + return isset($this->requests); + } + + public function clearRequests() + { + unset($this->requests); + } + + /** + * Information about incoming requests evaluated by [Google Cloud Armor + * security + * policies](https://cloud.google.com/armor/docs/security-policy-overview). + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Requests requests = 2; + * @param \Google\Cloud\SecurityCenter\V1\Requests $var + * @return $this + */ + public function setRequests($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Requests::class); + $this->requests = $var; + + return $this; + } + + /** + * Information about potential Layer 7 DDoS attacks identified by [Google + * Cloud Armor Adaptive + * Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview). + * + * Generated from protobuf field .google.cloud.securitycenter.v1.AdaptiveProtection adaptive_protection = 3; + * @return \Google\Cloud\SecurityCenter\V1\AdaptiveProtection|null + */ + public function getAdaptiveProtection() + { + return $this->adaptive_protection; + } + + public function hasAdaptiveProtection() + { + return isset($this->adaptive_protection); + } + + public function clearAdaptiveProtection() + { + unset($this->adaptive_protection); + } + + /** + * Information about potential Layer 7 DDoS attacks identified by [Google + * Cloud Armor Adaptive + * Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview). + * + * Generated from protobuf field .google.cloud.securitycenter.v1.AdaptiveProtection adaptive_protection = 3; + * @param \Google\Cloud\SecurityCenter\V1\AdaptiveProtection $var + * @return $this + */ + public function setAdaptiveProtection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\AdaptiveProtection::class); + $this->adaptive_protection = $var; + + return $this; + } + + /** + * Information about DDoS attack volume and classification. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Attack attack = 4; + * @return \Google\Cloud\SecurityCenter\V1\Attack|null + */ + public function getAttack() + { + return $this->attack; + } + + public function hasAttack() + { + return isset($this->attack); + } + + public function clearAttack() + { + unset($this->attack); + } + + /** + * Information about DDoS attack volume and classification. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.Attack attack = 4; + * @param \Google\Cloud\SecurityCenter\V1\Attack $var + * @return $this + */ + public function setAttack($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\Attack::class); + $this->attack = $var; + + return $this; + } + + /** + * Distinguish between volumetric & protocol DDoS attack and + * application layer attacks. For example, “L3_4†for Layer 3 and Layer 4 DDoS + * attacks, or “L_7†for Layer 7 DDoS attacks. + * + * Generated from protobuf field string threat_vector = 5; + * @return string + */ + public function getThreatVector() + { + return $this->threat_vector; + } + + /** + * Distinguish between volumetric & protocol DDoS attack and + * application layer attacks. For example, “L3_4†for Layer 3 and Layer 4 DDoS + * attacks, or “L_7†for Layer 7 DDoS attacks. + * + * Generated from protobuf field string threat_vector = 5; + * @param string $var + * @return $this + */ + public function setThreatVector($var) + { + GPBUtil::checkString($var, True); + $this->threat_vector = $var; + + return $this; + } + + /** + * Duration of attack from the start until the current moment (updated every 5 + * minutes). + * + * Generated from protobuf field .google.protobuf.Duration duration = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Duration of attack from the start until the current moment (updated every 5 + * minutes). + * + * Generated from protobuf field .google.protobuf.Duration duration = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + +} + diff --git a/SecurityCenter/src/V1/Finding.php b/SecurityCenter/src/V1/Finding.php index b01b12f0aa60..8a8361b76953 100644 --- a/SecurityCenter/src/V1/Finding.php +++ b/SecurityCenter/src/V1/Finding.php @@ -353,6 +353,12 @@ class Finding extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.cloud.securitycenter.v1.LoadBalancer load_balancers = 58; */ private $load_balancers; + /** + * Fields related to Cloud Armor findings. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.CloudArmor cloud_armor = 59; + */ + private $cloud_armor = null; /** * Notebook associated with the finding. * @@ -523,6 +529,8 @@ class Finding extends \Google\Protobuf\Internal\Message * Log entries that are relevant to the finding. * @type array<\Google\Cloud\SecurityCenter\V1\LoadBalancer>|\Google\Protobuf\Internal\RepeatedField $load_balancers * The load balancers associated with the finding. + * @type \Google\Cloud\SecurityCenter\V1\CloudArmor $cloud_armor + * Fields related to Cloud Armor findings. * @type \Google\Cloud\SecurityCenter\V1\Notebook $notebook * Notebook associated with the finding. * } @@ -1984,6 +1992,42 @@ public function setLoadBalancers($var) return $this; } + /** + * Fields related to Cloud Armor findings. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.CloudArmor cloud_armor = 59; + * @return \Google\Cloud\SecurityCenter\V1\CloudArmor|null + */ + public function getCloudArmor() + { + return $this->cloud_armor; + } + + public function hasCloudArmor() + { + return isset($this->cloud_armor); + } + + public function clearCloudArmor() + { + unset($this->cloud_armor); + } + + /** + * Fields related to Cloud Armor findings. + * + * Generated from protobuf field .google.cloud.securitycenter.v1.CloudArmor cloud_armor = 59; + * @param \Google\Cloud\SecurityCenter\V1\CloudArmor $var + * @return $this + */ + public function setCloudArmor($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecurityCenter\V1\CloudArmor::class); + $this->cloud_armor = $var; + + return $this; + } + /** * Notebook associated with the finding. * diff --git a/SecurityCenter/src/V1/Requests.php b/SecurityCenter/src/V1/Requests.php new file mode 100644 index 000000000000..b57cc601d293 --- /dev/null +++ b/SecurityCenter/src/V1/Requests.php @@ -0,0 +1,177 @@ +google.cloud.securitycenter.v1.Requests + */ +class Requests extends \Google\Protobuf\Internal\Message +{ + /** + * For 'Increasing deny ratio', the ratio is the denied traffic divided by the + * allowed traffic. For 'Allowed traffic spike', the ratio is the allowed + * traffic in the short term divided by allowed traffic in the long term. + * + * Generated from protobuf field double ratio = 1; + */ + private $ratio = 0.0; + /** + * Allowed RPS (requests per second) in the short term. + * + * Generated from protobuf field int32 short_term_allowed = 2; + */ + private $short_term_allowed = 0; + /** + * Allowed RPS (requests per second) over the long term. + * + * Generated from protobuf field int32 long_term_allowed = 3; + */ + private $long_term_allowed = 0; + /** + * Denied RPS (requests per second) over the long term. + * + * Generated from protobuf field int32 long_term_denied = 4; + */ + private $long_term_denied = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $ratio + * For 'Increasing deny ratio', the ratio is the denied traffic divided by the + * allowed traffic. For 'Allowed traffic spike', the ratio is the allowed + * traffic in the short term divided by allowed traffic in the long term. + * @type int $short_term_allowed + * Allowed RPS (requests per second) in the short term. + * @type int $long_term_allowed + * Allowed RPS (requests per second) over the long term. + * @type int $long_term_denied + * Denied RPS (requests per second) over the long term. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\CloudArmor::initOnce(); + parent::__construct($data); + } + + /** + * For 'Increasing deny ratio', the ratio is the denied traffic divided by the + * allowed traffic. For 'Allowed traffic spike', the ratio is the allowed + * traffic in the short term divided by allowed traffic in the long term. + * + * Generated from protobuf field double ratio = 1; + * @return float + */ + public function getRatio() + { + return $this->ratio; + } + + /** + * For 'Increasing deny ratio', the ratio is the denied traffic divided by the + * allowed traffic. For 'Allowed traffic spike', the ratio is the allowed + * traffic in the short term divided by allowed traffic in the long term. + * + * Generated from protobuf field double ratio = 1; + * @param float $var + * @return $this + */ + public function setRatio($var) + { + GPBUtil::checkDouble($var); + $this->ratio = $var; + + return $this; + } + + /** + * Allowed RPS (requests per second) in the short term. + * + * Generated from protobuf field int32 short_term_allowed = 2; + * @return int + */ + public function getShortTermAllowed() + { + return $this->short_term_allowed; + } + + /** + * Allowed RPS (requests per second) in the short term. + * + * Generated from protobuf field int32 short_term_allowed = 2; + * @param int $var + * @return $this + */ + public function setShortTermAllowed($var) + { + GPBUtil::checkInt32($var); + $this->short_term_allowed = $var; + + return $this; + } + + /** + * Allowed RPS (requests per second) over the long term. + * + * Generated from protobuf field int32 long_term_allowed = 3; + * @return int + */ + public function getLongTermAllowed() + { + return $this->long_term_allowed; + } + + /** + * Allowed RPS (requests per second) over the long term. + * + * Generated from protobuf field int32 long_term_allowed = 3; + * @param int $var + * @return $this + */ + public function setLongTermAllowed($var) + { + GPBUtil::checkInt32($var); + $this->long_term_allowed = $var; + + return $this; + } + + /** + * Denied RPS (requests per second) over the long term. + * + * Generated from protobuf field int32 long_term_denied = 4; + * @return int + */ + public function getLongTermDenied() + { + return $this->long_term_denied; + } + + /** + * Denied RPS (requests per second) over the long term. + * + * Generated from protobuf field int32 long_term_denied = 4; + * @param int $var + * @return $this + */ + public function setLongTermDenied($var) + { + GPBUtil::checkInt32($var); + $this->long_term_denied = $var; + + return $this; + } + +} + diff --git a/SecurityCenter/src/V1/SecurityPolicy.php b/SecurityCenter/src/V1/SecurityPolicy.php new file mode 100644 index 000000000000..a47a6c721a47 --- /dev/null +++ b/SecurityCenter/src/V1/SecurityPolicy.php @@ -0,0 +1,149 @@ +google.cloud.securitycenter.v1.SecurityPolicy + */ +class SecurityPolicy extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the Google Cloud Armor security policy, for example, + * "my-security-policy". + * + * Generated from protobuf field string name = 1; + */ + private $name = ''; + /** + * The type of Google Cloud Armor security policy for example, ‘backend + * security policy’, ‘edge security policy’, ‘network edge security policy’, + * or ‘always-on DDoS protection’. + * + * Generated from protobuf field string type = 2; + */ + private $type = ''; + /** + * Whether or not the associated rule or policy is in preview mode. + * + * Generated from protobuf field bool preview = 3; + */ + private $preview = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the Google Cloud Armor security policy, for example, + * "my-security-policy". + * @type string $type + * The type of Google Cloud Armor security policy for example, ‘backend + * security policy’, ‘edge security policy’, ‘network edge security policy’, + * or ‘always-on DDoS protection’. + * @type bool $preview + * Whether or not the associated rule or policy is in preview mode. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Securitycenter\V1\CloudArmor::initOnce(); + parent::__construct($data); + } + + /** + * The name of the Google Cloud Armor security policy, for example, + * "my-security-policy". + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the Google Cloud Armor security policy, for example, + * "my-security-policy". + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The type of Google Cloud Armor security policy for example, ‘backend + * security policy’, ‘edge security policy’, ‘network edge security policy’, + * or ‘always-on DDoS protection’. + * + * Generated from protobuf field string type = 2; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * The type of Google Cloud Armor security policy for example, ‘backend + * security policy’, ‘edge security policy’, ‘network edge security policy’, + * or ‘always-on DDoS protection’. + * + * Generated from protobuf field string type = 2; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * Whether or not the associated rule or policy is in preview mode. + * + * Generated from protobuf field bool preview = 3; + * @return bool + */ + public function getPreview() + { + return $this->preview; + } + + /** + * Whether or not the associated rule or policy is in preview mode. + * + * Generated from protobuf field bool preview = 3; + * @param bool $var + * @return $this + */ + public function setPreview($var) + { + GPBUtil::checkBool($var); + $this->preview = $var; + + return $this; + } + +} + From 6bec4ccb10adaca9d34aec67cc06bede58a8d04f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 19 Apr 2024 11:43:20 -0700 Subject: [PATCH 51/86] feat: A new message `FoundationModelTuningOptions` is added (#7241) feat: A new field `foundation_model_tuning_options` is added to message `.google.cloud.documentai.v1.TrainProcessorVersionRequest` docs: updated comments PiperOrigin-RevId: 625415406 Source-Link: https://github.com/googleapis/googleapis/commit/caa099d272fdf00be53d2328259fcbdaab3a3b20 Source-Link: https://github.com/googleapis/googleapis-gen/commit/91684486cc850c8564792720694a20b8c04c5061 Copy-Tag: eyJwIjoiRG9jdW1lbnRBaS8uT3dsQm90LnlhbWwiLCJoIjoiOTE2ODQ0ODZjYzg1MGM4NTY0NzkyNzIwNjk0YTIwYjhjMDRjNTA2MSJ9 --- .../metadata/V1/DocumentProcessorService.php | Bin 16538 -> 16766 bytes .../batch_process_documents.php | 3 +- .../create_processor.php | 9 +- .../evaluate_processor_version.php | 4 +- .../fetch_processor_types.php | 3 +- .../get_evaluation.php | 3 +- .../list_evaluations.php | 4 +- .../list_processor_versions.php | 5 +- .../list_processors.php | 4 +- .../process_document.php | 12 +- .../review_document.php | 5 +- .../set_default_processor_version.php | 15 +-- .../train_processor_version.php | 5 +- .../IndividualProcessStatus.php | 36 +++--- DocumentAi/src/V1/BatchProcessRequest.php | 15 +-- .../Client/DocumentProcessorServiceClient.php | 14 +-- DocumentAi/src/V1/CreateProcessorRequest.php | 62 ++++------ DocumentAi/src/V1/DeleteProcessorMetadata.php | 3 +- DocumentAi/src/V1/DeleteProcessorRequest.php | 3 +- .../src/V1/DisableProcessorMetadata.php | 3 +- DocumentAi/src/V1/DisableProcessorRequest.php | 3 +- .../src/V1/DisableProcessorResponse.php | 4 +- DocumentAi/src/V1/Document.php | 60 ++++----- DocumentAi/src/V1/Document/Entity.php | 72 +++++------ DocumentAi/src/V1/Document/EntityRelation.php | 3 +- DocumentAi/src/V1/Document/Page.php | 32 ++--- DocumentAi/src/V1/Document/Page/Block.php | 12 +- .../src/V1/Document/Page/DetectedBarcode.php | 24 ++-- DocumentAi/src/V1/Document/Page/FormField.php | 32 ++--- DocumentAi/src/V1/Document/Page/Layout.php | 68 ++++------- DocumentAi/src/V1/Document/Page/Line.php | 12 +- DocumentAi/src/V1/Document/Page/Paragraph.php | 12 +- DocumentAi/src/V1/Document/Page/Symbol.php | 12 +- DocumentAi/src/V1/Document/Page/Table.php | 12 +- .../src/V1/Document/Page/Table/TableCell.php | 12 +- DocumentAi/src/V1/Document/Page/Token.php | 24 ++-- .../V1/Document/Page/Token/DetectedBreak.php | 3 +- .../src/V1/Document/Page/Token/StyleInfo.php | 40 +++--- .../src/V1/Document/Page/VisualElement.php | 24 ++-- DocumentAi/src/V1/Document/PageAnchor.php | 7 +- .../src/V1/Document/PageAnchor/PageRef.php | 80 +++++------- .../PageAnchor/PageRef/LayoutType.php | 27 ++--- DocumentAi/src/V1/Document/ShardInfo.php | 12 +- DocumentAi/src/V1/Document/Style.php | 12 +- DocumentAi/src/V1/Document/TextAnchor.php | 15 +-- .../V1/Document/TextAnchor/TextSegment.php | 36 ++---- DocumentAi/src/V1/Document/TextChange.php | 20 ++- DocumentAi/src/V1/EnableProcessorMetadata.php | 3 +- DocumentAi/src/V1/EnableProcessorRequest.php | 3 +- DocumentAi/src/V1/EnableProcessorResponse.php | 4 +- .../V1/EvaluateProcessorVersionRequest.php | 40 +++--- .../src/V1/FetchProcessorTypesRequest.php | 5 +- .../src/V1/FetchProcessorTypesResponse.php | 3 +- .../DocumentProcessorServiceGapicClient.php | 102 +++++++--------- DocumentAi/src/V1/GetEvaluationRequest.php | 15 +-- DocumentAi/src/V1/GetProcessorRequest.php | 3 +- DocumentAi/src/V1/GetProcessorTypeRequest.php | 3 +- .../src/V1/GetProcessorVersionRequest.php | 3 +- DocumentAi/src/V1/HumanReviewStatus.php | 32 ++--- DocumentAi/src/V1/HumanReviewStatus/State.php | 3 +- DocumentAi/src/V1/ListEvaluationsRequest.php | 23 +--- .../src/V1/ListProcessorTypesRequest.php | 5 +- .../src/V1/ListProcessorTypesResponse.php | 3 +- .../src/V1/ListProcessorVersionsRequest.php | 25 ++-- DocumentAi/src/V1/ListProcessorsRequest.php | 20 +-- DocumentAi/src/V1/ListProcessorsResponse.php | 3 +- DocumentAi/src/V1/OcrConfig.php | 16 +-- DocumentAi/src/V1/ProcessOptions.php | 32 ++--- DocumentAi/src/V1/ProcessRequest.php | 75 ++++-------- DocumentAi/src/V1/ProcessResponse.php | 3 +- DocumentAi/src/V1/Processor.php | 12 +- .../V1/ReviewDocumentOperationMetadata.php | 3 +- DocumentAi/src/V1/ReviewDocumentRequest.php | 28 ++--- DocumentAi/src/V1/ReviewDocumentResponse.php | 3 +- .../V1/SetDefaultProcessorVersionRequest.php | 36 ++---- .../src/V1/TrainProcessorVersionRequest.php | 86 ++++++++----- .../FoundationModelTuningOptions.php | 114 ++++++++++++++++++ .../InputData.php | 3 +- 78 files changed, 677 insertions(+), 910 deletions(-) create mode 100644 DocumentAi/src/V1/TrainProcessorVersionRequest/FoundationModelTuningOptions.php diff --git a/DocumentAi/metadata/V1/DocumentProcessorService.php b/DocumentAi/metadata/V1/DocumentProcessorService.php index b7fff3bc1978b30da1113627944df9dd53b33be6..0471f41168e22a958f26de58491a5162ee888d39 100644 GIT binary patch delta 221 zcmbQ$$oQ{`aRVnC)6%ld+-zsWS(b2e$xNQBC_Z_C4BO-%vYpxuj9l_*`K5U&i6xo& zdGWdVDXBT}C8c?pdFk=_1t76v2_6MT4Q`{*$pz9flRK0|Cx4J-7t?ctYw`u@2?1-_ zTrS7YoG2B~C4*JkA7Y@81Q&NnQDSCZd~r!?L9qlA(0o=W<_C_9LaJO6IjM<7VC#z# eOH$)=OLIyx3vx13izJwV%9y~)Hn%B?$O8ZbV@c%z delta 44 zcmey@#5k*waRVnC)4`I>+-zsWSq`vs$xLok5}&+4hHdf>+0M-@@~q68vy?>S0b0Ed APXGV_ diff --git a/DocumentAi/samples/V1/DocumentProcessorServiceClient/batch_process_documents.php b/DocumentAi/samples/V1/DocumentProcessorServiceClient/batch_process_documents.php index 0160bd39a744..a09cdc4702a2 100644 --- a/DocumentAi/samples/V1/DocumentProcessorServiceClient/batch_process_documents.php +++ b/DocumentAi/samples/V1/DocumentProcessorServiceClient/batch_process_documents.php @@ -34,8 +34,7 @@ * LRO endpoint to batch process many documents. The output is written * to Cloud Storage as JSON in the [Document] format. * - * @param string $name The resource name of - * [Processor][google.cloud.documentai.v1.Processor] or + * @param string $name The resource name of [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * Format: `projects/{project}/locations/{location}/processors/{processor}`, * or diff --git a/DocumentAi/samples/V1/DocumentProcessorServiceClient/create_processor.php b/DocumentAi/samples/V1/DocumentProcessorServiceClient/create_processor.php index d43b36d2063f..4da1d5d88927 100644 --- a/DocumentAi/samples/V1/DocumentProcessorServiceClient/create_processor.php +++ b/DocumentAi/samples/V1/DocumentProcessorServiceClient/create_processor.php @@ -29,12 +29,11 @@ use Google\Cloud\DocumentAI\V1\Processor; /** - * Creates a processor from the - * [ProcessorType][google.cloud.documentai.v1.ProcessorType] provided. The - * processor will be at `ENABLED` state by default after its creation. + * Creates a processor from the [ProcessorType][google.cloud.documentai.v1.ProcessorType] provided. + * The processor will be at `ENABLED` state by default after its creation. * - * @param string $formattedParent The parent (project and location) under which to create the - * processor. Format: `projects/{project}/locations/{location}` + * @param string $formattedParent The parent (project and location) under which to create the processor. + * Format: `projects/{project}/locations/{location}` * Please see {@see DocumentProcessorServiceClient::locationName()} for help formatting this field. */ function create_processor_sample(string $formattedParent): void diff --git a/DocumentAi/samples/V1/DocumentProcessorServiceClient/evaluate_processor_version.php b/DocumentAi/samples/V1/DocumentProcessorServiceClient/evaluate_processor_version.php index 6e97be55dcf5..6ce9a0bd5bc0 100644 --- a/DocumentAi/samples/V1/DocumentProcessorServiceClient/evaluate_processor_version.php +++ b/DocumentAi/samples/V1/DocumentProcessorServiceClient/evaluate_processor_version.php @@ -34,9 +34,7 @@ * Evaluates a ProcessorVersion against annotated documents, producing an * Evaluation. * - * @param string $formattedProcessorVersion The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to - * evaluate. + * @param string $formattedProcessorVersion The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to evaluate. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * Please see {@see DocumentProcessorServiceClient::processorVersionName()} for help formatting this field. */ diff --git a/DocumentAi/samples/V1/DocumentProcessorServiceClient/fetch_processor_types.php b/DocumentAi/samples/V1/DocumentProcessorServiceClient/fetch_processor_types.php index ae701e7f169d..8289f03e2441 100644 --- a/DocumentAi/samples/V1/DocumentProcessorServiceClient/fetch_processor_types.php +++ b/DocumentAi/samples/V1/DocumentProcessorServiceClient/fetch_processor_types.php @@ -29,8 +29,7 @@ use Google\Cloud\DocumentAI\V1\FetchProcessorTypesResponse; /** - * Fetches processor types. Note that we don't use - * [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes] + * Fetches processor types. Note that we don't use [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes] * here, because it isn't paginated. * * @param string $formattedParent The location of processor types to list. diff --git a/DocumentAi/samples/V1/DocumentProcessorServiceClient/get_evaluation.php b/DocumentAi/samples/V1/DocumentProcessorServiceClient/get_evaluation.php index 5a9fd34e7829..93b7b12e58c2 100644 --- a/DocumentAi/samples/V1/DocumentProcessorServiceClient/get_evaluation.php +++ b/DocumentAi/samples/V1/DocumentProcessorServiceClient/get_evaluation.php @@ -31,8 +31,7 @@ /** * Retrieves a specific evaluation. * - * @param string $formattedName The resource name of the - * [Evaluation][google.cloud.documentai.v1.Evaluation] to get. + * @param string $formattedName The resource name of the [Evaluation][google.cloud.documentai.v1.Evaluation] to get. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` * Please see {@see DocumentProcessorServiceClient::evaluationName()} for help formatting this field. */ diff --git a/DocumentAi/samples/V1/DocumentProcessorServiceClient/list_evaluations.php b/DocumentAi/samples/V1/DocumentProcessorServiceClient/list_evaluations.php index 56204bee4cec..d9fd83952492 100644 --- a/DocumentAi/samples/V1/DocumentProcessorServiceClient/list_evaluations.php +++ b/DocumentAi/samples/V1/DocumentProcessorServiceClient/list_evaluations.php @@ -32,9 +32,7 @@ /** * Retrieves a set of evaluations for a given processor version. * - * @param string $formattedParent The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list - * evaluations for. + * @param string $formattedParent The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list evaluations for. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * Please see {@see DocumentProcessorServiceClient::processorVersionName()} for help formatting this field. */ diff --git a/DocumentAi/samples/V1/DocumentProcessorServiceClient/list_processor_versions.php b/DocumentAi/samples/V1/DocumentProcessorServiceClient/list_processor_versions.php index 6f255e825eef..fdbc0e346d93 100644 --- a/DocumentAi/samples/V1/DocumentProcessorServiceClient/list_processor_versions.php +++ b/DocumentAi/samples/V1/DocumentProcessorServiceClient/list_processor_versions.php @@ -32,9 +32,8 @@ /** * Lists all versions of a processor. * - * @param string $formattedParent The parent (project, location and processor) to list all - * versions. Format: - * `projects/{project}/locations/{location}/processors/{processor}` + * @param string $formattedParent The parent (project, location and processor) to list all versions. + * Format: `projects/{project}/locations/{location}/processors/{processor}` * Please see {@see DocumentProcessorServiceClient::processorName()} for help formatting this field. */ function list_processor_versions_sample(string $formattedParent): void diff --git a/DocumentAi/samples/V1/DocumentProcessorServiceClient/list_processors.php b/DocumentAi/samples/V1/DocumentProcessorServiceClient/list_processors.php index 8e44cb46fb8e..0aa0d1a6308b 100644 --- a/DocumentAi/samples/V1/DocumentProcessorServiceClient/list_processors.php +++ b/DocumentAi/samples/V1/DocumentProcessorServiceClient/list_processors.php @@ -32,8 +32,8 @@ /** * Lists all processors which belong to this project. * - * @param string $formattedParent The parent (project and location) which owns this collection of - * Processors. Format: `projects/{project}/locations/{location}` + * @param string $formattedParent The parent (project and location) which owns this collection of Processors. + * Format: `projects/{project}/locations/{location}` * Please see {@see DocumentProcessorServiceClient::locationName()} for help formatting this field. */ function list_processors_sample(string $formattedParent): void diff --git a/DocumentAi/samples/V1/DocumentProcessorServiceClient/process_document.php b/DocumentAi/samples/V1/DocumentProcessorServiceClient/process_document.php index 83301198db37..b408215b09af 100644 --- a/DocumentAi/samples/V1/DocumentProcessorServiceClient/process_document.php +++ b/DocumentAi/samples/V1/DocumentProcessorServiceClient/process_document.php @@ -31,15 +31,11 @@ /** * Processes a single document. * - * @param string $name The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] or + * @param string $name The resource name of the [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] - * to use for processing. If a - * [Processor][google.cloud.documentai.v1.Processor] is specified, the server - * will use its [default - * version][google.cloud.documentai.v1.Processor.default_processor_version]. - * Format: `projects/{project}/locations/{location}/processors/{processor}`, - * or + * to use for processing. If a [Processor][google.cloud.documentai.v1.Processor] is specified, the server will use + * its [default version][google.cloud.documentai.v1.Processor.default_processor_version]. Format: + * `projects/{project}/locations/{location}/processors/{processor}`, or * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` */ function process_document_sample(string $name): void diff --git a/DocumentAi/samples/V1/DocumentProcessorServiceClient/review_document.php b/DocumentAi/samples/V1/DocumentProcessorServiceClient/review_document.php index de14acf00be8..432799e813f9 100644 --- a/DocumentAi/samples/V1/DocumentProcessorServiceClient/review_document.php +++ b/DocumentAi/samples/V1/DocumentProcessorServiceClient/review_document.php @@ -34,9 +34,8 @@ * Send a document for Human Review. The input document should be processed by * the specified processor. * - * @param string $formattedHumanReviewConfig The resource name of the - * [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the - * document will be reviewed with. Please see + * @param string $formattedHumanReviewConfig The resource name of the [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the document will be + * reviewed with. Please see * {@see DocumentProcessorServiceClient::humanReviewConfigName()} for help formatting this field. */ function review_document_sample(string $formattedHumanReviewConfig): void diff --git a/DocumentAi/samples/V1/DocumentProcessorServiceClient/set_default_processor_version.php b/DocumentAi/samples/V1/DocumentProcessorServiceClient/set_default_processor_version.php index 4f6a0333c6bd..14dc833f029c 100644 --- a/DocumentAi/samples/V1/DocumentProcessorServiceClient/set_default_processor_version.php +++ b/DocumentAi/samples/V1/DocumentProcessorServiceClient/set_default_processor_version.php @@ -31,19 +31,14 @@ use Google\Rpc\Status; /** - * Set the default (active) version of a - * [Processor][google.cloud.documentai.v1.Processor] that will be used in - * [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] - * and + * Set the default (active) version of a [Processor][google.cloud.documentai.v1.Processor] that will be used in + * [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] and * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments]. * - * @param string $formattedProcessor The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] to change default - * version. Please see + * @param string $formattedProcessor The resource name of the [Processor][google.cloud.documentai.v1.Processor] to change default version. Please see * {@see DocumentProcessorServiceClient::processorName()} for help formatting this field. - * @param string $formattedDefaultProcessorVersion The resource name of child - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as - * default. Format: + * @param string $formattedDefaultProcessorVersion The resource name of child [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as default. + * Format: * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}` * Please see {@see DocumentProcessorServiceClient::processorVersionName()} for help formatting this field. */ diff --git a/DocumentAi/samples/V1/DocumentProcessorServiceClient/train_processor_version.php b/DocumentAi/samples/V1/DocumentProcessorServiceClient/train_processor_version.php index 17d67c3e5d87..001de10572ec 100644 --- a/DocumentAi/samples/V1/DocumentProcessorServiceClient/train_processor_version.php +++ b/DocumentAi/samples/V1/DocumentProcessorServiceClient/train_processor_version.php @@ -36,9 +36,8 @@ * Operation metadata is returned as * [TrainProcessorVersionMetadata][google.cloud.documentai.v1.TrainProcessorVersionMetadata]. * - * @param string $formattedParent The parent (project, location and processor) to create the new - * version for. Format: - * `projects/{project}/locations/{location}/processors/{processor}`. Please see + * @param string $formattedParent The parent (project, location and processor) to create the new version for. + * Format: `projects/{project}/locations/{location}/processors/{processor}`. Please see * {@see DocumentProcessorServiceClient::processorName()} for help formatting this field. */ function train_processor_version_sample(string $formattedParent): void diff --git a/DocumentAi/src/V1/BatchProcessMetadata/IndividualProcessStatus.php b/DocumentAi/src/V1/BatchProcessMetadata/IndividualProcessStatus.php index c269b8a5cc9d..49e03ee4c83c 100644 --- a/DocumentAi/src/V1/BatchProcessMetadata/IndividualProcessStatus.php +++ b/DocumentAi/src/V1/BatchProcessMetadata/IndividualProcessStatus.php @@ -16,9 +16,8 @@ class IndividualProcessStatus extends \Google\Protobuf\Internal\Message { /** - * The source of the document, same as the - * [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source] - * field in the request when the batch process started. + * The source of the document, same as the [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source] field in the + * request when the batch process started. * * Generated from protobuf field string input_gcs_source = 1; */ @@ -31,8 +30,8 @@ class IndividualProcessStatus extends \Google\Protobuf\Internal\Message private $status = null; /** * The Cloud Storage output destination (in the request as - * [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri]) - * of the processed document if it was successful, otherwise empty. + * [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri]) of the processed + * document if it was successful, otherwise empty. * * Generated from protobuf field string output_gcs_destination = 3; */ @@ -51,15 +50,14 @@ class IndividualProcessStatus extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $input_gcs_source - * The source of the document, same as the - * [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source] - * field in the request when the batch process started. + * The source of the document, same as the [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source] field in the + * request when the batch process started. * @type \Google\Rpc\Status $status * The status processing the document. * @type string $output_gcs_destination * The Cloud Storage output destination (in the request as - * [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri]) - * of the processed document if it was successful, otherwise empty. + * [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri]) of the processed + * document if it was successful, otherwise empty. * @type \Google\Cloud\DocumentAI\V1\HumanReviewStatus $human_review_status * The status of human review on the processed document. * } @@ -70,9 +68,8 @@ public function __construct($data = NULL) { } /** - * The source of the document, same as the - * [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source] - * field in the request when the batch process started. + * The source of the document, same as the [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source] field in the + * request when the batch process started. * * Generated from protobuf field string input_gcs_source = 1; * @return string @@ -83,9 +80,8 @@ public function getInputGcsSource() } /** - * The source of the document, same as the - * [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source] - * field in the request when the batch process started. + * The source of the document, same as the [input_gcs_source][google.cloud.documentai.v1.BatchProcessMetadata.IndividualProcessStatus.input_gcs_source] field in the + * request when the batch process started. * * Generated from protobuf field string input_gcs_source = 1; * @param string $var @@ -137,8 +133,8 @@ public function setStatus($var) /** * The Cloud Storage output destination (in the request as - * [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri]) - * of the processed document if it was successful, otherwise empty. + * [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri]) of the processed + * document if it was successful, otherwise empty. * * Generated from protobuf field string output_gcs_destination = 3; * @return string @@ -150,8 +146,8 @@ public function getOutputGcsDestination() /** * The Cloud Storage output destination (in the request as - * [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri]) - * of the processed document if it was successful, otherwise empty. + * [DocumentOutputConfig.GcsOutputConfig.gcs_uri][google.cloud.documentai.v1.DocumentOutputConfig.GcsOutputConfig.gcs_uri]) of the processed + * document if it was successful, otherwise empty. * * Generated from protobuf field string output_gcs_destination = 3; * @param string $var diff --git a/DocumentAi/src/V1/BatchProcessRequest.php b/DocumentAi/src/V1/BatchProcessRequest.php index 963bc1d14986..c97e6c96ae63 100644 --- a/DocumentAi/src/V1/BatchProcessRequest.php +++ b/DocumentAi/src/V1/BatchProcessRequest.php @@ -17,8 +17,7 @@ class BatchProcessRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name of - * [Processor][google.cloud.documentai.v1.Processor] or + * Required. The resource name of [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * Format: `projects/{project}/locations/{location}/processors/{processor}`, * or @@ -68,8 +67,7 @@ class BatchProcessRequest extends \Google\Protobuf\Internal\Message private $labels; /** - * @param string $name Required. The resource name of - * [Processor][google.cloud.documentai.v1.Processor] or + * @param string $name Required. The resource name of [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * Format: `projects/{project}/locations/{location}/processors/{processor}`, * or @@ -92,8 +90,7 @@ public static function build(string $name): self * Optional. Data for populating the Message object. * * @type string $name - * Required. The resource name of - * [Processor][google.cloud.documentai.v1.Processor] or + * Required. The resource name of [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * Format: `projects/{project}/locations/{location}/processors/{processor}`, * or @@ -125,8 +122,7 @@ public function __construct($data = NULL) { } /** - * Required. The resource name of - * [Processor][google.cloud.documentai.v1.Processor] or + * Required. The resource name of [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * Format: `projects/{project}/locations/{location}/processors/{processor}`, * or @@ -141,8 +137,7 @@ public function getName() } /** - * Required. The resource name of - * [Processor][google.cloud.documentai.v1.Processor] or + * Required. The resource name of [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * Format: `projects/{project}/locations/{location}/processors/{processor}`, * or diff --git a/DocumentAi/src/V1/Client/DocumentProcessorServiceClient.php b/DocumentAi/src/V1/Client/DocumentProcessorServiceClient.php index ee2355f5ef2e..45299e42b25b 100644 --- a/DocumentAi/src/V1/Client/DocumentProcessorServiceClient.php +++ b/DocumentAi/src/V1/Client/DocumentProcessorServiceClient.php @@ -436,9 +436,8 @@ public function batchProcessDocuments(BatchProcessRequest $request, array $callO } /** - * Creates a processor from the - * [ProcessorType][google.cloud.documentai.v1.ProcessorType] provided. The - * processor will be at `ENABLED` state by default after its creation. + * Creates a processor from the [ProcessorType][google.cloud.documentai.v1.ProcessorType] provided. + * The processor will be at `ENABLED` state by default after its creation. * * The async variant is * {@see DocumentProcessorServiceClient::createProcessorAsync()} . @@ -630,8 +629,7 @@ public function evaluateProcessorVersion(EvaluateProcessorVersionRequest $reques } /** - * Fetches processor types. Note that we don't use - * [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes] + * Fetches processor types. Note that we don't use [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes] * here, because it isn't paginated. * * The async variant is @@ -930,10 +928,8 @@ public function reviewDocument(ReviewDocumentRequest $request, array $callOption } /** - * Set the default (active) version of a - * [Processor][google.cloud.documentai.v1.Processor] that will be used in - * [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] - * and + * Set the default (active) version of a [Processor][google.cloud.documentai.v1.Processor] that will be used in + * [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] and * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments]. * * The async variant is diff --git a/DocumentAi/src/V1/CreateProcessorRequest.php b/DocumentAi/src/V1/CreateProcessorRequest.php index c68fac4ebfb3..a3e8a6c7c008 100644 --- a/DocumentAi/src/V1/CreateProcessorRequest.php +++ b/DocumentAi/src/V1/CreateProcessorRequest.php @@ -10,28 +10,24 @@ /** * Request message for the - * [CreateProcessor][google.cloud.documentai.v1.DocumentProcessorService.CreateProcessor] - * method. Notice this request is sent to a regionalized backend service. If the - * [ProcessorType][google.cloud.documentai.v1.ProcessorType] isn't available in - * that region, the creation fails. + * [CreateProcessor][google.cloud.documentai.v1.DocumentProcessorService.CreateProcessor] method. Notice + * this request is sent to a regionalized backend service. If the + * [ProcessorType][google.cloud.documentai.v1.ProcessorType] isn't available in that region, the creation fails. * * Generated from protobuf message google.cloud.documentai.v1.CreateProcessorRequest */ class CreateProcessorRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The parent (project and location) under which to create the - * processor. Format: `projects/{project}/locations/{location}` + * Required. The parent (project and location) under which to create the processor. + * Format: `projects/{project}/locations/{location}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ private $parent = ''; /** - * Required. The processor to be created, requires - * [Processor.type][google.cloud.documentai.v1.Processor.type] and - * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] - * to be set. Also, the - * [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] + * Required. The processor to be created, requires [Processor.type][google.cloud.documentai.v1.Processor.type] and + * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] to be set. Also, the [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] * field must be set if the processor is under CMEK. * * Generated from protobuf field .google.cloud.documentai.v1.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -39,14 +35,11 @@ class CreateProcessorRequest extends \Google\Protobuf\Internal\Message private $processor = null; /** - * @param string $parent Required. The parent (project and location) under which to create the - * processor. Format: `projects/{project}/locations/{location}` + * @param string $parent Required. The parent (project and location) under which to create the processor. + * Format: `projects/{project}/locations/{location}` * Please see {@see DocumentProcessorServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\DocumentAI\V1\Processor $processor Required. The processor to be created, requires - * [Processor.type][google.cloud.documentai.v1.Processor.type] and - * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] - * to be set. Also, the - * [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] + * @param \Google\Cloud\DocumentAI\V1\Processor $processor Required. The processor to be created, requires [Processor.type][google.cloud.documentai.v1.Processor.type] and + * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] to be set. Also, the [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] * field must be set if the processor is under CMEK. * * @return \Google\Cloud\DocumentAI\V1\CreateProcessorRequest @@ -67,14 +60,11 @@ public static function build(string $parent, \Google\Cloud\DocumentAI\V1\Process * Optional. Data for populating the Message object. * * @type string $parent - * Required. The parent (project and location) under which to create the - * processor. Format: `projects/{project}/locations/{location}` + * Required. The parent (project and location) under which to create the processor. + * Format: `projects/{project}/locations/{location}` * @type \Google\Cloud\DocumentAI\V1\Processor $processor - * Required. The processor to be created, requires - * [Processor.type][google.cloud.documentai.v1.Processor.type] and - * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] - * to be set. Also, the - * [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] + * Required. The processor to be created, requires [Processor.type][google.cloud.documentai.v1.Processor.type] and + * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] to be set. Also, the [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] * field must be set if the processor is under CMEK. * } */ @@ -84,8 +74,8 @@ public function __construct($data = NULL) { } /** - * Required. The parent (project and location) under which to create the - * processor. Format: `projects/{project}/locations/{location}` + * Required. The parent (project and location) under which to create the processor. + * Format: `projects/{project}/locations/{location}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -96,8 +86,8 @@ public function getParent() } /** - * Required. The parent (project and location) under which to create the - * processor. Format: `projects/{project}/locations/{location}` + * Required. The parent (project and location) under which to create the processor. + * Format: `projects/{project}/locations/{location}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var @@ -112,11 +102,8 @@ public function setParent($var) } /** - * Required. The processor to be created, requires - * [Processor.type][google.cloud.documentai.v1.Processor.type] and - * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] - * to be set. Also, the - * [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] + * Required. The processor to be created, requires [Processor.type][google.cloud.documentai.v1.Processor.type] and + * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] to be set. Also, the [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] * field must be set if the processor is under CMEK. * * Generated from protobuf field .google.cloud.documentai.v1.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -138,11 +125,8 @@ public function clearProcessor() } /** - * Required. The processor to be created, requires - * [Processor.type][google.cloud.documentai.v1.Processor.type] and - * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] - * to be set. Also, the - * [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] + * Required. The processor to be created, requires [Processor.type][google.cloud.documentai.v1.Processor.type] and + * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] to be set. Also, the [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] * field must be set if the processor is under CMEK. * * Generated from protobuf field .google.cloud.documentai.v1.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED]; diff --git a/DocumentAi/src/V1/DeleteProcessorMetadata.php b/DocumentAi/src/V1/DeleteProcessorMetadata.php index 95359c1f8ea2..0c4a43a40dbf 100644 --- a/DocumentAi/src/V1/DeleteProcessorMetadata.php +++ b/DocumentAi/src/V1/DeleteProcessorMetadata.php @@ -10,8 +10,7 @@ /** * The long-running operation metadata for the - * [DeleteProcessor][google.cloud.documentai.v1.DocumentProcessorService.DeleteProcessor] - * method. + * [DeleteProcessor][google.cloud.documentai.v1.DocumentProcessorService.DeleteProcessor] method. * * Generated from protobuf message google.cloud.documentai.v1.DeleteProcessorMetadata */ diff --git a/DocumentAi/src/V1/DeleteProcessorRequest.php b/DocumentAi/src/V1/DeleteProcessorRequest.php index 886e6f7d768b..eb2d18fe3429 100644 --- a/DocumentAi/src/V1/DeleteProcessorRequest.php +++ b/DocumentAi/src/V1/DeleteProcessorRequest.php @@ -10,8 +10,7 @@ /** * Request message for the - * [DeleteProcessor][google.cloud.documentai.v1.DocumentProcessorService.DeleteProcessor] - * method. + * [DeleteProcessor][google.cloud.documentai.v1.DocumentProcessorService.DeleteProcessor] method. * * Generated from protobuf message google.cloud.documentai.v1.DeleteProcessorRequest */ diff --git a/DocumentAi/src/V1/DisableProcessorMetadata.php b/DocumentAi/src/V1/DisableProcessorMetadata.php index 775058edf461..044c3e9c73b6 100644 --- a/DocumentAi/src/V1/DisableProcessorMetadata.php +++ b/DocumentAi/src/V1/DisableProcessorMetadata.php @@ -10,8 +10,7 @@ /** * The long-running operation metadata for the - * [DisableProcessor][google.cloud.documentai.v1.DocumentProcessorService.DisableProcessor] - * method. + * [DisableProcessor][google.cloud.documentai.v1.DocumentProcessorService.DisableProcessor] method. * * Generated from protobuf message google.cloud.documentai.v1.DisableProcessorMetadata */ diff --git a/DocumentAi/src/V1/DisableProcessorRequest.php b/DocumentAi/src/V1/DisableProcessorRequest.php index 55e51e24d0de..575dfe00ec56 100644 --- a/DocumentAi/src/V1/DisableProcessorRequest.php +++ b/DocumentAi/src/V1/DisableProcessorRequest.php @@ -10,8 +10,7 @@ /** * Request message for the - * [DisableProcessor][google.cloud.documentai.v1.DocumentProcessorService.DisableProcessor] - * method. + * [DisableProcessor][google.cloud.documentai.v1.DocumentProcessorService.DisableProcessor] method. * * Generated from protobuf message google.cloud.documentai.v1.DisableProcessorRequest */ diff --git a/DocumentAi/src/V1/DisableProcessorResponse.php b/DocumentAi/src/V1/DisableProcessorResponse.php index f1f15d776735..5b1db499a5d0 100644 --- a/DocumentAi/src/V1/DisableProcessorResponse.php +++ b/DocumentAi/src/V1/DisableProcessorResponse.php @@ -10,8 +10,8 @@ /** * Response message for the - * [DisableProcessor][google.cloud.documentai.v1.DocumentProcessorService.DisableProcessor] - * method. Intentionally empty proto for adding fields in future. + * [DisableProcessor][google.cloud.documentai.v1.DocumentProcessorService.DisableProcessor] method. + * Intentionally empty proto for adding fields in future. * * Generated from protobuf message google.cloud.documentai.v1.DisableProcessorResponse */ diff --git a/DocumentAi/src/V1/Document.php b/DocumentAi/src/V1/Document.php index 680a4cb3d531..1d12d75d8d18 100644 --- a/DocumentAi/src/V1/Document.php +++ b/DocumentAi/src/V1/Document.php @@ -45,25 +45,22 @@ class Document extends \Google\Protobuf\Internal\Message */ private $pages; /** - * A list of entities detected on - * [Document.text][google.cloud.documentai.v1.Document.text]. For document - * shards, entities in this list may cross shard boundaries. + * A list of entities detected on [Document.text][google.cloud.documentai.v1.Document.text]. For document shards, + * entities in this list may cross shard boundaries. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity entities = 7; */ private $entities; /** - * Placeholder. Relationship among - * [Document.entities][google.cloud.documentai.v1.Document.entities]. + * Placeholder. Relationship among [Document.entities][google.cloud.documentai.v1.Document.entities]. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.EntityRelation entity_relations = 8; */ private $entity_relations; /** - * Placeholder. A list of text corrections made to - * [Document.text][google.cloud.documentai.v1.Document.text]. This is usually - * used for annotating corrections to OCR mistakes. Text changes for a given - * revision may not overlap with each other. + * Placeholder. A list of text corrections made to [Document.text][google.cloud.documentai.v1.Document.text]. This + * is usually used for annotating corrections to OCR mistakes. Text changes + * for a given revision may not overlap with each other. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextChange text_changes = 14; */ @@ -114,17 +111,14 @@ class Document extends \Google\Protobuf\Internal\Message * @type array<\Google\Cloud\DocumentAI\V1\Document\Page>|\Google\Protobuf\Internal\RepeatedField $pages * Visual page layout for the [Document][google.cloud.documentai.v1.Document]. * @type array<\Google\Cloud\DocumentAI\V1\Document\Entity>|\Google\Protobuf\Internal\RepeatedField $entities - * A list of entities detected on - * [Document.text][google.cloud.documentai.v1.Document.text]. For document - * shards, entities in this list may cross shard boundaries. + * A list of entities detected on [Document.text][google.cloud.documentai.v1.Document.text]. For document shards, + * entities in this list may cross shard boundaries. * @type array<\Google\Cloud\DocumentAI\V1\Document\EntityRelation>|\Google\Protobuf\Internal\RepeatedField $entity_relations - * Placeholder. Relationship among - * [Document.entities][google.cloud.documentai.v1.Document.entities]. + * Placeholder. Relationship among [Document.entities][google.cloud.documentai.v1.Document.entities]. * @type array<\Google\Cloud\DocumentAI\V1\Document\TextChange>|\Google\Protobuf\Internal\RepeatedField $text_changes - * Placeholder. A list of text corrections made to - * [Document.text][google.cloud.documentai.v1.Document.text]. This is usually - * used for annotating corrections to OCR mistakes. Text changes for a given - * revision may not overlap with each other. + * Placeholder. A list of text corrections made to [Document.text][google.cloud.documentai.v1.Document.text]. This + * is usually used for annotating corrections to OCR mistakes. Text changes + * for a given revision may not overlap with each other. * @type \Google\Cloud\DocumentAI\V1\Document\ShardInfo $shard_info * Information about the sharding if this document is sharded part of a larger * document. If the document is not sharded, this message is not specified. @@ -322,9 +316,8 @@ public function setPages($var) } /** - * A list of entities detected on - * [Document.text][google.cloud.documentai.v1.Document.text]. For document - * shards, entities in this list may cross shard boundaries. + * A list of entities detected on [Document.text][google.cloud.documentai.v1.Document.text]. For document shards, + * entities in this list may cross shard boundaries. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity entities = 7; * @return \Google\Protobuf\Internal\RepeatedField @@ -335,9 +328,8 @@ public function getEntities() } /** - * A list of entities detected on - * [Document.text][google.cloud.documentai.v1.Document.text]. For document - * shards, entities in this list may cross shard boundaries. + * A list of entities detected on [Document.text][google.cloud.documentai.v1.Document.text]. For document shards, + * entities in this list may cross shard boundaries. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity entities = 7; * @param array<\Google\Cloud\DocumentAI\V1\Document\Entity>|\Google\Protobuf\Internal\RepeatedField $var @@ -352,8 +344,7 @@ public function setEntities($var) } /** - * Placeholder. Relationship among - * [Document.entities][google.cloud.documentai.v1.Document.entities]. + * Placeholder. Relationship among [Document.entities][google.cloud.documentai.v1.Document.entities]. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.EntityRelation entity_relations = 8; * @return \Google\Protobuf\Internal\RepeatedField @@ -364,8 +355,7 @@ public function getEntityRelations() } /** - * Placeholder. Relationship among - * [Document.entities][google.cloud.documentai.v1.Document.entities]. + * Placeholder. Relationship among [Document.entities][google.cloud.documentai.v1.Document.entities]. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.EntityRelation entity_relations = 8; * @param array<\Google\Cloud\DocumentAI\V1\Document\EntityRelation>|\Google\Protobuf\Internal\RepeatedField $var @@ -380,10 +370,9 @@ public function setEntityRelations($var) } /** - * Placeholder. A list of text corrections made to - * [Document.text][google.cloud.documentai.v1.Document.text]. This is usually - * used for annotating corrections to OCR mistakes. Text changes for a given - * revision may not overlap with each other. + * Placeholder. A list of text corrections made to [Document.text][google.cloud.documentai.v1.Document.text]. This + * is usually used for annotating corrections to OCR mistakes. Text changes + * for a given revision may not overlap with each other. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextChange text_changes = 14; * @return \Google\Protobuf\Internal\RepeatedField @@ -394,10 +383,9 @@ public function getTextChanges() } /** - * Placeholder. A list of text corrections made to - * [Document.text][google.cloud.documentai.v1.Document.text]. This is usually - * used for annotating corrections to OCR mistakes. Text changes for a given - * revision may not overlap with each other. + * Placeholder. A list of text corrections made to [Document.text][google.cloud.documentai.v1.Document.text]. This + * is usually used for annotating corrections to OCR mistakes. Text changes + * for a given revision may not overlap with each other. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextChange text_changes = 14; * @param array<\Google\Cloud\DocumentAI\V1\Document\TextChange>|\Google\Protobuf\Internal\RepeatedField $var diff --git a/DocumentAi/src/V1/Document/Entity.php b/DocumentAi/src/V1/Document/Entity.php index 57bd426eb317..7f9ee563e314 100644 --- a/DocumentAi/src/V1/Document/Entity.php +++ b/DocumentAi/src/V1/Document/Entity.php @@ -19,8 +19,7 @@ class Entity extends \Google\Protobuf\Internal\Message { /** * Optional. Provenance of the entity. - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -50,8 +49,8 @@ class Entity extends \Google\Protobuf\Internal\Message */ private $confidence = 0.0; /** - * Optional. Represents the provenance of this entity wrt. the location on - * the page where it was found. + * Optional. Represents the provenance of this entity wrt. the location on the + * page where it was found. * * Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -64,8 +63,8 @@ class Entity extends \Google\Protobuf\Internal\Message */ private $id = ''; /** - * Optional. Normalized entity value. Absent if the extracted value could - * not be converted or the type (e.g. address) is not supported for certain + * Optional. Normalized entity value. Absent if the extracted value could not be + * converted or the type (e.g. address) is not supported for certain * parsers. This field is also only populated for certain supported document * types. * @@ -73,8 +72,8 @@ class Entity extends \Google\Protobuf\Internal\Message */ private $normalized_value = null; /** - * Optional. Entities can be nested to form a hierarchical data structure - * representing the content in the document. + * Optional. Entities can be nested to form a hierarchical data structure representing + * the content in the document. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -86,8 +85,7 @@ class Entity extends \Google\Protobuf\Internal\Message */ private $provenance = null; /** - * Optional. Whether the entity will be redacted for de-identification - * purposes. + * Optional. Whether the entity will be redacted for de-identification purposes. * * Generated from protobuf field bool redacted = 12 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -101,8 +99,7 @@ class Entity extends \Google\Protobuf\Internal\Message * * @type \Google\Cloud\DocumentAI\V1\Document\TextAnchor $text_anchor * Optional. Provenance of the entity. - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * @type string $type * Required. Entity type from a schema e.g. `Address`. * @type string $mention_text @@ -112,24 +109,23 @@ class Entity extends \Google\Protobuf\Internal\Message * @type float $confidence * Optional. Confidence of detected Schema entity. Range `[0, 1]`. * @type \Google\Cloud\DocumentAI\V1\Document\PageAnchor $page_anchor - * Optional. Represents the provenance of this entity wrt. the location on - * the page where it was found. + * Optional. Represents the provenance of this entity wrt. the location on the + * page where it was found. * @type string $id * Optional. Canonical id. This will be a unique value in the entity list * for this document. * @type \Google\Cloud\DocumentAI\V1\Document\Entity\NormalizedValue $normalized_value - * Optional. Normalized entity value. Absent if the extracted value could - * not be converted or the type (e.g. address) is not supported for certain + * Optional. Normalized entity value. Absent if the extracted value could not be + * converted or the type (e.g. address) is not supported for certain * parsers. This field is also only populated for certain supported document * types. * @type array<\Google\Cloud\DocumentAI\V1\Document\Entity>|\Google\Protobuf\Internal\RepeatedField $properties - * Optional. Entities can be nested to form a hierarchical data structure - * representing the content in the document. + * Optional. Entities can be nested to form a hierarchical data structure representing + * the content in the document. * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance * Optional. The history of this annotation. * @type bool $redacted - * Optional. Whether the entity will be redacted for de-identification - * purposes. + * Optional. Whether the entity will be redacted for de-identification purposes. * } */ public function __construct($data = NULL) { @@ -139,8 +135,7 @@ public function __construct($data = NULL) { /** * Optional. Provenance of the entity. - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\DocumentAI\V1\Document\TextAnchor|null @@ -162,8 +157,7 @@ public function clearTextAnchor() /** * Optional. Provenance of the entity. - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\DocumentAI\V1\Document\TextAnchor $var @@ -282,8 +276,8 @@ public function setConfidence($var) } /** - * Optional. Represents the provenance of this entity wrt. the location on - * the page where it was found. + * Optional. Represents the provenance of this entity wrt. the location on the + * page where it was found. * * Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\DocumentAI\V1\Document\PageAnchor|null @@ -304,8 +298,8 @@ public function clearPageAnchor() } /** - * Optional. Represents the provenance of this entity wrt. the location on - * the page where it was found. + * Optional. Represents the provenance of this entity wrt. the location on the + * page where it was found. * * Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor page_anchor = 6 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\DocumentAI\V1\Document\PageAnchor $var @@ -348,8 +342,8 @@ public function setId($var) } /** - * Optional. Normalized entity value. Absent if the extracted value could - * not be converted or the type (e.g. address) is not supported for certain + * Optional. Normalized entity value. Absent if the extracted value could not be + * converted or the type (e.g. address) is not supported for certain * parsers. This field is also only populated for certain supported document * types. * @@ -372,8 +366,8 @@ public function clearNormalizedValue() } /** - * Optional. Normalized entity value. Absent if the extracted value could - * not be converted or the type (e.g. address) is not supported for certain + * Optional. Normalized entity value. Absent if the extracted value could not be + * converted or the type (e.g. address) is not supported for certain * parsers. This field is also only populated for certain supported document * types. * @@ -390,8 +384,8 @@ public function setNormalizedValue($var) } /** - * Optional. Entities can be nested to form a hierarchical data structure - * representing the content in the document. + * Optional. Entities can be nested to form a hierarchical data structure representing + * the content in the document. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\RepeatedField @@ -402,8 +396,8 @@ public function getProperties() } /** - * Optional. Entities can be nested to form a hierarchical data structure - * representing the content in the document. + * Optional. Entities can be nested to form a hierarchical data structure representing + * the content in the document. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.Entity properties = 10 [(.google.api.field_behavior) = OPTIONAL]; * @param array<\Google\Cloud\DocumentAI\V1\Document\Entity>|\Google\Protobuf\Internal\RepeatedField $var @@ -454,8 +448,7 @@ public function setProvenance($var) } /** - * Optional. Whether the entity will be redacted for de-identification - * purposes. + * Optional. Whether the entity will be redacted for de-identification purposes. * * Generated from protobuf field bool redacted = 12 [(.google.api.field_behavior) = OPTIONAL]; * @return bool @@ -466,8 +459,7 @@ public function getRedacted() } /** - * Optional. Whether the entity will be redacted for de-identification - * purposes. + * Optional. Whether the entity will be redacted for de-identification purposes. * * Generated from protobuf field bool redacted = 12 [(.google.api.field_behavior) = OPTIONAL]; * @param bool $var diff --git a/DocumentAi/src/V1/Document/EntityRelation.php b/DocumentAi/src/V1/Document/EntityRelation.php index 7669e0965bf4..a9a0a239a4ae 100644 --- a/DocumentAi/src/V1/Document/EntityRelation.php +++ b/DocumentAi/src/V1/Document/EntityRelation.php @@ -9,8 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Relationship between - * [Entities][google.cloud.documentai.v1.Document.Entity]. + * Relationship between [Entities][google.cloud.documentai.v1.Document.Entity]. * * Generated from protobuf message google.cloud.documentai.v1.Document.EntityRelation */ diff --git a/DocumentAi/src/V1/Document/Page.php b/DocumentAi/src/V1/Document/Page.php index d9a35c1a6238..d783a0631b05 100644 --- a/DocumentAi/src/V1/Document/Page.php +++ b/DocumentAi/src/V1/Document/Page.php @@ -16,11 +16,9 @@ class Page extends \Google\Protobuf\Internal\Message { /** - * 1-based index for current - * [Page][google.cloud.documentai.v1.Document.Page] in a parent - * [Document][google.cloud.documentai.v1.Document]. Useful when a page is - * taken out of a [Document][google.cloud.documentai.v1.Document] for - * individual processing. + * 1-based index for current [Page][google.cloud.documentai.v1.Document.Page] in a parent [Document][google.cloud.documentai.v1.Document]. + * Useful when a page is taken out of a [Document][google.cloud.documentai.v1.Document] for individual + * processing. * * Generated from protobuf field int32 page_number = 1; */ @@ -138,11 +136,9 @@ class Page extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type int $page_number - * 1-based index for current - * [Page][google.cloud.documentai.v1.Document.Page] in a parent - * [Document][google.cloud.documentai.v1.Document]. Useful when a page is - * taken out of a [Document][google.cloud.documentai.v1.Document] for - * individual processing. + * 1-based index for current [Page][google.cloud.documentai.v1.Document.Page] in a parent [Document][google.cloud.documentai.v1.Document]. + * Useful when a page is taken out of a [Document][google.cloud.documentai.v1.Document] for individual + * processing. * @type \Google\Cloud\DocumentAI\V1\Document\Page\Image $image * Rendered image for this page. This image is preprocessed to remove any * skew, rotation, and distortions such that the annotation bounding boxes @@ -191,11 +187,9 @@ public function __construct($data = NULL) { } /** - * 1-based index for current - * [Page][google.cloud.documentai.v1.Document.Page] in a parent - * [Document][google.cloud.documentai.v1.Document]. Useful when a page is - * taken out of a [Document][google.cloud.documentai.v1.Document] for - * individual processing. + * 1-based index for current [Page][google.cloud.documentai.v1.Document.Page] in a parent [Document][google.cloud.documentai.v1.Document]. + * Useful when a page is taken out of a [Document][google.cloud.documentai.v1.Document] for individual + * processing. * * Generated from protobuf field int32 page_number = 1; * @return int @@ -206,11 +200,9 @@ public function getPageNumber() } /** - * 1-based index for current - * [Page][google.cloud.documentai.v1.Document.Page] in a parent - * [Document][google.cloud.documentai.v1.Document]. Useful when a page is - * taken out of a [Document][google.cloud.documentai.v1.Document] for - * individual processing. + * 1-based index for current [Page][google.cloud.documentai.v1.Document.Page] in a parent [Document][google.cloud.documentai.v1.Document]. + * Useful when a page is taken out of a [Document][google.cloud.documentai.v1.Document] for individual + * processing. * * Generated from protobuf field int32 page_number = 1; * @param int $var diff --git a/DocumentAi/src/V1/Document/Page/Block.php b/DocumentAi/src/V1/Document/Page/Block.php index 9db40cafb22a..6d7b6e90d732 100644 --- a/DocumentAi/src/V1/Document/Page/Block.php +++ b/DocumentAi/src/V1/Document/Page/Block.php @@ -17,8 +17,7 @@ class Block extends \Google\Protobuf\Internal\Message { /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Block][google.cloud.documentai.v1.Document.Page.Block]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Block][google.cloud.documentai.v1.Document.Page.Block]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; */ @@ -44,8 +43,7 @@ class Block extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Block][google.cloud.documentai.v1.Document.Page.Block]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Block][google.cloud.documentai.v1.Document.Page.Block]. * @type array<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $detected_languages * A list of detected languages together with confidence. * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance @@ -58,8 +56,7 @@ public function __construct($data = NULL) { } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Block][google.cloud.documentai.v1.Document.Page.Block]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Block][google.cloud.documentai.v1.Document.Page.Block]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null @@ -80,8 +77,7 @@ public function clearLayout() } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Block][google.cloud.documentai.v1.Document.Page.Block]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Block][google.cloud.documentai.v1.Document.Page.Block]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var diff --git a/DocumentAi/src/V1/Document/Page/DetectedBarcode.php b/DocumentAi/src/V1/Document/Page/DetectedBarcode.php index e9f2aad81448..d1ba2db32d1b 100644 --- a/DocumentAi/src/V1/Document/Page/DetectedBarcode.php +++ b/DocumentAi/src/V1/Document/Page/DetectedBarcode.php @@ -16,15 +16,13 @@ class DetectedBarcode extends \Google\Protobuf\Internal\Message { /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; */ private $layout = null; /** - * Detailed barcode information of the - * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + * Detailed barcode information of the [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. * * Generated from protobuf field .google.cloud.documentai.v1.Barcode barcode = 2; */ @@ -37,11 +35,9 @@ class DetectedBarcode extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. * @type \Google\Cloud\DocumentAI\V1\Barcode $barcode - * Detailed barcode information of the - * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + * Detailed barcode information of the [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. * } */ public function __construct($data = NULL) { @@ -50,8 +46,7 @@ public function __construct($data = NULL) { } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null @@ -72,8 +67,7 @@ public function clearLayout() } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var @@ -88,8 +82,7 @@ public function setLayout($var) } /** - * Detailed barcode information of the - * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + * Detailed barcode information of the [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. * * Generated from protobuf field .google.cloud.documentai.v1.Barcode barcode = 2; * @return \Google\Cloud\DocumentAI\V1\Barcode|null @@ -110,8 +103,7 @@ public function clearBarcode() } /** - * Detailed barcode information of the - * [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. + * Detailed barcode information of the [DetectedBarcode][google.cloud.documentai.v1.Document.Page.DetectedBarcode]. * * Generated from protobuf field .google.cloud.documentai.v1.Barcode barcode = 2; * @param \Google\Cloud\DocumentAI\V1\Barcode $var diff --git a/DocumentAi/src/V1/Document/Page/FormField.php b/DocumentAi/src/V1/Document/Page/FormField.php index ebc285d717cc..0bc6ad4e5ef1 100644 --- a/DocumentAi/src/V1/Document/Page/FormField.php +++ b/DocumentAi/src/V1/Document/Page/FormField.php @@ -16,16 +16,14 @@ class FormField extends \Google\Protobuf\Internal\Message { /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the - * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. - * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. e.g. `Address`, `Email`, + * `Grand total`, `Phone number`, etc. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; */ private $field_name = null; /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the - * [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_value = 2; */ @@ -82,12 +80,10 @@ class FormField extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $field_name - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the - * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. - * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. e.g. `Address`, `Email`, + * `Grand total`, `Phone number`, etc. * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $field_value - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the - * [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. * @type array<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $name_detected_languages * A list of detected languages for name together with confidence. * @type array<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $value_detected_languages @@ -116,9 +112,8 @@ public function __construct($data = NULL) { } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the - * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. - * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. e.g. `Address`, `Email`, + * `Grand total`, `Phone number`, etc. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null @@ -139,9 +134,8 @@ public function clearFieldName() } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the - * [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. - * e.g. `Address`, `Email`, `Grand total`, `Phone number`, etc. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1.Document.Page.FormField] name. e.g. `Address`, `Email`, + * `Grand total`, `Phone number`, etc. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_name = 1; * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var @@ -156,8 +150,7 @@ public function setFieldName($var) } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the - * [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_value = 2; * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null @@ -178,8 +171,7 @@ public function clearFieldValue() } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the - * [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for the [FormField][google.cloud.documentai.v1.Document.Page.FormField] value. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout field_value = 2; * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var diff --git a/DocumentAi/src/V1/Document/Page/Layout.php b/DocumentAi/src/V1/Document/Page/Layout.php index 96282db495cb..dc7aca276aee 100644 --- a/DocumentAi/src/V1/Document/Page/Layout.php +++ b/DocumentAi/src/V1/Document/Page/Layout.php @@ -16,32 +16,27 @@ class Layout extends \Google\Protobuf\Internal\Message { /** - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; */ private $text_anchor = null; /** - * Confidence of the current - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] within - * context of the object this layout is for. e.g. confidence can be for a - * single token, a table, a visual element, etc. depending on context. - * Range `[0, 1]`. + * Confidence of the current [Layout][google.cloud.documentai.v1.Document.Page.Layout] within context of the object this + * layout is for. e.g. confidence can be for a single token, a table, + * a visual element, etc. depending on context. Range `[0, 1]`. * * Generated from protobuf field float confidence = 2; */ private $confidence = 0.0; /** - * The bounding polygon for the - * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + * The bounding polygon for the [Layout][google.cloud.documentai.v1.Document.Page.Layout]. * * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_poly = 3; */ private $bounding_poly = null; /** - * Detected orientation for the - * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + * Detected orientation for the [Layout][google.cloud.documentai.v1.Document.Page.Layout]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout.Orientation orientation = 4; */ @@ -54,20 +49,15 @@ class Layout extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\DocumentAI\V1\Document\TextAnchor $text_anchor - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * @type float $confidence - * Confidence of the current - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] within - * context of the object this layout is for. e.g. confidence can be for a - * single token, a table, a visual element, etc. depending on context. - * Range `[0, 1]`. + * Confidence of the current [Layout][google.cloud.documentai.v1.Document.Page.Layout] within context of the object this + * layout is for. e.g. confidence can be for a single token, a table, + * a visual element, etc. depending on context. Range `[0, 1]`. * @type \Google\Cloud\DocumentAI\V1\BoundingPoly $bounding_poly - * The bounding polygon for the - * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + * The bounding polygon for the [Layout][google.cloud.documentai.v1.Document.Page.Layout]. * @type int $orientation - * Detected orientation for the - * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + * Detected orientation for the [Layout][google.cloud.documentai.v1.Document.Page.Layout]. * } */ public function __construct($data = NULL) { @@ -76,8 +66,7 @@ public function __construct($data = NULL) { } /** - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; * @return \Google\Cloud\DocumentAI\V1\Document\TextAnchor|null @@ -98,8 +87,7 @@ public function clearTextAnchor() } /** - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; * @param \Google\Cloud\DocumentAI\V1\Document\TextAnchor $var @@ -114,11 +102,9 @@ public function setTextAnchor($var) } /** - * Confidence of the current - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] within - * context of the object this layout is for. e.g. confidence can be for a - * single token, a table, a visual element, etc. depending on context. - * Range `[0, 1]`. + * Confidence of the current [Layout][google.cloud.documentai.v1.Document.Page.Layout] within context of the object this + * layout is for. e.g. confidence can be for a single token, a table, + * a visual element, etc. depending on context. Range `[0, 1]`. * * Generated from protobuf field float confidence = 2; * @return float @@ -129,11 +115,9 @@ public function getConfidence() } /** - * Confidence of the current - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] within - * context of the object this layout is for. e.g. confidence can be for a - * single token, a table, a visual element, etc. depending on context. - * Range `[0, 1]`. + * Confidence of the current [Layout][google.cloud.documentai.v1.Document.Page.Layout] within context of the object this + * layout is for. e.g. confidence can be for a single token, a table, + * a visual element, etc. depending on context. Range `[0, 1]`. * * Generated from protobuf field float confidence = 2; * @param float $var @@ -148,8 +132,7 @@ public function setConfidence($var) } /** - * The bounding polygon for the - * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + * The bounding polygon for the [Layout][google.cloud.documentai.v1.Document.Page.Layout]. * * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_poly = 3; * @return \Google\Cloud\DocumentAI\V1\BoundingPoly|null @@ -170,8 +153,7 @@ public function clearBoundingPoly() } /** - * The bounding polygon for the - * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + * The bounding polygon for the [Layout][google.cloud.documentai.v1.Document.Page.Layout]. * * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_poly = 3; * @param \Google\Cloud\DocumentAI\V1\BoundingPoly $var @@ -186,8 +168,7 @@ public function setBoundingPoly($var) } /** - * Detected orientation for the - * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + * Detected orientation for the [Layout][google.cloud.documentai.v1.Document.Page.Layout]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout.Orientation orientation = 4; * @return int @@ -198,8 +179,7 @@ public function getOrientation() } /** - * Detected orientation for the - * [Layout][google.cloud.documentai.v1.Document.Page.Layout]. + * Detected orientation for the [Layout][google.cloud.documentai.v1.Document.Page.Layout]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout.Orientation orientation = 4; * @param int $var diff --git a/DocumentAi/src/V1/Document/Page/Line.php b/DocumentAi/src/V1/Document/Page/Line.php index cac636117910..7553c0232203 100644 --- a/DocumentAi/src/V1/Document/Page/Line.php +++ b/DocumentAi/src/V1/Document/Page/Line.php @@ -17,8 +17,7 @@ class Line extends \Google\Protobuf\Internal\Message { /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Line][google.cloud.documentai.v1.Document.Page.Line]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Line][google.cloud.documentai.v1.Document.Page.Line]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; */ @@ -44,8 +43,7 @@ class Line extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Line][google.cloud.documentai.v1.Document.Page.Line]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Line][google.cloud.documentai.v1.Document.Page.Line]. * @type array<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $detected_languages * A list of detected languages together with confidence. * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance @@ -58,8 +56,7 @@ public function __construct($data = NULL) { } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Line][google.cloud.documentai.v1.Document.Page.Line]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Line][google.cloud.documentai.v1.Document.Page.Line]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null @@ -80,8 +77,7 @@ public function clearLayout() } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Line][google.cloud.documentai.v1.Document.Page.Line]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Line][google.cloud.documentai.v1.Document.Page.Line]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var diff --git a/DocumentAi/src/V1/Document/Page/Paragraph.php b/DocumentAi/src/V1/Document/Page/Paragraph.php index c22535ac9486..2d11cc1b091c 100644 --- a/DocumentAi/src/V1/Document/Page/Paragraph.php +++ b/DocumentAi/src/V1/Document/Page/Paragraph.php @@ -16,8 +16,7 @@ class Paragraph extends \Google\Protobuf\Internal\Message { /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; */ @@ -43,8 +42,7 @@ class Paragraph extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. * @type array<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $detected_languages * A list of detected languages together with confidence. * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance @@ -57,8 +55,7 @@ public function __construct($data = NULL) { } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null @@ -79,8 +76,7 @@ public function clearLayout() } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Paragraph][google.cloud.documentai.v1.Document.Page.Paragraph]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var diff --git a/DocumentAi/src/V1/Document/Page/Symbol.php b/DocumentAi/src/V1/Document/Page/Symbol.php index a2bc27bfde2a..2b4815fefcb5 100644 --- a/DocumentAi/src/V1/Document/Page/Symbol.php +++ b/DocumentAi/src/V1/Document/Page/Symbol.php @@ -16,8 +16,7 @@ class Symbol extends \Google\Protobuf\Internal\Message { /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; */ @@ -36,8 +35,7 @@ class Symbol extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. * @type array<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $detected_languages * A list of detected languages together with confidence. * } @@ -48,8 +46,7 @@ public function __construct($data = NULL) { } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null @@ -70,8 +67,7 @@ public function clearLayout() } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Symbol][google.cloud.documentai.v1.Document.Page.Symbol]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var diff --git a/DocumentAi/src/V1/Document/Page/Table.php b/DocumentAi/src/V1/Document/Page/Table.php index 3e9e5a4c50d4..c73fb0b00828 100644 --- a/DocumentAi/src/V1/Document/Page/Table.php +++ b/DocumentAi/src/V1/Document/Page/Table.php @@ -16,8 +16,7 @@ class Table extends \Google\Protobuf\Internal\Message { /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Table][google.cloud.documentai.v1.Document.Page.Table]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Table][google.cloud.documentai.v1.Document.Page.Table]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; */ @@ -55,8 +54,7 @@ class Table extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Table][google.cloud.documentai.v1.Document.Page.Table]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Table][google.cloud.documentai.v1.Document.Page.Table]. * @type array<\Google\Cloud\DocumentAI\V1\Document\Page\Table\TableRow>|\Google\Protobuf\Internal\RepeatedField $header_rows * Header rows of the table. * @type array<\Google\Cloud\DocumentAI\V1\Document\Page\Table\TableRow>|\Google\Protobuf\Internal\RepeatedField $body_rows @@ -73,8 +71,7 @@ public function __construct($data = NULL) { } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Table][google.cloud.documentai.v1.Document.Page.Table]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Table][google.cloud.documentai.v1.Document.Page.Table]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null @@ -95,8 +92,7 @@ public function clearLayout() } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Table][google.cloud.documentai.v1.Document.Page.Table]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Table][google.cloud.documentai.v1.Document.Page.Table]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var diff --git a/DocumentAi/src/V1/Document/Page/Table/TableCell.php b/DocumentAi/src/V1/Document/Page/Table/TableCell.php index 0339697c8857..696a1a17ad88 100644 --- a/DocumentAi/src/V1/Document/Page/Table/TableCell.php +++ b/DocumentAi/src/V1/Document/Page/Table/TableCell.php @@ -16,8 +16,7 @@ class TableCell extends \Google\Protobuf\Internal\Message { /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; */ @@ -48,8 +47,7 @@ class TableCell extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. * @type int $row_span * How many rows this cell spans. * @type int $col_span @@ -64,8 +62,7 @@ public function __construct($data = NULL) { } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null @@ -86,8 +83,7 @@ public function clearLayout() } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [TableCell][google.cloud.documentai.v1.Document.Page.Table.TableCell]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var diff --git a/DocumentAi/src/V1/Document/Page/Token.php b/DocumentAi/src/V1/Document/Page/Token.php index 9c3e222bb6da..2f93fe847d26 100644 --- a/DocumentAi/src/V1/Document/Page/Token.php +++ b/DocumentAi/src/V1/Document/Page/Token.php @@ -16,15 +16,13 @@ class Token extends \Google\Protobuf\Internal\Message { /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Token][google.cloud.documentai.v1.Document.Page.Token]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; */ private $layout = null; /** - * Detected break at the end of a - * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * Detected break at the end of a [Token][google.cloud.documentai.v1.Document.Page.Token]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Token.DetectedBreak detected_break = 2; */ @@ -56,11 +54,9 @@ class Token extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Token][google.cloud.documentai.v1.Document.Page.Token]. * @type \Google\Cloud\DocumentAI\V1\Document\Page\Token\DetectedBreak $detected_break - * Detected break at the end of a - * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * Detected break at the end of a [Token][google.cloud.documentai.v1.Document.Page.Token]. * @type array<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $detected_languages * A list of detected languages together with confidence. * @type \Google\Cloud\DocumentAI\V1\Document\Provenance $provenance @@ -75,8 +71,7 @@ public function __construct($data = NULL) { } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Token][google.cloud.documentai.v1.Document.Page.Token]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null @@ -97,8 +92,7 @@ public function clearLayout() } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [Token][google.cloud.documentai.v1.Document.Page.Token]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var @@ -113,8 +107,7 @@ public function setLayout($var) } /** - * Detected break at the end of a - * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * Detected break at the end of a [Token][google.cloud.documentai.v1.Document.Page.Token]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Token.DetectedBreak detected_break = 2; * @return \Google\Cloud\DocumentAI\V1\Document\Page\Token\DetectedBreak|null @@ -135,8 +128,7 @@ public function clearDetectedBreak() } /** - * Detected break at the end of a - * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * Detected break at the end of a [Token][google.cloud.documentai.v1.Document.Page.Token]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Token.DetectedBreak detected_break = 2; * @param \Google\Cloud\DocumentAI\V1\Document\Page\Token\DetectedBreak $var diff --git a/DocumentAi/src/V1/Document/Page/Token/DetectedBreak.php b/DocumentAi/src/V1/Document/Page/Token/DetectedBreak.php index 826b142db9d3..f74d6c371237 100644 --- a/DocumentAi/src/V1/Document/Page/Token/DetectedBreak.php +++ b/DocumentAi/src/V1/Document/Page/Token/DetectedBreak.php @@ -9,8 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Detected break at the end of a - * [Token][google.cloud.documentai.v1.Document.Page.Token]. + * Detected break at the end of a [Token][google.cloud.documentai.v1.Document.Page.Token]. * * Generated from protobuf message google.cloud.documentai.v1.Document.Page.Token.DetectedBreak */ diff --git a/DocumentAi/src/V1/Document/Page/Token/StyleInfo.php b/DocumentAi/src/V1/Document/Page/Token/StyleInfo.php index c86a19f223c7..4e3fa356cff6 100644 --- a/DocumentAi/src/V1/Document/Page/Token/StyleInfo.php +++ b/DocumentAi/src/V1/Document/Page/Token/StyleInfo.php @@ -22,9 +22,8 @@ class StyleInfo extends \Google\Protobuf\Internal\Message */ private $font_size = 0; /** - * Font size in pixels, equal to _unrounded - * [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_ - * * _resolution_ ÷ `72.0`. + * Font size in pixels, equal to _unrounded [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_ * + * _resolution_ ÷ `72.0`. * * Generated from protobuf field double pixel_font_size = 2; */ @@ -42,9 +41,8 @@ class StyleInfo extends \Google\Protobuf\Internal\Message */ private $font_type = ''; /** - * Whether the text is bold (equivalent to - * [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight] - * is at least `700`). + * Whether the text is bold (equivalent to [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight] is at least + * `700`). * * Generated from protobuf field bool bold = 5; */ @@ -120,17 +118,15 @@ class StyleInfo extends \Google\Protobuf\Internal\Message * @type int $font_size * Font size in points (`1` point is `¹â„₇₂` inches). * @type float $pixel_font_size - * Font size in pixels, equal to _unrounded - * [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_ - * * _resolution_ ÷ `72.0`. + * Font size in pixels, equal to _unrounded [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_ * + * _resolution_ ÷ `72.0`. * @type float $letter_spacing * Letter spacing in points. * @type string $font_type * Name or style of the font. * @type bool $bold - * Whether the text is bold (equivalent to - * [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight] - * is at least `700`). + * Whether the text is bold (equivalent to [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight] is at least + * `700`). * @type bool $italic * Whether the text is italic. * @type bool $underlined @@ -186,9 +182,8 @@ public function setFontSize($var) } /** - * Font size in pixels, equal to _unrounded - * [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_ - * * _resolution_ ÷ `72.0`. + * Font size in pixels, equal to _unrounded [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_ * + * _resolution_ ÷ `72.0`. * * Generated from protobuf field double pixel_font_size = 2; * @return float @@ -199,9 +194,8 @@ public function getPixelFontSize() } /** - * Font size in pixels, equal to _unrounded - * [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_ - * * _resolution_ ÷ `72.0`. + * Font size in pixels, equal to _unrounded [font_size][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_size]_ * + * _resolution_ ÷ `72.0`. * * Generated from protobuf field double pixel_font_size = 2; * @param float $var @@ -268,9 +262,8 @@ public function setFontType($var) } /** - * Whether the text is bold (equivalent to - * [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight] - * is at least `700`). + * Whether the text is bold (equivalent to [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight] is at least + * `700`). * * Generated from protobuf field bool bold = 5; * @return bool @@ -281,9 +274,8 @@ public function getBold() } /** - * Whether the text is bold (equivalent to - * [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight] - * is at least `700`). + * Whether the text is bold (equivalent to [font_weight][google.cloud.documentai.v1.Document.Page.Token.StyleInfo.font_weight] is at least + * `700`). * * Generated from protobuf field bool bold = 5; * @param bool $var diff --git a/DocumentAi/src/V1/Document/Page/VisualElement.php b/DocumentAi/src/V1/Document/Page/VisualElement.php index 848278991249..68c3c902cee7 100644 --- a/DocumentAi/src/V1/Document/Page/VisualElement.php +++ b/DocumentAi/src/V1/Document/Page/VisualElement.php @@ -17,15 +17,13 @@ class VisualElement extends \Google\Protobuf\Internal\Message { /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; */ private $layout = null; /** - * Type of the - * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + * Type of the [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. * * Generated from protobuf field string type = 2; */ @@ -44,11 +42,9 @@ class VisualElement extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\DocumentAI\V1\Document\Page\Layout $layout - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. * @type string $type - * Type of the - * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + * Type of the [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. * @type array<\Google\Cloud\DocumentAI\V1\Document\Page\DetectedLanguage>|\Google\Protobuf\Internal\RepeatedField $detected_languages * A list of detected languages together with confidence. * } @@ -59,8 +55,7 @@ public function __construct($data = NULL) { } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @return \Google\Cloud\DocumentAI\V1\Document\Page\Layout|null @@ -81,8 +76,7 @@ public function clearLayout() } /** - * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for - * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + * [Layout][google.cloud.documentai.v1.Document.Page.Layout] for [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.Page.Layout layout = 1; * @param \Google\Cloud\DocumentAI\V1\Document\Page\Layout $var @@ -97,8 +91,7 @@ public function setLayout($var) } /** - * Type of the - * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + * Type of the [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. * * Generated from protobuf field string type = 2; * @return string @@ -109,8 +102,7 @@ public function getType() } /** - * Type of the - * [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. + * Type of the [VisualElement][google.cloud.documentai.v1.Document.Page.VisualElement]. * * Generated from protobuf field string type = 2; * @param string $var diff --git a/DocumentAi/src/V1/Document/PageAnchor.php b/DocumentAi/src/V1/Document/PageAnchor.php index c6524ec14f53..416be7aac5d0 100644 --- a/DocumentAi/src/V1/Document/PageAnchor.php +++ b/DocumentAi/src/V1/Document/PageAnchor.php @@ -9,10 +9,9 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Referencing the visual context of the entity in the - * [Document.pages][google.cloud.documentai.v1.Document.pages]. Page anchors - * can be cross-page, consist of multiple bounding polygons and optionally - * reference specific layout element types. + * Referencing the visual context of the entity in the [Document.pages][google.cloud.documentai.v1.Document.pages]. + * Page anchors can be cross-page, consist of multiple bounding polygons and + * optionally reference specific layout element types. * * Generated from protobuf message google.cloud.documentai.v1.Document.PageAnchor */ diff --git a/DocumentAi/src/V1/Document/PageAnchor/PageRef.php b/DocumentAi/src/V1/Document/PageAnchor/PageRef.php index f824b299a264..c0e7c2c2845e 100644 --- a/DocumentAi/src/V1/Document/PageAnchor/PageRef.php +++ b/DocumentAi/src/V1/Document/PageAnchor/PageRef.php @@ -16,9 +16,7 @@ class PageRef extends \Google\Protobuf\Internal\Message { /** - * Required. Index into the - * [Document.pages][google.cloud.documentai.v1.Document.pages] element, - * for example using + * Required. Index into the [Document.pages][google.cloud.documentai.v1.Document.pages] element, for example using * `[Document.pages][page_refs.page]` to locate the related page element. * This field is skipped when its value is the default `0`. See * https://developers.google.com/protocol-buffers/docs/proto3#json. @@ -27,32 +25,28 @@ class PageRef extends \Google\Protobuf\Internal\Message */ private $page = 0; /** - * Optional. The type of the layout element that is being referenced if - * any. + * Optional. The type of the layout element that is being referenced if any. * * Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $layout_type = 0; /** - * Optional. Deprecated. Use - * [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] - * instead. + * Optional. Deprecated. Use [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] instead. * * Generated from protobuf field string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * @deprecated */ protected $layout_id = ''; /** - * Optional. Identifies the bounding polygon of a layout element on the - * page. If `layout_type` is set, the bounding polygon must be exactly the - * same to the layout element it's referring to. + * Optional. Identifies the bounding polygon of a layout element on the page. + * If `layout_type` is set, the bounding polygon must be exactly the same + * to the layout element it's referring to. * * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; */ private $bounding_poly = null; /** - * Optional. Confidence of detected page element, if applicable. Range - * `[0, 1]`. + * Optional. Confidence of detected page element, if applicable. Range `[0, 1]`. * * Generated from protobuf field float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -65,26 +59,20 @@ class PageRef extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type int|string $page - * Required. Index into the - * [Document.pages][google.cloud.documentai.v1.Document.pages] element, - * for example using + * Required. Index into the [Document.pages][google.cloud.documentai.v1.Document.pages] element, for example using * `[Document.pages][page_refs.page]` to locate the related page element. * This field is skipped when its value is the default `0`. See * https://developers.google.com/protocol-buffers/docs/proto3#json. * @type int $layout_type - * Optional. The type of the layout element that is being referenced if - * any. + * Optional. The type of the layout element that is being referenced if any. * @type string $layout_id - * Optional. Deprecated. Use - * [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] - * instead. + * Optional. Deprecated. Use [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] instead. * @type \Google\Cloud\DocumentAI\V1\BoundingPoly $bounding_poly - * Optional. Identifies the bounding polygon of a layout element on the - * page. If `layout_type` is set, the bounding polygon must be exactly the - * same to the layout element it's referring to. + * Optional. Identifies the bounding polygon of a layout element on the page. + * If `layout_type` is set, the bounding polygon must be exactly the same + * to the layout element it's referring to. * @type float $confidence - * Optional. Confidence of detected page element, if applicable. Range - * `[0, 1]`. + * Optional. Confidence of detected page element, if applicable. Range `[0, 1]`. * } */ public function __construct($data = NULL) { @@ -93,9 +81,7 @@ public function __construct($data = NULL) { } /** - * Required. Index into the - * [Document.pages][google.cloud.documentai.v1.Document.pages] element, - * for example using + * Required. Index into the [Document.pages][google.cloud.documentai.v1.Document.pages] element, for example using * `[Document.pages][page_refs.page]` to locate the related page element. * This field is skipped when its value is the default `0`. See * https://developers.google.com/protocol-buffers/docs/proto3#json. @@ -109,9 +95,7 @@ public function getPage() } /** - * Required. Index into the - * [Document.pages][google.cloud.documentai.v1.Document.pages] element, - * for example using + * Required. Index into the [Document.pages][google.cloud.documentai.v1.Document.pages] element, for example using * `[Document.pages][page_refs.page]` to locate the related page element. * This field is skipped when its value is the default `0`. See * https://developers.google.com/protocol-buffers/docs/proto3#json. @@ -129,8 +113,7 @@ public function setPage($var) } /** - * Optional. The type of the layout element that is being referenced if - * any. + * Optional. The type of the layout element that is being referenced if any. * * Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return int @@ -141,8 +124,7 @@ public function getLayoutType() } /** - * Optional. The type of the layout element that is being referenced if - * any. + * Optional. The type of the layout element that is being referenced if any. * * Generated from protobuf field .google.cloud.documentai.v1.Document.PageAnchor.PageRef.LayoutType layout_type = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param int $var @@ -157,9 +139,7 @@ public function setLayoutType($var) } /** - * Optional. Deprecated. Use - * [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] - * instead. + * Optional. Deprecated. Use [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] instead. * * Generated from protobuf field string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * @return string @@ -172,9 +152,7 @@ public function getLayoutId() } /** - * Optional. Deprecated. Use - * [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] - * instead. + * Optional. Deprecated. Use [PageRef.bounding_poly][google.cloud.documentai.v1.Document.PageAnchor.PageRef.bounding_poly] instead. * * Generated from protobuf field string layout_id = 3 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; * @param string $var @@ -191,9 +169,9 @@ public function setLayoutId($var) } /** - * Optional. Identifies the bounding polygon of a layout element on the - * page. If `layout_type` is set, the bounding polygon must be exactly the - * same to the layout element it's referring to. + * Optional. Identifies the bounding polygon of a layout element on the page. + * If `layout_type` is set, the bounding polygon must be exactly the same + * to the layout element it's referring to. * * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\DocumentAI\V1\BoundingPoly|null @@ -214,9 +192,9 @@ public function clearBoundingPoly() } /** - * Optional. Identifies the bounding polygon of a layout element on the - * page. If `layout_type` is set, the bounding polygon must be exactly the - * same to the layout element it's referring to. + * Optional. Identifies the bounding polygon of a layout element on the page. + * If `layout_type` is set, the bounding polygon must be exactly the same + * to the layout element it's referring to. * * Generated from protobuf field .google.cloud.documentai.v1.BoundingPoly bounding_poly = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\DocumentAI\V1\BoundingPoly $var @@ -231,8 +209,7 @@ public function setBoundingPoly($var) } /** - * Optional. Confidence of detected page element, if applicable. Range - * `[0, 1]`. + * Optional. Confidence of detected page element, if applicable. Range `[0, 1]`. * * Generated from protobuf field float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return float @@ -243,8 +220,7 @@ public function getConfidence() } /** - * Optional. Confidence of detected page element, if applicable. Range - * `[0, 1]`. + * Optional. Confidence of detected page element, if applicable. Range `[0, 1]`. * * Generated from protobuf field float confidence = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param float $var diff --git a/DocumentAi/src/V1/Document/PageAnchor/PageRef/LayoutType.php b/DocumentAi/src/V1/Document/PageAnchor/PageRef/LayoutType.php index 221ebd633975..57636ed532aa 100644 --- a/DocumentAi/src/V1/Document/PageAnchor/PageRef/LayoutType.php +++ b/DocumentAi/src/V1/Document/PageAnchor/PageRef/LayoutType.php @@ -20,56 +20,43 @@ class LayoutType */ const LAYOUT_TYPE_UNSPECIFIED = 0; /** - * References a - * [Page.blocks][google.cloud.documentai.v1.Document.Page.blocks] - * element. + * References a [Page.blocks][google.cloud.documentai.v1.Document.Page.blocks] element. * * Generated from protobuf enum BLOCK = 1; */ const BLOCK = 1; /** - * References a - * [Page.paragraphs][google.cloud.documentai.v1.Document.Page.paragraphs] - * element. + * References a [Page.paragraphs][google.cloud.documentai.v1.Document.Page.paragraphs] element. * * Generated from protobuf enum PARAGRAPH = 2; */ const PARAGRAPH = 2; /** - * References a - * [Page.lines][google.cloud.documentai.v1.Document.Page.lines] element. + * References a [Page.lines][google.cloud.documentai.v1.Document.Page.lines] element. * * Generated from protobuf enum LINE = 3; */ const LINE = 3; /** - * References a - * [Page.tokens][google.cloud.documentai.v1.Document.Page.tokens] - * element. + * References a [Page.tokens][google.cloud.documentai.v1.Document.Page.tokens] element. * * Generated from protobuf enum TOKEN = 4; */ const TOKEN = 4; /** - * References a - * [Page.visual_elements][google.cloud.documentai.v1.Document.Page.visual_elements] - * element. + * References a [Page.visual_elements][google.cloud.documentai.v1.Document.Page.visual_elements] element. * * Generated from protobuf enum VISUAL_ELEMENT = 5; */ const VISUAL_ELEMENT = 5; /** - * Refrrences a - * [Page.tables][google.cloud.documentai.v1.Document.Page.tables] - * element. + * Refrrences a [Page.tables][google.cloud.documentai.v1.Document.Page.tables] element. * * Generated from protobuf enum TABLE = 6; */ const TABLE = 6; /** - * References a - * [Page.form_fields][google.cloud.documentai.v1.Document.Page.form_fields] - * element. + * References a [Page.form_fields][google.cloud.documentai.v1.Document.Page.form_fields] element. * * Generated from protobuf enum FORM_FIELD = 7; */ diff --git a/DocumentAi/src/V1/Document/ShardInfo.php b/DocumentAi/src/V1/Document/ShardInfo.php index 5468362e5902..ceb0ffbd1b07 100644 --- a/DocumentAi/src/V1/Document/ShardInfo.php +++ b/DocumentAi/src/V1/Document/ShardInfo.php @@ -30,8 +30,7 @@ class ShardInfo extends \Google\Protobuf\Internal\Message */ private $shard_count = 0; /** - * The index of the first character in - * [Document.text][google.cloud.documentai.v1.Document.text] in the overall + * The index of the first character in [Document.text][google.cloud.documentai.v1.Document.text] in the overall * document global text. * * Generated from protobuf field int64 text_offset = 3; @@ -49,8 +48,7 @@ class ShardInfo extends \Google\Protobuf\Internal\Message * @type int|string $shard_count * Total number of shards. * @type int|string $text_offset - * The index of the first character in - * [Document.text][google.cloud.documentai.v1.Document.text] in the overall + * The index of the first character in [Document.text][google.cloud.documentai.v1.Document.text] in the overall * document global text. * } */ @@ -112,8 +110,7 @@ public function setShardCount($var) } /** - * The index of the first character in - * [Document.text][google.cloud.documentai.v1.Document.text] in the overall + * The index of the first character in [Document.text][google.cloud.documentai.v1.Document.text] in the overall * document global text. * * Generated from protobuf field int64 text_offset = 3; @@ -125,8 +122,7 @@ public function getTextOffset() } /** - * The index of the first character in - * [Document.text][google.cloud.documentai.v1.Document.text] in the overall + * The index of the first character in [Document.text][google.cloud.documentai.v1.Document.text] in the overall * document global text. * * Generated from protobuf field int64 text_offset = 3; diff --git a/DocumentAi/src/V1/Document/Style.php b/DocumentAi/src/V1/Document/Style.php index ffbf6a13ecb1..6375ff7fccbe 100644 --- a/DocumentAi/src/V1/Document/Style.php +++ b/DocumentAi/src/V1/Document/Style.php @@ -17,8 +17,7 @@ class Style extends \Google\Protobuf\Internal\Message { /** - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; */ @@ -79,8 +78,7 @@ class Style extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\DocumentAI\V1\Document\TextAnchor $text_anchor - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * @type \Google\Type\Color $color * Text color. * @type \Google\Type\Color $background_color @@ -109,8 +107,7 @@ public function __construct($data = NULL) { } /** - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; * @return \Google\Cloud\DocumentAI\V1\Document\TextAnchor|null @@ -131,8 +128,7 @@ public function clearTextAnchor() } /** - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field .google.cloud.documentai.v1.Document.TextAnchor text_anchor = 1; * @param \Google\Cloud\DocumentAI\V1\Document\TextAnchor $var diff --git a/DocumentAi/src/V1/Document/TextAnchor.php b/DocumentAi/src/V1/Document/TextAnchor.php index 5655e0477ede..b7c04a37cd21 100644 --- a/DocumentAi/src/V1/Document/TextAnchor.php +++ b/DocumentAi/src/V1/Document/TextAnchor.php @@ -9,16 +9,14 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Text reference indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * Text reference indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf message google.cloud.documentai.v1.Document.TextAnchor */ class TextAnchor extends \Google\Protobuf\Internal\Message { /** - * The text segments from the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * The text segments from the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1; */ @@ -39,8 +37,7 @@ class TextAnchor extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type array<\Google\Cloud\DocumentAI\V1\Document\TextAnchor\TextSegment>|\Google\Protobuf\Internal\RepeatedField $text_segments - * The text segments from the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * The text segments from the [Document.text][google.cloud.documentai.v1.Document.text]. * @type string $content * Contains the content of the text span so that users do * not have to look it up in the text_segments. It is always @@ -53,8 +50,7 @@ public function __construct($data = NULL) { } /** - * The text segments from the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * The text segments from the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1; * @return \Google\Protobuf\Internal\RepeatedField @@ -65,8 +61,7 @@ public function getTextSegments() } /** - * The text segments from the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * The text segments from the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field repeated .google.cloud.documentai.v1.Document.TextAnchor.TextSegment text_segments = 1; * @param array<\Google\Cloud\DocumentAI\V1\Document\TextAnchor\TextSegment>|\Google\Protobuf\Internal\RepeatedField $var diff --git a/DocumentAi/src/V1/Document/TextAnchor/TextSegment.php b/DocumentAi/src/V1/Document/TextAnchor/TextSegment.php index 0af2a77b2bc1..eec03dab8f9a 100644 --- a/DocumentAi/src/V1/Document/TextAnchor/TextSegment.php +++ b/DocumentAi/src/V1/Document/TextAnchor/TextSegment.php @@ -9,27 +9,22 @@ use Google\Protobuf\Internal\GPBUtil; /** - * A text segment in the - * [Document.text][google.cloud.documentai.v1.Document.text]. The indices - * may be out of bounds which indicate that the text extends into another - * document shard for large sharded documents. See - * [ShardInfo.text_offset][google.cloud.documentai.v1.Document.ShardInfo.text_offset] + * A text segment in the [Document.text][google.cloud.documentai.v1.Document.text]. The indices may be out of bounds + * which indicate that the text extends into another document shard for + * large sharded documents. See [ShardInfo.text_offset][google.cloud.documentai.v1.Document.ShardInfo.text_offset] * * Generated from protobuf message google.cloud.documentai.v1.Document.TextAnchor.TextSegment */ class TextSegment extends \Google\Protobuf\Internal\Message { /** - * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] - * start UTF-8 char index in the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] start UTF-8 char index in the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field int64 start_index = 1; */ private $start_index = 0; /** - * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] - * half open end UTF-8 char index in the + * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] half open end UTF-8 char index in the * [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field int64 end_index = 2; @@ -43,12 +38,9 @@ class TextSegment extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type int|string $start_index - * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] - * start UTF-8 char index in the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] start UTF-8 char index in the [Document.text][google.cloud.documentai.v1.Document.text]. * @type int|string $end_index - * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] - * half open end UTF-8 char index in the + * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] half open end UTF-8 char index in the * [Document.text][google.cloud.documentai.v1.Document.text]. * } */ @@ -58,9 +50,7 @@ public function __construct($data = NULL) { } /** - * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] - * start UTF-8 char index in the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] start UTF-8 char index in the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field int64 start_index = 1; * @return int|string @@ -71,9 +61,7 @@ public function getStartIndex() } /** - * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] - * start UTF-8 char index in the - * [Document.text][google.cloud.documentai.v1.Document.text]. + * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] start UTF-8 char index in the [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field int64 start_index = 1; * @param int|string $var @@ -88,8 +76,7 @@ public function setStartIndex($var) } /** - * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] - * half open end UTF-8 char index in the + * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] half open end UTF-8 char index in the * [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field int64 end_index = 2; @@ -101,8 +88,7 @@ public function getEndIndex() } /** - * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] - * half open end UTF-8 char index in the + * [TextSegment][google.cloud.documentai.v1.Document.TextAnchor.TextSegment] half open end UTF-8 char index in the * [Document.text][google.cloud.documentai.v1.Document.text]. * * Generated from protobuf field int64 end_index = 2; diff --git a/DocumentAi/src/V1/Document/TextChange.php b/DocumentAi/src/V1/Document/TextChange.php index ad2ef3ef1be5..691263416988 100644 --- a/DocumentAi/src/V1/Document/TextChange.php +++ b/DocumentAi/src/V1/Document/TextChange.php @@ -17,9 +17,8 @@ class TextChange extends \Google\Protobuf\Internal\Message { /** * Provenance of the correction. - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. There can - * only be a single `TextAnchor.text_segments` element. If the start and + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. There can only be a + * single `TextAnchor.text_segments` element. If the start and * end index of the text segment are the same, the text change is inserted * before that index. * @@ -48,9 +47,8 @@ class TextChange extends \Google\Protobuf\Internal\Message * * @type \Google\Cloud\DocumentAI\V1\Document\TextAnchor $text_anchor * Provenance of the correction. - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. There can - * only be a single `TextAnchor.text_segments` element. If the start and + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. There can only be a + * single `TextAnchor.text_segments` element. If the start and * end index of the text segment are the same, the text change is inserted * before that index. * @type string $changed_text @@ -66,9 +64,8 @@ public function __construct($data = NULL) { /** * Provenance of the correction. - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. There can - * only be a single `TextAnchor.text_segments` element. If the start and + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. There can only be a + * single `TextAnchor.text_segments` element. If the start and * end index of the text segment are the same, the text change is inserted * before that index. * @@ -92,9 +89,8 @@ public function clearTextAnchor() /** * Provenance of the correction. - * Text anchor indexing into the - * [Document.text][google.cloud.documentai.v1.Document.text]. There can - * only be a single `TextAnchor.text_segments` element. If the start and + * Text anchor indexing into the [Document.text][google.cloud.documentai.v1.Document.text]. There can only be a + * single `TextAnchor.text_segments` element. If the start and * end index of the text segment are the same, the text change is inserted * before that index. * diff --git a/DocumentAi/src/V1/EnableProcessorMetadata.php b/DocumentAi/src/V1/EnableProcessorMetadata.php index 8883938b22c3..4321d7eb4090 100644 --- a/DocumentAi/src/V1/EnableProcessorMetadata.php +++ b/DocumentAi/src/V1/EnableProcessorMetadata.php @@ -10,8 +10,7 @@ /** * The long-running operation metadata for the - * [EnableProcessor][google.cloud.documentai.v1.DocumentProcessorService.EnableProcessor] - * method. + * [EnableProcessor][google.cloud.documentai.v1.DocumentProcessorService.EnableProcessor] method. * * Generated from protobuf message google.cloud.documentai.v1.EnableProcessorMetadata */ diff --git a/DocumentAi/src/V1/EnableProcessorRequest.php b/DocumentAi/src/V1/EnableProcessorRequest.php index 69f0290c3ae4..797214123655 100644 --- a/DocumentAi/src/V1/EnableProcessorRequest.php +++ b/DocumentAi/src/V1/EnableProcessorRequest.php @@ -10,8 +10,7 @@ /** * Request message for the - * [EnableProcessor][google.cloud.documentai.v1.DocumentProcessorService.EnableProcessor] - * method. + * [EnableProcessor][google.cloud.documentai.v1.DocumentProcessorService.EnableProcessor] method. * * Generated from protobuf message google.cloud.documentai.v1.EnableProcessorRequest */ diff --git a/DocumentAi/src/V1/EnableProcessorResponse.php b/DocumentAi/src/V1/EnableProcessorResponse.php index 573c89ac5fa2..fb2ad3323e41 100644 --- a/DocumentAi/src/V1/EnableProcessorResponse.php +++ b/DocumentAi/src/V1/EnableProcessorResponse.php @@ -10,8 +10,8 @@ /** * Response message for the - * [EnableProcessor][google.cloud.documentai.v1.DocumentProcessorService.EnableProcessor] - * method. Intentionally empty proto for adding fields in future. + * [EnableProcessor][google.cloud.documentai.v1.DocumentProcessorService.EnableProcessor] method. + * Intentionally empty proto for adding fields in future. * * Generated from protobuf message google.cloud.documentai.v1.EnableProcessorResponse */ diff --git a/DocumentAi/src/V1/EvaluateProcessorVersionRequest.php b/DocumentAi/src/V1/EvaluateProcessorVersionRequest.php index bd08972c749c..a7f5d5e64ecd 100644 --- a/DocumentAi/src/V1/EvaluateProcessorVersionRequest.php +++ b/DocumentAi/src/V1/EvaluateProcessorVersionRequest.php @@ -9,35 +9,29 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Evaluates the given - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] against the - * supplied documents. + * Evaluates the given [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] against the supplied documents. * * Generated from protobuf message google.cloud.documentai.v1.EvaluateProcessorVersionRequest */ class EvaluateProcessorVersionRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to - * evaluate. + * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to evaluate. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * * Generated from protobuf field string processor_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ private $processor_version = ''; /** - * Optional. The documents used in the evaluation. If unspecified, use the - * processor's dataset as evaluation input. + * Optional. The documents used in the evaluation. If unspecified, use the processor's + * dataset as evaluation input. * * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; */ private $evaluation_documents = null; /** - * @param string $processorVersion Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to - * evaluate. + * @param string $processorVersion Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to evaluate. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * Please see {@see DocumentProcessorServiceClient::processorVersionName()} for help formatting this field. * @@ -58,13 +52,11 @@ public static function build(string $processorVersion): self * Optional. Data for populating the Message object. * * @type string $processor_version - * Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to - * evaluate. + * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to evaluate. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * @type \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig $evaluation_documents - * Optional. The documents used in the evaluation. If unspecified, use the - * processor's dataset as evaluation input. + * Optional. The documents used in the evaluation. If unspecified, use the processor's + * dataset as evaluation input. * } */ public function __construct($data = NULL) { @@ -73,9 +65,7 @@ public function __construct($data = NULL) { } /** - * Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to - * evaluate. + * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to evaluate. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * * Generated from protobuf field string processor_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -87,9 +77,7 @@ public function getProcessorVersion() } /** - * Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to - * evaluate. + * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to evaluate. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * * Generated from protobuf field string processor_version = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -105,8 +93,8 @@ public function setProcessorVersion($var) } /** - * Optional. The documents used in the evaluation. If unspecified, use the - * processor's dataset as evaluation input. + * Optional. The documents used in the evaluation. If unspecified, use the processor's + * dataset as evaluation input. * * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig|null @@ -127,8 +115,8 @@ public function clearEvaluationDocuments() } /** - * Optional. The documents used in the evaluation. If unspecified, use the - * processor's dataset as evaluation input. + * Optional. The documents used in the evaluation. If unspecified, use the processor's + * dataset as evaluation input. * * Generated from protobuf field .google.cloud.documentai.v1.BatchDocumentsInputConfig evaluation_documents = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\DocumentAI\V1\BatchDocumentsInputConfig $var diff --git a/DocumentAi/src/V1/FetchProcessorTypesRequest.php b/DocumentAi/src/V1/FetchProcessorTypesRequest.php index 679b71159dac..47792e9acdf2 100644 --- a/DocumentAi/src/V1/FetchProcessorTypesRequest.php +++ b/DocumentAi/src/V1/FetchProcessorTypesRequest.php @@ -10,9 +10,8 @@ /** * Request message for the - * [FetchProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.FetchProcessorTypes] - * method. Some processor types may require the project be added to an - * allowlist. + * [FetchProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.FetchProcessorTypes] method. + * Some processor types may require the project be added to an allowlist. * * Generated from protobuf message google.cloud.documentai.v1.FetchProcessorTypesRequest */ diff --git a/DocumentAi/src/V1/FetchProcessorTypesResponse.php b/DocumentAi/src/V1/FetchProcessorTypesResponse.php index dd5747eca369..812b11f22a0f 100644 --- a/DocumentAi/src/V1/FetchProcessorTypesResponse.php +++ b/DocumentAi/src/V1/FetchProcessorTypesResponse.php @@ -10,8 +10,7 @@ /** * Response message for the - * [FetchProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.FetchProcessorTypes] - * method. + * [FetchProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.FetchProcessorTypes] method. * * Generated from protobuf message google.cloud.documentai.v1.FetchProcessorTypesResponse */ diff --git a/DocumentAi/src/V1/Gapic/DocumentProcessorServiceGapicClient.php b/DocumentAi/src/V1/Gapic/DocumentProcessorServiceGapicClient.php index 685be49314c0..38e3a24c9cea 100644 --- a/DocumentAi/src/V1/Gapic/DocumentProcessorServiceGapicClient.php +++ b/DocumentAi/src/V1/Gapic/DocumentProcessorServiceGapicClient.php @@ -77,6 +77,7 @@ use Google\Cloud\DocumentAI\V1\TrainProcessorVersionMetadata; use Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest; use Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\CustomDocumentExtractionOptions; +use Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\FoundationModelTuningOptions; use Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\InputData; use Google\Cloud\DocumentAI\V1\UndeployProcessorVersionRequest; use Google\Cloud\Location\GetLocationRequest; @@ -610,8 +611,7 @@ public function __construct(array $options = []) * } * ``` * - * @param string $name Required. The resource name of - * [Processor][google.cloud.documentai.v1.Processor] or + * @param string $name Required. The resource name of [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * Format: `projects/{project}/locations/{location}/processors/{processor}`, * or @@ -692,9 +692,8 @@ public function batchProcessDocuments($name, array $optionalArgs = []) } /** - * Creates a processor from the - * [ProcessorType][google.cloud.documentai.v1.ProcessorType] provided. The - * processor will be at `ENABLED` state by default after its creation. + * Creates a processor from the [ProcessorType][google.cloud.documentai.v1.ProcessorType] provided. + * The processor will be at `ENABLED` state by default after its creation. * * Sample code: * ``` @@ -708,13 +707,10 @@ public function batchProcessDocuments($name, array $optionalArgs = []) * } * ``` * - * @param string $parent Required. The parent (project and location) under which to create the - * processor. Format: `projects/{project}/locations/{location}` - * @param Processor $processor Required. The processor to be created, requires - * [Processor.type][google.cloud.documentai.v1.Processor.type] and - * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] - * to be set. Also, the - * [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] + * @param string $parent Required. The parent (project and location) under which to create the processor. + * Format: `projects/{project}/locations/{location}` + * @param Processor $processor Required. The processor to be created, requires [Processor.type][google.cloud.documentai.v1.Processor.type] and + * [Processor.display_name][google.cloud.documentai.v1.Processor.display_name] to be set. Also, the [Processor.kms_key_name][google.cloud.documentai.v1.Processor.kms_key_name] * field must be set if the processor is under CMEK. * @param array $optionalArgs { * Optional. @@ -1156,16 +1152,14 @@ public function enableProcessor($name, array $optionalArgs = []) * } * ``` * - * @param string $processorVersion Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to - * evaluate. + * @param string $processorVersion Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to evaluate. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * @param array $optionalArgs { * Optional. * * @type BatchDocumentsInputConfig $evaluationDocuments - * Optional. The documents used in the evaluation. If unspecified, use the - * processor's dataset as evaluation input. + * Optional. The documents used in the evaluation. If unspecified, use the processor's + * dataset as evaluation input. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on @@ -1205,8 +1199,7 @@ public function evaluateProcessorVersion( } /** - * Fetches processor types. Note that we don't use - * [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes] + * Fetches processor types. Note that we don't use [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes] * here, because it isn't paginated. * * Sample code: @@ -1269,8 +1262,7 @@ public function fetchProcessorTypes($parent, array $optionalArgs = []) * } * ``` * - * @param string $name Required. The resource name of the - * [Evaluation][google.cloud.documentai.v1.Evaluation] to get. + * @param string $name Required. The resource name of the [Evaluation][google.cloud.documentai.v1.Evaluation] to get. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` * @param array $optionalArgs { * Optional. @@ -1475,9 +1467,7 @@ public function getProcessorVersion($name, array $optionalArgs = []) * } * ``` * - * @param string $parent Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list - * evaluations for. + * @param string $parent Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list evaluations for. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * @param array $optionalArgs { * Optional. @@ -1633,9 +1623,8 @@ public function listProcessorTypes($parent, array $optionalArgs = []) * } * ``` * - * @param string $parent Required. The parent (project, location and processor) to list all - * versions. Format: - * `projects/{project}/locations/{location}/processors/{processor}` + * @param string $parent Required. The parent (project, location and processor) to list all versions. + * Format: `projects/{project}/locations/{location}/processors/{processor}` * @param array $optionalArgs { * Optional. * @@ -1712,8 +1701,8 @@ public function listProcessorVersions($parent, array $optionalArgs = []) * } * ``` * - * @param string $parent Required. The parent (project and location) which owns this collection of - * Processors. Format: `projects/{project}/locations/{location}` + * @param string $parent Required. The parent (project and location) which owns this collection of Processors. + * Format: `projects/{project}/locations/{location}` * @param array $optionalArgs { * Optional. * @@ -1778,15 +1767,11 @@ public function listProcessors($parent, array $optionalArgs = []) * } * ``` * - * @param string $name Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] or + * @param string $name Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] - * to use for processing. If a - * [Processor][google.cloud.documentai.v1.Processor] is specified, the server - * will use its [default - * version][google.cloud.documentai.v1.Processor.default_processor_version]. - * Format: `projects/{project}/locations/{location}/processors/{processor}`, - * or + * to use for processing. If a [Processor][google.cloud.documentai.v1.Processor] is specified, the server will use + * its [default version][google.cloud.documentai.v1.Processor.default_processor_version]. Format: + * `projects/{project}/locations/{location}/processors/{processor}`, or * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * @param array $optionalArgs { * Optional. @@ -1801,8 +1786,7 @@ public function listProcessors($parent, array $optionalArgs = []) * Whether human review should be skipped for this request. Default to * `false`. * @type FieldMask $fieldMask - * Specifies which fields to include in the - * [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] + * Specifies which fields to include in the [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] * output. Only supports top-level document and pages field, so it must be in * the form of `{document_field_name}` or `pages.{page_field_name}`. * @type ProcessOptions $processOptions @@ -1912,9 +1896,8 @@ public function processDocument($name, array $optionalArgs = []) * } * ``` * - * @param string $humanReviewConfig Required. The resource name of the - * [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the - * document will be reviewed with. + * @param string $humanReviewConfig Required. The resource name of the [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the document will be + * reviewed with. * @param array $optionalArgs { * Optional. * @@ -1976,10 +1959,8 @@ public function reviewDocument($humanReviewConfig, array $optionalArgs = []) } /** - * Set the default (active) version of a - * [Processor][google.cloud.documentai.v1.Processor] that will be used in - * [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] - * and + * Set the default (active) version of a [Processor][google.cloud.documentai.v1.Processor] that will be used in + * [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] and * [BatchProcessDocuments][google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments]. * * Sample code: @@ -2019,12 +2000,9 @@ public function reviewDocument($humanReviewConfig, array $optionalArgs = []) * } * ``` * - * @param string $processor Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] to change default - * version. - * @param string $defaultProcessorVersion Required. The resource name of child - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as - * default. Format: + * @param string $processor Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] to change default version. + * @param string $defaultProcessorVersion Required. The resource name of child [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as default. + * Format: * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}` * @param array $optionalArgs { * Optional. @@ -2105,23 +2083,23 @@ public function setDefaultProcessorVersion( * } * ``` * - * @param string $parent Required. The parent (project, location and processor) to create the new - * version for. Format: - * `projects/{project}/locations/{location}/processors/{processor}`. + * @param string $parent Required. The parent (project, location and processor) to create the new version for. + * Format: `projects/{project}/locations/{location}/processors/{processor}`. * @param ProcessorVersion $processorVersion Required. The processor version to be created. * @param array $optionalArgs { * Optional. * * @type CustomDocumentExtractionOptions $customDocumentExtractionOptions * Options to control Custom Document Extraction (CDE) Processor. + * @type FoundationModelTuningOptions $foundationModelTuningOptions + * Options to control foundation model tuning of a processor. * @type DocumentSchema $documentSchema * Optional. The schema the processor version will be trained with. * @type InputData $inputData - * Optional. The input data used to train the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. + * Optional. The input data used to train the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * @type string $baseProcessorVersion - * Optional. The processor version to use as a base for training. This - * processor version must be a child of `parent`. Format: + * Optional. The processor version to use as a base for training. This processor version + * must be a child of `parent`. Format: * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`. * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an @@ -2149,6 +2127,12 @@ public function trainProcessorVersion( ); } + if (isset($optionalArgs['foundationModelTuningOptions'])) { + $request->setFoundationModelTuningOptions( + $optionalArgs['foundationModelTuningOptions'] + ); + } + if (isset($optionalArgs['documentSchema'])) { $request->setDocumentSchema($optionalArgs['documentSchema']); } diff --git a/DocumentAi/src/V1/GetEvaluationRequest.php b/DocumentAi/src/V1/GetEvaluationRequest.php index 3f6b6397979c..f29706db5760 100644 --- a/DocumentAi/src/V1/GetEvaluationRequest.php +++ b/DocumentAi/src/V1/GetEvaluationRequest.php @@ -16,8 +16,7 @@ class GetEvaluationRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name of the - * [Evaluation][google.cloud.documentai.v1.Evaluation] to get. + * Required. The resource name of the [Evaluation][google.cloud.documentai.v1.Evaluation] to get. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -25,8 +24,7 @@ class GetEvaluationRequest extends \Google\Protobuf\Internal\Message private $name = ''; /** - * @param string $name Required. The resource name of the - * [Evaluation][google.cloud.documentai.v1.Evaluation] to get. + * @param string $name Required. The resource name of the [Evaluation][google.cloud.documentai.v1.Evaluation] to get. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` * Please see {@see DocumentProcessorServiceClient::evaluationName()} for help formatting this field. * @@ -47,8 +45,7 @@ public static function build(string $name): self * Optional. Data for populating the Message object. * * @type string $name - * Required. The resource name of the - * [Evaluation][google.cloud.documentai.v1.Evaluation] to get. + * Required. The resource name of the [Evaluation][google.cloud.documentai.v1.Evaluation] to get. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` * } */ @@ -58,8 +55,7 @@ public function __construct($data = NULL) { } /** - * Required. The resource name of the - * [Evaluation][google.cloud.documentai.v1.Evaluation] to get. + * Required. The resource name of the [Evaluation][google.cloud.documentai.v1.Evaluation] to get. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -71,8 +67,7 @@ public function getName() } /** - * Required. The resource name of the - * [Evaluation][google.cloud.documentai.v1.Evaluation] to get. + * Required. The resource name of the [Evaluation][google.cloud.documentai.v1.Evaluation] to get. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { diff --git a/DocumentAi/src/V1/GetProcessorRequest.php b/DocumentAi/src/V1/GetProcessorRequest.php index a436dc92b9f1..b30cc50bfae5 100644 --- a/DocumentAi/src/V1/GetProcessorRequest.php +++ b/DocumentAi/src/V1/GetProcessorRequest.php @@ -9,8 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Request message for the - * [GetProcessor][google.cloud.documentai.v1.DocumentProcessorService.GetProcessor] + * Request message for the [GetProcessor][google.cloud.documentai.v1.DocumentProcessorService.GetProcessor] * method. * * Generated from protobuf message google.cloud.documentai.v1.GetProcessorRequest diff --git a/DocumentAi/src/V1/GetProcessorTypeRequest.php b/DocumentAi/src/V1/GetProcessorTypeRequest.php index c93b93eddb47..3291e6d676c4 100644 --- a/DocumentAi/src/V1/GetProcessorTypeRequest.php +++ b/DocumentAi/src/V1/GetProcessorTypeRequest.php @@ -10,8 +10,7 @@ /** * Request message for the - * [GetProcessorType][google.cloud.documentai.v1.DocumentProcessorService.GetProcessorType] - * method. + * [GetProcessorType][google.cloud.documentai.v1.DocumentProcessorService.GetProcessorType] method. * * Generated from protobuf message google.cloud.documentai.v1.GetProcessorTypeRequest */ diff --git a/DocumentAi/src/V1/GetProcessorVersionRequest.php b/DocumentAi/src/V1/GetProcessorVersionRequest.php index 8596ab9e93dd..6e00df63688e 100644 --- a/DocumentAi/src/V1/GetProcessorVersionRequest.php +++ b/DocumentAi/src/V1/GetProcessorVersionRequest.php @@ -10,8 +10,7 @@ /** * Request message for the - * [GetProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.GetProcessorVersion] - * method. + * [GetProcessorVersion][google.cloud.documentai.v1.DocumentProcessorService.GetProcessorVersion] method. * * Generated from protobuf message google.cloud.documentai.v1.GetProcessorVersionRequest */ diff --git a/DocumentAi/src/V1/HumanReviewStatus.php b/DocumentAi/src/V1/HumanReviewStatus.php index d40f6f0f9913..7c05ed063c39 100644 --- a/DocumentAi/src/V1/HumanReviewStatus.php +++ b/DocumentAi/src/V1/HumanReviewStatus.php @@ -29,11 +29,9 @@ class HumanReviewStatus extends \Google\Protobuf\Internal\Message private $state_message = ''; /** * The name of the operation triggered by the processed document. This field - * is populated only when the - * [state][google.cloud.documentai.v1.HumanReviewStatus.state] is - * `HUMAN_REVIEW_IN_PROGRESS`. It has the same response type and metadata as - * the long-running operation returned by - * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]. + * is populated only when the [state][google.cloud.documentai.v1.HumanReviewStatus.state] is `HUMAN_REVIEW_IN_PROGRESS`. It has + * the same response type and metadata as the long-running operation returned + * by [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]. * * Generated from protobuf field string human_review_operation = 3; */ @@ -51,11 +49,9 @@ class HumanReviewStatus extends \Google\Protobuf\Internal\Message * A message providing more details about the human review state. * @type string $human_review_operation * The name of the operation triggered by the processed document. This field - * is populated only when the - * [state][google.cloud.documentai.v1.HumanReviewStatus.state] is - * `HUMAN_REVIEW_IN_PROGRESS`. It has the same response type and metadata as - * the long-running operation returned by - * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]. + * is populated only when the [state][google.cloud.documentai.v1.HumanReviewStatus.state] is `HUMAN_REVIEW_IN_PROGRESS`. It has + * the same response type and metadata as the long-running operation returned + * by [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]. * } */ public function __construct($data = NULL) { @@ -117,11 +113,9 @@ public function setStateMessage($var) /** * The name of the operation triggered by the processed document. This field - * is populated only when the - * [state][google.cloud.documentai.v1.HumanReviewStatus.state] is - * `HUMAN_REVIEW_IN_PROGRESS`. It has the same response type and metadata as - * the long-running operation returned by - * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]. + * is populated only when the [state][google.cloud.documentai.v1.HumanReviewStatus.state] is `HUMAN_REVIEW_IN_PROGRESS`. It has + * the same response type and metadata as the long-running operation returned + * by [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]. * * Generated from protobuf field string human_review_operation = 3; * @return string @@ -133,11 +127,9 @@ public function getHumanReviewOperation() /** * The name of the operation triggered by the processed document. This field - * is populated only when the - * [state][google.cloud.documentai.v1.HumanReviewStatus.state] is - * `HUMAN_REVIEW_IN_PROGRESS`. It has the same response type and metadata as - * the long-running operation returned by - * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]. + * is populated only when the [state][google.cloud.documentai.v1.HumanReviewStatus.state] is `HUMAN_REVIEW_IN_PROGRESS`. It has + * the same response type and metadata as the long-running operation returned + * by [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument]. * * Generated from protobuf field string human_review_operation = 3; * @param string $var diff --git a/DocumentAi/src/V1/HumanReviewStatus/State.php b/DocumentAi/src/V1/HumanReviewStatus/State.php index 2cb38208abcf..5da0162c4568 100644 --- a/DocumentAi/src/V1/HumanReviewStatus/State.php +++ b/DocumentAi/src/V1/HumanReviewStatus/State.php @@ -41,8 +41,7 @@ class State const IN_PROGRESS = 3; /** * Some error happened during triggering human review, see the - * [state_message][google.cloud.documentai.v1.HumanReviewStatus.state_message] - * for details. + * [state_message][google.cloud.documentai.v1.HumanReviewStatus.state_message] for details. * * Generated from protobuf enum ERROR = 4; */ diff --git a/DocumentAi/src/V1/ListEvaluationsRequest.php b/DocumentAi/src/V1/ListEvaluationsRequest.php index 3ca00303ab73..ad9d039a546b 100644 --- a/DocumentAi/src/V1/ListEvaluationsRequest.php +++ b/DocumentAi/src/V1/ListEvaluationsRequest.php @@ -9,17 +9,14 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Retrieves a list of evaluations for a given - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. + * Retrieves a list of evaluations for a given [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * * Generated from protobuf message google.cloud.documentai.v1.ListEvaluationsRequest */ class ListEvaluationsRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list - * evaluations for. + * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list evaluations for. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -42,9 +39,7 @@ class ListEvaluationsRequest extends \Google\Protobuf\Internal\Message private $page_token = ''; /** - * @param string $parent Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list - * evaluations for. + * @param string $parent Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list evaluations for. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * Please see {@see DocumentProcessorServiceClient::processorVersionName()} for help formatting this field. * @@ -65,9 +60,7 @@ public static function build(string $parent): self * Optional. Data for populating the Message object. * * @type string $parent - * Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list - * evaluations for. + * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list evaluations for. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * @type int $page_size * The standard list page size. @@ -84,9 +77,7 @@ public function __construct($data = NULL) { } /** - * Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list - * evaluations for. + * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list evaluations for. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -98,9 +89,7 @@ public function getParent() } /** - * Required. The resource name of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list - * evaluations for. + * Required. The resource name of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to list evaluations for. * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { diff --git a/DocumentAi/src/V1/ListProcessorTypesRequest.php b/DocumentAi/src/V1/ListProcessorTypesRequest.php index f6a6ff74339f..4687d456a055 100644 --- a/DocumentAi/src/V1/ListProcessorTypesRequest.php +++ b/DocumentAi/src/V1/ListProcessorTypesRequest.php @@ -10,9 +10,8 @@ /** * Request message for the - * [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes] - * method. Some processor types may require the project be added to an - * allowlist. + * [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes] method. + * Some processor types may require the project be added to an allowlist. * * Generated from protobuf message google.cloud.documentai.v1.ListProcessorTypesRequest */ diff --git a/DocumentAi/src/V1/ListProcessorTypesResponse.php b/DocumentAi/src/V1/ListProcessorTypesResponse.php index cad6cb143783..1b5c2fca8332 100644 --- a/DocumentAi/src/V1/ListProcessorTypesResponse.php +++ b/DocumentAi/src/V1/ListProcessorTypesResponse.php @@ -10,8 +10,7 @@ /** * Response message for the - * [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes] - * method. + * [ListProcessorTypes][google.cloud.documentai.v1.DocumentProcessorService.ListProcessorTypes] method. * * Generated from protobuf message google.cloud.documentai.v1.ListProcessorTypesResponse */ diff --git a/DocumentAi/src/V1/ListProcessorVersionsRequest.php b/DocumentAi/src/V1/ListProcessorVersionsRequest.php index 0855408ca8f3..91005ac879f7 100644 --- a/DocumentAi/src/V1/ListProcessorVersionsRequest.php +++ b/DocumentAi/src/V1/ListProcessorVersionsRequest.php @@ -16,9 +16,8 @@ class ListProcessorVersionsRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The parent (project, location and processor) to list all - * versions. Format: - * `projects/{project}/locations/{location}/processors/{processor}` + * Required. The parent (project, location and processor) to list all versions. + * Format: `projects/{project}/locations/{location}/processors/{processor}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -40,9 +39,8 @@ class ListProcessorVersionsRequest extends \Google\Protobuf\Internal\Message private $page_token = ''; /** - * @param string $parent Required. The parent (project, location and processor) to list all - * versions. Format: - * `projects/{project}/locations/{location}/processors/{processor}` + * @param string $parent Required. The parent (project, location and processor) to list all versions. + * Format: `projects/{project}/locations/{location}/processors/{processor}` * Please see {@see DocumentProcessorServiceClient::processorName()} for help formatting this field. * * @return \Google\Cloud\DocumentAI\V1\ListProcessorVersionsRequest @@ -62,9 +60,8 @@ public static function build(string $parent): self * Optional. Data for populating the Message object. * * @type string $parent - * Required. The parent (project, location and processor) to list all - * versions. Format: - * `projects/{project}/locations/{location}/processors/{processor}` + * Required. The parent (project, location and processor) to list all versions. + * Format: `projects/{project}/locations/{location}/processors/{processor}` * @type int $page_size * The maximum number of processor versions to return. * If unspecified, at most `10` processor versions will be returned. @@ -80,9 +77,8 @@ public function __construct($data = NULL) { } /** - * Required. The parent (project, location and processor) to list all - * versions. Format: - * `projects/{project}/locations/{location}/processors/{processor}` + * Required. The parent (project, location and processor) to list all versions. + * Format: `projects/{project}/locations/{location}/processors/{processor}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -93,9 +89,8 @@ public function getParent() } /** - * Required. The parent (project, location and processor) to list all - * versions. Format: - * `projects/{project}/locations/{location}/processors/{processor}` + * Required. The parent (project, location and processor) to list all versions. + * Format: `projects/{project}/locations/{location}/processors/{processor}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/DocumentAi/src/V1/ListProcessorsRequest.php b/DocumentAi/src/V1/ListProcessorsRequest.php index ed6ea01b0f2c..4b0946a0f25f 100644 --- a/DocumentAi/src/V1/ListProcessorsRequest.php +++ b/DocumentAi/src/V1/ListProcessorsRequest.php @@ -16,8 +16,8 @@ class ListProcessorsRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The parent (project and location) which owns this collection of - * Processors. Format: `projects/{project}/locations/{location}` + * Required. The parent (project and location) which owns this collection of Processors. + * Format: `projects/{project}/locations/{location}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -39,8 +39,8 @@ class ListProcessorsRequest extends \Google\Protobuf\Internal\Message private $page_token = ''; /** - * @param string $parent Required. The parent (project and location) which owns this collection of - * Processors. Format: `projects/{project}/locations/{location}` + * @param string $parent Required. The parent (project and location) which owns this collection of Processors. + * Format: `projects/{project}/locations/{location}` * Please see {@see DocumentProcessorServiceClient::locationName()} for help formatting this field. * * @return \Google\Cloud\DocumentAI\V1\ListProcessorsRequest @@ -60,8 +60,8 @@ public static function build(string $parent): self * Optional. Data for populating the Message object. * * @type string $parent - * Required. The parent (project and location) which owns this collection of - * Processors. Format: `projects/{project}/locations/{location}` + * Required. The parent (project and location) which owns this collection of Processors. + * Format: `projects/{project}/locations/{location}` * @type int $page_size * The maximum number of processors to return. * If unspecified, at most `50` processors will be returned. @@ -77,8 +77,8 @@ public function __construct($data = NULL) { } /** - * Required. The parent (project and location) which owns this collection of - * Processors. Format: `projects/{project}/locations/{location}` + * Required. The parent (project and location) which owns this collection of Processors. + * Format: `projects/{project}/locations/{location}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -89,8 +89,8 @@ public function getParent() } /** - * Required. The parent (project and location) which owns this collection of - * Processors. Format: `projects/{project}/locations/{location}` + * Required. The parent (project and location) which owns this collection of Processors. + * Format: `projects/{project}/locations/{location}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/DocumentAi/src/V1/ListProcessorsResponse.php b/DocumentAi/src/V1/ListProcessorsResponse.php index bd8c34e6e2f1..626893ecbab0 100644 --- a/DocumentAi/src/V1/ListProcessorsResponse.php +++ b/DocumentAi/src/V1/ListProcessorsResponse.php @@ -10,8 +10,7 @@ /** * Response message for the - * [ListProcessors][google.cloud.documentai.v1.DocumentProcessorService.ListProcessors] - * method. + * [ListProcessors][google.cloud.documentai.v1.DocumentProcessorService.ListProcessors] method. * * Generated from protobuf message google.cloud.documentai.v1.ListProcessorsResponse */ diff --git a/DocumentAi/src/V1/OcrConfig.php b/DocumentAi/src/V1/OcrConfig.php index aa89f0c91389..30f924135328 100644 --- a/DocumentAi/src/V1/OcrConfig.php +++ b/DocumentAi/src/V1/OcrConfig.php @@ -55,9 +55,7 @@ class OcrConfig extends \Google\Protobuf\Internal\Message private $enable_symbol = false; /** * Turn on font identification model and return font style information. - * Deprecated, use - * [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] - * instead. + * Deprecated, use [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] instead. * * Generated from protobuf field bool compute_style_info = 8 [deprecated = true]; * @deprecated @@ -103,9 +101,7 @@ class OcrConfig extends \Google\Protobuf\Internal\Message * Includes symbol level OCR information if set to true. * @type bool $compute_style_info * Turn on font identification model and return font style information. - * Deprecated, use - * [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] - * instead. + * Deprecated, use [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] instead. * @type bool $disable_character_boxes_detection * Turn off character box detector in OCR engine. Character box detection is * enabled by default in OCR 2.0 (and later) processors. @@ -276,9 +272,7 @@ public function setEnableSymbol($var) /** * Turn on font identification model and return font style information. - * Deprecated, use - * [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] - * instead. + * Deprecated, use [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] instead. * * Generated from protobuf field bool compute_style_info = 8 [deprecated = true]; * @return bool @@ -292,9 +286,7 @@ public function getComputeStyleInfo() /** * Turn on font identification model and return font style information. - * Deprecated, use - * [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] - * instead. + * Deprecated, use [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] instead. * * Generated from protobuf field bool compute_style_info = 8 [deprecated = true]; * @param bool $var diff --git a/DocumentAi/src/V1/ProcessOptions.php b/DocumentAi/src/V1/ProcessOptions.php index 04141b7386a6..f5261cb564e1 100644 --- a/DocumentAi/src/V1/ProcessOptions.php +++ b/DocumentAi/src/V1/ProcessOptions.php @@ -23,11 +23,9 @@ class ProcessOptions extends \Google\Protobuf\Internal\Message */ private $ocr_config = null; /** - * Optional. Override the schema of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will - * return an Invalid Argument error if this field is set when the underlying - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't - * support schema override. + * Optional. Override the schema of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will return an Invalid + * Argument error if this field is set when the underlying + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't support schema override. * * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema schema_override = 8 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -51,11 +49,9 @@ class ProcessOptions extends \Google\Protobuf\Internal\Message * Only applicable to `OCR_PROCESSOR` and `FORM_PARSER_PROCESSOR`. * Returns error if set on other processor types. * @type \Google\Cloud\DocumentAI\V1\DocumentSchema $schema_override - * Optional. Override the schema of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will - * return an Invalid Argument error if this field is set when the underlying - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't - * support schema override. + * Optional. Override the schema of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will return an Invalid + * Argument error if this field is set when the underlying + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't support schema override. * } */ public function __construct($data = NULL) { @@ -197,11 +193,9 @@ public function setOcrConfig($var) } /** - * Optional. Override the schema of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will - * return an Invalid Argument error if this field is set when the underlying - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't - * support schema override. + * Optional. Override the schema of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will return an Invalid + * Argument error if this field is set when the underlying + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't support schema override. * * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema schema_override = 8 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\DocumentAI\V1\DocumentSchema|null @@ -222,11 +216,9 @@ public function clearSchemaOverride() } /** - * Optional. Override the schema of the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will - * return an Invalid Argument error if this field is set when the underlying - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't - * support schema override. + * Optional. Override the schema of the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Will return an Invalid + * Argument error if this field is set when the underlying + * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] doesn't support schema override. * * Generated from protobuf field .google.cloud.documentai.v1.DocumentSchema schema_override = 8 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\DocumentAI\V1\DocumentSchema $var diff --git a/DocumentAi/src/V1/ProcessRequest.php b/DocumentAi/src/V1/ProcessRequest.php index 80d84227d6ab..77b8d1de93dc 100644 --- a/DocumentAi/src/V1/ProcessRequest.php +++ b/DocumentAi/src/V1/ProcessRequest.php @@ -10,23 +10,18 @@ /** * Request message for the - * [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] - * method. + * [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] method. * * Generated from protobuf message google.cloud.documentai.v1.ProcessRequest */ class ProcessRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] or + * Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] - * to use for processing. If a - * [Processor][google.cloud.documentai.v1.Processor] is specified, the server - * will use its [default - * version][google.cloud.documentai.v1.Processor.default_processor_version]. - * Format: `projects/{project}/locations/{location}/processors/{processor}`, - * or + * to use for processing. If a [Processor][google.cloud.documentai.v1.Processor] is specified, the server will use + * its [default version][google.cloud.documentai.v1.Processor.default_processor_version]. Format: + * `projects/{project}/locations/{location}/processors/{processor}`, or * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -40,8 +35,7 @@ class ProcessRequest extends \Google\Protobuf\Internal\Message */ private $skip_human_review = false; /** - * Specifies which fields to include in the - * [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] + * Specifies which fields to include in the [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] * output. Only supports top-level document and pages field, so it must be in * the form of `{document_field_name}` or `pages.{page_field_name}`. * @@ -67,15 +61,11 @@ class ProcessRequest extends \Google\Protobuf\Internal\Message protected $source; /** - * @param string $name Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] or + * @param string $name Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] - * to use for processing. If a - * [Processor][google.cloud.documentai.v1.Processor] is specified, the server - * will use its [default - * version][google.cloud.documentai.v1.Processor.default_processor_version]. - * Format: `projects/{project}/locations/{location}/processors/{processor}`, - * or + * to use for processing. If a [Processor][google.cloud.documentai.v1.Processor] is specified, the server will use + * its [default version][google.cloud.documentai.v1.Processor.default_processor_version]. Format: + * `projects/{project}/locations/{location}/processors/{processor}`, or * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * * @return \Google\Cloud\DocumentAI\V1\ProcessRequest @@ -101,22 +91,17 @@ public static function build(string $name): self * @type \Google\Cloud\DocumentAI\V1\GcsDocument $gcs_document * A raw document on Google Cloud Storage. * @type string $name - * Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] or + * Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] - * to use for processing. If a - * [Processor][google.cloud.documentai.v1.Processor] is specified, the server - * will use its [default - * version][google.cloud.documentai.v1.Processor.default_processor_version]. - * Format: `projects/{project}/locations/{location}/processors/{processor}`, - * or + * to use for processing. If a [Processor][google.cloud.documentai.v1.Processor] is specified, the server will use + * its [default version][google.cloud.documentai.v1.Processor.default_processor_version]. Format: + * `projects/{project}/locations/{location}/processors/{processor}`, or * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * @type bool $skip_human_review * Whether human review should be skipped for this request. Default to * `false`. * @type \Google\Protobuf\FieldMask $field_mask - * Specifies which fields to include in the - * [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] + * Specifies which fields to include in the [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] * output. Only supports top-level document and pages field, so it must be in * the form of `{document_field_name}` or `pages.{page_field_name}`. * @type \Google\Cloud\DocumentAI\V1\ProcessOptions $process_options @@ -228,15 +213,11 @@ public function setGcsDocument($var) } /** - * Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] or + * Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] - * to use for processing. If a - * [Processor][google.cloud.documentai.v1.Processor] is specified, the server - * will use its [default - * version][google.cloud.documentai.v1.Processor.default_processor_version]. - * Format: `projects/{project}/locations/{location}/processors/{processor}`, - * or + * to use for processing. If a [Processor][google.cloud.documentai.v1.Processor] is specified, the server will use + * its [default version][google.cloud.documentai.v1.Processor.default_processor_version]. Format: + * `projects/{project}/locations/{location}/processors/{processor}`, or * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -248,15 +229,11 @@ public function getName() } /** - * Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] or + * Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] or * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] - * to use for processing. If a - * [Processor][google.cloud.documentai.v1.Processor] is specified, the server - * will use its [default - * version][google.cloud.documentai.v1.Processor.default_processor_version]. - * Format: `projects/{project}/locations/{location}/processors/{processor}`, - * or + * to use for processing. If a [Processor][google.cloud.documentai.v1.Processor] is specified, the server will use + * its [default version][google.cloud.documentai.v1.Processor.default_processor_version]. Format: + * `projects/{project}/locations/{location}/processors/{processor}`, or * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -300,8 +277,7 @@ public function setSkipHumanReview($var) } /** - * Specifies which fields to include in the - * [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] + * Specifies which fields to include in the [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] * output. Only supports top-level document and pages field, so it must be in * the form of `{document_field_name}` or `pages.{page_field_name}`. * @@ -324,8 +300,7 @@ public function clearFieldMask() } /** - * Specifies which fields to include in the - * [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] + * Specifies which fields to include in the [ProcessResponse.document][google.cloud.documentai.v1.ProcessResponse.document] * output. Only supports top-level document and pages field, so it must be in * the form of `{document_field_name}` or `pages.{page_field_name}`. * diff --git a/DocumentAi/src/V1/ProcessResponse.php b/DocumentAi/src/V1/ProcessResponse.php index bf2379e49104..297d6a35b52d 100644 --- a/DocumentAi/src/V1/ProcessResponse.php +++ b/DocumentAi/src/V1/ProcessResponse.php @@ -10,8 +10,7 @@ /** * Response message for the - * [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] - * method. + * [ProcessDocument][google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument] method. * * Generated from protobuf message google.cloud.documentai.v1.ProcessResponse */ diff --git a/DocumentAi/src/V1/Processor.php b/DocumentAi/src/V1/Processor.php index 1c0793461805..3c4ff0be7656 100644 --- a/DocumentAi/src/V1/Processor.php +++ b/DocumentAi/src/V1/Processor.php @@ -56,8 +56,7 @@ class Processor extends \Google\Protobuf\Internal\Message */ private $processor_version_aliases; /** - * Output only. Immutable. The http endpoint that can be called to invoke - * processing. + * Output only. Immutable. The http endpoint that can be called to invoke processing. * * Generated from protobuf field string process_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; */ @@ -98,8 +97,7 @@ class Processor extends \Google\Protobuf\Internal\Message * @type array<\Google\Cloud\DocumentAI\V1\ProcessorVersionAlias>|\Google\Protobuf\Internal\RepeatedField $processor_version_aliases * Output only. The processor version aliases. * @type string $process_endpoint - * Output only. Immutable. The http endpoint that can be called to invoke - * processing. + * Output only. Immutable. The http endpoint that can be called to invoke processing. * @type \Google\Protobuf\Timestamp $create_time * The time the processor was created. * @type string $kms_key_name @@ -275,8 +273,7 @@ public function setProcessorVersionAliases($var) } /** - * Output only. Immutable. The http endpoint that can be called to invoke - * processing. + * Output only. Immutable. The http endpoint that can be called to invoke processing. * * Generated from protobuf field string process_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; * @return string @@ -287,8 +284,7 @@ public function getProcessEndpoint() } /** - * Output only. Immutable. The http endpoint that can be called to invoke - * processing. + * Output only. Immutable. The http endpoint that can be called to invoke processing. * * Generated from protobuf field string process_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; * @param string $var diff --git a/DocumentAi/src/V1/ReviewDocumentOperationMetadata.php b/DocumentAi/src/V1/ReviewDocumentOperationMetadata.php index 5be3e52f8db9..7f22bdf322c6 100644 --- a/DocumentAi/src/V1/ReviewDocumentOperationMetadata.php +++ b/DocumentAi/src/V1/ReviewDocumentOperationMetadata.php @@ -10,8 +10,7 @@ /** * The long-running operation metadata for the - * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument] - * method. + * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument] method. * * Generated from protobuf message google.cloud.documentai.v1.ReviewDocumentOperationMetadata */ diff --git a/DocumentAi/src/V1/ReviewDocumentRequest.php b/DocumentAi/src/V1/ReviewDocumentRequest.php index e91cdc317a00..ca1664b39c8e 100644 --- a/DocumentAi/src/V1/ReviewDocumentRequest.php +++ b/DocumentAi/src/V1/ReviewDocumentRequest.php @@ -10,17 +10,15 @@ /** * Request message for the - * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument] - * method. + * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument] method. * * Generated from protobuf message google.cloud.documentai.v1.ReviewDocumentRequest */ class ReviewDocumentRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name of the - * [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the - * document will be reviewed with. + * Required. The resource name of the [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the document will be + * reviewed with. * * Generated from protobuf field string human_review_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -46,9 +44,8 @@ class ReviewDocumentRequest extends \Google\Protobuf\Internal\Message protected $source; /** - * @param string $humanReviewConfig Required. The resource name of the - * [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the - * document will be reviewed with. Please see + * @param string $humanReviewConfig Required. The resource name of the [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the document will be + * reviewed with. Please see * {@see DocumentProcessorServiceClient::humanReviewConfigName()} for help formatting this field. * * @return \Google\Cloud\DocumentAI\V1\ReviewDocumentRequest @@ -70,9 +67,8 @@ public static function build(string $humanReviewConfig): self * @type \Google\Cloud\DocumentAI\V1\Document $inline_document * An inline document proto. * @type string $human_review_config - * Required. The resource name of the - * [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the - * document will be reviewed with. + * Required. The resource name of the [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the document will be + * reviewed with. * @type bool $enable_schema_validation * Whether the validation should be performed on the ad-hoc review request. * @type int $priority @@ -118,9 +114,8 @@ public function setInlineDocument($var) } /** - * Required. The resource name of the - * [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the - * document will be reviewed with. + * Required. The resource name of the [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the document will be + * reviewed with. * * Generated from protobuf field string human_review_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -131,9 +126,8 @@ public function getHumanReviewConfig() } /** - * Required. The resource name of the - * [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the - * document will be reviewed with. + * Required. The resource name of the [HumanReviewConfig][google.cloud.documentai.v1.HumanReviewConfig] that the document will be + * reviewed with. * * Generated from protobuf field string human_review_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/DocumentAi/src/V1/ReviewDocumentResponse.php b/DocumentAi/src/V1/ReviewDocumentResponse.php index e6ab07dbc3c3..076819827de5 100644 --- a/DocumentAi/src/V1/ReviewDocumentResponse.php +++ b/DocumentAi/src/V1/ReviewDocumentResponse.php @@ -10,8 +10,7 @@ /** * Response message for the - * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument] - * method. + * [ReviewDocument][google.cloud.documentai.v1.DocumentProcessorService.ReviewDocument] method. * * Generated from protobuf message google.cloud.documentai.v1.ReviewDocumentResponse */ diff --git a/DocumentAi/src/V1/SetDefaultProcessorVersionRequest.php b/DocumentAi/src/V1/SetDefaultProcessorVersionRequest.php index 7f3deceb62b8..14de7ad1d620 100644 --- a/DocumentAi/src/V1/SetDefaultProcessorVersionRequest.php +++ b/DocumentAi/src/V1/SetDefaultProcessorVersionRequest.php @@ -18,17 +18,14 @@ class SetDefaultProcessorVersionRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] to change default - * version. + * Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] to change default version. * * Generated from protobuf field string processor = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ private $processor = ''; /** - * Required. The resource name of child - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as - * default. Format: + * Required. The resource name of child [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as default. + * Format: * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}` * * Generated from protobuf field string default_processor_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -42,13 +39,10 @@ class SetDefaultProcessorVersionRequest extends \Google\Protobuf\Internal\Messag * Optional. Data for populating the Message object. * * @type string $processor - * Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] to change default - * version. + * Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] to change default version. * @type string $default_processor_version - * Required. The resource name of child - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as - * default. Format: + * Required. The resource name of child [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as default. + * Format: * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}` * } */ @@ -58,9 +52,7 @@ public function __construct($data = NULL) { } /** - * Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] to change default - * version. + * Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] to change default version. * * Generated from protobuf field string processor = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -71,9 +63,7 @@ public function getProcessor() } /** - * Required. The resource name of the - * [Processor][google.cloud.documentai.v1.Processor] to change default - * version. + * Required. The resource name of the [Processor][google.cloud.documentai.v1.Processor] to change default version. * * Generated from protobuf field string processor = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var @@ -88,9 +78,8 @@ public function setProcessor($var) } /** - * Required. The resource name of child - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as - * default. Format: + * Required. The resource name of child [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as default. + * Format: * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}` * * Generated from protobuf field string default_processor_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { @@ -102,9 +91,8 @@ public function getDefaultProcessorVersion() } /** - * Required. The resource name of child - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as - * default. Format: + * Required. The resource name of child [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion] to use as default. + * Format: * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}` * * Generated from protobuf field string default_processor_version = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { diff --git a/DocumentAi/src/V1/TrainProcessorVersionRequest.php b/DocumentAi/src/V1/TrainProcessorVersionRequest.php index 22e07c88db8d..7c79a6bd7bb9 100644 --- a/DocumentAi/src/V1/TrainProcessorVersionRequest.php +++ b/DocumentAi/src/V1/TrainProcessorVersionRequest.php @@ -18,9 +18,8 @@ class TrainProcessorVersionRequest extends \Google\Protobuf\Internal\Message { /** - * Required. The parent (project, location and processor) to create the new - * version for. Format: - * `projects/{project}/locations/{location}/processors/{processor}`. + * Required. The parent (project, location and processor) to create the new version for. + * Format: `projects/{project}/locations/{location}/processors/{processor}`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -38,15 +37,14 @@ class TrainProcessorVersionRequest extends \Google\Protobuf\Internal\Message */ private $document_schema = null; /** - * Optional. The input data used to train the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. + * Optional. The input data used to train the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; */ private $input_data = null; /** - * Optional. The processor version to use as a base for training. This - * processor version must be a child of `parent`. Format: + * Optional. The processor version to use as a base for training. This processor version + * must be a child of `parent`. Format: * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`. * * Generated from protobuf field string base_processor_version = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -55,9 +53,8 @@ class TrainProcessorVersionRequest extends \Google\Protobuf\Internal\Message protected $processor_flags; /** - * @param string $parent Required. The parent (project, location and processor) to create the new - * version for. Format: - * `projects/{project}/locations/{location}/processors/{processor}`. Please see + * @param string $parent Required. The parent (project, location and processor) to create the new version for. + * Format: `projects/{project}/locations/{location}/processors/{processor}`. Please see * {@see DocumentProcessorServiceClient::processorName()} for help formatting this field. * @param \Google\Cloud\DocumentAI\V1\ProcessorVersion $processorVersion Required. The processor version to be created. * @@ -80,20 +77,20 @@ public static function build(string $parent, \Google\Cloud\DocumentAI\V1\Process * * @type \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\CustomDocumentExtractionOptions $custom_document_extraction_options * Options to control Custom Document Extraction (CDE) Processor. + * @type \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\FoundationModelTuningOptions $foundation_model_tuning_options + * Options to control foundation model tuning of a processor. * @type string $parent - * Required. The parent (project, location and processor) to create the new - * version for. Format: - * `projects/{project}/locations/{location}/processors/{processor}`. + * Required. The parent (project, location and processor) to create the new version for. + * Format: `projects/{project}/locations/{location}/processors/{processor}`. * @type \Google\Cloud\DocumentAI\V1\ProcessorVersion $processor_version * Required. The processor version to be created. * @type \Google\Cloud\DocumentAI\V1\DocumentSchema $document_schema * Optional. The schema the processor version will be trained with. * @type \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\InputData $input_data - * Optional. The input data used to train the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. + * Optional. The input data used to train the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * @type string $base_processor_version - * Optional. The processor version to use as a base for training. This - * processor version must be a child of `parent`. Format: + * Optional. The processor version to use as a base for training. This processor version + * must be a child of `parent`. Format: * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`. * } */ @@ -134,9 +131,39 @@ public function setCustomDocumentExtractionOptions($var) } /** - * Required. The parent (project, location and processor) to create the new - * version for. Format: - * `projects/{project}/locations/{location}/processors/{processor}`. + * Options to control foundation model tuning of a processor. + * + * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.FoundationModelTuningOptions foundation_model_tuning_options = 12; + * @return \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\FoundationModelTuningOptions|null + */ + public function getFoundationModelTuningOptions() + { + return $this->readOneof(12); + } + + public function hasFoundationModelTuningOptions() + { + return $this->hasOneof(12); + } + + /** + * Options to control foundation model tuning of a processor. + * + * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.FoundationModelTuningOptions foundation_model_tuning_options = 12; + * @param \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\FoundationModelTuningOptions $var + * @return $this + */ + public function setFoundationModelTuningOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\FoundationModelTuningOptions::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Required. The parent (project, location and processor) to create the new version for. + * Format: `projects/{project}/locations/{location}/processors/{processor}`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -147,9 +174,8 @@ public function getParent() } /** - * Required. The parent (project, location and processor) to create the new - * version for. Format: - * `projects/{project}/locations/{location}/processors/{processor}`. + * Required. The parent (project, location and processor) to create the new version for. + * Format: `projects/{project}/locations/{location}/processors/{processor}`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var @@ -236,8 +262,7 @@ public function setDocumentSchema($var) } /** - * Optional. The input data used to train the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. + * Optional. The input data used to train the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\InputData|null @@ -258,8 +283,7 @@ public function clearInputData() } /** - * Optional. The input data used to train the - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. + * Optional. The input data used to train the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * * Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\InputData $var @@ -274,8 +298,8 @@ public function setInputData($var) } /** - * Optional. The processor version to use as a base for training. This - * processor version must be a child of `parent`. Format: + * Optional. The processor version to use as a base for training. This processor version + * must be a child of `parent`. Format: * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`. * * Generated from protobuf field string base_processor_version = 8 [(.google.api.field_behavior) = OPTIONAL]; @@ -287,8 +311,8 @@ public function getBaseProcessorVersion() } /** - * Optional. The processor version to use as a base for training. This - * processor version must be a child of `parent`. Format: + * Optional. The processor version to use as a base for training. This processor version + * must be a child of `parent`. Format: * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`. * * Generated from protobuf field string base_processor_version = 8 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/DocumentAi/src/V1/TrainProcessorVersionRequest/FoundationModelTuningOptions.php b/DocumentAi/src/V1/TrainProcessorVersionRequest/FoundationModelTuningOptions.php new file mode 100644 index 000000000000..4bf65b9547f3 --- /dev/null +++ b/DocumentAi/src/V1/TrainProcessorVersionRequest/FoundationModelTuningOptions.php @@ -0,0 +1,114 @@ +google.cloud.documentai.v1.TrainProcessorVersionRequest.FoundationModelTuningOptions + */ +class FoundationModelTuningOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The number of steps to run for model tuning. Valid values are between + * 1 and 400. If not provided, recommended steps will be used. + * + * Generated from protobuf field int32 train_steps = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $train_steps = 0; + /** + * Optional. The multiplier to apply to the recommended learning rate. Valid values + * are between 0.1 and 10. If not provided, recommended learning rate will + * be used. + * + * Generated from protobuf field float learning_rate_multiplier = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $learning_rate_multiplier = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $train_steps + * Optional. The number of steps to run for model tuning. Valid values are between + * 1 and 400. If not provided, recommended steps will be used. + * @type float $learning_rate_multiplier + * Optional. The multiplier to apply to the recommended learning rate. Valid values + * are between 0.1 and 10. If not provided, recommended learning rate will + * be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Documentai\V1\DocumentProcessorService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The number of steps to run for model tuning. Valid values are between + * 1 and 400. If not provided, recommended steps will be used. + * + * Generated from protobuf field int32 train_steps = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTrainSteps() + { + return $this->train_steps; + } + + /** + * Optional. The number of steps to run for model tuning. Valid values are between + * 1 and 400. If not provided, recommended steps will be used. + * + * Generated from protobuf field int32 train_steps = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTrainSteps($var) + { + GPBUtil::checkInt32($var); + $this->train_steps = $var; + + return $this; + } + + /** + * Optional. The multiplier to apply to the recommended learning rate. Valid values + * are between 0.1 and 10. If not provided, recommended learning rate will + * be used. + * + * Generated from protobuf field float learning_rate_multiplier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getLearningRateMultiplier() + { + return $this->learning_rate_multiplier; + } + + /** + * Optional. The multiplier to apply to the recommended learning rate. Valid values + * are between 0.1 and 10. If not provided, recommended learning rate will + * be used. + * + * Generated from protobuf field float learning_rate_multiplier = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setLearningRateMultiplier($var) + { + GPBUtil::checkFloat($var); + $this->learning_rate_multiplier = $var; + + return $this; + } + +} + + diff --git a/DocumentAi/src/V1/TrainProcessorVersionRequest/InputData.php b/DocumentAi/src/V1/TrainProcessorVersionRequest/InputData.php index c82fa1453462..856f8daaf9ed 100644 --- a/DocumentAi/src/V1/TrainProcessorVersionRequest/InputData.php +++ b/DocumentAi/src/V1/TrainProcessorVersionRequest/InputData.php @@ -9,8 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * The input data used to train a new - * [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. + * The input data used to train a new [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. * * Generated from protobuf message google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData */ From 704630fe93226c27365679e3834450251f44e8dd Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 19 Apr 2024 11:43:36 -0700 Subject: [PATCH 52/86] docs: in google.cloud.kms.v1.PublicKey, pem field is always populated (#7240) PiperOrigin-RevId: 625414261 Source-Link: https://github.com/googleapis/googleapis/commit/1c2d0272e3926d7a32bf876b1d9c6225e926e838 Source-Link: https://github.com/googleapis/googleapis-gen/commit/79eaf4e52e0086b54f2de8fee66a58b5a1b76273 Copy-Tag: eyJwIjoiS21zLy5Pd2xCb3QueWFtbCIsImgiOiI3OWVhZjRlNTJlMDA4NmI1NGYyZGU4ZmVlNjZhNThiNWExYjc2MjczIn0= --- Kms/src/V1/PublicKey.php | 76 +++++++++++++++------------------------- 1 file changed, 28 insertions(+), 48 deletions(-) diff --git a/Kms/src/V1/PublicKey.php b/Kms/src/V1/PublicKey.php index b02369ca8c8f..89ac65e6a3b6 100644 --- a/Kms/src/V1/PublicKey.php +++ b/Kms/src/V1/PublicKey.php @@ -18,12 +18,10 @@ class PublicKey extends \Google\Protobuf\Internal\Message { /** - * A public key encoded in PEM format, populated only when - * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - * returns one key. For more information, see the [RFC - * 7468](https://tools.ietf.org/html/rfc7468) sections for [General - * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and [Textual - * Encoding of Subject Public Key Info] + * The public key, encoded in PEM format. For more information, see the + * [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for + * [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and + * [Textual Encoding of Subject Public Key Info] * (https://tools.ietf.org/html/rfc7468#section-13). * * Generated from protobuf field string pem = 1; @@ -38,10 +36,8 @@ class PublicKey extends \Google\Protobuf\Internal\Message */ private $algorithm = 0; /** - * Integrity verification field: A CRC32C checksum of the returned - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. It is only populated - * when [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - * returns one key. An integrity check of + * Integrity verification field. A CRC32C checksum of the returned + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by * computing the CRC32C checksum of * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your @@ -81,22 +77,18 @@ class PublicKey extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $pem - * A public key encoded in PEM format, populated only when - * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - * returns one key. For more information, see the [RFC - * 7468](https://tools.ietf.org/html/rfc7468) sections for [General - * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and [Textual - * Encoding of Subject Public Key Info] + * The public key, encoded in PEM format. For more information, see the + * [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for + * [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and + * [Textual Encoding of Subject Public Key Info] * (https://tools.ietf.org/html/rfc7468#section-13). * @type int $algorithm * The * [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] * associated with this key. * @type \Google\Protobuf\Int64Value $pem_crc32c - * Integrity verification field: A CRC32C checksum of the returned - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. It is only populated - * when [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - * returns one key. An integrity check of + * Integrity verification field. A CRC32C checksum of the returned + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by * computing the CRC32C checksum of * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your @@ -124,12 +116,10 @@ public function __construct($data = NULL) { } /** - * A public key encoded in PEM format, populated only when - * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - * returns one key. For more information, see the [RFC - * 7468](https://tools.ietf.org/html/rfc7468) sections for [General - * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and [Textual - * Encoding of Subject Public Key Info] + * The public key, encoded in PEM format. For more information, see the + * [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for + * [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and + * [Textual Encoding of Subject Public Key Info] * (https://tools.ietf.org/html/rfc7468#section-13). * * Generated from protobuf field string pem = 1; @@ -141,12 +131,10 @@ public function getPem() } /** - * A public key encoded in PEM format, populated only when - * [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - * returns one key. For more information, see the [RFC - * 7468](https://tools.ietf.org/html/rfc7468) sections for [General - * Considerations](https://tools.ietf.org/html/rfc7468#section-2) and [Textual - * Encoding of Subject Public Key Info] + * The public key, encoded in PEM format. For more information, see the + * [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for + * [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and + * [Textual Encoding of Subject Public Key Info] * (https://tools.ietf.org/html/rfc7468#section-13). * * Generated from protobuf field string pem = 1; @@ -192,10 +180,8 @@ public function setAlgorithm($var) } /** - * Integrity verification field: A CRC32C checksum of the returned - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. It is only populated - * when [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - * returns one key. An integrity check of + * Integrity verification field. A CRC32C checksum of the returned + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by * computing the CRC32C checksum of * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your @@ -229,10 +215,8 @@ public function clearPemCrc32C() /** * Returns the unboxed value from getPemCrc32C() - * Integrity verification field: A CRC32C checksum of the returned - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. It is only populated - * when [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - * returns one key. An integrity check of + * Integrity verification field. A CRC32C checksum of the returned + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by * computing the CRC32C checksum of * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your @@ -254,10 +238,8 @@ public function getPemCrc32CValue() } /** - * Integrity verification field: A CRC32C checksum of the returned - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. It is only populated - * when [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - * returns one key. An integrity check of + * Integrity verification field. A CRC32C checksum of the returned + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by * computing the CRC32C checksum of * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your @@ -285,10 +267,8 @@ public function setPemCrc32C($var) /** * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - * Integrity verification field: A CRC32C checksum of the returned - * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. It is only populated - * when [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey] - * returns one key. An integrity check of + * Integrity verification field. A CRC32C checksum of the returned + * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem]. An integrity check of * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] can be performed by * computing the CRC32C checksum of * [PublicKey.pem][google.cloud.kms.v1.PublicKey.pem] and comparing your From 6e75ee1d0100aaf992d0bb40d8d08cdca7a30a93 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 19 Apr 2024 11:43:51 -0700 Subject: [PATCH 53/86] docs: fixed the description of ListFirewallPoliciesResponse (#7238) PiperOrigin-RevId: 625332079 Source-Link: https://github.com/googleapis/googleapis/commit/15c7279b86d29111025aa2fa74aad0b836e81557 Source-Link: https://github.com/googleapis/googleapis-gen/commit/80b610af4c23b435aa91f6f9e1a2be6028227b1d Copy-Tag: eyJwIjoiUmVjYXB0Y2hhRW50ZXJwcmlzZS8uT3dsQm90LnlhbWwiLCJoIjoiODBiNjEwYWY0YzIzYjQzNWFhOTFmNmY5ZTFhMmJlNjAyODIyN2IxZCJ9 --- RecaptchaEnterprise/src/V1/ListFirewallPoliciesResponse.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RecaptchaEnterprise/src/V1/ListFirewallPoliciesResponse.php b/RecaptchaEnterprise/src/V1/ListFirewallPoliciesResponse.php index c70d5fc76668..13b8d06b50ae 100644 --- a/RecaptchaEnterprise/src/V1/ListFirewallPoliciesResponse.php +++ b/RecaptchaEnterprise/src/V1/ListFirewallPoliciesResponse.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Response to request to list firewall policies belonging to a key. + * Response to request to list firewall policies belonging to a project. * * Generated from protobuf message google.cloud.recaptchaenterprise.v1.ListFirewallPoliciesResponse */ From f80eb133b2c866dfc3d92637792ad2147164d523 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 19 Apr 2024 11:44:46 -0700 Subject: [PATCH 54/86] feat: Added CloudRun, GkeNamespace, GkeWorkload, GkeService, and BasicService service types (#7237) * feat: Added Synthetic Monitor targets to Uptime data model feat: Added ServiceAgentAuthentication auth method for Uptime docs: Updated comments accordingly PiperOrigin-RevId: 625075445 Source-Link: https://github.com/googleapis/googleapis/commit/90db3b07a411bba462ec570726d596c17e3d9b3e Source-Link: https://github.com/googleapis/googleapis-gen/commit/d55c82ca1c120dcd46f7d9a1cd2dc6edf847514f Copy-Tag: eyJwIjoiTW9uaXRvcmluZy8uT3dsQm90LnlhbWwiLCJoIjoiZDU1YzgyY2ExYzEyMGRjZDQ2ZjdkOWExY2QyZGM2ZWRmODQ3NTE0ZiJ9 * feat: Added CloudRun, GkeNamespace, GkeWorkload, GkeService, and BasicService service types docs: Updated comments accordingly PiperOrigin-RevId: 625351698 Source-Link: https://github.com/googleapis/googleapis/commit/79687e28058086e9740e36f5d7d76ddfbfa36e43 Source-Link: https://github.com/googleapis/googleapis-gen/commit/942d8077865b3f60849562f26219790362798fe8 Copy-Tag: eyJwIjoiTW9uaXRvcmluZy8uT3dsQm90LnlhbWwiLCJoIjoiOTQyZDgwNzc4NjViM2Y2MDg0OTU2MmYyNjIxOTc5MDM2Mjc5OGZlOCJ9 --- Monitoring/metadata/V3/Service.php | Bin 4653 -> 5715 bytes Monitoring/metadata/V3/Uptime.php | Bin 5190 -> 6049 bytes .../V3/Client/UptimeCheckServiceClient.php | 20 ++ .../Gapic/UptimeCheckServiceGapicClient.php | 32 +++ Monitoring/src/V3/Service.php | 202 +++++++++++++- Monitoring/src/V3/Service/AppEngine.php | 16 +- Monitoring/src/V3/Service/BasicService.php | 130 +++++++++ Monitoring/src/V3/Service/CloudEndpoints.php | 16 +- Monitoring/src/V3/Service/CloudRun.php | 120 +++++++++ Monitoring/src/V3/Service/Custom.php | 5 +- Monitoring/src/V3/Service/GkeNamespace.php | 182 +++++++++++++ Monitoring/src/V3/Service/GkeService.php | 219 +++++++++++++++ Monitoring/src/V3/Service/GkeWorkload.php | 250 ++++++++++++++++++ Monitoring/src/V3/ServiceLevelObjective.php | 14 +- Monitoring/src/V3/SyntheticMonitorTarget.php | 75 ++++++ .../CloudFunctionV2Target.php | 134 ++++++++++ Monitoring/src/V3/UptimeCheckConfig.php | 51 +++- .../src/V3/UptimeCheckConfig/HttpCheck.php | 52 ++++ .../HttpCheck/ServiceAgentAuthentication.php | 74 ++++++ .../ServiceAgentAuthenticationType.php | 57 ++++ ...uptime_check_service_descriptor_config.php | 1 + 21 files changed, 1611 insertions(+), 39 deletions(-) create mode 100644 Monitoring/src/V3/Service/BasicService.php create mode 100644 Monitoring/src/V3/Service/CloudRun.php create mode 100644 Monitoring/src/V3/Service/GkeNamespace.php create mode 100644 Monitoring/src/V3/Service/GkeService.php create mode 100644 Monitoring/src/V3/Service/GkeWorkload.php create mode 100644 Monitoring/src/V3/SyntheticMonitorTarget.php create mode 100644 Monitoring/src/V3/SyntheticMonitorTarget/CloudFunctionV2Target.php create mode 100644 Monitoring/src/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication.php create mode 100644 Monitoring/src/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication/ServiceAgentAuthenticationType.php diff --git a/Monitoring/metadata/V3/Service.php b/Monitoring/metadata/V3/Service.php index 1627dee4f7a7b671b07fe8db70c22464a26abb42..ffa79a3a9746c27bd7d886c8dec772ecbf848b0b 100644 GIT binary patch delta 919 zcmbu8&x#X45XS9H+$5FBnv9EfatMmMVU3c7#e=YjY}S7V@t}yuVYXAmG41rwGZR@n z1fOBN`3ee3(1U{DQCRTc3-}J=QLwu+`J)>_@H+MD`o8+A=GFSwi?834$_*cRuZs`8 zp)X|mleE)!EpS=)gU<09#~G6|@yiskKA`pG)iyqg5KjyZc!=?~D=PovOd zNKY7~t&nEx<^b2aV7Xi(wUZqAK zY$Z7x!#NG00(^ulcKzNwE$ir0Ex~va#V98dBTIL5PQmIdu1O(plwJ}jFU0UaO3Q^t zNR5(n7V5DGU5-QKE)zj41?S3Td=Mf%ZcP3S(a!0L@%t2DzKnlyJIXRW63lYDQ@4L^ z${1|CA@JLV7Z+;gFo*2iht=ttdBxjD9;v-r>WHuCYicjvNGH3M+XlO?QaNZ`0w?>L Yc1jndXF@ABD^C3xJggx&QzG delta 88 zcmcbtvsPupF2>1U8ILkOl$*SV$$GL7v$Nz$PA>M~)S|M?*SgN~C!#xBw}a8a)62 diff --git a/Monitoring/metadata/V3/Uptime.php b/Monitoring/metadata/V3/Uptime.php index 36ba869253e4af40d3ac4226633f0eec61f3f9e6..528518b81c8051f6bd7984d3cb2001d0d814ed5a 100644 GIT binary patch delta 810 zcmX@6u~2`*E+(cKnw$49H8WbwX5tbHuFNaRNG-`s_RY`BEXgklNi0fFEfI?65=_p? zFHMP0E6qzT$;{7-FEf&0RAAKLHgeLN{E$hcUJtuYJ!gj>KBZzq(3{q1WxkRzb z3E6P5}egar^Ru2dNT{_es-$@&OK6nP7-&N04Gi6tx})wgrr{$W7a0I W0riyR8>@3EK!J`zNzr6}5pw_qsTF7d delta 92 zcmV-i0Hgn*FUBaax&i{dBD1^#g8>zS8wwFsaCB*HWkYCXV{1ciZf0p`lW7Ablbi*P yvvmgi0s`&{vvUcb0<(w=n*oy|545x84?6}2#sLZ#V{dJfQ4ST8JQlB$R2NMhxFD$j diff --git a/Monitoring/src/V3/Client/UptimeCheckServiceClient.php b/Monitoring/src/V3/Client/UptimeCheckServiceClient.php index 678287407dd8..17e4d2b2270e 100644 --- a/Monitoring/src/V3/Client/UptimeCheckServiceClient.php +++ b/Monitoring/src/V3/Client/UptimeCheckServiceClient.php @@ -134,6 +134,25 @@ public static function folderUptimeCheckConfigName(string $folder, string $uptim ]); } + /** + * Formats a string containing the fully-qualified path to represent a function + * resource. + * + * @param string $project + * @param string $location + * @param string $function + * + * @return string The formatted function resource. + */ + public static function functionName(string $project, string $location, string $function): string + { + return self::getPathTemplate('function')->render([ + 'project' => $project, + 'location' => $location, + 'function' => $function, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * organization_uptime_check_config resource. @@ -190,6 +209,7 @@ public static function uptimeCheckConfigName(string $project, string $uptimeChec * The following name formats are supported: * Template: Pattern * - folderUptimeCheckConfig: folders/{folder}/uptimeCheckConfigs/{uptime_check_config} + * - function: projects/{project}/locations/{location}/functions/{function} * - organizationUptimeCheckConfig: organizations/{organization}/uptimeCheckConfigs/{uptime_check_config} * - projectUptimeCheckConfig: projects/{project}/uptimeCheckConfigs/{uptime_check_config} * - uptimeCheckConfig: projects/{project}/uptimeCheckConfigs/{uptime_check_config} diff --git a/Monitoring/src/V3/Gapic/UptimeCheckServiceGapicClient.php b/Monitoring/src/V3/Gapic/UptimeCheckServiceGapicClient.php index b1432f8b2ff9..88d26a215cac 100644 --- a/Monitoring/src/V3/Gapic/UptimeCheckServiceGapicClient.php +++ b/Monitoring/src/V3/Gapic/UptimeCheckServiceGapicClient.php @@ -108,6 +108,8 @@ class UptimeCheckServiceGapicClient private static $folderUptimeCheckConfigNameTemplate; + private static $functionNameTemplate; + private static $organizationUptimeCheckConfigNameTemplate; private static $projectUptimeCheckConfigNameTemplate; @@ -144,6 +146,15 @@ private static function getFolderUptimeCheckConfigNameTemplate() return self::$folderUptimeCheckConfigNameTemplate; } + private static function getFunctionNameTemplate() + { + if (self::$functionNameTemplate == null) { + self::$functionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/functions/{function}'); + } + + return self::$functionNameTemplate; + } + private static function getOrganizationUptimeCheckConfigNameTemplate() { if (self::$organizationUptimeCheckConfigNameTemplate == null) { @@ -176,6 +187,7 @@ private static function getPathTemplateMap() if (self::$pathTemplateMap == null) { self::$pathTemplateMap = [ 'folderUptimeCheckConfig' => self::getFolderUptimeCheckConfigNameTemplate(), + 'function' => self::getFunctionNameTemplate(), 'organizationUptimeCheckConfig' => self::getOrganizationUptimeCheckConfigNameTemplate(), 'projectUptimeCheckConfig' => self::getProjectUptimeCheckConfigNameTemplate(), 'uptimeCheckConfig' => self::getUptimeCheckConfigNameTemplate(), @@ -202,6 +214,25 @@ public static function folderUptimeCheckConfigName($folder, $uptimeCheckConfig) ]); } + /** + * Formats a string containing the fully-qualified path to represent a function + * resource. + * + * @param string $project + * @param string $location + * @param string $function + * + * @return string The formatted function resource. + */ + public static function functionName($project, $location, $function) + { + return self::getFunctionNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'function' => $function, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * organization_uptime_check_config resource. @@ -258,6 +289,7 @@ public static function uptimeCheckConfigName($project, $uptimeCheckConfig) * The following name formats are supported: * Template: Pattern * - folderUptimeCheckConfig: folders/{folder}/uptimeCheckConfigs/{uptime_check_config} + * - function: projects/{project}/locations/{location}/functions/{function} * - organizationUptimeCheckConfig: organizations/{organization}/uptimeCheckConfigs/{uptime_check_config} * - projectUptimeCheckConfig: projects/{project}/uptimeCheckConfigs/{uptime_check_config} * - uptimeCheckConfig: projects/{project}/uptimeCheckConfigs/{uptime_check_config} diff --git a/Monitoring/src/V3/Service.php b/Monitoring/src/V3/Service.php index af568f611c2a..dcb2edbbd5c6 100644 --- a/Monitoring/src/V3/Service.php +++ b/Monitoring/src/V3/Service.php @@ -20,10 +20,10 @@ class Service extends \Google\Protobuf\Internal\Message { /** - * Resource name for this Service. The format is: + * Identifier. Resource name for this Service. The format is: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; */ private $name = ''; /** @@ -32,6 +32,15 @@ class Service extends \Google\Protobuf\Internal\Message * Generated from protobuf field string display_name = 2; */ private $display_name = ''; + /** + * Message that contains the service type and service labels of this service + * if it is a basic service. + * Documentation and examples + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field .google.monitoring.v3.Service.BasicService basic_service = 19; + */ + private $basic_service = null; /** * Configuration for how to query telemetry on a Service. * @@ -58,7 +67,7 @@ class Service extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Resource name for this Service. The format is: + * Identifier. Resource name for this Service. The format is: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] * @type string $display_name * Name used for UI elements listing this Service. @@ -76,6 +85,19 @@ class Service extends \Google\Protobuf\Internal\Message * Type used for canonical services scoped to an Istio mesh. * Metrics for Istio are * [documented here](https://istio.io/latest/docs/reference/config/metrics/) + * @type \Google\Cloud\Monitoring\V3\Service\CloudRun $cloud_run + * Type used for Cloud Run services. + * @type \Google\Cloud\Monitoring\V3\Service\GkeNamespace $gke_namespace + * Type used for GKE Namespaces. + * @type \Google\Cloud\Monitoring\V3\Service\GkeWorkload $gke_workload + * Type used for GKE Workloads. + * @type \Google\Cloud\Monitoring\V3\Service\GkeService $gke_service + * Type used for GKE Services (the Kubernetes concept of a service). + * @type \Google\Cloud\Monitoring\V3\Service\BasicService $basic_service + * Message that contains the service type and service labels of this service + * if it is a basic service. + * Documentation and examples + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). * @type \Google\Cloud\Monitoring\V3\Service\Telemetry $telemetry * Configuration for how to query telemetry on a Service. * @type array|\Google\Protobuf\Internal\MapField $user_labels @@ -93,10 +115,10 @@ public function __construct($data = NULL) { } /** - * Resource name for this Service. The format is: + * Identifier. Resource name for this Service. The format is: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @return string */ public function getName() @@ -105,10 +127,10 @@ public function getName() } /** - * Resource name for this Service. The format is: + * Identifier. Resource name for this Service. The format is: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @param string $var * @return $this */ @@ -336,6 +358,172 @@ public function setIstioCanonicalService($var) return $this; } + /** + * Type used for Cloud Run services. + * + * Generated from protobuf field .google.monitoring.v3.Service.CloudRun cloud_run = 12; + * @return \Google\Cloud\Monitoring\V3\Service\CloudRun|null + */ + public function getCloudRun() + { + return $this->readOneof(12); + } + + public function hasCloudRun() + { + return $this->hasOneof(12); + } + + /** + * Type used for Cloud Run services. + * + * Generated from protobuf field .google.monitoring.v3.Service.CloudRun cloud_run = 12; + * @param \Google\Cloud\Monitoring\V3\Service\CloudRun $var + * @return $this + */ + public function setCloudRun($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\CloudRun::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Type used for GKE Namespaces. + * + * Generated from protobuf field .google.monitoring.v3.Service.GkeNamespace gke_namespace = 15; + * @return \Google\Cloud\Monitoring\V3\Service\GkeNamespace|null + */ + public function getGkeNamespace() + { + return $this->readOneof(15); + } + + public function hasGkeNamespace() + { + return $this->hasOneof(15); + } + + /** + * Type used for GKE Namespaces. + * + * Generated from protobuf field .google.monitoring.v3.Service.GkeNamespace gke_namespace = 15; + * @param \Google\Cloud\Monitoring\V3\Service\GkeNamespace $var + * @return $this + */ + public function setGkeNamespace($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\GkeNamespace::class); + $this->writeOneof(15, $var); + + return $this; + } + + /** + * Type used for GKE Workloads. + * + * Generated from protobuf field .google.monitoring.v3.Service.GkeWorkload gke_workload = 16; + * @return \Google\Cloud\Monitoring\V3\Service\GkeWorkload|null + */ + public function getGkeWorkload() + { + return $this->readOneof(16); + } + + public function hasGkeWorkload() + { + return $this->hasOneof(16); + } + + /** + * Type used for GKE Workloads. + * + * Generated from protobuf field .google.monitoring.v3.Service.GkeWorkload gke_workload = 16; + * @param \Google\Cloud\Monitoring\V3\Service\GkeWorkload $var + * @return $this + */ + public function setGkeWorkload($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\GkeWorkload::class); + $this->writeOneof(16, $var); + + return $this; + } + + /** + * Type used for GKE Services (the Kubernetes concept of a service). + * + * Generated from protobuf field .google.monitoring.v3.Service.GkeService gke_service = 17; + * @return \Google\Cloud\Monitoring\V3\Service\GkeService|null + */ + public function getGkeService() + { + return $this->readOneof(17); + } + + public function hasGkeService() + { + return $this->hasOneof(17); + } + + /** + * Type used for GKE Services (the Kubernetes concept of a service). + * + * Generated from protobuf field .google.monitoring.v3.Service.GkeService gke_service = 17; + * @param \Google\Cloud\Monitoring\V3\Service\GkeService $var + * @return $this + */ + public function setGkeService($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\GkeService::class); + $this->writeOneof(17, $var); + + return $this; + } + + /** + * Message that contains the service type and service labels of this service + * if it is a basic service. + * Documentation and examples + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field .google.monitoring.v3.Service.BasicService basic_service = 19; + * @return \Google\Cloud\Monitoring\V3\Service\BasicService|null + */ + public function getBasicService() + { + return $this->basic_service; + } + + public function hasBasicService() + { + return isset($this->basic_service); + } + + public function clearBasicService() + { + unset($this->basic_service); + } + + /** + * Message that contains the service type and service labels of this service + * if it is a basic service. + * Documentation and examples + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field .google.monitoring.v3.Service.BasicService basic_service = 19; + * @param \Google\Cloud\Monitoring\V3\Service\BasicService $var + * @return $this + */ + public function setBasicService($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\Service\BasicService::class); + $this->basic_service = $var; + + return $this; + } + /** * Configuration for how to query telemetry on a Service. * diff --git a/Monitoring/src/V3/Service/AppEngine.php b/Monitoring/src/V3/Service/AppEngine.php index e9cc9b68dbb0..a6f569054113 100644 --- a/Monitoring/src/V3/Service/AppEngine.php +++ b/Monitoring/src/V3/Service/AppEngine.php @@ -17,8 +17,8 @@ class AppEngine extends \Google\Protobuf\Internal\Message { /** * The ID of the App Engine module underlying this service. Corresponds to - * the `module_id` resource label in the `gae_app` monitored resource: - * https://cloud.google.com/monitoring/api/resources#tag_gae_app + * the `module_id` resource label in the [`gae_app` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_gae_app). * * Generated from protobuf field string module_id = 1; */ @@ -32,8 +32,8 @@ class AppEngine extends \Google\Protobuf\Internal\Message * * @type string $module_id * The ID of the App Engine module underlying this service. Corresponds to - * the `module_id` resource label in the `gae_app` monitored resource: - * https://cloud.google.com/monitoring/api/resources#tag_gae_app + * the `module_id` resource label in the [`gae_app` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_gae_app). * } */ public function __construct($data = NULL) { @@ -43,8 +43,8 @@ public function __construct($data = NULL) { /** * The ID of the App Engine module underlying this service. Corresponds to - * the `module_id` resource label in the `gae_app` monitored resource: - * https://cloud.google.com/monitoring/api/resources#tag_gae_app + * the `module_id` resource label in the [`gae_app` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_gae_app). * * Generated from protobuf field string module_id = 1; * @return string @@ -56,8 +56,8 @@ public function getModuleId() /** * The ID of the App Engine module underlying this service. Corresponds to - * the `module_id` resource label in the `gae_app` monitored resource: - * https://cloud.google.com/monitoring/api/resources#tag_gae_app + * the `module_id` resource label in the [`gae_app` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_gae_app). * * Generated from protobuf field string module_id = 1; * @param string $var diff --git a/Monitoring/src/V3/Service/BasicService.php b/Monitoring/src/V3/Service/BasicService.php new file mode 100644 index 000000000000..4b370e8c9a9a --- /dev/null +++ b/Monitoring/src/V3/Service/BasicService.php @@ -0,0 +1,130 @@ +google.monitoring.v3.Service.BasicService + */ +class BasicService extends \Google\Protobuf\Internal\Message +{ + /** + * The type of service that this basic service defines, e.g. + * APP_ENGINE service type. + * Documentation and valid values + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field string service_type = 1; + */ + private $service_type = ''; + /** + * Labels that specify the resource that emits the monitoring data which + * is used for SLO reporting of this `Service`. + * Documentation and valid values for given service types + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field map service_labels = 2; + */ + private $service_labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service_type + * The type of service that this basic service defines, e.g. + * APP_ENGINE service type. + * Documentation and valid values + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * @type array|\Google\Protobuf\Internal\MapField $service_labels + * Labels that specify the resource that emits the monitoring data which + * is used for SLO reporting of this `Service`. + * Documentation and valid values for given service types + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * The type of service that this basic service defines, e.g. + * APP_ENGINE service type. + * Documentation and valid values + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field string service_type = 1; + * @return string + */ + public function getServiceType() + { + return $this->service_type; + } + + /** + * The type of service that this basic service defines, e.g. + * APP_ENGINE service type. + * Documentation and valid values + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field string service_type = 1; + * @param string $var + * @return $this + */ + public function setServiceType($var) + { + GPBUtil::checkString($var, True); + $this->service_type = $var; + + return $this; + } + + /** + * Labels that specify the resource that emits the monitoring data which + * is used for SLO reporting of this `Service`. + * Documentation and valid values for given service types + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field map service_labels = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getServiceLabels() + { + return $this->service_labels; + } + + /** + * Labels that specify the resource that emits the monitoring data which + * is used for SLO reporting of this `Service`. + * Documentation and valid values for given service types + * [here](https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli). + * + * Generated from protobuf field map service_labels = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setServiceLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->service_labels = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BasicService::class, \Google\Cloud\Monitoring\V3\Service_BasicService::class); + diff --git a/Monitoring/src/V3/Service/CloudEndpoints.php b/Monitoring/src/V3/Service/CloudEndpoints.php index e8b9a3a8a690..dbaf9668a6af 100644 --- a/Monitoring/src/V3/Service/CloudEndpoints.php +++ b/Monitoring/src/V3/Service/CloudEndpoints.php @@ -17,8 +17,8 @@ class CloudEndpoints extends \Google\Protobuf\Internal\Message { /** * The name of the Cloud Endpoints service underlying this service. - * Corresponds to the `service` resource label in the `api` monitored - * resource: https://cloud.google.com/monitoring/api/resources#tag_api + * Corresponds to the `service` resource label in the [`api` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_api). * * Generated from protobuf field string service = 1; */ @@ -32,8 +32,8 @@ class CloudEndpoints extends \Google\Protobuf\Internal\Message * * @type string $service * The name of the Cloud Endpoints service underlying this service. - * Corresponds to the `service` resource label in the `api` monitored - * resource: https://cloud.google.com/monitoring/api/resources#tag_api + * Corresponds to the `service` resource label in the [`api` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_api). * } */ public function __construct($data = NULL) { @@ -43,8 +43,8 @@ public function __construct($data = NULL) { /** * The name of the Cloud Endpoints service underlying this service. - * Corresponds to the `service` resource label in the `api` monitored - * resource: https://cloud.google.com/monitoring/api/resources#tag_api + * Corresponds to the `service` resource label in the [`api` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_api). * * Generated from protobuf field string service = 1; * @return string @@ -56,8 +56,8 @@ public function getService() /** * The name of the Cloud Endpoints service underlying this service. - * Corresponds to the `service` resource label in the `api` monitored - * resource: https://cloud.google.com/monitoring/api/resources#tag_api + * Corresponds to the `service` resource label in the [`api` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_api). * * Generated from protobuf field string service = 1; * @param string $var diff --git a/Monitoring/src/V3/Service/CloudRun.php b/Monitoring/src/V3/Service/CloudRun.php new file mode 100644 index 000000000000..666cdeeb5271 --- /dev/null +++ b/Monitoring/src/V3/Service/CloudRun.php @@ -0,0 +1,120 @@ +google.monitoring.v3.Service.CloudRun + */ +class CloudRun extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the Cloud Run service. Corresponds to the `service_name` + * resource label in the [`cloud_run_revision` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). + * + * Generated from protobuf field string service_name = 1; + */ + private $service_name = ''; + /** + * The location the service is run. Corresponds to the `location` + * resource label in the [`cloud_run_revision` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). + * + * Generated from protobuf field string location = 2; + */ + private $location = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service_name + * The name of the Cloud Run service. Corresponds to the `service_name` + * resource label in the [`cloud_run_revision` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). + * @type string $location + * The location the service is run. Corresponds to the `location` + * resource label in the [`cloud_run_revision` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * The name of the Cloud Run service. Corresponds to the `service_name` + * resource label in the [`cloud_run_revision` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). + * + * Generated from protobuf field string service_name = 1; + * @return string + */ + public function getServiceName() + { + return $this->service_name; + } + + /** + * The name of the Cloud Run service. Corresponds to the `service_name` + * resource label in the [`cloud_run_revision` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). + * + * Generated from protobuf field string service_name = 1; + * @param string $var + * @return $this + */ + public function setServiceName($var) + { + GPBUtil::checkString($var, True); + $this->service_name = $var; + + return $this; + } + + /** + * The location the service is run. Corresponds to the `location` + * resource label in the [`cloud_run_revision` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). + * + * Generated from protobuf field string location = 2; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * The location the service is run. Corresponds to the `location` + * resource label in the [`cloud_run_revision` monitored + * resource](https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision). + * + * Generated from protobuf field string location = 2; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CloudRun::class, \Google\Cloud\Monitoring\V3\Service_CloudRun::class); + diff --git a/Monitoring/src/V3/Service/Custom.php b/Monitoring/src/V3/Service/Custom.php index 08ba22af9c20..03fb8595f374 100644 --- a/Monitoring/src/V3/Service/Custom.php +++ b/Monitoring/src/V3/Service/Custom.php @@ -9,8 +9,9 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Custom view of service telemetry. Currently a place-holder pending final - * design. + * Use a custom service to designate a service that you want to monitor + * when none of the other service types (like App Engine, Cloud Run, or + * a GKE type) matches your intended service. * * Generated from protobuf message google.monitoring.v3.Service.Custom */ diff --git a/Monitoring/src/V3/Service/GkeNamespace.php b/Monitoring/src/V3/Service/GkeNamespace.php new file mode 100644 index 000000000000..0f995ffe7afb --- /dev/null +++ b/Monitoring/src/V3/Service/GkeNamespace.php @@ -0,0 +1,182 @@ +google.monitoring.v3.Service.GkeNamespace + */ +class GkeNamespace extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $project_id = ''; + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + */ + private $location = ''; + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + */ + private $cluster_name = ''; + /** + * The name of this namespace. + * + * Generated from protobuf field string namespace_name = 4; + */ + private $namespace_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * @type string $location + * The location of the parent cluster. This may be a zone or region. + * @type string $cluster_name + * The name of the parent cluster. + * @type string $namespace_name + * The name of this namespace. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + * @return string + */ + public function getClusterName() + { + return $this->cluster_name; + } + + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + * @param string $var + * @return $this + */ + public function setClusterName($var) + { + GPBUtil::checkString($var, True); + $this->cluster_name = $var; + + return $this; + } + + /** + * The name of this namespace. + * + * Generated from protobuf field string namespace_name = 4; + * @return string + */ + public function getNamespaceName() + { + return $this->namespace_name; + } + + /** + * The name of this namespace. + * + * Generated from protobuf field string namespace_name = 4; + * @param string $var + * @return $this + */ + public function setNamespaceName($var) + { + GPBUtil::checkString($var, True); + $this->namespace_name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GkeNamespace::class, \Google\Cloud\Monitoring\V3\Service_GkeNamespace::class); + diff --git a/Monitoring/src/V3/Service/GkeService.php b/Monitoring/src/V3/Service/GkeService.php new file mode 100644 index 000000000000..a829d31af226 --- /dev/null +++ b/Monitoring/src/V3/Service/GkeService.php @@ -0,0 +1,219 @@ +google.monitoring.v3.Service.GkeService + */ +class GkeService extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $project_id = ''; + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + */ + private $location = ''; + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + */ + private $cluster_name = ''; + /** + * The name of the parent namespace. + * + * Generated from protobuf field string namespace_name = 4; + */ + private $namespace_name = ''; + /** + * The name of this service. + * + * Generated from protobuf field string service_name = 5; + */ + private $service_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * @type string $location + * The location of the parent cluster. This may be a zone or region. + * @type string $cluster_name + * The name of the parent cluster. + * @type string $namespace_name + * The name of the parent namespace. + * @type string $service_name + * The name of this service. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + * @return string + */ + public function getClusterName() + { + return $this->cluster_name; + } + + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + * @param string $var + * @return $this + */ + public function setClusterName($var) + { + GPBUtil::checkString($var, True); + $this->cluster_name = $var; + + return $this; + } + + /** + * The name of the parent namespace. + * + * Generated from protobuf field string namespace_name = 4; + * @return string + */ + public function getNamespaceName() + { + return $this->namespace_name; + } + + /** + * The name of the parent namespace. + * + * Generated from protobuf field string namespace_name = 4; + * @param string $var + * @return $this + */ + public function setNamespaceName($var) + { + GPBUtil::checkString($var, True); + $this->namespace_name = $var; + + return $this; + } + + /** + * The name of this service. + * + * Generated from protobuf field string service_name = 5; + * @return string + */ + public function getServiceName() + { + return $this->service_name; + } + + /** + * The name of this service. + * + * Generated from protobuf field string service_name = 5; + * @param string $var + * @return $this + */ + public function setServiceName($var) + { + GPBUtil::checkString($var, True); + $this->service_name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GkeService::class, \Google\Cloud\Monitoring\V3\Service_GkeService::class); + diff --git a/Monitoring/src/V3/Service/GkeWorkload.php b/Monitoring/src/V3/Service/GkeWorkload.php new file mode 100644 index 000000000000..e8c33e9f50f4 --- /dev/null +++ b/Monitoring/src/V3/Service/GkeWorkload.php @@ -0,0 +1,250 @@ +google.monitoring.v3.Service.GkeWorkload + */ +class GkeWorkload extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $project_id = ''; + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + */ + private $location = ''; + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + */ + private $cluster_name = ''; + /** + * The name of the parent namespace. + * + * Generated from protobuf field string namespace_name = 4; + */ + private $namespace_name = ''; + /** + * The type of this workload (for example, "Deployment" or "DaemonSet") + * + * Generated from protobuf field string top_level_controller_type = 5; + */ + private $top_level_controller_type = ''; + /** + * The name of this workload. + * + * Generated from protobuf field string top_level_controller_name = 6; + */ + private $top_level_controller_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * @type string $location + * The location of the parent cluster. This may be a zone or region. + * @type string $cluster_name + * The name of the parent cluster. + * @type string $namespace_name + * The name of the parent namespace. + * @type string $top_level_controller_type + * The type of this workload (for example, "Deployment" or "DaemonSet") + * @type string $top_level_controller_name + * The name of this workload. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Service::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Output only. The project this resource lives in. For legacy services + * migrated from the `Custom` type, this may be a distinct project from the + * one parenting the service itself. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * The location of the parent cluster. This may be a zone or region. + * + * Generated from protobuf field string location = 2; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + * @return string + */ + public function getClusterName() + { + return $this->cluster_name; + } + + /** + * The name of the parent cluster. + * + * Generated from protobuf field string cluster_name = 3; + * @param string $var + * @return $this + */ + public function setClusterName($var) + { + GPBUtil::checkString($var, True); + $this->cluster_name = $var; + + return $this; + } + + /** + * The name of the parent namespace. + * + * Generated from protobuf field string namespace_name = 4; + * @return string + */ + public function getNamespaceName() + { + return $this->namespace_name; + } + + /** + * The name of the parent namespace. + * + * Generated from protobuf field string namespace_name = 4; + * @param string $var + * @return $this + */ + public function setNamespaceName($var) + { + GPBUtil::checkString($var, True); + $this->namespace_name = $var; + + return $this; + } + + /** + * The type of this workload (for example, "Deployment" or "DaemonSet") + * + * Generated from protobuf field string top_level_controller_type = 5; + * @return string + */ + public function getTopLevelControllerType() + { + return $this->top_level_controller_type; + } + + /** + * The type of this workload (for example, "Deployment" or "DaemonSet") + * + * Generated from protobuf field string top_level_controller_type = 5; + * @param string $var + * @return $this + */ + public function setTopLevelControllerType($var) + { + GPBUtil::checkString($var, True); + $this->top_level_controller_type = $var; + + return $this; + } + + /** + * The name of this workload. + * + * Generated from protobuf field string top_level_controller_name = 6; + * @return string + */ + public function getTopLevelControllerName() + { + return $this->top_level_controller_name; + } + + /** + * The name of this workload. + * + * Generated from protobuf field string top_level_controller_name = 6; + * @param string $var + * @return $this + */ + public function setTopLevelControllerName($var) + { + GPBUtil::checkString($var, True); + $this->top_level_controller_name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GkeWorkload::class, \Google\Cloud\Monitoring\V3\Service_GkeWorkload::class); + diff --git a/Monitoring/src/V3/ServiceLevelObjective.php b/Monitoring/src/V3/ServiceLevelObjective.php index 38ca81f6b3ae..30c09f3bd178 100644 --- a/Monitoring/src/V3/ServiceLevelObjective.php +++ b/Monitoring/src/V3/ServiceLevelObjective.php @@ -21,10 +21,10 @@ class ServiceLevelObjective extends \Google\Protobuf\Internal\Message { /** - * Resource name for this `ServiceLevelObjective`. The format is: + * Identifier. Resource name for this `ServiceLevelObjective`. The format is: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; */ private $name = ''; /** @@ -68,7 +68,7 @@ class ServiceLevelObjective extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Resource name for this `ServiceLevelObjective`. The format is: + * Identifier. Resource name for this `ServiceLevelObjective`. The format is: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] * @type string $display_name * Name used for UI elements listing this SLO. @@ -101,10 +101,10 @@ public function __construct($data = NULL) { } /** - * Resource name for this `ServiceLevelObjective`. The format is: + * Identifier. Resource name for this `ServiceLevelObjective`. The format is: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @return string */ public function getName() @@ -113,10 +113,10 @@ public function getName() } /** - * Resource name for this `ServiceLevelObjective`. The format is: + * Identifier. Resource name for this `ServiceLevelObjective`. The format is: * projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @param string $var * @return $this */ diff --git a/Monitoring/src/V3/SyntheticMonitorTarget.php b/Monitoring/src/V3/SyntheticMonitorTarget.php new file mode 100644 index 000000000000..8bbfac0f1098 --- /dev/null +++ b/Monitoring/src/V3/SyntheticMonitorTarget.php @@ -0,0 +1,75 @@ +google.monitoring.v3.SyntheticMonitorTarget + */ +class SyntheticMonitorTarget extends \Google\Protobuf\Internal\Message +{ + protected $target; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget\CloudFunctionV2Target $cloud_function_v2 + * Target a Synthetic Monitor GCFv2 instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); + parent::__construct($data); + } + + /** + * Target a Synthetic Monitor GCFv2 instance. + * + * Generated from protobuf field .google.monitoring.v3.SyntheticMonitorTarget.CloudFunctionV2Target cloud_function_v2 = 1; + * @return \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget\CloudFunctionV2Target|null + */ + public function getCloudFunctionV2() + { + return $this->readOneof(1); + } + + public function hasCloudFunctionV2() + { + return $this->hasOneof(1); + } + + /** + * Target a Synthetic Monitor GCFv2 instance. + * + * Generated from protobuf field .google.monitoring.v3.SyntheticMonitorTarget.CloudFunctionV2Target cloud_function_v2 = 1; + * @param \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget\CloudFunctionV2Target $var + * @return $this + */ + public function setCloudFunctionV2($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget\CloudFunctionV2Target::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getTarget() + { + return $this->whichOneof("target"); + } + +} + diff --git a/Monitoring/src/V3/SyntheticMonitorTarget/CloudFunctionV2Target.php b/Monitoring/src/V3/SyntheticMonitorTarget/CloudFunctionV2Target.php new file mode 100644 index 000000000000..3b8b2cb16e55 --- /dev/null +++ b/Monitoring/src/V3/SyntheticMonitorTarget/CloudFunctionV2Target.php @@ -0,0 +1,134 @@ +google.monitoring.v3.SyntheticMonitorTarget.CloudFunctionV2Target + */ +class CloudFunctionV2Target extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Fully qualified GCFv2 resource name + * i.e. `projects/{project}/locations/{location}/functions/{function}` + * Required. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $name = ''; + /** + * Output only. The `cloud_run_revision` Monitored Resource associated with + * the GCFv2. The Synthetic Monitor execution results (metrics, logs, and + * spans) are reported against this Monitored Resource. This field is output + * only. + * + * Generated from protobuf field .google.api.MonitoredResource cloud_run_revision = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $cloud_run_revision = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Fully qualified GCFv2 resource name + * i.e. `projects/{project}/locations/{location}/functions/{function}` + * Required. + * @type \Google\Api\MonitoredResource $cloud_run_revision + * Output only. The `cloud_run_revision` Monitored Resource associated with + * the GCFv2. The Synthetic Monitor execution results (metrics, logs, and + * spans) are reported against this Monitored Resource. This field is output + * only. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); + parent::__construct($data); + } + + /** + * Required. Fully qualified GCFv2 resource name + * i.e. `projects/{project}/locations/{location}/functions/{function}` + * Required. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Fully qualified GCFv2 resource name + * i.e. `projects/{project}/locations/{location}/functions/{function}` + * Required. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The `cloud_run_revision` Monitored Resource associated with + * the GCFv2. The Synthetic Monitor execution results (metrics, logs, and + * spans) are reported against this Monitored Resource. This field is output + * only. + * + * Generated from protobuf field .google.api.MonitoredResource cloud_run_revision = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Api\MonitoredResource|null + */ + public function getCloudRunRevision() + { + return $this->cloud_run_revision; + } + + public function hasCloudRunRevision() + { + return isset($this->cloud_run_revision); + } + + public function clearCloudRunRevision() + { + unset($this->cloud_run_revision); + } + + /** + * Output only. The `cloud_run_revision` Monitored Resource associated with + * the GCFv2. The Synthetic Monitor execution results (metrics, logs, and + * spans) are reported against this Monitored Resource. This field is output + * only. + * + * Generated from protobuf field .google.api.MonitoredResource cloud_run_revision = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Api\MonitoredResource $var + * @return $this + */ + public function setCloudRunRevision($var) + { + GPBUtil::checkMessage($var, \Google\Api\MonitoredResource::class); + $this->cloud_run_revision = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CloudFunctionV2Target::class, \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget_CloudFunctionV2Target::class); + diff --git a/Monitoring/src/V3/UptimeCheckConfig.php b/Monitoring/src/V3/UptimeCheckConfig.php index 9f24019200cb..4ecc880f0b4c 100644 --- a/Monitoring/src/V3/UptimeCheckConfig.php +++ b/Monitoring/src/V3/UptimeCheckConfig.php @@ -17,7 +17,8 @@ class UptimeCheckConfig extends \Google\Protobuf\Internal\Message { /** - * A unique resource name for this Uptime check configuration. The format is: + * Identifier. A unique resource name for this Uptime check configuration. The + * format is: * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] * `[PROJECT_ID_OR_NUMBER]` is the Workspace host project associated with the * Uptime check. @@ -25,7 +26,7 @@ class UptimeCheckConfig extends \Google\Protobuf\Internal\Message * on create, the resource name is assigned by the server and included in the * response. * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; */ private $name = ''; /** @@ -119,7 +120,8 @@ class UptimeCheckConfig extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * A unique resource name for this Uptime check configuration. The format is: + * Identifier. A unique resource name for this Uptime check configuration. The + * format is: * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] * `[PROJECT_ID_OR_NUMBER]` is the Workspace host project associated with the * Uptime check. @@ -145,6 +147,8 @@ class UptimeCheckConfig extends \Google\Protobuf\Internal\Message * `cloud_run_revision` * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\ResourceGroup $resource_group * The group resource associated with the configuration. + * @type \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget $synthetic_monitor + * Specifies a Synthetic Monitor to invoke. * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck $http_check * Contains information needed to make an HTTP or HTTPS check. * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\TcpCheck $tcp_check @@ -196,7 +200,8 @@ public function __construct($data = NULL) { } /** - * A unique resource name for this Uptime check configuration. The format is: + * Identifier. A unique resource name for this Uptime check configuration. The + * format is: * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] * `[PROJECT_ID_OR_NUMBER]` is the Workspace host project associated with the * Uptime check. @@ -204,7 +209,7 @@ public function __construct($data = NULL) { * on create, the resource name is assigned by the server and included in the * response. * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @return string */ public function getName() @@ -213,7 +218,8 @@ public function getName() } /** - * A unique resource name for this Uptime check configuration. The format is: + * Identifier. A unique resource name for this Uptime check configuration. The + * format is: * projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] * `[PROJECT_ID_OR_NUMBER]` is the Workspace host project associated with the * Uptime check. @@ -221,7 +227,7 @@ public function getName() * on create, the resource name is assigned by the server and included in the * response. * - * Generated from protobuf field string name = 1; + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * @param string $var * @return $this */ @@ -347,6 +353,37 @@ public function setResourceGroup($var) return $this; } + /** + * Specifies a Synthetic Monitor to invoke. + * + * Generated from protobuf field .google.monitoring.v3.SyntheticMonitorTarget synthetic_monitor = 21; + * @return \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget|null + */ + public function getSyntheticMonitor() + { + return $this->readOneof(21); + } + + public function hasSyntheticMonitor() + { + return $this->hasOneof(21); + } + + /** + * Specifies a Synthetic Monitor to invoke. + * + * Generated from protobuf field .google.monitoring.v3.SyntheticMonitorTarget synthetic_monitor = 21; + * @param \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget $var + * @return $this + */ + public function setSyntheticMonitor($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\SyntheticMonitorTarget::class); + $this->writeOneof(21, $var); + + return $this; + } + /** * Contains information needed to make an HTTP or HTTPS check. * diff --git a/Monitoring/src/V3/UptimeCheckConfig/HttpCheck.php b/Monitoring/src/V3/UptimeCheckConfig/HttpCheck.php index 69bbea563f5d..923cfc8ff0b1 100644 --- a/Monitoring/src/V3/UptimeCheckConfig/HttpCheck.php +++ b/Monitoring/src/V3/UptimeCheckConfig/HttpCheck.php @@ -50,6 +50,7 @@ class HttpCheck extends \Google\Protobuf\Internal\Message /** * The authentication information. Optional when creating an HTTP check; * defaults to empty. + * Do not set both `auth_method` and `auth_info`. * * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4; */ @@ -138,6 +139,7 @@ class HttpCheck extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.PingConfig ping_config = 12; */ private $ping_config = null; + protected $auth_method; /** * Constructor. @@ -164,6 +166,7 @@ class HttpCheck extends \Google\Protobuf\Internal\Message * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\BasicAuthentication $auth_info * The authentication information. Optional when creating an HTTP check; * defaults to empty. + * Do not set both `auth_method` and `auth_info`. * @type bool $mask_headers * Boolean specifying whether to encrypt the header information. * Encryption should be specified for any headers related to authentication @@ -216,6 +219,10 @@ class HttpCheck extends \Google\Protobuf\Internal\Message * pass if the HTTP status code is 200-299. * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\PingConfig $ping_config * Contains information needed to add pings to an HTTP check. + * @type \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ServiceAgentAuthentication $service_agent_authentication + * If specified, Uptime will generate and attach an OIDC JWT token for the + * Monitoring service agent service account as an `Authorization` header + * in the HTTP request when probing. * } */ public function __construct($data = NULL) { @@ -346,6 +353,7 @@ public function setPort($var) /** * The authentication information. Optional when creating an HTTP check; * defaults to empty. + * Do not set both `auth_method` and `auth_info`. * * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4; * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\BasicAuthentication|null @@ -368,6 +376,7 @@ public function clearAuthInfo() /** * The authentication information. Optional when creating an HTTP check; * defaults to empty. + * Do not set both `auth_method` and `auth_info`. * * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4; * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\BasicAuthentication $var @@ -671,6 +680,49 @@ public function setPingConfig($var) return $this; } + /** + * If specified, Uptime will generate and attach an OIDC JWT token for the + * Monitoring service agent service account as an `Authorization` header + * in the HTTP request when probing. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication service_agent_authentication = 14; + * @return \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ServiceAgentAuthentication|null + */ + public function getServiceAgentAuthentication() + { + return $this->readOneof(14); + } + + public function hasServiceAgentAuthentication() + { + return $this->hasOneof(14); + } + + /** + * If specified, Uptime will generate and attach an OIDC JWT token for the + * Monitoring service agent service account as an `Authorization` header + * in the HTTP request when probing. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication service_agent_authentication = 14; + * @param \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ServiceAgentAuthentication $var + * @return $this + */ + public function setServiceAgentAuthentication($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ServiceAgentAuthentication::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * @return string + */ + public function getAuthMethod() + { + return $this->whichOneof("auth_method"); + } + } // Adding a class alias for backwards compatibility with the previous class name. diff --git a/Monitoring/src/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication.php b/Monitoring/src/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication.php new file mode 100644 index 000000000000..2dfc502b4bbb --- /dev/null +++ b/Monitoring/src/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication.php @@ -0,0 +1,74 @@ +google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication + */ +class ServiceAgentAuthentication extends \Google\Protobuf\Internal\Message +{ + /** + * Type of authentication. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication.ServiceAgentAuthenticationType type = 1; + */ + private $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Type of authentication. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Monitoring\V3\Uptime::initOnce(); + parent::__construct($data); + } + + /** + * Type of authentication. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication.ServiceAgentAuthenticationType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Type of authentication. + * + * Generated from protobuf field .google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication.ServiceAgentAuthenticationType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Monitoring\V3\UptimeCheckConfig\HttpCheck\ServiceAgentAuthentication\ServiceAgentAuthenticationType::class); + $this->type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ServiceAgentAuthentication::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck_ServiceAgentAuthentication::class); + diff --git a/Monitoring/src/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication/ServiceAgentAuthenticationType.php b/Monitoring/src/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication/ServiceAgentAuthenticationType.php new file mode 100644 index 000000000000..8b14271b462a --- /dev/null +++ b/Monitoring/src/V3/UptimeCheckConfig/HttpCheck/ServiceAgentAuthentication/ServiceAgentAuthenticationType.php @@ -0,0 +1,57 @@ +google.monitoring.v3.UptimeCheckConfig.HttpCheck.ServiceAgentAuthentication.ServiceAgentAuthenticationType + */ +class ServiceAgentAuthenticationType +{ + /** + * Default value, will result in OIDC Authentication. + * + * Generated from protobuf enum SERVICE_AGENT_AUTHENTICATION_TYPE_UNSPECIFIED = 0; + */ + const SERVICE_AGENT_AUTHENTICATION_TYPE_UNSPECIFIED = 0; + /** + * OIDC Authentication + * + * Generated from protobuf enum OIDC_TOKEN = 1; + */ + const OIDC_TOKEN = 1; + + private static $valueToName = [ + self::SERVICE_AGENT_AUTHENTICATION_TYPE_UNSPECIFIED => 'SERVICE_AGENT_AUTHENTICATION_TYPE_UNSPECIFIED', + self::OIDC_TOKEN => 'OIDC_TOKEN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ServiceAgentAuthenticationType::class, \Google\Cloud\Monitoring\V3\UptimeCheckConfig_HttpCheck_ServiceAgentAuthentication_ServiceAgentAuthenticationType::class); + diff --git a/Monitoring/src/V3/resources/uptime_check_service_descriptor_config.php b/Monitoring/src/V3/resources/uptime_check_service_descriptor_config.php index a9dbc7aa7817..e1d4dafc1ca4 100644 --- a/Monitoring/src/V3/resources/uptime_check_service_descriptor_config.php +++ b/Monitoring/src/V3/resources/uptime_check_service_descriptor_config.php @@ -106,6 +106,7 @@ ], 'templateMap' => [ 'folderUptimeCheckConfig' => 'folders/{folder}/uptimeCheckConfigs/{uptime_check_config}', + 'function' => 'projects/{project}/locations/{location}/functions/{function}', 'organizationUptimeCheckConfig' => 'organizations/{organization}/uptimeCheckConfigs/{uptime_check_config}', 'projectUptimeCheckConfig' => 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}', 'uptimeCheckConfig' => 'projects/{project}/uptimeCheckConfigs/{uptime_check_config}', From ac1be59cb699fd99ff0783fe2029281b5659dc59 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 19 Apr 2024 18:54:27 +0000 Subject: [PATCH 55/86] feat: Add Chat read state APIs (#7246) * feat: add UpdateMembership API PiperOrigin-RevId: 625805898 Source-Link: https://github.com/googleapis/googleapis/commit/c106d2f8cfecf198fddb491b926a795dd58005b2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/593bb0cb6cafe7cb71c36774f26c7f5c88cbb5d9 Copy-Tag: eyJwIjoiQXBwc0NoYXQvLk93bEJvdC55YW1sIiwiaCI6IjU5M2JiMGNiNmNhZmU3Y2I3MWMzNjc3NGYyNmM3ZjVjODhjYmI1ZDkifQ== * feat: Add Chat read state APIs PiperOrigin-RevId: 626377569 Source-Link: https://github.com/googleapis/googleapis/commit/e9672e7d385602cca256306850579d87d62efdbf Source-Link: https://github.com/googleapis/googleapis-gen/commit/50c8b6af16beb7c0306dff12717ab2b9766057e0 Copy-Tag: eyJwIjoiQXBwc0NoYXQvLk93bEJvdC55YW1sIiwiaCI6IjUwYzhiNmFmMTZiZWI3YzAzMDZkZmYxMjcxN2FiMmI5NzY2MDU3ZTAifQ== --- AppsChat/metadata/Chat/V1/ChatService.php | Bin 5388 -> 6433 bytes AppsChat/metadata/Chat/V1/Membership.php | Bin 2411 -> 2640 bytes AppsChat/metadata/Chat/V1/SpaceReadState.php | 41 +++ AppsChat/metadata/Chat/V1/ThreadReadState.php | 37 +++ .../get_space_read_state.php | 89 ++++++ .../get_thread_read_state.php | 90 ++++++ .../ChatServiceClient/update_membership.php | 63 ++++ .../update_space_read_state.php | 66 +++++ .../src/Chat/V1/Client/ChatServiceClient.php | 167 +++++++++++ .../src/Chat/V1/GetSpaceReadStateRequest.php | 127 ++++++++ .../src/Chat/V1/GetThreadReadStateRequest.php | 132 +++++++++ AppsChat/src/Chat/V1/Membership.php | 4 - AppsChat/src/Chat/V1/SpaceReadState.php | 124 ++++++++ AppsChat/src/Chat/V1/ThreadReadState.php | 120 ++++++++ .../src/Chat/V1/UpdateMembershipRequest.php | 158 ++++++++++ .../Chat/V1/UpdateSpaceReadStateRequest.php | 230 +++++++++++++++ AppsChat/src/Chat/V1/gapic_metadata.json | 20 ++ .../resources/chat_service_client_config.json | 20 ++ .../chat_service_descriptor_config.php | 52 ++++ .../chat_service_rest_client_config.php | 54 ++++ .../Unit/V1/Client/ChatServiceClientTest.php | 275 ++++++++++++++++++ 21 files changed, 1865 insertions(+), 4 deletions(-) create mode 100644 AppsChat/metadata/Chat/V1/SpaceReadState.php create mode 100644 AppsChat/metadata/Chat/V1/ThreadReadState.php create mode 100644 AppsChat/samples/V1/ChatServiceClient/get_space_read_state.php create mode 100644 AppsChat/samples/V1/ChatServiceClient/get_thread_read_state.php create mode 100644 AppsChat/samples/V1/ChatServiceClient/update_membership.php create mode 100644 AppsChat/samples/V1/ChatServiceClient/update_space_read_state.php create mode 100644 AppsChat/src/Chat/V1/GetSpaceReadStateRequest.php create mode 100644 AppsChat/src/Chat/V1/GetThreadReadStateRequest.php create mode 100644 AppsChat/src/Chat/V1/SpaceReadState.php create mode 100644 AppsChat/src/Chat/V1/ThreadReadState.php create mode 100644 AppsChat/src/Chat/V1/UpdateMembershipRequest.php create mode 100644 AppsChat/src/Chat/V1/UpdateSpaceReadStateRequest.php diff --git a/AppsChat/metadata/Chat/V1/ChatService.php b/AppsChat/metadata/Chat/V1/ChatService.php index 815f339431fd5a860dd2fcde679b70a5bf171606..9c06a9d4498fd1ed8dd89f88b9015cfaf5e9b07d 100644 GIT binary patch delta 782 zcmeCtT4=PvpP4f#H8CZ)B(WrQ@;~V|5=uEa;#(I5(q6wNu0cnPkyoh58LF+e0pA?w;aWCQ*)D2i;6Qc3v^0>@+GP9 zxrxQuO_!fcW->F<02y43P@D7COOwYWq|ZgL>EXgpk}lI1N&7Lb)-=jaG&ft>?( zLuoP4(Lg7_-2!I7b=C^qWaJV7dAKAM%{AJScw_~j5rJZFJzTd^$t_12uz^Uyi4i>h zM%G~Wpeuv~5+Mg#383q%7h1;1B?Jr`v=kwvi6#8d)WAFR16Bm-AqpXpOCghb1jUnP1tOEM1swvK9<$E{rwOwt e5LE&L8lVP~pcEJah6aFB diff --git a/AppsChat/metadata/Chat/V1/Membership.php b/AppsChat/metadata/Chat/V1/Membership.php index 6feaa39be9a0cfec68d9978193f218eb5dc37fed..e86c272e3b7eb5de34cfce038c59a8ac1a9653a8 100644 GIT binary patch delta 184 zcmaDYbU|dpbS6%>%+#C|-^AkV$p;y=CigLgvpnVHlAq`;KbeC$Sy~}IKR-PuRllGp zza&4YG)+GZq&z+ssD5(_vkS9f3nQ0!XhBM1NvdyZZc=JdaYklAP-F&9@Z zTu_2hfl-6oNNVyuW+^i#<_C^ULMB|?rC_aK^CXxc3iKdW>cOnkgS&9^BDRxE0CTH6 A`2YX_ delta 33 pcmca0@>*!abf(FdnfzGx@Nmgb^p>CO!koPMB(p8^=3e&0OaRtE3)uhw diff --git a/AppsChat/metadata/Chat/V1/SpaceReadState.php b/AppsChat/metadata/Chat/V1/SpaceReadState.php new file mode 100644 index 000000000000..c50a77eec7f1 --- /dev/null +++ b/AppsChat/metadata/Chat/V1/SpaceReadState.php @@ -0,0 +1,41 @@ +internalAddGeneratedFile( + ' +è +%google/chat/v1/space_read_state.protogoogle.chat.v1google/api/resource.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto"¼ +SpaceReadState +name ( 7 +last_read_time ( 2.google.protobuf.TimestampBàA:cêA` +"chat.googleapis.com/SpaceReadState*users/{user}/spaces/{space}/spaceReadState2spaceReadState"T +GetSpaceReadStateRequest8 +name ( B*àAúA$ +"chat.googleapis.com/SpaceReadState"’ +UpdateSpaceReadStateRequest= +space_read_state ( 2.google.chat.v1.SpaceReadStateBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàABž +com.google.chat.v1BSpaceReadStateProtoPZ,cloud.google.com/go/chat/apiv1/chatpb;chatpbªGoogle.Apps.Chat.V1ÊGoogle\\Apps\\Chat\\V1êGoogle::Apps::Chat::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AppsChat/metadata/Chat/V1/ThreadReadState.php b/AppsChat/metadata/Chat/V1/ThreadReadState.php new file mode 100644 index 000000000000..f1dcbd1fc458 --- /dev/null +++ b/AppsChat/metadata/Chat/V1/ThreadReadState.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile( + ' +Å +&google/chat/v1/thread_read_state.protogoogle.chat.v1google/api/resource.protogoogle/protobuf/timestamp.proto"Ì +ThreadReadState +name ( 2 +last_read_time ( 2.google.protobuf.Timestamp:wêAt +#chat.googleapis.com/ThreadReadStatesetName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SpaceReadState $response */ + $response = $chatServiceClient->getSpaceReadState($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ChatServiceClient::spaceReadStateName('[USER]', '[SPACE]'); + + get_space_read_state_sample($formattedName); +} +// [END chat_v1_generated_ChatService_GetSpaceReadState_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/get_thread_read_state.php b/AppsChat/samples/V1/ChatServiceClient/get_thread_read_state.php new file mode 100644 index 000000000000..3f8bf096c47f --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/get_thread_read_state.php @@ -0,0 +1,90 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ThreadReadState $response */ + $response = $chatServiceClient->getThreadReadState($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ChatServiceClient::threadReadStateName('[USER]', '[SPACE]', '[THREAD]'); + + get_thread_read_state_sample($formattedName); +} +// [END chat_v1_generated_ChatService_GetThreadReadState_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/update_membership.php b/AppsChat/samples/V1/ChatServiceClient/update_membership.php new file mode 100644 index 000000000000..9bdc4cc059ca --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/update_membership.php @@ -0,0 +1,63 @@ +setMembership($membership) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var Membership $response */ + $response = $chatServiceClient->updateMembership($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END chat_v1_generated_ChatService_UpdateMembership_sync] diff --git a/AppsChat/samples/V1/ChatServiceClient/update_space_read_state.php b/AppsChat/samples/V1/ChatServiceClient/update_space_read_state.php new file mode 100644 index 000000000000..f3bc77396457 --- /dev/null +++ b/AppsChat/samples/V1/ChatServiceClient/update_space_read_state.php @@ -0,0 +1,66 @@ +setSpaceReadState($spaceReadState) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var SpaceReadState $response */ + $response = $chatServiceClient->updateSpaceReadState($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END chat_v1_generated_ChatService_UpdateSpaceReadState_sync] diff --git a/AppsChat/src/Chat/V1/Client/ChatServiceClient.php b/AppsChat/src/Chat/V1/Client/ChatServiceClient.php index cfbe6d679e84..2ab67351b2b1 100644 --- a/AppsChat/src/Chat/V1/Client/ChatServiceClient.php +++ b/AppsChat/src/Chat/V1/Client/ChatServiceClient.php @@ -47,7 +47,9 @@ use Google\Apps\Chat\V1\GetAttachmentRequest; use Google\Apps\Chat\V1\GetMembershipRequest; use Google\Apps\Chat\V1\GetMessageRequest; +use Google\Apps\Chat\V1\GetSpaceReadStateRequest; use Google\Apps\Chat\V1\GetSpaceRequest; +use Google\Apps\Chat\V1\GetThreadReadStateRequest; use Google\Apps\Chat\V1\ListMembershipsRequest; use Google\Apps\Chat\V1\ListMessagesRequest; use Google\Apps\Chat\V1\ListReactionsRequest; @@ -57,7 +59,11 @@ use Google\Apps\Chat\V1\Reaction; use Google\Apps\Chat\V1\SetUpSpaceRequest; use Google\Apps\Chat\V1\Space; +use Google\Apps\Chat\V1\SpaceReadState; +use Google\Apps\Chat\V1\ThreadReadState; +use Google\Apps\Chat\V1\UpdateMembershipRequest; use Google\Apps\Chat\V1\UpdateMessageRequest; +use Google\Apps\Chat\V1\UpdateSpaceReadStateRequest; use Google\Apps\Chat\V1\UpdateSpaceRequest; use Google\Apps\Chat\V1\UploadAttachmentRequest; use Google\Apps\Chat\V1\UploadAttachmentResponse; @@ -90,13 +96,17 @@ * @method PromiseInterface getMembershipAsync(GetMembershipRequest $request, array $optionalArgs = []) * @method PromiseInterface getMessageAsync(GetMessageRequest $request, array $optionalArgs = []) * @method PromiseInterface getSpaceAsync(GetSpaceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSpaceReadStateAsync(GetSpaceReadStateRequest $request, array $optionalArgs = []) + * @method PromiseInterface getThreadReadStateAsync(GetThreadReadStateRequest $request, array $optionalArgs = []) * @method PromiseInterface listMembershipsAsync(ListMembershipsRequest $request, array $optionalArgs = []) * @method PromiseInterface listMessagesAsync(ListMessagesRequest $request, array $optionalArgs = []) * @method PromiseInterface listReactionsAsync(ListReactionsRequest $request, array $optionalArgs = []) * @method PromiseInterface listSpacesAsync(ListSpacesRequest $request, array $optionalArgs = []) * @method PromiseInterface setUpSpaceAsync(SetUpSpaceRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateMembershipAsync(UpdateMembershipRequest $request, array $optionalArgs = []) * @method PromiseInterface updateMessageAsync(UpdateMessageRequest $request, array $optionalArgs = []) * @method PromiseInterface updateSpaceAsync(UpdateSpaceRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSpaceReadStateAsync(UpdateSpaceReadStateRequest $request, array $optionalArgs = []) * @method PromiseInterface uploadAttachmentAsync(UploadAttachmentRequest $request, array $optionalArgs = []) */ final class ChatServiceClient @@ -140,6 +150,8 @@ final class ChatServiceClient 'https://www.googleapis.com/auth/chat.spaces', 'https://www.googleapis.com/auth/chat.spaces.create', 'https://www.googleapis.com/auth/chat.spaces.readonly', + 'https://www.googleapis.com/auth/chat.users.readstate', + 'https://www.googleapis.com/auth/chat.users.readstate.readonly', ]; private static function getClientDefaults() @@ -270,6 +282,23 @@ public static function spaceName(string $space): string ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * space_read_state resource. + * + * @param string $user + * @param string $space + * + * @return string The formatted space_read_state resource. + */ + public static function spaceReadStateName(string $user, string $space): string + { + return self::getPathTemplate('spaceReadState')->render([ + 'user' => $user, + 'space' => $space, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a thread * resource. @@ -287,6 +316,25 @@ public static function threadName(string $space, string $thread): string ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * thread_read_state resource. + * + * @param string $user + * @param string $space + * @param string $thread + * + * @return string The formatted thread_read_state resource. + */ + public static function threadReadStateName(string $user, string $space, string $thread): string + { + return self::getPathTemplate('threadReadState')->render([ + 'user' => $user, + 'space' => $space, + 'thread' => $thread, + ]); + } + /** * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: @@ -297,7 +345,9 @@ public static function threadName(string $space, string $thread): string * - quotedMessageMetadata: spaces/{space}/messages/{message}/quotedMessageMetadata/{quoted_message_metadata} * - reaction: spaces/{space}/messages/{message}/reactions/{reaction} * - space: spaces/{space} + * - spaceReadState: users/{user}/spaces/{space}/spaceReadState * - thread: spaces/{space}/threads/{thread} + * - threadReadState: users/{user}/spaces/{space}/threads/{thread}/threadReadState * * 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 @@ -886,6 +936,66 @@ public function getSpace(GetSpaceRequest $request, array $callOptions = []): Spa return $this->startApiCall('GetSpace', $request, $callOptions)->wait(); } + /** + * Returns details about a user's read state within a space, used to identify + * read and unread messages. + * + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::getSpaceReadStateAsync()} . + * + * @example samples/V1/ChatServiceClient/get_space_read_state.php + * + * @param GetSpaceReadStateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SpaceReadState + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSpaceReadState(GetSpaceReadStateRequest $request, array $callOptions = []): SpaceReadState + { + return $this->startApiCall('GetSpaceReadState', $request, $callOptions)->wait(); + } + + /** + * Returns details about a user's read state within a thread, used to identify + * read and unread messages. + * + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::getThreadReadStateAsync()} . + * + * @example samples/V1/ChatServiceClient/get_thread_read_state.php + * + * @param GetThreadReadStateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ThreadReadState + * + * @throws ApiException Thrown if the API call fails. + */ + public function getThreadReadState(GetThreadReadStateRequest $request, array $callOptions = []): ThreadReadState + { + return $this->startApiCall('GetThreadReadState', $request, $callOptions)->wait(); + } + /** * Lists memberships in a space. For an example, see [List users and Google * Chat apps in a @@ -1096,6 +1206,33 @@ public function setUpSpace(SetUpSpaceRequest $request, array $callOptions = []): return $this->startApiCall('SetUpSpace', $request, $callOptions)->wait(); } + /** + * Updates a membership. Requires [user + * authentication](https://developers.google.com/chat/api/guides/auth/users). + * + * The async variant is {@see ChatServiceClient::updateMembershipAsync()} . + * + * @example samples/V1/ChatServiceClient/update_membership.php + * + * @param UpdateMembershipRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Membership + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateMembership(UpdateMembershipRequest $request, array $callOptions = []): Membership + { + return $this->startApiCall('UpdateMembership', $request, $callOptions)->wait(); + } + /** * Updates a message. There's a difference between the `patch` and `update` * methods. The `patch` @@ -1172,6 +1309,36 @@ public function updateSpace(UpdateSpaceRequest $request, array $callOptions = [] return $this->startApiCall('UpdateSpace', $request, $callOptions)->wait(); } + /** + * Updates a user's read state within a space, used to identify read and + * unread messages. + * + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::updateSpaceReadStateAsync()} . + * + * @example samples/V1/ChatServiceClient/update_space_read_state.php + * + * @param UpdateSpaceReadStateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SpaceReadState + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSpaceReadState(UpdateSpaceReadStateRequest $request, array $callOptions = []): SpaceReadState + { + return $this->startApiCall('UpdateSpaceReadState', $request, $callOptions)->wait(); + } + /** * Uploads an attachment. For an example, see * [Upload media as a file diff --git a/AppsChat/src/Chat/V1/GetSpaceReadStateRequest.php b/AppsChat/src/Chat/V1/GetSpaceReadStateRequest.php new file mode 100644 index 000000000000..388b0ec0c154 --- /dev/null +++ b/AppsChat/src/Chat/V1/GetSpaceReadStateRequest.php @@ -0,0 +1,127 @@ +google.chat.v1.GetSpaceReadStateRequest + */ +class GetSpaceReadStateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the space read state to retrieve. + * Only supports getting read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * Format: users/{user}/spaces/{space}/spaceReadState + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the space read state to retrieve. + * + * Only supports getting read state for the calling user. + * + * To refer to the calling user, set one of the following: + * + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * + * Format: users/{user}/spaces/{space}/spaceReadState + * Please see {@see ChatServiceClient::spaceReadStateName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\GetSpaceReadStateRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the space read state to retrieve. + * Only supports getting read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * Format: users/{user}/spaces/{space}/spaceReadState + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\SpaceReadState::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the space read state to retrieve. + * Only supports getting read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * Format: users/{user}/spaces/{space}/spaceReadState + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the space read state to retrieve. + * Only supports getting read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * Format: users/{user}/spaces/{space}/spaceReadState + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/GetThreadReadStateRequest.php b/AppsChat/src/Chat/V1/GetThreadReadStateRequest.php new file mode 100644 index 000000000000..66ef60d6afb3 --- /dev/null +++ b/AppsChat/src/Chat/V1/GetThreadReadStateRequest.php @@ -0,0 +1,132 @@ +google.chat.v1.GetThreadReadStateRequest + */ +class GetThreadReadStateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the thread read state to retrieve. + * Only supports getting read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, + * `users/me/spaces/{space}/threads/{thread}/threadReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/threads/{thread}/threadReadState`. + * Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the thread read state to retrieve. + * + * Only supports getting read state for the calling user. + * + * To refer to the calling user, set one of the following: + * + * - The `me` alias. For example, + * `users/me/spaces/{space}/threads/{thread}/threadReadState`. + * + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`. + * + * - Their user id. For example, + * `users/123456789/spaces/{space}/threads/{thread}/threadReadState`. + * + * Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState + * Please see {@see ChatServiceClient::threadReadStateName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\GetThreadReadStateRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the thread read state to retrieve. + * Only supports getting read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, + * `users/me/spaces/{space}/threads/{thread}/threadReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/threads/{thread}/threadReadState`. + * Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\ThreadReadState::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the thread read state to retrieve. + * Only supports getting read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, + * `users/me/spaces/{space}/threads/{thread}/threadReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/threads/{thread}/threadReadState`. + * Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the thread read state to retrieve. + * Only supports getting read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, + * `users/me/spaces/{space}/threads/{thread}/threadReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/threads/{thread}/threadReadState`. + * Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/Membership.php b/AppsChat/src/Chat/V1/Membership.php index 4361e9ab1970..b588dfd08aa5 100644 --- a/AppsChat/src/Chat/V1/Membership.php +++ b/AppsChat/src/Chat/V1/Membership.php @@ -32,7 +32,6 @@ class Membership extends \Google\Protobuf\Internal\Message /** * Optional. User's role within a Chat space, which determines their permitted * actions in the space. - * [Developer Preview](https://developers.google.com/workspace/preview): * This field can only be used as input in `UpdateMembership`. * * Generated from protobuf field .google.chat.v1.Membership.MembershipRole role = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -70,7 +69,6 @@ class Membership extends \Google\Protobuf\Internal\Message * @type int $role * Optional. User's role within a Chat space, which determines their permitted * actions in the space. - * [Developer Preview](https://developers.google.com/workspace/preview): * This field can only be used as input in `UpdateMembership`. * @type \Google\Apps\Chat\V1\User $member * The Google Chat user or app the membership corresponds to. @@ -155,7 +153,6 @@ public function setState($var) /** * Optional. User's role within a Chat space, which determines their permitted * actions in the space. - * [Developer Preview](https://developers.google.com/workspace/preview): * This field can only be used as input in `UpdateMembership`. * * Generated from protobuf field .google.chat.v1.Membership.MembershipRole role = 7 [(.google.api.field_behavior) = OPTIONAL]; @@ -169,7 +166,6 @@ public function getRole() /** * Optional. User's role within a Chat space, which determines their permitted * actions in the space. - * [Developer Preview](https://developers.google.com/workspace/preview): * This field can only be used as input in `UpdateMembership`. * * Generated from protobuf field .google.chat.v1.Membership.MembershipRole role = 7 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/AppsChat/src/Chat/V1/SpaceReadState.php b/AppsChat/src/Chat/V1/SpaceReadState.php new file mode 100644 index 000000000000..c50b92718f4c --- /dev/null +++ b/AppsChat/src/Chat/V1/SpaceReadState.php @@ -0,0 +1,124 @@ +google.chat.v1.SpaceReadState + */ +class SpaceReadState extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the space read state. + * Format: `users/{user}/spaces/{space}/spaceReadState` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Optional. The time when the user's space read state was updated. Usually + * this corresponds with either the timestamp of the last read message, or a + * timestamp specified by the user to mark the last read position in a space. + * + * Generated from protobuf field .google.protobuf.Timestamp last_read_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $last_read_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name of the space read state. + * Format: `users/{user}/spaces/{space}/spaceReadState` + * @type \Google\Protobuf\Timestamp $last_read_time + * Optional. The time when the user's space read state was updated. Usually + * this corresponds with either the timestamp of the last read message, or a + * timestamp specified by the user to mark the last read position in a space. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\SpaceReadState::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the space read state. + * Format: `users/{user}/spaces/{space}/spaceReadState` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name of the space read state. + * Format: `users/{user}/spaces/{space}/spaceReadState` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The time when the user's space read state was updated. Usually + * this corresponds with either the timestamp of the last read message, or a + * timestamp specified by the user to mark the last read position in a space. + * + * Generated from protobuf field .google.protobuf.Timestamp last_read_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastReadTime() + { + return $this->last_read_time; + } + + public function hasLastReadTime() + { + return isset($this->last_read_time); + } + + public function clearLastReadTime() + { + unset($this->last_read_time); + } + + /** + * Optional. The time when the user's space read state was updated. Usually + * this corresponds with either the timestamp of the last read message, or a + * timestamp specified by the user to mark the last read position in a space. + * + * Generated from protobuf field .google.protobuf.Timestamp last_read_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_read_time = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/ThreadReadState.php b/AppsChat/src/Chat/V1/ThreadReadState.php new file mode 100644 index 000000000000..5605873dfdea --- /dev/null +++ b/AppsChat/src/Chat/V1/ThreadReadState.php @@ -0,0 +1,120 @@ +google.chat.v1.ThreadReadState + */ +class ThreadReadState extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the thread read state. + * Format: `users/{user}/spaces/{space}/threads/{thread}/threadReadState` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The time when the user's thread read state was updated. Usually this + * corresponds with the timestamp of the last read message in a thread. + * + * Generated from protobuf field .google.protobuf.Timestamp last_read_time = 2; + */ + protected $last_read_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name of the thread read state. + * Format: `users/{user}/spaces/{space}/threads/{thread}/threadReadState` + * @type \Google\Protobuf\Timestamp $last_read_time + * The time when the user's thread read state was updated. Usually this + * corresponds with the timestamp of the last read message in a thread. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\ThreadReadState::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the thread read state. + * Format: `users/{user}/spaces/{space}/threads/{thread}/threadReadState` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name of the thread read state. + * Format: `users/{user}/spaces/{space}/threads/{thread}/threadReadState` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The time when the user's thread read state was updated. Usually this + * corresponds with the timestamp of the last read message in a thread. + * + * Generated from protobuf field .google.protobuf.Timestamp last_read_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastReadTime() + { + return $this->last_read_time; + } + + public function hasLastReadTime() + { + return isset($this->last_read_time); + } + + public function clearLastReadTime() + { + unset($this->last_read_time); + } + + /** + * The time when the user's thread read state was updated. Usually this + * corresponds with the timestamp of the last read message in a thread. + * + * Generated from protobuf field .google.protobuf.Timestamp last_read_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_read_time = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/UpdateMembershipRequest.php b/AppsChat/src/Chat/V1/UpdateMembershipRequest.php new file mode 100644 index 000000000000..b9dba2305c9b --- /dev/null +++ b/AppsChat/src/Chat/V1/UpdateMembershipRequest.php @@ -0,0 +1,158 @@ +google.chat.v1.UpdateMembershipRequest + */ +class UpdateMembershipRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The membership to update. Only fields specified by `update_mask` + * are updated. + * + * Generated from protobuf field .google.chat.v1.Membership membership = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $membership = null; + /** + * Required. The field paths to update. Separate multiple values with commas + * or use `*` to update all field paths. + * Currently supported field paths: + * - `role` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Apps\Chat\V1\Membership $membership Required. The membership to update. Only fields specified by `update_mask` + * are updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. The field paths to update. Separate multiple values with commas + * or use `*` to update all field paths. + * + * Currently supported field paths: + * + * - `role` + * + * @return \Google\Apps\Chat\V1\UpdateMembershipRequest + * + * @experimental + */ + public static function build(\Google\Apps\Chat\V1\Membership $membership, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setMembership($membership) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Membership $membership + * Required. The membership to update. Only fields specified by `update_mask` + * are updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The field paths to update. Separate multiple values with commas + * or use `*` to update all field paths. + * Currently supported field paths: + * - `role` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Required. The membership to update. Only fields specified by `update_mask` + * are updated. + * + * Generated from protobuf field .google.chat.v1.Membership membership = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Apps\Chat\V1\Membership|null + */ + public function getMembership() + { + return $this->membership; + } + + public function hasMembership() + { + return isset($this->membership); + } + + public function clearMembership() + { + unset($this->membership); + } + + /** + * Required. The membership to update. Only fields specified by `update_mask` + * are updated. + * + * Generated from protobuf field .google.chat.v1.Membership membership = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Apps\Chat\V1\Membership $var + * @return $this + */ + public function setMembership($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Membership::class); + $this->membership = $var; + + return $this; + } + + /** + * Required. The field paths to update. Separate multiple values with commas + * or use `*` to update all field paths. + * Currently supported field paths: + * - `role` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The field paths to update. Separate multiple values with commas + * or use `*` to update all field paths. + * Currently supported field paths: + * - `role` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/UpdateSpaceReadStateRequest.php b/AppsChat/src/Chat/V1/UpdateSpaceReadStateRequest.php new file mode 100644 index 000000000000..ca8c1da1bda2 --- /dev/null +++ b/AppsChat/src/Chat/V1/UpdateSpaceReadStateRequest.php @@ -0,0 +1,230 @@ +google.chat.v1.UpdateSpaceReadStateRequest + */ +class UpdateSpaceReadStateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The space read state and fields to update. + * Only supports updating read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * Format: users/{user}/spaces/{space}/spaceReadState + * + * Generated from protobuf field .google.chat.v1.SpaceReadState space_read_state = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $space_read_state = null; + /** + * Required. The field paths to update. Currently supported field paths: + * - `last_read_time` + * When the `last_read_time` is before the latest message create time, the + * space appears as unread in the UI. + * To mark the space as read, set `last_read_time` to any value later (larger) + * than the latest message create time. The `last_read_time` is coerced to + * match the latest message create time. Note that the space read state only + * affects the read state of messages that are visible in the space's + * top-level conversation. Replies in threads are unaffected by this + * timestamp, and instead rely on the thread read state. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Apps\Chat\V1\SpaceReadState $spaceReadState Required. The space read state and fields to update. + * + * Only supports updating read state for the calling user. + * + * To refer to the calling user, set one of the following: + * + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * + * Format: users/{user}/spaces/{space}/spaceReadState + * @param \Google\Protobuf\FieldMask $updateMask Required. The field paths to update. Currently supported field paths: + * + * - `last_read_time` + * + * When the `last_read_time` is before the latest message create time, the + * space appears as unread in the UI. + * + * To mark the space as read, set `last_read_time` to any value later (larger) + * than the latest message create time. The `last_read_time` is coerced to + * match the latest message create time. Note that the space read state only + * affects the read state of messages that are visible in the space's + * top-level conversation. Replies in threads are unaffected by this + * timestamp, and instead rely on the thread read state. + * + * @return \Google\Apps\Chat\V1\UpdateSpaceReadStateRequest + * + * @experimental + */ + public static function build(\Google\Apps\Chat\V1\SpaceReadState $spaceReadState, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSpaceReadState($spaceReadState) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\SpaceReadState $space_read_state + * Required. The space read state and fields to update. + * Only supports updating read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * Format: users/{user}/spaces/{space}/spaceReadState + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The field paths to update. Currently supported field paths: + * - `last_read_time` + * When the `last_read_time` is before the latest message create time, the + * space appears as unread in the UI. + * To mark the space as read, set `last_read_time` to any value later (larger) + * than the latest message create time. The `last_read_time` is coerced to + * match the latest message create time. Note that the space read state only + * affects the read state of messages that are visible in the space's + * top-level conversation. Replies in threads are unaffected by this + * timestamp, and instead rely on the thread read state. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\SpaceReadState::initOnce(); + parent::__construct($data); + } + + /** + * Required. The space read state and fields to update. + * Only supports updating read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * Format: users/{user}/spaces/{space}/spaceReadState + * + * Generated from protobuf field .google.chat.v1.SpaceReadState space_read_state = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Apps\Chat\V1\SpaceReadState|null + */ + public function getSpaceReadState() + { + return $this->space_read_state; + } + + public function hasSpaceReadState() + { + return isset($this->space_read_state); + } + + public function clearSpaceReadState() + { + unset($this->space_read_state); + } + + /** + * Required. The space read state and fields to update. + * Only supports updating read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * Format: users/{user}/spaces/{space}/spaceReadState + * + * Generated from protobuf field .google.chat.v1.SpaceReadState space_read_state = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Apps\Chat\V1\SpaceReadState $var + * @return $this + */ + public function setSpaceReadState($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\SpaceReadState::class); + $this->space_read_state = $var; + + return $this; + } + + /** + * Required. The field paths to update. Currently supported field paths: + * - `last_read_time` + * When the `last_read_time` is before the latest message create time, the + * space appears as unread in the UI. + * To mark the space as read, set `last_read_time` to any value later (larger) + * than the latest message create time. The `last_read_time` is coerced to + * match the latest message create time. Note that the space read state only + * affects the read state of messages that are visible in the space's + * top-level conversation. Replies in threads are unaffected by this + * timestamp, and instead rely on the thread read state. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. The field paths to update. Currently supported field paths: + * - `last_read_time` + * When the `last_read_time` is before the latest message create time, the + * space appears as unread in the UI. + * To mark the space as read, set `last_read_time` to any value later (larger) + * than the latest message create time. The `last_read_time` is coerced to + * match the latest message create time. Note that the space read state only + * affects the read state of messages that are visible in the space's + * top-level conversation. Replies in threads are unaffected by this + * timestamp, and instead rely on the thread read state. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/AppsChat/src/Chat/V1/gapic_metadata.json b/AppsChat/src/Chat/V1/gapic_metadata.json index 8d2fed5a4092..d94cea6ab2e5 100644 --- a/AppsChat/src/Chat/V1/gapic_metadata.json +++ b/AppsChat/src/Chat/V1/gapic_metadata.json @@ -80,6 +80,16 @@ "getSpace" ] }, + "GetSpaceReadState": { + "methods": [ + "getSpaceReadState" + ] + }, + "GetThreadReadState": { + "methods": [ + "getThreadReadState" + ] + }, "ListMemberships": { "methods": [ "listMemberships" @@ -105,6 +115,11 @@ "setUpSpace" ] }, + "UpdateMembership": { + "methods": [ + "updateMembership" + ] + }, "UpdateMessage": { "methods": [ "updateMessage" @@ -115,6 +130,11 @@ "updateSpace" ] }, + "UpdateSpaceReadState": { + "methods": [ + "updateSpaceReadState" + ] + }, "UploadAttachment": { "methods": [ "uploadAttachment" diff --git a/AppsChat/src/Chat/V1/resources/chat_service_client_config.json b/AppsChat/src/Chat/V1/resources/chat_service_client_config.json index dfc25d11fb1d..f1134ba2ce70 100644 --- a/AppsChat/src/Chat/V1/resources/chat_service_client_config.json +++ b/AppsChat/src/Chat/V1/resources/chat_service_client_config.json @@ -98,6 +98,16 @@ "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "GetSpaceReadState": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetThreadReadState": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "ListMemberships": { "timeout_millis": 30000, "retry_codes_name": "retry_policy_1_codes", @@ -123,6 +133,11 @@ "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "UpdateMembership": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "UpdateMessage": { "timeout_millis": 30000, "retry_codes_name": "retry_policy_1_codes", @@ -133,6 +148,11 @@ "retry_codes_name": "retry_policy_1_codes", "retry_params_name": "retry_policy_1_params" }, + "UpdateSpaceReadState": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, "UploadAttachment": { "timeout_millis": 30000, "retry_codes_name": "retry_policy_1_codes", diff --git a/AppsChat/src/Chat/V1/resources/chat_service_descriptor_config.php b/AppsChat/src/Chat/V1/resources/chat_service_descriptor_config.php index 9e77fdd75081..daa891eb9118 100644 --- a/AppsChat/src/Chat/V1/resources/chat_service_descriptor_config.php +++ b/AppsChat/src/Chat/V1/resources/chat_service_descriptor_config.php @@ -175,6 +175,30 @@ ], ], ], + 'GetSpaceReadState' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\SpaceReadState', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetThreadReadState' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\ThreadReadState', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], 'ListMemberships' => [ 'pageStreaming' => [ 'requestPageTokenGetMethod' => 'getPageToken', @@ -251,6 +275,19 @@ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Apps\Chat\V1\Space', ], + 'UpdateMembership' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Membership', + 'headerParams' => [ + [ + 'keyName' => 'membership.name', + 'fieldAccessors' => [ + 'getMembership', + 'getName', + ], + ], + ], + ], 'UpdateMessage' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Apps\Chat\V1\Message', @@ -277,6 +314,19 @@ ], ], ], + 'UpdateSpaceReadState' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\SpaceReadState', + 'headerParams' => [ + [ + 'keyName' => 'space_read_state.name', + 'fieldAccessors' => [ + 'getSpaceReadState', + 'getName', + ], + ], + ], + ], 'UploadAttachment' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Apps\Chat\V1\UploadAttachmentResponse', @@ -296,7 +346,9 @@ 'quotedMessageMetadata' => 'spaces/{space}/messages/{message}/quotedMessageMetadata/{quoted_message_metadata}', 'reaction' => 'spaces/{space}/messages/{message}/reactions/{reaction}', 'space' => 'spaces/{space}', + 'spaceReadState' => 'users/{user}/spaces/{space}/spaceReadState', 'thread' => 'spaces/{space}/threads/{thread}', + 'threadReadState' => 'users/{user}/spaces/{space}/threads/{thread}/threadReadState', ], ], ], diff --git a/AppsChat/src/Chat/V1/resources/chat_service_rest_client_config.php b/AppsChat/src/Chat/V1/resources/chat_service_rest_client_config.php index 591234af557b..a4fdec701035 100644 --- a/AppsChat/src/Chat/V1/resources/chat_service_rest_client_config.php +++ b/AppsChat/src/Chat/V1/resources/chat_service_rest_client_config.php @@ -168,6 +168,28 @@ ], ], ], + 'GetSpaceReadState' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=users/*/spaces/*/spaceReadState}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetThreadReadState' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=users/*/spaces/*/threads/*/threadReadState}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'ListMemberships' => [ 'method' => 'get', 'uriTemplate' => '/v1/{parent=spaces/*}/members', @@ -210,6 +232,22 @@ 'uriTemplate' => '/v1/spaces:setup', 'body' => '*', ], + 'UpdateMembership' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{membership.name=spaces/*/members/*}', + 'body' => 'membership', + 'placeholders' => [ + 'membership.name' => [ + 'getters' => [ + 'getMembership', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], 'UpdateMessage' => [ 'method' => 'put', 'uriTemplate' => '/v1/{message.name=spaces/*/messages/*}', @@ -243,6 +281,22 @@ ], ], ], + 'UpdateSpaceReadState' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{space_read_state.name=users/*/spaces/*/spaceReadState}', + 'body' => 'space_read_state', + 'placeholders' => [ + 'space_read_state.name' => [ + 'getters' => [ + 'getSpaceReadState', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], 'UploadAttachment' => [ 'method' => 'post', 'uriTemplate' => '/v1/{parent=spaces/*}/attachments:upload', diff --git a/AppsChat/tests/Unit/V1/Client/ChatServiceClientTest.php b/AppsChat/tests/Unit/V1/Client/ChatServiceClientTest.php index 39b216d86be8..b85a6671b62d 100644 --- a/AppsChat/tests/Unit/V1/Client/ChatServiceClientTest.php +++ b/AppsChat/tests/Unit/V1/Client/ChatServiceClientTest.php @@ -42,7 +42,9 @@ use Google\Apps\Chat\V1\GetAttachmentRequest; use Google\Apps\Chat\V1\GetMembershipRequest; use Google\Apps\Chat\V1\GetMessageRequest; +use Google\Apps\Chat\V1\GetSpaceReadStateRequest; use Google\Apps\Chat\V1\GetSpaceRequest; +use Google\Apps\Chat\V1\GetThreadReadStateRequest; use Google\Apps\Chat\V1\ListMembershipsRequest; use Google\Apps\Chat\V1\ListMembershipsResponse; use Google\Apps\Chat\V1\ListMessagesRequest; @@ -56,10 +58,15 @@ use Google\Apps\Chat\V1\Reaction; use Google\Apps\Chat\V1\SetUpSpaceRequest; use Google\Apps\Chat\V1\Space; +use Google\Apps\Chat\V1\SpaceReadState; +use Google\Apps\Chat\V1\ThreadReadState; +use Google\Apps\Chat\V1\UpdateMembershipRequest; use Google\Apps\Chat\V1\UpdateMessageRequest; +use Google\Apps\Chat\V1\UpdateSpaceReadStateRequest; use Google\Apps\Chat\V1\UpdateSpaceRequest; use Google\Apps\Chat\V1\UploadAttachmentRequest; use Google\Apps\Chat\V1\UploadAttachmentResponse; +use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; use Google\Rpc\Code; use stdClass; @@ -1073,6 +1080,136 @@ public function getSpaceExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function getSpaceReadStateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new SpaceReadState(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->spaceReadStateName('[USER]', '[SPACE]'); + $request = (new GetSpaceReadStateRequest())->setName($formattedName); + $response = $gapicClient->getSpaceReadState($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/GetSpaceReadState', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSpaceReadStateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->spaceReadStateName('[USER]', '[SPACE]'); + $request = (new GetSpaceReadStateRequest())->setName($formattedName); + try { + $gapicClient->getSpaceReadState($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getThreadReadStateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new ThreadReadState(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->threadReadStateName('[USER]', '[SPACE]', '[THREAD]'); + $request = (new GetThreadReadStateRequest())->setName($formattedName); + $response = $gapicClient->getThreadReadState($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/GetThreadReadState', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getThreadReadStateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->threadReadStateName('[USER]', '[SPACE]', '[THREAD]'); + $request = (new GetThreadReadStateRequest())->setName($formattedName); + try { + $gapicClient->getThreadReadState($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function listMembershipsTest() { @@ -1428,6 +1565,75 @@ public function setUpSpaceExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function updateMembershipTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Membership(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $membership = new Membership(); + $updateMask = new FieldMask(); + $request = (new UpdateMembershipRequest())->setMembership($membership)->setUpdateMask($updateMask); + $response = $gapicClient->updateMembership($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/UpdateMembership', $actualFuncCall); + $actualValue = $actualRequestObject->getMembership(); + $this->assertProtobufEquals($membership, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateMembershipExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $membership = new Membership(); + $updateMask = new FieldMask(); + $request = (new UpdateMembershipRequest())->setMembership($membership)->setUpdateMask($updateMask); + try { + $gapicClient->updateMembership($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function updateMessageTest() { @@ -1582,6 +1788,75 @@ public function updateSpaceExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function updateSpaceReadStateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new SpaceReadState(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $spaceReadState = new SpaceReadState(); + $updateMask = new FieldMask(); + $request = (new UpdateSpaceReadStateRequest())->setSpaceReadState($spaceReadState)->setUpdateMask($updateMask); + $response = $gapicClient->updateSpaceReadState($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/UpdateSpaceReadState', $actualFuncCall); + $actualValue = $actualRequestObject->getSpaceReadState(); + $this->assertProtobufEquals($spaceReadState, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSpaceReadStateExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $spaceReadState = new SpaceReadState(); + $updateMask = new FieldMask(); + $request = (new UpdateSpaceReadStateRequest())->setSpaceReadState($spaceReadState)->setUpdateMask($updateMask); + try { + $gapicClient->updateSpaceReadState($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function uploadAttachmentTest() { From 2505ec330ef7cd0d255f5d35a146c3986f19002b Mon Sep 17 00:00:00 2001 From: "Javi H. Gil" Date: Fri, 19 Apr 2024 21:10:17 +0200 Subject: [PATCH 56/86] feat(logging): add trace to logging on cloud run (#6764) Co-authored-by: Yash Sahu <54198301+yash30201@users.noreply.github.com> Co-authored-by: Brent Shaffer --- Core/src/Report/CloudRunMetadataProvider.php | 16 +++++++++++++--- .../Unit/Report/CloudRunMetadataProviderTest.php | 10 +++++++++- Logging/composer.json | 2 +- Logging/src/PsrLogger.php | 4 ++++ Logging/tests/Unit/PsrLoggerBatchTest.php | 15 +++++++++++++-- 5 files changed, 40 insertions(+), 7 deletions(-) diff --git a/Core/src/Report/CloudRunMetadataProvider.php b/Core/src/Report/CloudRunMetadataProvider.php index aa09d3d24505..5b7d771924b4 100644 --- a/Core/src/Report/CloudRunMetadataProvider.php +++ b/Core/src/Report/CloudRunMetadataProvider.php @@ -39,6 +39,11 @@ class CloudRunMetadataProvider implements MetadataProviderInterface */ private $revisionId; + /** + * @var string + */ + private $traceId; + public function __construct(array $env) { $this->serviceId = isset($env['K_SERVICE']) @@ -47,6 +52,9 @@ public function __construct(array $env) $this->revisionId = isset($env['K_REVISION']) ? $env['K_REVISION'] : 'unknown-revision'; + $this->traceId = isset($env['HTTP_X_CLOUD_TRACE_CONTEXT']) + ? substr($env['HTTP_X_CLOUD_TRACE_CONTEXT'], 0, 32) + : null; $this->metadata = new Metadata(); } @@ -87,11 +95,13 @@ public function versionId() } /** - * not implemented - * @TODO + * Return the labels. We need to evaluate $_SERVER for each request. + * @return array */ public function labels() { - return []; + return !empty($this->traceId) + ? ['run.googleapis.com/trace_id' => $this->traceId ] + : []; } } diff --git a/Core/tests/Unit/Report/CloudRunMetadataProviderTest.php b/Core/tests/Unit/Report/CloudRunMetadataProviderTest.php index f23833b591e6..f355e62f39d2 100644 --- a/Core/tests/Unit/Report/CloudRunMetadataProviderTest.php +++ b/Core/tests/Unit/Report/CloudRunMetadataProviderTest.php @@ -29,10 +29,17 @@ public function testMetadataProvider() { $provider = new CloudRunMetadataProvider([ 'K_SERVICE' => 'my-service', - 'K_REVISION' => 'my-revision' + 'K_REVISION' => 'my-revision', + 'HTTP_X_CLOUD_TRACE_CONTEXT' => 'my-traceId' ]); $this->assertEquals('my-service', $provider->serviceId()); $this->assertEquals('my-revision', $provider->versionId()); + $this->assertEquals( + [ + 'run.googleapis.com/trace_id' => 'my-traceId' + ], + $provider->labels() + ); } public function testDefaults() @@ -40,5 +47,6 @@ public function testDefaults() $provider = new CloudRunMetadataProvider([]); $this->assertEquals('unknown-service', $provider->serviceId()); $this->assertEquals('unknown-revision', $provider->versionId()); + $this->assertEquals([], $provider->labels()); } } diff --git a/Logging/composer.json b/Logging/composer.json index dd38cea71c3f..5a0414702806 100644 --- a/Logging/composer.json +++ b/Logging/composer.json @@ -5,7 +5,7 @@ "minimum-stability": "stable", "require": { "php": "^8.0", - "google/cloud-core": "^1.52.7", + "google/cloud-core": "^1.58", "google/gax": "^1.30" }, "require-dev": { diff --git a/Logging/src/PsrLogger.php b/Logging/src/PsrLogger.php index ce3f0a18bb67..a6e694d0f426 100644 --- a/Logging/src/PsrLogger.php +++ b/Logging/src/PsrLogger.php @@ -403,6 +403,10 @@ public function log($level, Stringable|string $message, array $context = []): vo $options['trace'] = $labels['appengine.googleapis.com/trace_id']; } + if (isset($labels['run.googleapis.com/trace_id'])) { + $options['trace'] = + $labels['run.googleapis.com/trace_id']; + } } // Adding MonitoredResource $resource = $this->metadataProvider->monitoredResource(); diff --git a/Logging/tests/Unit/PsrLoggerBatchTest.php b/Logging/tests/Unit/PsrLoggerBatchTest.php index 1bab1c9c091b..e1e9e03502bc 100644 --- a/Logging/tests/Unit/PsrLoggerBatchTest.php +++ b/Logging/tests/Unit/PsrLoggerBatchTest.php @@ -18,6 +18,7 @@ namespace Google\Cloud\Logging\Tests\Unit; use Google\Cloud\Core\Batch\BatchRunner; +use Google\Cloud\Core\Report\CloudRunMetadataProvider; use Google\Cloud\Core\Report\GAEFlexMetadataProvider; use Google\Cloud\Logging\Connection\Rest; use Google\Cloud\Logging\Entry; @@ -90,8 +91,9 @@ public function testSend( /** * @dataProvider traceIdProvider */ - public function testTraceIdLabelOnGAEFlex( + public function testTraceIdLabelOnServerlessPlatforms( $traceId, + $metadataProviderClass, $labels, $expectedLabels ) { @@ -125,7 +127,7 @@ public function testTraceIdLabelOnGAEFlex( [ 'batchEnabled' => true, 'batchRunner' => $this->runner->reveal(), - 'metadataProvider' => new GAEFlexMetadataProvider($server) + 'metadataProvider' => new $metadataProviderClass($server) ] ); @@ -187,16 +189,25 @@ public function traceIdProvider() return [ [ '', + GAEFlexMetadataProvider::class, [], [], ], [ str_repeat('x', 32), + GAEFlexMetadataProvider::class, [], ['appengine.googleapis.com/trace_id' => str_repeat('x', 32)] ], [ str_repeat('x', 32), + CloudRunMetadataProvider::class, + [], + ['run.googleapis.com/trace_id' => str_repeat('x', 32)] + ], + [ + str_repeat('x', 32), + GAEFlexMetadataProvider::class, ['myKey' => 'myVal'], [ 'appengine.googleapis.com/trace_id' => str_repeat('x', 32), From 0d82359c0bc373aa5b76bec0d3e7a3ca6fe34cba Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Sat, 20 Apr 2024 00:24:23 +0200 Subject: [PATCH 57/86] chore(deps): update gcr.io/cloud-devrel-public-resources/storage-testbench docker tag to v0.44.0 (#7239) --- .github/workflows/storage-emulator-retry-conformance-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/storage-emulator-retry-conformance-tests.yaml b/.github/workflows/storage-emulator-retry-conformance-tests.yaml index 3058e94c8799..94249cd98532 100644 --- a/.github/workflows/storage-emulator-retry-conformance-tests.yaml +++ b/.github/workflows/storage-emulator-retry-conformance-tests.yaml @@ -16,7 +16,7 @@ jobs: services: emulator: - image: gcr.io/cloud-devrel-public-resources/storage-testbench:v0.43.0 + image: gcr.io/cloud-devrel-public-resources/storage-testbench:v0.44.0 ports: - 9000:9000 From d32b4560951b96b7fe3086ecf730c1cdc9c12f76 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 19 Apr 2024 22:39:11 +0000 Subject: [PATCH 58/86] chore(main): release 0.242.0 (#7234) --- AccessApproval/VERSION | 2 +- AccessContextManager/VERSION | 2 +- AdvisoryNotifications/VERSION | 2 +- AiPlatform/VERSION | 2 +- AlloyDb/VERSION | 2 +- AnalyticsAdmin/VERSION | 2 +- AnalyticsData/VERSION | 2 +- ApiGateway/VERSION | 2 +- ApiKeys/VERSION | 2 +- ApigeeConnect/VERSION | 2 +- ApigeeRegistry/VERSION | 2 +- AppEngineAdmin/VERSION | 2 +- AppHub/VERSION | 2 +- AppsChat/VERSION | 2 +- AppsEventsSubscriptions/VERSION | 2 +- AppsMeet/VERSION | 2 +- ArtifactRegistry/VERSION | 2 +- Asset/VERSION | 2 +- AssuredWorkloads/VERSION | 2 +- AutoMl/VERSION | 2 +- BareMetalSolution/VERSION | 2 +- Batch/VERSION | 2 +- BeyondCorpAppConnections/VERSION | 2 +- BeyondCorpAppConnectors/VERSION | 2 +- BeyondCorpAppGateways/VERSION | 2 +- BeyondCorpClientConnectorServices/VERSION | 2 +- BeyondCorpClientGateways/VERSION | 2 +- BigQueryAnalyticsHub/VERSION | 2 +- BigQueryConnection/VERSION | 2 +- BigQueryDataExchange/VERSION | 2 +- BigQueryDataPolicies/VERSION | 2 +- BigQueryDataTransfer/VERSION | 2 +- BigQueryMigration/VERSION | 2 +- BigQueryReservation/VERSION | 2 +- BigQueryStorage/VERSION | 2 +- Billing/VERSION | 2 +- BillingBudgets/VERSION | 2 +- BinaryAuthorization/VERSION | 2 +- Build/VERSION | 2 +- CHANGELOG.md | 1091 +++++++++++++++++++++ CertificateManager/VERSION | 2 +- Channel/VERSION | 2 +- CommerceConsumerProcurement/VERSION | 2 +- Compute/VERSION | 2 +- ConfidentialComputing/VERSION | 2 +- Config/VERSION | 2 +- ContactCenterInsights/VERSION | 2 +- Container/VERSION | 2 +- ContainerAnalysis/VERSION | 2 +- ControlsPartner/VERSION | 2 +- Core/VERSION | 2 +- DataCatalog/VERSION | 2 +- DataCatalogLineage/VERSION | 2 +- DataFusion/VERSION | 2 +- DataLabeling/VERSION | 2 +- Dataflow/VERSION | 2 +- Dataform/VERSION | 2 +- Dataplex/VERSION | 2 +- Dataproc/VERSION | 2 +- DataprocMetastore/VERSION | 2 +- Datastore/VERSION | 2 +- Datastore/src/DatastoreClient.php | 2 +- DatastoreAdmin/VERSION | 2 +- Datastream/VERSION | 2 +- Debugger/VERSION | 2 +- Debugger/src/DebuggerClient.php | 2 +- Deploy/VERSION | 2 +- Dialogflow/VERSION | 2 +- DialogflowCx/VERSION | 2 +- DiscoveryEngine/VERSION | 2 +- Dlp/VERSION | 2 +- Dms/VERSION | 2 +- DocumentAi/VERSION | 2 +- Domains/VERSION | 2 +- EdgeNetwork/VERSION | 2 +- ErrorReporting/VERSION | 2 +- EssentialContacts/VERSION | 2 +- Eventarc/VERSION | 2 +- EventarcPublishing/VERSION | 2 +- Filestore/VERSION | 2 +- Firestore/VERSION | 2 +- Firestore/src/FirestoreClient.php | 2 +- Functions/VERSION | 2 +- GSuiteAddOns/VERSION | 2 +- GkeBackup/VERSION | 2 +- GkeConnectGateway/VERSION | 2 +- GkeHub/VERSION | 2 +- GkeMultiCloud/VERSION | 2 +- Grafeas/VERSION | 2 +- Iam/VERSION | 2 +- IamCredentials/VERSION | 2 +- Iap/VERSION | 2 +- Ids/VERSION | 2 +- Iot/VERSION | 2 +- Kms/VERSION | 2 +- KmsInventory/VERSION | 2 +- Language/VERSION | 2 +- Language/src/LanguageClient.php | 2 +- LifeSciences/VERSION | 2 +- Logging/VERSION | 2 +- Logging/src/LoggingClient.php | 2 +- LongRunning/VERSION | 2 +- LongRunning/composer.json | 2 +- ManagedIdentities/VERSION | 2 +- MediaTranslation/VERSION | 2 +- Memcache/VERSION | 2 +- MigrationCenter/VERSION | 2 +- Monitoring/VERSION | 2 +- NetApp/VERSION | 2 +- NetworkConnectivity/VERSION | 2 +- NetworkManagement/VERSION | 2 +- NetworkSecurity/VERSION | 2 +- Notebooks/VERSION | 2 +- Optimization/VERSION | 2 +- OrchestrationAirflow/VERSION | 2 +- OrgPolicy/VERSION | 2 +- OsConfig/VERSION | 2 +- OsLogin/VERSION | 2 +- Parallelstore/VERSION | 2 +- PolicySimulator/VERSION | 2 +- PolicyTroubleshooter/VERSION | 2 +- PolicyTroubleshooterIam/VERSION | 2 +- PrivateCatalog/VERSION | 2 +- Profiler/VERSION | 2 +- PubSub/VERSION | 2 +- Quotas/VERSION | 2 +- RapidMigrationAssessment/VERSION | 2 +- RecaptchaEnterprise/VERSION | 2 +- RecommendationEngine/VERSION | 2 +- Recommender/VERSION | 2 +- Redis/VERSION | 2 +- RedisCluster/VERSION | 2 +- ResourceManager/VERSION | 2 +- ResourceSettings/VERSION | 2 +- Retail/VERSION | 2 +- Run/VERSION | 2 +- Scheduler/VERSION | 2 +- SecretManager/VERSION | 2 +- SecureSourceManager/VERSION | 2 +- SecurityCenter/VERSION | 2 +- SecurityCenterManagement/VERSION | 2 +- SecurityPrivateCa/VERSION | 2 +- SecurityPublicCA/VERSION | 2 +- ServiceControl/VERSION | 2 +- ServiceDirectory/VERSION | 2 +- ServiceHealth/VERSION | 2 +- ServiceManagement/VERSION | 2 +- ServiceUsage/VERSION | 2 +- Shell/VERSION | 2 +- ShoppingCss/VERSION | 2 +- ShoppingMerchantInventories/VERSION | 2 +- ShoppingMerchantQuota/VERSION | 2 +- ShoppingMerchantReports/VERSION | 2 +- Spanner/VERSION | 2 +- Spanner/src/SpannerClient.php | 2 +- Speech/VERSION | 2 +- Speech/src/SpeechClient.php | 2 +- SqlAdmin/VERSION | 2 +- Storage/VERSION | 2 +- Storage/src/StorageClient.php | 2 +- StorageInsights/VERSION | 2 +- StorageTransfer/VERSION | 2 +- Support/VERSION | 2 +- Talent/VERSION | 2 +- Tasks/VERSION | 2 +- TelcoAutomation/VERSION | 2 +- TextToSpeech/VERSION | 2 +- Tpu/VERSION | 2 +- Trace/VERSION | 2 +- Trace/src/TraceClient.php | 2 +- Translate/VERSION | 2 +- VideoIntelligence/VERSION | 2 +- VideoLiveStream/VERSION | 2 +- VideoStitcher/VERSION | 2 +- VideoTranscoder/VERSION | 2 +- Vision/VERSION | 2 +- Vision/src/VisionClient.php | 2 +- VmMigration/VERSION | 2 +- VmwareEngine/VERSION | 2 +- VpcAccess/VERSION | 2 +- WebRisk/VERSION | 2 +- WebSecurityScanner/VERSION | 2 +- Workflows/VERSION | 2 +- composer.json | 342 +++---- 184 files changed, 1444 insertions(+), 353 deletions(-) diff --git a/AccessApproval/VERSION b/AccessApproval/VERSION index 23aa8390630c..0495c4a88cae 100644 --- a/AccessApproval/VERSION +++ b/AccessApproval/VERSION @@ -1 +1 @@ -1.2.2 +1.2.3 diff --git a/AccessContextManager/VERSION b/AccessContextManager/VERSION index cb0c939a936f..be14282b7fff 100644 --- a/AccessContextManager/VERSION +++ b/AccessContextManager/VERSION @@ -1 +1 @@ -0.5.2 +0.5.3 diff --git a/AdvisoryNotifications/VERSION b/AdvisoryNotifications/VERSION index a3df0a6959e1..6f4eebdf6f68 100644 --- a/AdvisoryNotifications/VERSION +++ b/AdvisoryNotifications/VERSION @@ -1 +1 @@ -0.8.0 +0.8.1 diff --git a/AiPlatform/VERSION b/AiPlatform/VERSION index 0f1a7dfc7c40..9b1bb8512396 100644 --- a/AiPlatform/VERSION +++ b/AiPlatform/VERSION @@ -1 +1 @@ -0.37.0 +0.37.1 diff --git a/AlloyDb/VERSION b/AlloyDb/VERSION index 78bc1abd14f2..571215736a66 100644 --- a/AlloyDb/VERSION +++ b/AlloyDb/VERSION @@ -1 +1 @@ -0.10.0 +0.10.1 diff --git a/AnalyticsAdmin/VERSION b/AnalyticsAdmin/VERSION index faa5fb2659b5..d90746a79af3 100644 --- a/AnalyticsAdmin/VERSION +++ b/AnalyticsAdmin/VERSION @@ -1 +1 @@ -0.22.2 +0.22.3 diff --git a/AnalyticsData/VERSION b/AnalyticsData/VERSION index 201a22c8fa5c..7eb3095a3295 100644 --- a/AnalyticsData/VERSION +++ b/AnalyticsData/VERSION @@ -1 +1 @@ -0.16.2 +0.16.3 diff --git a/ApiGateway/VERSION b/ApiGateway/VERSION index 1892b9267677..31e5c843497c 100644 --- a/ApiGateway/VERSION +++ b/ApiGateway/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/ApiKeys/VERSION b/ApiKeys/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/ApiKeys/VERSION +++ b/ApiKeys/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/ApigeeConnect/VERSION b/ApigeeConnect/VERSION index 23aa8390630c..0495c4a88cae 100644 --- a/ApigeeConnect/VERSION +++ b/ApigeeConnect/VERSION @@ -1 +1 @@ -1.2.2 +1.2.3 diff --git a/ApigeeRegistry/VERSION b/ApigeeRegistry/VERSION index cb0c939a936f..be14282b7fff 100644 --- a/ApigeeRegistry/VERSION +++ b/ApigeeRegistry/VERSION @@ -1 +1 @@ -0.5.2 +0.5.3 diff --git a/AppEngineAdmin/VERSION b/AppEngineAdmin/VERSION index 1892b9267677..31e5c843497c 100644 --- a/AppEngineAdmin/VERSION +++ b/AppEngineAdmin/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/AppHub/VERSION b/AppHub/VERSION index 6e8bf73aa550..17e51c385ea3 100644 --- a/AppHub/VERSION +++ b/AppHub/VERSION @@ -1 +1 @@ -0.1.0 +0.1.1 diff --git a/AppsChat/VERSION b/AppsChat/VERSION index 77d6f4ca2371..6e8bf73aa550 100644 --- a/AppsChat/VERSION +++ b/AppsChat/VERSION @@ -1 +1 @@ -0.0.0 +0.1.0 diff --git a/AppsEventsSubscriptions/VERSION b/AppsEventsSubscriptions/VERSION index 6e8bf73aa550..17e51c385ea3 100644 --- a/AppsEventsSubscriptions/VERSION +++ b/AppsEventsSubscriptions/VERSION @@ -1 +1 @@ -0.1.0 +0.1.1 diff --git a/AppsMeet/VERSION b/AppsMeet/VERSION index 0ea3a944b399..0c62199f16ac 100644 --- a/AppsMeet/VERSION +++ b/AppsMeet/VERSION @@ -1 +1 @@ -0.2.0 +0.2.1 diff --git a/ArtifactRegistry/VERSION b/ArtifactRegistry/VERSION index b6160487433b..844f6a91acb9 100644 --- a/ArtifactRegistry/VERSION +++ b/ArtifactRegistry/VERSION @@ -1 +1 @@ -0.6.2 +0.6.3 diff --git a/Asset/VERSION b/Asset/VERSION index 15b989e398fc..41c11ffb730c 100644 --- a/Asset/VERSION +++ b/Asset/VERSION @@ -1 +1 @@ -1.16.0 +1.16.1 diff --git a/AssuredWorkloads/VERSION b/AssuredWorkloads/VERSION index bc859cbd6d99..1a96df19c09a 100644 --- a/AssuredWorkloads/VERSION +++ b/AssuredWorkloads/VERSION @@ -1 +1 @@ -0.11.2 +0.11.3 diff --git a/AutoMl/VERSION b/AutoMl/VERSION index fdd3be6df54a..266146b87cbc 100644 --- a/AutoMl/VERSION +++ b/AutoMl/VERSION @@ -1 +1 @@ -1.6.2 +1.6.3 diff --git a/BareMetalSolution/VERSION b/BareMetalSolution/VERSION index b6160487433b..844f6a91acb9 100644 --- a/BareMetalSolution/VERSION +++ b/BareMetalSolution/VERSION @@ -1 +1 @@ -0.6.2 +0.6.3 diff --git a/Batch/VERSION b/Batch/VERSION index 19270385eaf7..c3f65805f7b7 100644 --- a/Batch/VERSION +++ b/Batch/VERSION @@ -1 +1 @@ -0.16.5 +0.16.6 diff --git a/BeyondCorpAppConnections/VERSION b/BeyondCorpAppConnections/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/BeyondCorpAppConnections/VERSION +++ b/BeyondCorpAppConnections/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/BeyondCorpAppConnectors/VERSION b/BeyondCorpAppConnectors/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/BeyondCorpAppConnectors/VERSION +++ b/BeyondCorpAppConnectors/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/BeyondCorpAppGateways/VERSION b/BeyondCorpAppGateways/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/BeyondCorpAppGateways/VERSION +++ b/BeyondCorpAppGateways/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/BeyondCorpClientConnectorServices/VERSION b/BeyondCorpClientConnectorServices/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/BeyondCorpClientConnectorServices/VERSION +++ b/BeyondCorpClientConnectorServices/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/BeyondCorpClientGateways/VERSION b/BeyondCorpClientGateways/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/BeyondCorpClientGateways/VERSION +++ b/BeyondCorpClientGateways/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/BigQueryAnalyticsHub/VERSION b/BigQueryAnalyticsHub/VERSION index 8f0916f768f0..4b9fcbec101a 100644 --- a/BigQueryAnalyticsHub/VERSION +++ b/BigQueryAnalyticsHub/VERSION @@ -1 +1 @@ -0.5.0 +0.5.1 diff --git a/BigQueryConnection/VERSION b/BigQueryConnection/VERSION index 4cda8f19edc7..8af85beb5159 100644 --- a/BigQueryConnection/VERSION +++ b/BigQueryConnection/VERSION @@ -1 +1 @@ -1.5.2 +1.5.3 diff --git a/BigQueryDataExchange/VERSION b/BigQueryDataExchange/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/BigQueryDataExchange/VERSION +++ b/BigQueryDataExchange/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/BigQueryDataPolicies/VERSION b/BigQueryDataPolicies/VERSION index cb0c939a936f..be14282b7fff 100644 --- a/BigQueryDataPolicies/VERSION +++ b/BigQueryDataPolicies/VERSION @@ -1 +1 @@ -0.5.2 +0.5.3 diff --git a/BigQueryDataTransfer/VERSION b/BigQueryDataTransfer/VERSION index 53adb84c8220..a7ee35a3ea70 100644 --- a/BigQueryDataTransfer/VERSION +++ b/BigQueryDataTransfer/VERSION @@ -1 +1 @@ -1.8.2 +1.8.3 diff --git a/BigQueryMigration/VERSION b/BigQueryMigration/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/BigQueryMigration/VERSION +++ b/BigQueryMigration/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/BigQueryReservation/VERSION b/BigQueryReservation/VERSION index 1892b9267677..31e5c843497c 100644 --- a/BigQueryReservation/VERSION +++ b/BigQueryReservation/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/BigQueryStorage/VERSION b/BigQueryStorage/VERSION index 4dae2985b58c..5ad2491cf880 100644 --- a/BigQueryStorage/VERSION +++ b/BigQueryStorage/VERSION @@ -1 +1 @@ -1.10.1 +1.10.2 diff --git a/Billing/VERSION b/Billing/VERSION index d615fd0c04ab..158c74729336 100644 --- a/Billing/VERSION +++ b/Billing/VERSION @@ -1 +1 @@ -1.9.4 +1.9.5 diff --git a/BillingBudgets/VERSION b/BillingBudgets/VERSION index 9df886c42a1e..428b770e3e23 100644 --- a/BillingBudgets/VERSION +++ b/BillingBudgets/VERSION @@ -1 +1 @@ -1.4.2 +1.4.3 diff --git a/BinaryAuthorization/VERSION b/BinaryAuthorization/VERSION index b60d71966ae9..7ada0d303f3e 100644 --- a/BinaryAuthorization/VERSION +++ b/BinaryAuthorization/VERSION @@ -1 +1 @@ -0.8.4 +0.8.5 diff --git a/Build/VERSION b/Build/VERSION index 04a373efe6ba..2a0970ca757c 100644 --- a/Build/VERSION +++ b/Build/VERSION @@ -1 +1 @@ -0.16.0 +0.16.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index c5ba1f2de3a5..b2cc14cd47aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,1096 @@ # Changelog +## 0.242.0 + +
google/cloud-access-approval 1.2.3 + + + +
+ +
google/access-context-manager 0.5.3 + + + +
+ +
google/cloud-advisorynotifications 0.8.1 + + + +
+ +
google/cloud-ai-platform 0.37.1 + + + +
+ +
google/cloud-alloydb 0.10.1 + + + +
+ +
google/analytics-admin 0.22.3 + + + +
+ +
google/analytics-data 0.16.3 + + + +
+ +
google/cloud-api-gateway 1.3.3 + + + +
+ +
google/cloud-api-keys 0.4.3 + + + +
+ +
google/cloud-apigee-connect 1.2.3 + + + +
+ +
google/cloud-apigee-registry 0.5.3 + + + +
+ +
google/cloud-appengine-admin 1.3.3 + + + +
+ +
google/cloud-apphub 0.1.1 + + + +
+ +
google/apps-chat 0.1.0 + + + +### Features + +* Add Chat read state APIs ([#7246](https://github.com/googleapis/google-cloud-php/issues/7246)) ([ac1be59](https://github.com/googleapis/google-cloud-php/commit/ac1be59cb699fd99ff0783fe2029281b5659dc59)) +* Introduce AppsChat ([#7215](https://github.com/googleapis/google-cloud-php/issues/7215)) ([b0c6cc9](https://github.com/googleapis/google-cloud-php/commit/b0c6cc9f994ea9b5a0be3492efffbcf0171855f7)) + +
+ +
google/apps-events-subscriptions 0.1.1 + + + +
+ +
google/apps-meet 0.2.1 + + + +
+ +
google/cloud-artifact-registry 0.6.3 + + + +
+ +
google/cloud-asset 1.16.1 + + + +
+ +
google/cloud-assured-workloads 0.11.3 + + + +
+ +
google/cloud-automl 1.6.3 + + + +
+ +
google/cloud-bare-metal-solution 0.6.3 + + + +
+ +
google/cloud-batch 0.16.6 + + + +
+ +
google/cloud-beyondcorp-appconnections 0.4.3 + + + +
+ +
google/cloud-beyondcorp-appconnectors 0.4.3 + + + +
+ +
google/cloud-beyondcorp-appgateways 0.4.3 + + + +
+ +
google/cloud-beyondcorp-clientconnectorservices 0.4.3 + + + +
+ +
google/cloud-beyondcorp-clientgateways 0.4.3 + + + +
+ +
google/cloud-bigquery-analyticshub 0.5.1 + + + +
+ +
google/cloud-bigquery-connection 1.5.3 + + + +
+ +
google/cloud-bigquery-data-exchange 0.4.3 + + + +
+ +
google/cloud-bigquery-datapolicies 0.5.3 + + + +
+ +
google/cloud-bigquerydatatransfer 1.8.3 + + + +### Bug Fixes + +* Mark parent/name fields with the REQUIRED field_behavior annotation ([#7236](https://github.com/googleapis/google-cloud-php/issues/7236)) ([1c5846d](https://github.com/googleapis/google-cloud-php/commit/1c5846d9ae3ded5ca6fab3e637daba8a1254a72d)) + +
+ +
google/cloud-bigquery-migration 0.4.3 + + + +
+ +
google/cloud-bigquery-reservation 1.3.3 + + + +
+ +
google/cloud-bigquery-storage 1.10.2 + + + +
+ +
google/cloud-billing 1.9.5 + + + +
+ +
google/cloud-billing-budgets 1.4.3 + + + +
+ +
google/cloud-binary-authorization 0.8.5 + + + +
+ +
google/cloud-build 0.16.1 + + + +
+ +
google/cloud-certificate-manager 0.7.1 + + + +
+ +
google/cloud-channel 1.9.3 + + + +
+ +
google/cloud-commerce-consumer-procurement 0.2.3 + + + +
+ +
google/cloud-compute 1.16.1 + + + +
+ +
google/cloud-confidentialcomputing 0.8.1 + + + +
+ +
google/cloud-config 0.4.1 + + + +
+ +
google/cloud-contact-center-insights 1.9.3 + + + +
+ +
google/cloud-container 1.30.1 + + + +
+ +
google/cloud-container-analysis 0.5.5 + + + +
+ +
google/cloud-cloudcontrolspartner 0.1.1 + + + +
+ +
google/cloud-core 1.58.0 + + + +### Features + +* **logging:** Add trace to logging on cloud run ([#6764](https://github.com/googleapis/google-cloud-php/issues/6764)) ([2505ec3](https://github.com/googleapis/google-cloud-php/commit/2505ec330ef7cd0d255f5d35a146c3986f19002b)) + +
+ +
google/cloud-data-catalog 1.10.1 + + + +
+ +
google/cloud-datacatalog-lineage 0.5.3 + + + +
+ +
google/cloud-data-fusion 0.6.3 + + + +
+ +
google/cloud-datalabeling 0.5.3 + + + +
+ +
google/cloud-dataflow 0.6.2 + + + +
+ +
google/cloud-dataform 0.4.3 + + + +
+ +
google/cloud-dataplex 0.15.1 + + + +
+ +
google/cloud-dataproc 3.13.2 + + + +
+ +
google/cloud-dataproc-metastore 0.11.3 + + + +
+ +
google/cloud-datastore 1.28.1 + + + +
+ +
google/cloud-datastore-admin 0.8.3 + + + +
+ +
google/cloud-datastream 1.5.3 + + + +
+ +
google/cloud-debugger 1.8.5 + + + +
+ +
google/cloud-deploy 0.18.0 + + + +### Features + +* Add Skaffold remote config support for GCB repos ([#7248](https://github.com/googleapis/google-cloud-php/issues/7248)) ([297615a](https://github.com/googleapis/google-cloud-php/commit/297615a04871d366d425ede8a20a456f41d88bb9)) + + +### Documentation + +* Clarified related comments ([297615a](https://github.com/googleapis/google-cloud-php/commit/297615a04871d366d425ede8a20a456f41d88bb9)) + +
+ +
google/cloud-dialogflow 1.12.1 + + + +
+ +
google/cloud-dialogflow-cx 0.3.2 + + + +
+ +
google/cloud-discoveryengine 0.11.1 + + + +
+ +
google/cloud-dlp 1.13.1 + + + +
+ +
google/cloud-dms 1.5.3 + + + +
+ +
google/cloud-document-ai 1.12.0 + + + +### Features + +* A new field `foundation_model_tuning_options` is added to message `.google.cloud.documentai.v1.TrainProcessorVersionRequest` ([6bec4cc](https://github.com/googleapis/google-cloud-php/commit/6bec4ccb10adaca9d34aec67cc06bede58a8d04f)) +* A new message `FoundationModelTuningOptions` is added ([#7241](https://github.com/googleapis/google-cloud-php/issues/7241)) ([6bec4cc](https://github.com/googleapis/google-cloud-php/commit/6bec4ccb10adaca9d34aec67cc06bede58a8d04f)) + + +### Documentation + +* Updated comments ([6bec4cc](https://github.com/googleapis/google-cloud-php/commit/6bec4ccb10adaca9d34aec67cc06bede58a8d04f)) + +
+ +
google/cloud-domains 0.5.3 + + + +
+ +
google/cloud-edgenetwork 0.3.4 + + + +
+ +
google/cloud-error-reporting 0.22.4 + + + +
+ +
google/cloud-essential-contacts 0.4.3 + + + +
+ +
google/cloud-eventarc 1.3.3 + + + +
+ +
google/cloud-eventarc-publishing 0.6.2 + + + +
+ +
google/cloud-filestore 1.5.5 + + + +
+ +
google/cloud-firestore 1.43.1 + + + +
+ +
google/cloud-functions 1.6.3 + + + +
+ +
google/cloud-gsuite-addons 0.3.3 + + + +
+ +
google/cloud-gke-backup 0.7.1 + + + +
+ +
google/cloud-gke-connect-gateway 0.4.2 + + + +
+ +
google/cloud-gke-hub 0.9.3 + + + +
+ +
google/cloud-gke-multi-cloud 0.5.3 + + + +
+ +
google/grafeas 0.10.1 + + + +
+ +
google/cloud-iam 0.5.3 + + + +
+ +
google/cloud-iam-credentials 1.2.3 + + + +
+ +
google/cloud-iap 1.4.3 + + + +
+ +
google/cloud-ids 0.5.3 + + + +
+ +
google/cloud-iot 1.7.3 + + + +
+ +
google/cloud-kms 1.21.3 + + + +### Documentation + +* In google.cloud.kms.v1.PublicKey, pem field is always populated ([#7240](https://github.com/googleapis/google-cloud-php/issues/7240)) ([704630f](https://github.com/googleapis/google-cloud-php/commit/704630fe93226c27365679e3834450251f44e8dd)) + +
+ +
google/cloud-kms-inventory 0.4.3 + + + +
+ +
google/cloud-language 0.32.4 + + + +
+ +
google/cloud-life-sciences 0.6.3 + + + +
+ +
google/cloud-logging 1.30.0 + + + +### Features + +* **logging:** Add trace to logging on cloud run ([#6764](https://github.com/googleapis/google-cloud-php/issues/6764)) ([2505ec3](https://github.com/googleapis/google-cloud-php/commit/2505ec330ef7cd0d255f5d35a146c3986f19002b)) + +
+ +
google/longrunning 0.4.1 + + + +
+ +
google/cloud-managed-identities 1.3.3 + + + +
+ +
google/cloud-media-translation 0.4.2 + + + +
+ +
google/cloud-memcache 1.3.3 + + + +
+ +
google/cloud-migrationcenter 0.4.3 + + + +
+ +
google/cloud-monitoring 1.10.0 + + + +### Features + +* Added CloudRun, GkeNamespace, GkeWorkload, GkeService, and BasicService service types ([#7237](https://github.com/googleapis/google-cloud-php/issues/7237)) ([f80eb13](https://github.com/googleapis/google-cloud-php/commit/f80eb133b2c866dfc3d92637792ad2147164d523)) + + +### Documentation + +* Updated comments ([2060f2d](https://github.com/googleapis/google-cloud-php/commit/2060f2df4a4fc57d94d00acb274fcc2a9d75952c)) +* Updated comments accordingly ([f80eb13](https://github.com/googleapis/google-cloud-php/commit/f80eb133b2c866dfc3d92637792ad2147164d523)) +* Various updates ([2060f2d](https://github.com/googleapis/google-cloud-php/commit/2060f2df4a4fc57d94d00acb274fcc2a9d75952c)) + +
+ +
google/cloud-netapp 0.2.5 + + + +
+ +
google/cloud-network-connectivity 1.5.3 + + + +
+ +
google/cloud-network-management 1.7.1 + + + +
+ +
google/cloud-network-security 0.6.3 + + + +
+ +
google/cloud-notebooks 0.7.3 + + + +
+ +
google/cloud-optimization 0.6.3 + + + +
+ +
google/cloud-orchestration-airflow 1.6.2 + + + +
+ +
google/cloud-org-policy 0.6.3 + + + +
+ +
google/cloud-osconfig 1.3.3 + + + +
+ +
google/cloud-oslogin 1.9.3 + + + +
+ +
google/cloud-parallelstore 0.1.1 + + + +
+ +
google/cloud-policysimulator 0.2.3 + + + +
+ +
google/cloud-policy-troubleshooter 1.3.2 + + + +
+ +
google/cloud-policytroubleshooter-iam 0.2.3 + + + +
+ +
google/cloud-private-catalog 0.4.2 + + + +
+ +
google/cloud-profiler 1.4.1 + + + +
+ +
google/cloud-pubsub 2.1.1 + + + +
+ +
google/cloud-quotas 0.2.1 + + + +### Documentation + +* Update contact_email doc to not check permission of the email account ([#7247](https://github.com/googleapis/google-cloud-php/issues/7247)) ([10e53e7](https://github.com/googleapis/google-cloud-php/commit/10e53e78e48aab887edea903521e9909dc0d7cc1)) + +
+ +
google/cloud-rapidmigrationassessment 0.3.3 + + + +
+ +
google/cloud-recaptcha-enterprise 1.11.1 + + + +### Documentation + +* Fixed the description of ListFirewallPoliciesResponse ([#7238](https://github.com/googleapis/google-cloud-php/issues/7238)) ([6e75ee1](https://github.com/googleapis/google-cloud-php/commit/6e75ee1d0100aaf992d0bb40d8d08cdca7a30a93)) + +
+ +
google/cloud-recommendations-ai 0.7.3 + + + +
+ +
google/cloud-recommender 1.11.3 + + + +
+ +
google/cloud-redis 1.9.3 + + + +
+ +
google/cloud-redis-cluster 0.2.3 + + + +
+ +
google/cloud-resource-manager 0.8.3 + + + +
+ +
google/cloud-resource-settings 1.2.3 + + + +
+ +
google/cloud-retail 1.6.2 + + + +
+ +
google/cloud-run 0.9.1 + + + +
+ +
google/cloud-scheduler 1.10.3 + + + +
+ +
google/cloud-secret-manager 1.14.2 + + + +
+ +
google/cloud-securesourcemanager 0.2.3 + + + +
+ +
google/cloud-security-center 1.28.0 + + + +### Features + +* Add cloud_armor field to finding's list of attributes ([#7242](https://github.com/googleapis/google-cloud-php/issues/7242)) ([06be47c](https://github.com/googleapis/google-cloud-php/commit/06be47c5a18ccec2953962672e4cebe5c7735f6f)) + +
+ +
google/cloud-securitycentermanagement 0.2.6 + + + +
+ +
google/cloud-security-private-ca 1.7.1 + + + +
+ +
google/cloud-security-public-ca 0.3.3 + + + +
+ +
google/cloud-service-control 1.4.2 + + + +
+ +
google/cloud-service-directory 1.3.3 + + + +
+ +
google/cloud-servicehealth 0.1.4 + + + +
+ +
google/cloud-service-management 1.3.3 + + + +
+ +
google/cloud-service-usage 1.3.2 + + + +
+ +
google/cloud-shell 1.3.3 + + + +
+ +
google/shopping-css 0.2.4 + + + +
+ +
google/shopping-merchant-inventories 0.4.1 + + + +
+ +
google/shopping-merchant-quota 0.1.1 + + + +
+ +
google/shopping-merchant-reports 0.7.1 + + + +
+ +
google/cloud-spanner 1.75.2 + + + +
+ +
google/cloud-speech 1.18.1 + + + +
+ +
google/cloud-sql-admin 0.16.1 + + + +
+ +
google/cloud-storage 1.41.3 + + + +
+ +
google/cloud-storageinsights 0.3.3 + + + +
+ +
google/cloud-storage-transfer 1.4.3 + + + +
+ +
google/cloud-support 0.2.3 + + + +
+ +
google/cloud-talent 1.3.3 + + + +
+ +
google/cloud-tasks 1.14.4 + + + +
+ +
google/cloud-telcoautomation 0.2.3 + + + +
+ +
google/cloud-text-to-speech 1.8.3 + + + +
+ +
google/cloud-tpu 1.4.3 + + + +
+ +
google/cloud-trace 1.8.4 + + + +
+ +
google/cloud-translate 1.17.5 + + + +
+ +
google/cloud-videointelligence 1.15.3 + + + +
+ +
google/cloud-video-live-stream 0.7.3 + + + +
+ +
google/cloud-video-stitcher 0.8.3 + + + +
+ +
google/cloud-video-transcoder 0.10.3 + + + +
+ +
google/cloud-vision 1.9.2 + + + +
+ +
google/cloud-vm-migration 0.6.3 + + + +
+ +
google/cloud-vmware-engine 0.5.4 + + + +
+ +
google/cloud-vpc-access 1.3.3 + + + +
+ +
google/cloud-web-risk 1.5.3 + + + +
+ +
google/cloud-web-security-scanner 0.8.3 + + + +
+ +
google/cloud-workflows 0.5.3 + + + +
+ ## 0.241.0
google/cloud-batch 0.16.5 diff --git a/CertificateManager/VERSION b/CertificateManager/VERSION index faef31a4357c..39e898a4f952 100644 --- a/CertificateManager/VERSION +++ b/CertificateManager/VERSION @@ -1 +1 @@ -0.7.0 +0.7.1 diff --git a/Channel/VERSION b/Channel/VERSION index 8fdcf3869464..77fee73a8cf9 100644 --- a/Channel/VERSION +++ b/Channel/VERSION @@ -1 +1 @@ -1.9.2 +1.9.3 diff --git a/CommerceConsumerProcurement/VERSION b/CommerceConsumerProcurement/VERSION index ee1372d33a29..7179039691ce 100644 --- a/CommerceConsumerProcurement/VERSION +++ b/CommerceConsumerProcurement/VERSION @@ -1 +1 @@ -0.2.2 +0.2.3 diff --git a/Compute/VERSION b/Compute/VERSION index 15b989e398fc..41c11ffb730c 100644 --- a/Compute/VERSION +++ b/Compute/VERSION @@ -1 +1 @@ -1.16.0 +1.16.1 diff --git a/ConfidentialComputing/VERSION b/ConfidentialComputing/VERSION index a3df0a6959e1..6f4eebdf6f68 100644 --- a/ConfidentialComputing/VERSION +++ b/ConfidentialComputing/VERSION @@ -1 +1 @@ -0.8.0 +0.8.1 diff --git a/Config/VERSION b/Config/VERSION index 1d0ba9ea182b..267577d47e49 100644 --- a/Config/VERSION +++ b/Config/VERSION @@ -1 +1 @@ -0.4.0 +0.4.1 diff --git a/ContactCenterInsights/VERSION b/ContactCenterInsights/VERSION index 8fdcf3869464..77fee73a8cf9 100644 --- a/ContactCenterInsights/VERSION +++ b/ContactCenterInsights/VERSION @@ -1 +1 @@ -1.9.2 +1.9.3 diff --git a/Container/VERSION b/Container/VERSION index 034552a83eeb..7f3c3affd72c 100644 --- a/Container/VERSION +++ b/Container/VERSION @@ -1 +1 @@ -1.30.0 +1.30.1 diff --git a/ContainerAnalysis/VERSION b/ContainerAnalysis/VERSION index 7d8568351b4f..d1d899fa33a0 100644 --- a/ContainerAnalysis/VERSION +++ b/ContainerAnalysis/VERSION @@ -1 +1 @@ -0.5.4 +0.5.5 diff --git a/ControlsPartner/VERSION b/ControlsPartner/VERSION index 6e8bf73aa550..17e51c385ea3 100644 --- a/ControlsPartner/VERSION +++ b/ControlsPartner/VERSION @@ -1 +1 @@ -0.1.0 +0.1.1 diff --git a/Core/VERSION b/Core/VERSION index 373aea97570a..79f82f6b8e0c 100644 --- a/Core/VERSION +++ b/Core/VERSION @@ -1 +1 @@ -1.57.0 +1.58.0 diff --git a/DataCatalog/VERSION b/DataCatalog/VERSION index 81c871de46b3..4dae2985b58c 100644 --- a/DataCatalog/VERSION +++ b/DataCatalog/VERSION @@ -1 +1 @@ -1.10.0 +1.10.1 diff --git a/DataCatalogLineage/VERSION b/DataCatalogLineage/VERSION index cb0c939a936f..be14282b7fff 100644 --- a/DataCatalogLineage/VERSION +++ b/DataCatalogLineage/VERSION @@ -1 +1 @@ -0.5.2 +0.5.3 diff --git a/DataFusion/VERSION b/DataFusion/VERSION index b6160487433b..844f6a91acb9 100644 --- a/DataFusion/VERSION +++ b/DataFusion/VERSION @@ -1 +1 @@ -0.6.2 +0.6.3 diff --git a/DataLabeling/VERSION b/DataLabeling/VERSION index cb0c939a936f..be14282b7fff 100644 --- a/DataLabeling/VERSION +++ b/DataLabeling/VERSION @@ -1 +1 @@ -0.5.2 +0.5.3 diff --git a/Dataflow/VERSION b/Dataflow/VERSION index ee6cdce3c290..b6160487433b 100644 --- a/Dataflow/VERSION +++ b/Dataflow/VERSION @@ -1 +1 @@ -0.6.1 +0.6.2 diff --git a/Dataform/VERSION b/Dataform/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/Dataform/VERSION +++ b/Dataform/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/Dataplex/VERSION b/Dataplex/VERSION index a5510516948f..e815b861f023 100644 --- a/Dataplex/VERSION +++ b/Dataplex/VERSION @@ -1 +1 @@ -0.15.0 +0.15.1 diff --git a/Dataproc/VERSION b/Dataproc/VERSION index c10780c628ad..3e388a4ac94a 100644 --- a/Dataproc/VERSION +++ b/Dataproc/VERSION @@ -1 +1 @@ -3.13.1 +3.13.2 diff --git a/DataprocMetastore/VERSION b/DataprocMetastore/VERSION index bc859cbd6d99..1a96df19c09a 100644 --- a/DataprocMetastore/VERSION +++ b/DataprocMetastore/VERSION @@ -1 +1 @@ -0.11.2 +0.11.3 diff --git a/Datastore/VERSION b/Datastore/VERSION index cfc730712d5d..450a687b2dae 100644 --- a/Datastore/VERSION +++ b/Datastore/VERSION @@ -1 +1 @@ -1.28.0 +1.28.1 diff --git a/Datastore/src/DatastoreClient.php b/Datastore/src/DatastoreClient.php index be00366fbc97..45b3e055c4d8 100644 --- a/Datastore/src/DatastoreClient.php +++ b/Datastore/src/DatastoreClient.php @@ -92,7 +92,7 @@ class DatastoreClient use ClientTrait; use DatastoreTrait; - const VERSION = '1.28.0'; + const VERSION = '1.28.1'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/datastore'; diff --git a/DatastoreAdmin/VERSION b/DatastoreAdmin/VERSION index 100435be135a..ee94dd834b53 100644 --- a/DatastoreAdmin/VERSION +++ b/DatastoreAdmin/VERSION @@ -1 +1 @@ -0.8.2 +0.8.3 diff --git a/Datastream/VERSION b/Datastream/VERSION index 4cda8f19edc7..8af85beb5159 100644 --- a/Datastream/VERSION +++ b/Datastream/VERSION @@ -1 +1 @@ -1.5.2 +1.5.3 diff --git a/Debugger/VERSION b/Debugger/VERSION index bfa363e76ed7..8decb929b986 100644 --- a/Debugger/VERSION +++ b/Debugger/VERSION @@ -1 +1 @@ -1.8.4 +1.8.5 diff --git a/Debugger/src/DebuggerClient.php b/Debugger/src/DebuggerClient.php index 8e7e46c614a7..54db26e5d2ce 100644 --- a/Debugger/src/DebuggerClient.php +++ b/Debugger/src/DebuggerClient.php @@ -40,7 +40,7 @@ class DebuggerClient { use ClientTrait; - const VERSION = '1.8.4'; + const VERSION = '1.8.5'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/cloud-platform'; const READ_ONLY_SCOPE = 'https://www.googleapis.com/auth/debugger.readonly'; diff --git a/Deploy/VERSION b/Deploy/VERSION index c3d16c1646bd..66333910a4be 100644 --- a/Deploy/VERSION +++ b/Deploy/VERSION @@ -1 +1 @@ -0.17.2 +0.18.0 diff --git a/Dialogflow/VERSION b/Dialogflow/VERSION index 0eed1a29efd6..f8f4f03b3dcc 100644 --- a/Dialogflow/VERSION +++ b/Dialogflow/VERSION @@ -1 +1 @@ -1.12.0 +1.12.1 diff --git a/DialogflowCx/VERSION b/DialogflowCx/VERSION index 9e11b32fcaa9..d15723fbe8de 100644 --- a/DialogflowCx/VERSION +++ b/DialogflowCx/VERSION @@ -1 +1 @@ -0.3.1 +0.3.2 diff --git a/DiscoveryEngine/VERSION b/DiscoveryEngine/VERSION index d9df1bbc0c7b..af88ba824866 100644 --- a/DiscoveryEngine/VERSION +++ b/DiscoveryEngine/VERSION @@ -1 +1 @@ -0.11.0 +0.11.1 diff --git a/Dlp/VERSION b/Dlp/VERSION index feaae22bac7e..b50dd27dd92e 100644 --- a/Dlp/VERSION +++ b/Dlp/VERSION @@ -1 +1 @@ -1.13.0 +1.13.1 diff --git a/Dms/VERSION b/Dms/VERSION index 4cda8f19edc7..8af85beb5159 100644 --- a/Dms/VERSION +++ b/Dms/VERSION @@ -1 +1 @@ -1.5.2 +1.5.3 diff --git a/DocumentAi/VERSION b/DocumentAi/VERSION index 720c7384c619..0eed1a29efd6 100644 --- a/DocumentAi/VERSION +++ b/DocumentAi/VERSION @@ -1 +1 @@ -1.11.1 +1.12.0 diff --git a/Domains/VERSION b/Domains/VERSION index cb0c939a936f..be14282b7fff 100644 --- a/Domains/VERSION +++ b/Domains/VERSION @@ -1 +1 @@ -0.5.2 +0.5.3 diff --git a/EdgeNetwork/VERSION b/EdgeNetwork/VERSION index 1c09c74e221c..42045acae20f 100644 --- a/EdgeNetwork/VERSION +++ b/EdgeNetwork/VERSION @@ -1 +1 @@ -0.3.3 +0.3.4 diff --git a/ErrorReporting/VERSION b/ErrorReporting/VERSION index d90746a79af3..4240544f330c 100644 --- a/ErrorReporting/VERSION +++ b/ErrorReporting/VERSION @@ -1 +1 @@ -0.22.3 +0.22.4 diff --git a/EssentialContacts/VERSION b/EssentialContacts/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/EssentialContacts/VERSION +++ b/EssentialContacts/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/Eventarc/VERSION b/Eventarc/VERSION index 1892b9267677..31e5c843497c 100644 --- a/Eventarc/VERSION +++ b/Eventarc/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/EventarcPublishing/VERSION b/EventarcPublishing/VERSION index ee6cdce3c290..b6160487433b 100644 --- a/EventarcPublishing/VERSION +++ b/EventarcPublishing/VERSION @@ -1 +1 @@ -0.6.1 +0.6.2 diff --git a/Filestore/VERSION b/Filestore/VERSION index 94fe62c2740f..9075be495155 100644 --- a/Filestore/VERSION +++ b/Filestore/VERSION @@ -1 +1 @@ -1.5.4 +1.5.5 diff --git a/Firestore/VERSION b/Firestore/VERSION index b978278f05f5..3987c472943e 100644 --- a/Firestore/VERSION +++ b/Firestore/VERSION @@ -1 +1 @@ -1.43.0 +1.43.1 diff --git a/Firestore/src/FirestoreClient.php b/Firestore/src/FirestoreClient.php index 472f865cce52..6a40f213eaa7 100644 --- a/Firestore/src/FirestoreClient.php +++ b/Firestore/src/FirestoreClient.php @@ -75,7 +75,7 @@ class FirestoreClient use SnapshotTrait; use ValidateTrait; - const VERSION = '1.43.0'; + const VERSION = '1.43.1'; const DEFAULT_DATABASE = '(default)'; diff --git a/Functions/VERSION b/Functions/VERSION index fdd3be6df54a..266146b87cbc 100644 --- a/Functions/VERSION +++ b/Functions/VERSION @@ -1 +1 @@ -1.6.2 +1.6.3 diff --git a/GSuiteAddOns/VERSION b/GSuiteAddOns/VERSION index d15723fbe8de..1c09c74e221c 100644 --- a/GSuiteAddOns/VERSION +++ b/GSuiteAddOns/VERSION @@ -1 +1 @@ -0.3.2 +0.3.3 diff --git a/GkeBackup/VERSION b/GkeBackup/VERSION index faef31a4357c..39e898a4f952 100644 --- a/GkeBackup/VERSION +++ b/GkeBackup/VERSION @@ -1 +1 @@ -0.7.0 +0.7.1 diff --git a/GkeConnectGateway/VERSION b/GkeConnectGateway/VERSION index 267577d47e49..2b7c5ae01848 100644 --- a/GkeConnectGateway/VERSION +++ b/GkeConnectGateway/VERSION @@ -1 +1 @@ -0.4.1 +0.4.2 diff --git a/GkeHub/VERSION b/GkeHub/VERSION index 2003b639c400..965065db5b84 100644 --- a/GkeHub/VERSION +++ b/GkeHub/VERSION @@ -1 +1 @@ -0.9.2 +0.9.3 diff --git a/GkeMultiCloud/VERSION b/GkeMultiCloud/VERSION index cb0c939a936f..be14282b7fff 100644 --- a/GkeMultiCloud/VERSION +++ b/GkeMultiCloud/VERSION @@ -1 +1 @@ -0.5.2 +0.5.3 diff --git a/Grafeas/VERSION b/Grafeas/VERSION index 78bc1abd14f2..571215736a66 100644 --- a/Grafeas/VERSION +++ b/Grafeas/VERSION @@ -1 +1 @@ -0.10.0 +0.10.1 diff --git a/Iam/VERSION b/Iam/VERSION index cb0c939a936f..be14282b7fff 100644 --- a/Iam/VERSION +++ b/Iam/VERSION @@ -1 +1 @@ -0.5.2 +0.5.3 diff --git a/IamCredentials/VERSION b/IamCredentials/VERSION index 23aa8390630c..0495c4a88cae 100644 --- a/IamCredentials/VERSION +++ b/IamCredentials/VERSION @@ -1 +1 @@ -1.2.2 +1.2.3 diff --git a/Iap/VERSION b/Iap/VERSION index 9df886c42a1e..428b770e3e23 100644 --- a/Iap/VERSION +++ b/Iap/VERSION @@ -1 +1 @@ -1.4.2 +1.4.3 diff --git a/Ids/VERSION b/Ids/VERSION index cb0c939a936f..be14282b7fff 100644 --- a/Ids/VERSION +++ b/Ids/VERSION @@ -1 +1 @@ -0.5.2 +0.5.3 diff --git a/Iot/VERSION b/Iot/VERSION index f8a696c8dc56..661e7aeadf36 100644 --- a/Iot/VERSION +++ b/Iot/VERSION @@ -1 +1 @@ -1.7.2 +1.7.3 diff --git a/Kms/VERSION b/Kms/VERSION index 0369d0b1e932..bae5c7f667c9 100644 --- a/Kms/VERSION +++ b/Kms/VERSION @@ -1 +1 @@ -1.21.2 +1.21.3 diff --git a/KmsInventory/VERSION b/KmsInventory/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/KmsInventory/VERSION +++ b/KmsInventory/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/Language/VERSION b/Language/VERSION index d721c76847ae..eb7713622c21 100644 --- a/Language/VERSION +++ b/Language/VERSION @@ -1 +1 @@ -0.32.3 +0.32.4 diff --git a/Language/src/LanguageClient.php b/Language/src/LanguageClient.php index 4f568d5a24c2..da5050b90376 100644 --- a/Language/src/LanguageClient.php +++ b/Language/src/LanguageClient.php @@ -46,7 +46,7 @@ class LanguageClient ClientTrait::jsonDecode insteadof RetryDeciderTrait; } - const VERSION = '0.32.3'; + const VERSION = '0.32.4'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/cloud-platform'; diff --git a/LifeSciences/VERSION b/LifeSciences/VERSION index b6160487433b..844f6a91acb9 100644 --- a/LifeSciences/VERSION +++ b/LifeSciences/VERSION @@ -1 +1 @@ -0.6.2 +0.6.3 diff --git a/Logging/VERSION b/Logging/VERSION index 93f9beed36e7..034552a83eeb 100644 --- a/Logging/VERSION +++ b/Logging/VERSION @@ -1 +1 @@ -1.29.4 +1.30.0 diff --git a/Logging/src/LoggingClient.php b/Logging/src/LoggingClient.php index 4431a271a48d..4279511b1168 100644 --- a/Logging/src/LoggingClient.php +++ b/Logging/src/LoggingClient.php @@ -70,7 +70,7 @@ class LoggingClient use ArrayTrait; use ClientTrait; - const VERSION = '1.29.4'; + const VERSION = '1.30.0'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/logging.admin'; const READ_ONLY_SCOPE = 'https://www.googleapis.com/auth/logging.read'; diff --git a/LongRunning/VERSION b/LongRunning/VERSION index 1d0ba9ea182b..267577d47e49 100644 --- a/LongRunning/VERSION +++ b/LongRunning/VERSION @@ -1 +1 @@ -0.4.0 +0.4.1 diff --git a/LongRunning/composer.json b/LongRunning/composer.json index 8a7dae7bae9e..55971d8a6ab3 100644 --- a/LongRunning/composer.json +++ b/LongRunning/composer.json @@ -3,7 +3,7 @@ "description": "Google LongRunning Client for PHP", "license": "Apache-2.0", "minimum-stability": "stable", - "version": "0.4.0", + "version": "0.4.1", "autoload": { "psr-4": { "Google\\ApiCore\\LongRunning\\": "src/ApiCore/LongRunning", diff --git a/ManagedIdentities/VERSION b/ManagedIdentities/VERSION index 1892b9267677..31e5c843497c 100644 --- a/ManagedIdentities/VERSION +++ b/ManagedIdentities/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/MediaTranslation/VERSION b/MediaTranslation/VERSION index 267577d47e49..2b7c5ae01848 100644 --- a/MediaTranslation/VERSION +++ b/MediaTranslation/VERSION @@ -1 +1 @@ -0.4.1 +0.4.2 diff --git a/Memcache/VERSION b/Memcache/VERSION index 1892b9267677..31e5c843497c 100644 --- a/Memcache/VERSION +++ b/Memcache/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/MigrationCenter/VERSION b/MigrationCenter/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/MigrationCenter/VERSION +++ b/MigrationCenter/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/Monitoring/VERSION b/Monitoring/VERSION index 8fdcf3869464..81c871de46b3 100644 --- a/Monitoring/VERSION +++ b/Monitoring/VERSION @@ -1 +1 @@ -1.9.2 +1.10.0 diff --git a/NetApp/VERSION b/NetApp/VERSION index abd410582dea..3a4036fb450f 100644 --- a/NetApp/VERSION +++ b/NetApp/VERSION @@ -1 +1 @@ -0.2.4 +0.2.5 diff --git a/NetworkConnectivity/VERSION b/NetworkConnectivity/VERSION index 4cda8f19edc7..8af85beb5159 100644 --- a/NetworkConnectivity/VERSION +++ b/NetworkConnectivity/VERSION @@ -1 +1 @@ -1.5.2 +1.5.3 diff --git a/NetworkManagement/VERSION b/NetworkManagement/VERSION index bd8bf882d061..943f9cbc4ec7 100644 --- a/NetworkManagement/VERSION +++ b/NetworkManagement/VERSION @@ -1 +1 @@ -1.7.0 +1.7.1 diff --git a/NetworkSecurity/VERSION b/NetworkSecurity/VERSION index b6160487433b..844f6a91acb9 100644 --- a/NetworkSecurity/VERSION +++ b/NetworkSecurity/VERSION @@ -1 +1 @@ -0.6.2 +0.6.3 diff --git a/Notebooks/VERSION b/Notebooks/VERSION index 7486fdbc50b3..f38fc5393ff6 100644 --- a/Notebooks/VERSION +++ b/Notebooks/VERSION @@ -1 +1 @@ -0.7.2 +0.7.3 diff --git a/Optimization/VERSION b/Optimization/VERSION index b6160487433b..844f6a91acb9 100644 --- a/Optimization/VERSION +++ b/Optimization/VERSION @@ -1 +1 @@ -0.6.2 +0.6.3 diff --git a/OrchestrationAirflow/VERSION b/OrchestrationAirflow/VERSION index 9c6d6293b1a8..fdd3be6df54a 100644 --- a/OrchestrationAirflow/VERSION +++ b/OrchestrationAirflow/VERSION @@ -1 +1 @@ -1.6.1 +1.6.2 diff --git a/OrgPolicy/VERSION b/OrgPolicy/VERSION index b6160487433b..844f6a91acb9 100644 --- a/OrgPolicy/VERSION +++ b/OrgPolicy/VERSION @@ -1 +1 @@ -0.6.2 +0.6.3 diff --git a/OsConfig/VERSION b/OsConfig/VERSION index 1892b9267677..31e5c843497c 100644 --- a/OsConfig/VERSION +++ b/OsConfig/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/OsLogin/VERSION b/OsLogin/VERSION index 8fdcf3869464..77fee73a8cf9 100644 --- a/OsLogin/VERSION +++ b/OsLogin/VERSION @@ -1 +1 @@ -1.9.2 +1.9.3 diff --git a/Parallelstore/VERSION b/Parallelstore/VERSION index 6e8bf73aa550..17e51c385ea3 100644 --- a/Parallelstore/VERSION +++ b/Parallelstore/VERSION @@ -1 +1 @@ -0.1.0 +0.1.1 diff --git a/PolicySimulator/VERSION b/PolicySimulator/VERSION index ee1372d33a29..7179039691ce 100644 --- a/PolicySimulator/VERSION +++ b/PolicySimulator/VERSION @@ -1 +1 @@ -0.2.2 +0.2.3 diff --git a/PolicyTroubleshooter/VERSION b/PolicyTroubleshooter/VERSION index 3a3cd8cc8b07..1892b9267677 100644 --- a/PolicyTroubleshooter/VERSION +++ b/PolicyTroubleshooter/VERSION @@ -1 +1 @@ -1.3.1 +1.3.2 diff --git a/PolicyTroubleshooterIam/VERSION b/PolicyTroubleshooterIam/VERSION index ee1372d33a29..7179039691ce 100644 --- a/PolicyTroubleshooterIam/VERSION +++ b/PolicyTroubleshooterIam/VERSION @@ -1 +1 @@ -0.2.2 +0.2.3 diff --git a/PrivateCatalog/VERSION b/PrivateCatalog/VERSION index 267577d47e49..2b7c5ae01848 100644 --- a/PrivateCatalog/VERSION +++ b/PrivateCatalog/VERSION @@ -1 +1 @@ -0.4.1 +0.4.2 diff --git a/Profiler/VERSION b/Profiler/VERSION index 88c5fb891dcf..347f5833ee6d 100644 --- a/Profiler/VERSION +++ b/Profiler/VERSION @@ -1 +1 @@ -1.4.0 +1.4.1 diff --git a/PubSub/VERSION b/PubSub/VERSION index 7ec1d6db4087..3e3c2f1e5edb 100644 --- a/PubSub/VERSION +++ b/PubSub/VERSION @@ -1 +1 @@ -2.1.0 +2.1.1 diff --git a/Quotas/VERSION b/Quotas/VERSION index 0ea3a944b399..0c62199f16ac 100644 --- a/Quotas/VERSION +++ b/Quotas/VERSION @@ -1 +1 @@ -0.2.0 +0.2.1 diff --git a/RapidMigrationAssessment/VERSION b/RapidMigrationAssessment/VERSION index d15723fbe8de..1c09c74e221c 100644 --- a/RapidMigrationAssessment/VERSION +++ b/RapidMigrationAssessment/VERSION @@ -1 +1 @@ -0.3.2 +0.3.3 diff --git a/RecaptchaEnterprise/VERSION b/RecaptchaEnterprise/VERSION index 1cac385c6cb8..720c7384c619 100644 --- a/RecaptchaEnterprise/VERSION +++ b/RecaptchaEnterprise/VERSION @@ -1 +1 @@ -1.11.0 +1.11.1 diff --git a/RecommendationEngine/VERSION b/RecommendationEngine/VERSION index 7486fdbc50b3..f38fc5393ff6 100644 --- a/RecommendationEngine/VERSION +++ b/RecommendationEngine/VERSION @@ -1 +1 @@ -0.7.2 +0.7.3 diff --git a/Recommender/VERSION b/Recommender/VERSION index ca7176690dd6..0a5af26df3fd 100644 --- a/Recommender/VERSION +++ b/Recommender/VERSION @@ -1 +1 @@ -1.11.2 +1.11.3 diff --git a/Redis/VERSION b/Redis/VERSION index 8fdcf3869464..77fee73a8cf9 100644 --- a/Redis/VERSION +++ b/Redis/VERSION @@ -1 +1 @@ -1.9.2 +1.9.3 diff --git a/RedisCluster/VERSION b/RedisCluster/VERSION index ee1372d33a29..7179039691ce 100644 --- a/RedisCluster/VERSION +++ b/RedisCluster/VERSION @@ -1 +1 @@ -0.2.2 +0.2.3 diff --git a/ResourceManager/VERSION b/ResourceManager/VERSION index 100435be135a..ee94dd834b53 100644 --- a/ResourceManager/VERSION +++ b/ResourceManager/VERSION @@ -1 +1 @@ -0.8.2 +0.8.3 diff --git a/ResourceSettings/VERSION b/ResourceSettings/VERSION index 23aa8390630c..0495c4a88cae 100644 --- a/ResourceSettings/VERSION +++ b/ResourceSettings/VERSION @@ -1 +1 @@ -1.2.2 +1.2.3 diff --git a/Retail/VERSION b/Retail/VERSION index 9c6d6293b1a8..fdd3be6df54a 100644 --- a/Retail/VERSION +++ b/Retail/VERSION @@ -1 +1 @@ -1.6.1 +1.6.2 diff --git a/Run/VERSION b/Run/VERSION index ac39a106c485..f374f6662e9a 100644 --- a/Run/VERSION +++ b/Run/VERSION @@ -1 +1 @@ -0.9.0 +0.9.1 diff --git a/Scheduler/VERSION b/Scheduler/VERSION index 5ad2491cf880..587c5f0c7309 100644 --- a/Scheduler/VERSION +++ b/Scheduler/VERSION @@ -1 +1 @@ -1.10.2 +1.10.3 diff --git a/SecretManager/VERSION b/SecretManager/VERSION index 63e799cf451b..a4cc55716f5d 100644 --- a/SecretManager/VERSION +++ b/SecretManager/VERSION @@ -1 +1 @@ -1.14.1 +1.14.2 diff --git a/SecureSourceManager/VERSION b/SecureSourceManager/VERSION index ee1372d33a29..7179039691ce 100644 --- a/SecureSourceManager/VERSION +++ b/SecureSourceManager/VERSION @@ -1 +1 @@ -0.2.2 +0.2.3 diff --git a/SecurityCenter/VERSION b/SecurityCenter/VERSION index 5db08bf2dc57..cfc730712d5d 100644 --- a/SecurityCenter/VERSION +++ b/SecurityCenter/VERSION @@ -1 +1 @@ -1.27.0 +1.28.0 diff --git a/SecurityCenterManagement/VERSION b/SecurityCenterManagement/VERSION index 3a4036fb450f..53a75d673557 100644 --- a/SecurityCenterManagement/VERSION +++ b/SecurityCenterManagement/VERSION @@ -1 +1 @@ -0.2.5 +0.2.6 diff --git a/SecurityPrivateCa/VERSION b/SecurityPrivateCa/VERSION index bd8bf882d061..943f9cbc4ec7 100644 --- a/SecurityPrivateCa/VERSION +++ b/SecurityPrivateCa/VERSION @@ -1 +1 @@ -1.7.0 +1.7.1 diff --git a/SecurityPublicCA/VERSION b/SecurityPublicCA/VERSION index d15723fbe8de..1c09c74e221c 100644 --- a/SecurityPublicCA/VERSION +++ b/SecurityPublicCA/VERSION @@ -1 +1 @@ -0.3.2 +0.3.3 diff --git a/ServiceControl/VERSION b/ServiceControl/VERSION index 347f5833ee6d..9df886c42a1e 100644 --- a/ServiceControl/VERSION +++ b/ServiceControl/VERSION @@ -1 +1 @@ -1.4.1 +1.4.2 diff --git a/ServiceDirectory/VERSION b/ServiceDirectory/VERSION index 1892b9267677..31e5c843497c 100644 --- a/ServiceDirectory/VERSION +++ b/ServiceDirectory/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/ServiceHealth/VERSION b/ServiceHealth/VERSION index b1e80bb2480a..845639eef26c 100644 --- a/ServiceHealth/VERSION +++ b/ServiceHealth/VERSION @@ -1 +1 @@ -0.1.3 +0.1.4 diff --git a/ServiceManagement/VERSION b/ServiceManagement/VERSION index 1892b9267677..31e5c843497c 100644 --- a/ServiceManagement/VERSION +++ b/ServiceManagement/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/ServiceUsage/VERSION b/ServiceUsage/VERSION index 3a3cd8cc8b07..1892b9267677 100644 --- a/ServiceUsage/VERSION +++ b/ServiceUsage/VERSION @@ -1 +1 @@ -1.3.1 +1.3.2 diff --git a/Shell/VERSION b/Shell/VERSION index 1892b9267677..31e5c843497c 100644 --- a/Shell/VERSION +++ b/Shell/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/ShoppingCss/VERSION b/ShoppingCss/VERSION index 7179039691ce..abd410582dea 100644 --- a/ShoppingCss/VERSION +++ b/ShoppingCss/VERSION @@ -1 +1 @@ -0.2.3 +0.2.4 diff --git a/ShoppingMerchantInventories/VERSION b/ShoppingMerchantInventories/VERSION index 1d0ba9ea182b..267577d47e49 100644 --- a/ShoppingMerchantInventories/VERSION +++ b/ShoppingMerchantInventories/VERSION @@ -1 +1 @@ -0.4.0 +0.4.1 diff --git a/ShoppingMerchantQuota/VERSION b/ShoppingMerchantQuota/VERSION index 6e8bf73aa550..17e51c385ea3 100644 --- a/ShoppingMerchantQuota/VERSION +++ b/ShoppingMerchantQuota/VERSION @@ -1 +1 @@ -0.1.0 +0.1.1 diff --git a/ShoppingMerchantReports/VERSION b/ShoppingMerchantReports/VERSION index faef31a4357c..39e898a4f952 100644 --- a/ShoppingMerchantReports/VERSION +++ b/ShoppingMerchantReports/VERSION @@ -1 +1 @@ -0.7.0 +0.7.1 diff --git a/Spanner/VERSION b/Spanner/VERSION index e1e86acb2353..008463d94849 100644 --- a/Spanner/VERSION +++ b/Spanner/VERSION @@ -1 +1 @@ -1.75.1 +1.75.2 diff --git a/Spanner/src/SpannerClient.php b/Spanner/src/SpannerClient.php index 3a00bdabf911..73541a14187a 100644 --- a/Spanner/src/SpannerClient.php +++ b/Spanner/src/SpannerClient.php @@ -120,7 +120,7 @@ class SpannerClient use LROTrait; use ValidateTrait; - const VERSION = '1.75.1'; + const VERSION = '1.75.2'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/spanner.data'; const ADMIN_SCOPE = 'https://www.googleapis.com/auth/spanner.admin'; diff --git a/Speech/VERSION b/Speech/VERSION index 84cc529467b0..ec6d649be650 100644 --- a/Speech/VERSION +++ b/Speech/VERSION @@ -1 +1 @@ -1.18.0 +1.18.1 diff --git a/Speech/src/SpeechClient.php b/Speech/src/SpeechClient.php index 25d7a88a9230..45bbf27da601 100644 --- a/Speech/src/SpeechClient.php +++ b/Speech/src/SpeechClient.php @@ -50,7 +50,7 @@ class SpeechClient { use ClientTrait; - const VERSION = '1.18.0'; + const VERSION = '1.18.1'; const SCOPE = 'https://www.googleapis.com/auth/cloud-platform'; diff --git a/SqlAdmin/VERSION b/SqlAdmin/VERSION index 04a373efe6ba..2a0970ca757c 100644 --- a/SqlAdmin/VERSION +++ b/SqlAdmin/VERSION @@ -1 +1 @@ -0.16.0 +0.16.1 diff --git a/Storage/VERSION b/Storage/VERSION index 5f24410720f5..021b2b85fea5 100644 --- a/Storage/VERSION +++ b/Storage/VERSION @@ -1 +1 @@ -1.41.2 +1.41.3 diff --git a/Storage/src/StorageClient.php b/Storage/src/StorageClient.php index d82b9c6a2c2c..b4945a63b26d 100644 --- a/Storage/src/StorageClient.php +++ b/Storage/src/StorageClient.php @@ -47,7 +47,7 @@ class StorageClient use ArrayTrait; use ClientTrait; - const VERSION = '1.41.2'; + const VERSION = '1.41.3'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/devstorage.full_control'; const READ_ONLY_SCOPE = 'https://www.googleapis.com/auth/devstorage.read_only'; diff --git a/StorageInsights/VERSION b/StorageInsights/VERSION index d15723fbe8de..1c09c74e221c 100644 --- a/StorageInsights/VERSION +++ b/StorageInsights/VERSION @@ -1 +1 @@ -0.3.2 +0.3.3 diff --git a/StorageTransfer/VERSION b/StorageTransfer/VERSION index 9df886c42a1e..428b770e3e23 100644 --- a/StorageTransfer/VERSION +++ b/StorageTransfer/VERSION @@ -1 +1 @@ -1.4.2 +1.4.3 diff --git a/Support/VERSION b/Support/VERSION index ee1372d33a29..7179039691ce 100644 --- a/Support/VERSION +++ b/Support/VERSION @@ -1 +1 @@ -0.2.2 +0.2.3 diff --git a/Talent/VERSION b/Talent/VERSION index 1892b9267677..31e5c843497c 100644 --- a/Talent/VERSION +++ b/Talent/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/Tasks/VERSION b/Tasks/VERSION index 4ea8ad87e6e4..4e00d0ac0791 100644 --- a/Tasks/VERSION +++ b/Tasks/VERSION @@ -1 +1 @@ -1.14.3 +1.14.4 diff --git a/TelcoAutomation/VERSION b/TelcoAutomation/VERSION index ee1372d33a29..7179039691ce 100644 --- a/TelcoAutomation/VERSION +++ b/TelcoAutomation/VERSION @@ -1 +1 @@ -0.2.2 +0.2.3 diff --git a/TextToSpeech/VERSION b/TextToSpeech/VERSION index 53adb84c8220..a7ee35a3ea70 100644 --- a/TextToSpeech/VERSION +++ b/TextToSpeech/VERSION @@ -1 +1 @@ -1.8.2 +1.8.3 diff --git a/Tpu/VERSION b/Tpu/VERSION index 9df886c42a1e..428b770e3e23 100644 --- a/Tpu/VERSION +++ b/Tpu/VERSION @@ -1 +1 @@ -1.4.2 +1.4.3 diff --git a/Trace/VERSION b/Trace/VERSION index a7ee35a3ea70..bfa363e76ed7 100644 --- a/Trace/VERSION +++ b/Trace/VERSION @@ -1 +1 @@ -1.8.3 +1.8.4 diff --git a/Trace/src/TraceClient.php b/Trace/src/TraceClient.php index 8f50841557b9..fb4fac5f3ec2 100644 --- a/Trace/src/TraceClient.php +++ b/Trace/src/TraceClient.php @@ -40,7 +40,7 @@ class TraceClient { use ClientTrait; - const VERSION = '1.8.3'; + const VERSION = '1.8.4'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/cloud-platform'; diff --git a/Translate/VERSION b/Translate/VERSION index b5aaf81f9cf3..ff278344b339 100644 --- a/Translate/VERSION +++ b/Translate/VERSION @@ -1 +1 @@ -1.17.4 +1.17.5 diff --git a/VideoIntelligence/VERSION b/VideoIntelligence/VERSION index 42cf0675c566..f2380cc7aefe 100644 --- a/VideoIntelligence/VERSION +++ b/VideoIntelligence/VERSION @@ -1 +1 @@ -1.15.2 +1.15.3 diff --git a/VideoLiveStream/VERSION b/VideoLiveStream/VERSION index 7486fdbc50b3..f38fc5393ff6 100644 --- a/VideoLiveStream/VERSION +++ b/VideoLiveStream/VERSION @@ -1 +1 @@ -0.7.2 +0.7.3 diff --git a/VideoStitcher/VERSION b/VideoStitcher/VERSION index 100435be135a..ee94dd834b53 100644 --- a/VideoStitcher/VERSION +++ b/VideoStitcher/VERSION @@ -1 +1 @@ -0.8.2 +0.8.3 diff --git a/VideoTranscoder/VERSION b/VideoTranscoder/VERSION index 5eef0f10e8cd..a3f5a8ed4d60 100644 --- a/VideoTranscoder/VERSION +++ b/VideoTranscoder/VERSION @@ -1 +1 @@ -0.10.2 +0.10.3 diff --git a/Vision/VERSION b/Vision/VERSION index 9ab8337f3962..8fdcf3869464 100644 --- a/Vision/VERSION +++ b/Vision/VERSION @@ -1 +1 @@ -1.9.1 +1.9.2 diff --git a/Vision/src/VisionClient.php b/Vision/src/VisionClient.php index f5e0e55b1b97..7976f3547a04 100644 --- a/Vision/src/VisionClient.php +++ b/Vision/src/VisionClient.php @@ -50,7 +50,7 @@ class VisionClient use ClientTrait; use ValidateTrait; - const VERSION = '1.9.1'; + const VERSION = '1.9.2'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/cloud-platform'; diff --git a/VmMigration/VERSION b/VmMigration/VERSION index b6160487433b..844f6a91acb9 100644 --- a/VmMigration/VERSION +++ b/VmMigration/VERSION @@ -1 +1 @@ -0.6.2 +0.6.3 diff --git a/VmwareEngine/VERSION b/VmwareEngine/VERSION index be14282b7fff..7d8568351b4f 100644 --- a/VmwareEngine/VERSION +++ b/VmwareEngine/VERSION @@ -1 +1 @@ -0.5.3 +0.5.4 diff --git a/VpcAccess/VERSION b/VpcAccess/VERSION index 1892b9267677..31e5c843497c 100644 --- a/VpcAccess/VERSION +++ b/VpcAccess/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/WebRisk/VERSION b/WebRisk/VERSION index 4cda8f19edc7..8af85beb5159 100644 --- a/WebRisk/VERSION +++ b/WebRisk/VERSION @@ -1 +1 @@ -1.5.2 +1.5.3 diff --git a/WebSecurityScanner/VERSION b/WebSecurityScanner/VERSION index 100435be135a..ee94dd834b53 100644 --- a/WebSecurityScanner/VERSION +++ b/WebSecurityScanner/VERSION @@ -1 +1 @@ -0.8.2 +0.8.3 diff --git a/Workflows/VERSION b/Workflows/VERSION index cb0c939a936f..be14282b7fff 100644 --- a/Workflows/VERSION +++ b/Workflows/VERSION @@ -1 +1 @@ -0.5.2 +0.5.3 diff --git a/composer.json b/composer.json index ea6d094edf64..5894eee6c8e8 100644 --- a/composer.json +++ b/composer.json @@ -70,182 +70,182 @@ "psr/log": ">=3" }, "replace": { - "google/access-context-manager": "0.5.2", - "google/analytics-admin": "0.22.2", - "google/analytics-data": "0.16.2", - "google/apps-events-subscriptions": "0.1.0", - "google/apps-chat": "0.0.0", - "google/apps-meet": "0.2.0", - "google/cloud-access-approval": "1.2.2", - "google/cloud-advisorynotifications": "0.8.0", - "google/cloud-ai-platform": "0.37.0", - "google/cloud-alloydb": "0.10.0", - "google/cloud-api-gateway": "1.3.2", - "google/cloud-api-keys": "0.4.2", - "google/cloud-apigee-connect": "1.2.2", - "google/cloud-apigee-registry": "0.5.2", - "google/cloud-appengine-admin": "1.3.2", - "google/cloud-apphub": "0.1.0", - "google/cloud-artifact-registry": "0.6.2", - "google/cloud-asset": "1.16.0", - "google/cloud-assured-workloads": "0.11.2", - "google/cloud-automl": "1.6.2", - "google/cloud-bare-metal-solution": "0.6.2", - "google/cloud-batch": "0.16.5", - "google/cloud-beyondcorp-appconnections": "0.4.2", - "google/cloud-beyondcorp-appconnectors": "0.4.2", - "google/cloud-beyondcorp-appgateways": "0.4.2", - "google/cloud-beyondcorp-clientconnectorservices": "0.4.2", - "google/cloud-beyondcorp-clientgateways": "0.4.2", + "google/access-context-manager": "0.5.3", + "google/analytics-admin": "0.22.3", + "google/analytics-data": "0.16.3", + "google/apps-events-subscriptions": "0.1.1", + "google/apps-chat": "0.1.0", + "google/apps-meet": "0.2.1", + "google/cloud-access-approval": "1.2.3", + "google/cloud-advisorynotifications": "0.8.1", + "google/cloud-ai-platform": "0.37.1", + "google/cloud-alloydb": "0.10.1", + "google/cloud-api-gateway": "1.3.3", + "google/cloud-api-keys": "0.4.3", + "google/cloud-apigee-connect": "1.2.3", + "google/cloud-apigee-registry": "0.5.3", + "google/cloud-appengine-admin": "1.3.3", + "google/cloud-apphub": "0.1.1", + "google/cloud-artifact-registry": "0.6.3", + "google/cloud-asset": "1.16.1", + "google/cloud-assured-workloads": "0.11.3", + "google/cloud-automl": "1.6.3", + "google/cloud-bare-metal-solution": "0.6.3", + "google/cloud-batch": "0.16.6", + "google/cloud-beyondcorp-appconnections": "0.4.3", + "google/cloud-beyondcorp-appconnectors": "0.4.3", + "google/cloud-beyondcorp-appgateways": "0.4.3", + "google/cloud-beyondcorp-clientconnectorservices": "0.4.3", + "google/cloud-beyondcorp-clientgateways": "0.4.3", "google/cloud-bigquery": "1.30.1", - "google/cloud-bigquery-analyticshub": "0.5.0", - "google/cloud-bigquery-connection": "1.5.2", - "google/cloud-bigquery-data-exchange": "0.4.2", - "google/cloud-bigquery-datapolicies": "0.5.2", - "google/cloud-bigquery-migration": "0.4.2", - "google/cloud-bigquery-reservation": "1.3.2", - "google/cloud-bigquery-storage": "1.10.1", - "google/cloud-bigquerydatatransfer": "1.8.2", + "google/cloud-bigquery-analyticshub": "0.5.1", + "google/cloud-bigquery-connection": "1.5.3", + "google/cloud-bigquery-data-exchange": "0.4.3", + "google/cloud-bigquery-datapolicies": "0.5.3", + "google/cloud-bigquery-migration": "0.4.3", + "google/cloud-bigquery-reservation": "1.3.3", + "google/cloud-bigquery-storage": "1.10.2", + "google/cloud-bigquerydatatransfer": "1.8.3", "google/cloud-bigtable": "1.31.0", - "google/cloud-billing": "1.9.4", - "google/cloud-billing-budgets": "1.4.2", - "google/cloud-binary-authorization": "0.8.4", - "google/cloud-build": "0.16.0", - "google/cloud-certificate-manager": "0.7.0", - "google/cloud-channel": "1.9.2", - "google/cloud-cloudcontrolspartner": "0.1.0", - "google/cloud-commerce-consumer-procurement": "0.2.2", + "google/cloud-billing": "1.9.5", + "google/cloud-billing-budgets": "1.4.3", + "google/cloud-binary-authorization": "0.8.5", + "google/cloud-build": "0.16.1", + "google/cloud-certificate-manager": "0.7.1", + "google/cloud-channel": "1.9.3", + "google/cloud-cloudcontrolspartner": "0.1.1", + "google/cloud-commerce-consumer-procurement": "0.2.3", "google/cloud-common-protos": "0.5.1", - "google/cloud-compute": "1.16.0", - "google/cloud-confidentialcomputing": "0.8.0", - "google/cloud-config": "0.4.0", - "google/cloud-contact-center-insights": "1.9.2", - "google/cloud-container": "1.30.0", - "google/cloud-container-analysis": "0.5.4", - "google/cloud-core": "1.57.0", - "google/cloud-data-catalog": "1.10.0", - "google/cloud-data-fusion": "0.6.2", - "google/cloud-datacatalog-lineage": "0.5.2", - "google/cloud-dataflow": "0.6.1", - "google/cloud-dataform": "0.4.2", - "google/cloud-datalabeling": "0.5.2", - "google/cloud-dataplex": "0.15.0", - "google/cloud-dataproc": "3.13.1", - "google/cloud-dataproc-metastore": "0.11.2", - "google/cloud-datastore": "1.28.0", - "google/cloud-datastore-admin": "0.8.2", - "google/cloud-datastream": "1.5.2", - "google/cloud-debugger": "1.8.4", - "google/cloud-deploy": "0.17.2", - "google/cloud-dialogflow": "1.12.0", - "google/cloud-dialogflow-cx": "0.3.1", - "google/cloud-discoveryengine": "0.11.0", - "google/cloud-dlp": "1.13.0", - "google/cloud-dms": "1.5.2", - "google/cloud-document-ai": "1.11.1", - "google/cloud-domains": "0.5.2", - "google/cloud-edgenetwork": "0.3.3", - "google/cloud-error-reporting": "0.22.3", - "google/cloud-essential-contacts": "0.4.2", - "google/cloud-eventarc": "1.3.2", - "google/cloud-eventarc-publishing": "0.6.1", - "google/cloud-filestore": "1.5.4", - "google/cloud-firestore": "1.43.0", - "google/cloud-functions": "1.6.2", + "google/cloud-compute": "1.16.1", + "google/cloud-confidentialcomputing": "0.8.1", + "google/cloud-config": "0.4.1", + "google/cloud-contact-center-insights": "1.9.3", + "google/cloud-container": "1.30.1", + "google/cloud-container-analysis": "0.5.5", + "google/cloud-core": "1.58.0", + "google/cloud-data-catalog": "1.10.1", + "google/cloud-data-fusion": "0.6.3", + "google/cloud-datacatalog-lineage": "0.5.3", + "google/cloud-dataflow": "0.6.2", + "google/cloud-dataform": "0.4.3", + "google/cloud-datalabeling": "0.5.3", + "google/cloud-dataplex": "0.15.1", + "google/cloud-dataproc": "3.13.2", + "google/cloud-dataproc-metastore": "0.11.3", + "google/cloud-datastore": "1.28.1", + "google/cloud-datastore-admin": "0.8.3", + "google/cloud-datastream": "1.5.3", + "google/cloud-debugger": "1.8.5", + "google/cloud-deploy": "0.18.0", + "google/cloud-dialogflow": "1.12.1", + "google/cloud-dialogflow-cx": "0.3.2", + "google/cloud-discoveryengine": "0.11.1", + "google/cloud-dlp": "1.13.1", + "google/cloud-dms": "1.5.3", + "google/cloud-document-ai": "1.12.0", + "google/cloud-domains": "0.5.3", + "google/cloud-edgenetwork": "0.3.4", + "google/cloud-error-reporting": "0.22.4", + "google/cloud-essential-contacts": "0.4.3", + "google/cloud-eventarc": "1.3.3", + "google/cloud-eventarc-publishing": "0.6.2", + "google/cloud-filestore": "1.5.5", + "google/cloud-firestore": "1.43.1", + "google/cloud-functions": "1.6.3", "google/cloud-game-servers": "1.2.4", - "google/cloud-gke-backup": "0.7.0", - "google/cloud-gke-connect-gateway": "0.4.1", - "google/cloud-gke-hub": "0.9.2", - "google/cloud-gke-multi-cloud": "0.5.2", - "google/cloud-gsuite-addons": "0.3.2", - "google/cloud-iam": "0.5.2", - "google/cloud-iam-credentials": "1.2.2", - "google/cloud-iap": "1.4.2", - "google/cloud-ids": "0.5.2", - "google/cloud-iot": "1.7.2", - "google/cloud-kms": "1.21.2", - "google/cloud-kms-inventory": "0.4.2", - "google/cloud-language": "0.32.3", - "google/cloud-life-sciences": "0.6.2", - "google/cloud-logging": "1.29.4", - "google/cloud-managed-identities": "1.3.2", - "google/cloud-media-translation": "0.4.1", - "google/cloud-memcache": "1.3.2", - "google/cloud-migrationcenter": "0.4.2", - "google/cloud-monitoring": "1.9.2", - "google/cloud-netapp": "0.2.4", - "google/cloud-network-connectivity": "1.5.2", - "google/cloud-network-management": "1.7.0", - "google/cloud-network-security": "0.6.2", - "google/cloud-notebooks": "0.7.2", - "google/cloud-optimization": "0.6.2", - "google/cloud-orchestration-airflow": "1.6.1", - "google/cloud-org-policy": "0.6.2", - "google/cloud-osconfig": "1.3.2", - "google/cloud-oslogin": "1.9.2", - "google/cloud-parallelstore": "0.1.0", - "google/cloud-policy-troubleshooter": "1.3.1", - "google/cloud-policysimulator": "0.2.2", - "google/cloud-policytroubleshooter-iam": "0.2.2", - "google/cloud-private-catalog": "0.4.1", - "google/cloud-profiler": "1.4.0", - "google/cloud-pubsub": "2.1.0", - "google/cloud-quotas": "0.2.0", - "google/cloud-rapidmigrationassessment": "0.3.2", - "google/cloud-recaptcha-enterprise": "1.11.0", - "google/cloud-recommendations-ai": "0.7.2", - "google/cloud-recommender": "1.11.2", - "google/cloud-redis": "1.9.2", - "google/cloud-redis-cluster": "0.2.2", - "google/cloud-resource-manager": "0.8.2", - "google/cloud-resource-settings": "1.2.2", - "google/cloud-retail": "1.6.1", - "google/cloud-run": "0.9.0", - "google/cloud-scheduler": "1.10.2", - "google/cloud-secret-manager": "1.14.1", - "google/cloud-securesourcemanager": "0.2.2", - "google/cloud-security-center": "1.27.0", - "google/cloud-security-private-ca": "1.7.0", - "google/cloud-security-public-ca": "0.3.2", - "google/cloud-securitycentermanagement": "0.2.5", - "google/cloud-service-control": "1.4.1", - "google/cloud-service-directory": "1.3.2", - "google/cloud-service-management": "1.3.2", - "google/cloud-service-usage": "1.3.1", - "google/cloud-servicehealth": "0.1.3", - "google/cloud-shell": "1.3.2", - "google/cloud-spanner": "1.75.1", - "google/cloud-speech": "1.18.0", - "google/cloud-sql-admin": "0.16.0", - "google/cloud-storage": "1.41.2", - "google/cloud-storage-transfer": "1.4.2", - "google/cloud-storageinsights": "0.3.2", - "google/cloud-support": "0.2.2", - "google/cloud-talent": "1.3.2", - "google/cloud-tasks": "1.14.3", - "google/cloud-telcoautomation": "0.2.2", - "google/cloud-text-to-speech": "1.8.2", - "google/cloud-tpu": "1.4.2", - "google/cloud-trace": "1.8.3", - "google/cloud-translate": "1.17.4", - "google/cloud-video-live-stream": "0.7.2", - "google/cloud-video-stitcher": "0.8.2", - "google/cloud-video-transcoder": "0.10.2", - "google/cloud-videointelligence": "1.15.2", - "google/cloud-vision": "1.9.1", - "google/cloud-vm-migration": "0.6.2", - "google/cloud-vmware-engine": "0.5.3", - "google/cloud-vpc-access": "1.3.2", - "google/cloud-web-risk": "1.5.2", - "google/cloud-web-security-scanner": "0.8.2", - "google/cloud-workflows": "0.5.2", - "google/grafeas": "0.10.0", - "google/longrunning": "0.4.0", + "google/cloud-gke-backup": "0.7.1", + "google/cloud-gke-connect-gateway": "0.4.2", + "google/cloud-gke-hub": "0.9.3", + "google/cloud-gke-multi-cloud": "0.5.3", + "google/cloud-gsuite-addons": "0.3.3", + "google/cloud-iam": "0.5.3", + "google/cloud-iam-credentials": "1.2.3", + "google/cloud-iap": "1.4.3", + "google/cloud-ids": "0.5.3", + "google/cloud-iot": "1.7.3", + "google/cloud-kms": "1.21.3", + "google/cloud-kms-inventory": "0.4.3", + "google/cloud-language": "0.32.4", + "google/cloud-life-sciences": "0.6.3", + "google/cloud-logging": "1.30.0", + "google/cloud-managed-identities": "1.3.3", + "google/cloud-media-translation": "0.4.2", + "google/cloud-memcache": "1.3.3", + "google/cloud-migrationcenter": "0.4.3", + "google/cloud-monitoring": "1.10.0", + "google/cloud-netapp": "0.2.5", + "google/cloud-network-connectivity": "1.5.3", + "google/cloud-network-management": "1.7.1", + "google/cloud-network-security": "0.6.3", + "google/cloud-notebooks": "0.7.3", + "google/cloud-optimization": "0.6.3", + "google/cloud-orchestration-airflow": "1.6.2", + "google/cloud-org-policy": "0.6.3", + "google/cloud-osconfig": "1.3.3", + "google/cloud-oslogin": "1.9.3", + "google/cloud-parallelstore": "0.1.1", + "google/cloud-policy-troubleshooter": "1.3.2", + "google/cloud-policysimulator": "0.2.3", + "google/cloud-policytroubleshooter-iam": "0.2.3", + "google/cloud-private-catalog": "0.4.2", + "google/cloud-profiler": "1.4.1", + "google/cloud-pubsub": "2.1.1", + "google/cloud-quotas": "0.2.1", + "google/cloud-rapidmigrationassessment": "0.3.3", + "google/cloud-recaptcha-enterprise": "1.11.1", + "google/cloud-recommendations-ai": "0.7.3", + "google/cloud-recommender": "1.11.3", + "google/cloud-redis": "1.9.3", + "google/cloud-redis-cluster": "0.2.3", + "google/cloud-resource-manager": "0.8.3", + "google/cloud-resource-settings": "1.2.3", + "google/cloud-retail": "1.6.2", + "google/cloud-run": "0.9.1", + "google/cloud-scheduler": "1.10.3", + "google/cloud-secret-manager": "1.14.2", + "google/cloud-securesourcemanager": "0.2.3", + "google/cloud-security-center": "1.28.0", + "google/cloud-security-private-ca": "1.7.1", + "google/cloud-security-public-ca": "0.3.3", + "google/cloud-securitycentermanagement": "0.2.6", + "google/cloud-service-control": "1.4.2", + "google/cloud-service-directory": "1.3.3", + "google/cloud-service-management": "1.3.3", + "google/cloud-service-usage": "1.3.2", + "google/cloud-servicehealth": "0.1.4", + "google/cloud-shell": "1.3.3", + "google/cloud-spanner": "1.75.2", + "google/cloud-speech": "1.18.1", + "google/cloud-sql-admin": "0.16.1", + "google/cloud-storage": "1.41.3", + "google/cloud-storage-transfer": "1.4.3", + "google/cloud-storageinsights": "0.3.3", + "google/cloud-support": "0.2.3", + "google/cloud-talent": "1.3.3", + "google/cloud-tasks": "1.14.4", + "google/cloud-telcoautomation": "0.2.3", + "google/cloud-text-to-speech": "1.8.3", + "google/cloud-tpu": "1.4.3", + "google/cloud-trace": "1.8.4", + "google/cloud-translate": "1.17.5", + "google/cloud-video-live-stream": "0.7.3", + "google/cloud-video-stitcher": "0.8.3", + "google/cloud-video-transcoder": "0.10.3", + "google/cloud-videointelligence": "1.15.3", + "google/cloud-vision": "1.9.2", + "google/cloud-vm-migration": "0.6.3", + "google/cloud-vmware-engine": "0.5.4", + "google/cloud-vpc-access": "1.3.3", + "google/cloud-web-risk": "1.5.3", + "google/cloud-web-security-scanner": "0.8.3", + "google/cloud-workflows": "0.5.3", + "google/grafeas": "0.10.1", + "google/longrunning": "0.4.1", "google/shopping-common-protos": "0.3.0", - "google/shopping-css": "0.2.3", - "google/shopping-merchant-inventories": "0.4.0", - "google/shopping-merchant-quota": "0.1.0", - "google/shopping-merchant-reports": "0.7.0" + "google/shopping-css": "0.2.4", + "google/shopping-merchant-inventories": "0.4.1", + "google/shopping-merchant-quota": "0.1.1", + "google/shopping-merchant-reports": "0.7.1" }, "suggest": { "opis/closure": "May be used to serialize closures to process jobs in the batch daemon. Please require version ^3.", From a58e5f44d0d942626360dc3ebe65bc40c11a90af Mon Sep 17 00:00:00 2001 From: Ajumal Date: Wed, 24 Apr 2024 13:21:57 +0000 Subject: [PATCH 59/86] chore(tests): Fix AddComponentCommandTest (#7253) --- dev/tests/Unit/Command/AddComponentCommandTest.php | 8 ++------ dev/tests/fixtures/component/SecretManager/README.md | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/dev/tests/Unit/Command/AddComponentCommandTest.php b/dev/tests/Unit/Command/AddComponentCommandTest.php index 87f6ce116aa0..3a6e0818ec6e 100644 --- a/dev/tests/Unit/Command/AddComponentCommandTest.php +++ b/dev/tests/Unit/Command/AddComponentCommandTest.php @@ -63,9 +63,7 @@ public static function setUpBeforeClass(): void public function testAddComponent() { self::$commandTester->setInputs([ - 'Y', // Does this information look correct? [Y/n] - 'https://cloud.google.com/secret-manager/docs/reference/rest/', // What is the product documentation URL? - 'https://cloud.google.com/secret-manager', // What is the product homepage? + 'Y' // Does this information look correct? [Y/n] ]); self::$commandTester->execute([ @@ -189,9 +187,7 @@ public function testGoogleapisGenPath() $commandTester = new CommandTester($application->get('add-component')); $commandTester->setInputs([ - 'Y', // Does this information look correct? [Y/n] - 'https://cloud.google.com/secret-manager/docs/reference/rest/', // What is the product documentation URL? - 'https://cloud.google.com/secret-manager', // What is the product homepage? + 'Y' // Does this information look correct? [Y/n] ]); $commandTester->execute([ diff --git a/dev/tests/fixtures/component/SecretManager/README.md b/dev/tests/fixtures/component/SecretManager/README.md index 0608a7d425b9..2c92f6419dd6 100644 --- a/dev/tests/fixtures/component/SecretManager/README.md +++ b/dev/tests/fixtures/component/SecretManager/README.md @@ -42,4 +42,4 @@ This component is considered alpha. As such, it is still a work-in-progress and ### Next Steps -1. Understand the [official documentation](https://cloud.google.com/secret-manager/docs/reference/rest/). +1. Understand the [official documentation](https://cloud.google.com/secret-manager/docs/overview). From d12027711154292c14917c6ef76382fc7fca2dab Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 25 Apr 2024 11:12:44 +0530 Subject: [PATCH 60/86] fix: Defined class prefix of GMON for Objective C (#7256) PiperOrigin-RevId: 627770937 Source-Link: https://github.com/googleapis/googleapis/commit/dc9e1d1aeca572898f0fade9f4dd597fc7834402 Source-Link: https://github.com/googleapis/googleapis-gen/commit/21889ac93b205b21da9908d0fa548e149551c2cf Copy-Tag: eyJwIjoiTW9uaXRvcmluZy8uT3dsQm90LnlhbWwiLCJoIjoiMjE4ODlhYzkzYjIwNWIyMWRhOTkwOGQwZmE1NDhlMTQ5NTUxYzJjZiJ9 --- Monitoring/metadata/V3/Common.php | Bin 2532 -> 2539 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Monitoring/metadata/V3/Common.php b/Monitoring/metadata/V3/Common.php index 2164fb3c8760677a8795493e23bb7537bf54f102..0fef40d6d1092c1e0a0c14353880a477bd27cd54 100644 GIT binary patch delta 32 ocmaDN{91TJ0~6!I&5canY>a0opXJD9U&O@X?(6S2*@|-&0Lm;2Q~&?~ delta 24 gcmaDY{6u&|0~6z{&5canY>dYypXJD%?8vza0D8*_Z2$lO From d65086eea0e1b90f24f04d7085c5769679f75250 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 25 Apr 2024 11:24:59 +0530 Subject: [PATCH 61/86] feat:Add Fraud Prevention settings field (#7252) PiperOrigin-RevId: 627445658 Source-Link: https://github.com/googleapis/googleapis/commit/0f16abbe51676b83a966ae0787c680d0aaade137 Source-Link: https://github.com/googleapis/googleapis-gen/commit/692123de7bdcd9180ef64369a0927aafe8846d91 Copy-Tag: eyJwIjoiUmVjYXB0Y2hhRW50ZXJwcmlzZS8uT3dsQm90LnlhbWwiLCJoIjoiNjkyMTIzZGU3YmRjZDkxODBlZjY0MzY5YTA5MjdhYWZlODg0NmQ5MSJ9 Co-authored-by: Ajumal --- .../metadata/V1/Recaptchaenterprise.php | Bin 22123 -> 22294 bytes RecaptchaEnterprise/src/V1/Event.php | 34 +++++++++ .../src/V1/Event/FraudPrevention.php | 70 ++++++++++++++++++ 3 files changed, 104 insertions(+) create mode 100644 RecaptchaEnterprise/src/V1/Event/FraudPrevention.php diff --git a/RecaptchaEnterprise/metadata/V1/Recaptchaenterprise.php b/RecaptchaEnterprise/metadata/V1/Recaptchaenterprise.php index 8d57cc36a40b48c11be8a9239ed089fd2c164ea0..969a45bf273907a9b96baef1801f897f13693975 100644 GIT binary patch delta 161 zcmaF8hH=_D#tqCYtcR8|a@kJww%zQ?vY(%69_wZ{kuQugLXlhoX+?>pDe(nGsb#5o zC7Jno5`qeh8hl1plNEW@Y(QdqZXgu_a0O1x4;&el{J8kh#Dx^NWZZ%rLtWwnf?UH~ m{U#@J2}^NvvAg;?I{CP|2rvrqaB;YJ219sEn}3NGIsgDIwlF#X delta 36 ucmV+<0NekTt^w<;0k8uE1(&1&3O$iaJ+nmwzYhZQ1G5Gc^Z~P_7I8rF=nUBa diff --git a/RecaptchaEnterprise/src/V1/Event.php b/RecaptchaEnterprise/src/V1/Event.php index dd520e9e0e4a..95c5df6a7b2c 100644 --- a/RecaptchaEnterprise/src/V1/Event.php +++ b/RecaptchaEnterprise/src/V1/Event.php @@ -119,6 +119,12 @@ class Event extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.UserInfo user_info = 15 [(.google.api.field_behavior) = OPTIONAL]; */ private $user_info = null; + /** + * Optional. The Fraud Prevention setting for this assessment. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event.FraudPrevention fraud_prevention = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $fraud_prevention = 0; /** * Constructor. @@ -173,6 +179,8 @@ class Event extends \Google\Protobuf\Internal\Message * can be identified. They are often identified through the use of an account * for logged-in requests or login/registration requests, or by providing user * identifiers for guest actions like checkout. + * @type int $fraud_prevention + * Optional. The Fraud Prevention setting for this assessment. * } */ public function __construct($data = NULL) { @@ -606,5 +614,31 @@ public function setUserInfo($var) return $this; } + /** + * Optional. The Fraud Prevention setting for this assessment. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event.FraudPrevention fraud_prevention = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getFraudPrevention() + { + return $this->fraud_prevention; + } + + /** + * Optional. The Fraud Prevention setting for this assessment. + * + * Generated from protobuf field .google.cloud.recaptchaenterprise.v1.Event.FraudPrevention fraud_prevention = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setFraudPrevention($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\RecaptchaEnterprise\V1\Event\FraudPrevention::class); + $this->fraud_prevention = $var; + + return $this; + } + } diff --git a/RecaptchaEnterprise/src/V1/Event/FraudPrevention.php b/RecaptchaEnterprise/src/V1/Event/FraudPrevention.php new file mode 100644 index 000000000000..5650681f23e6 --- /dev/null +++ b/RecaptchaEnterprise/src/V1/Event/FraudPrevention.php @@ -0,0 +1,70 @@ +google.cloud.recaptchaenterprise.v1.Event.FraudPrevention + */ +class FraudPrevention +{ + /** + * Default, unspecified setting. If opted in for automatic detection, + * `fraud_prevention_assessment` is returned based on the request. + * Otherwise, `fraud_prevention_assessment` is returned if + * `transaction_data` is present in the `Event` and Fraud Prevention is + * enabled in the Google Cloud console. + * + * Generated from protobuf enum FRAUD_PREVENTION_UNSPECIFIED = 0; + */ + const FRAUD_PREVENTION_UNSPECIFIED = 0; + /** + * Enable Fraud Prevention for this assessment, if Fraud Prevention is + * enabled in the Google Cloud console. + * + * Generated from protobuf enum ENABLED = 1; + */ + const ENABLED = 1; + /** + * Disable Fraud Prevention for this assessment, regardless of opt-in + * status or Google Cloud console settings. + * + * Generated from protobuf enum DISABLED = 2; + */ + const DISABLED = 2; + + private static $valueToName = [ + self::FRAUD_PREVENTION_UNSPECIFIED => 'FRAUD_PREVENTION_UNSPECIFIED', + self::ENABLED => 'ENABLED', + self::DISABLED => 'DISABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FraudPrevention::class, \Google\Cloud\RecaptchaEnterprise\V1\Event_FraudPrevention::class); + From 0a27dbbbda4ee70a6e65d6975066a407b071c62f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 25 Apr 2024 11:31:11 +0530 Subject: [PATCH 62/86] feat: Infrastructure manager supports 1.2.3, 1.3.10, 1.4.7, 1.5.7 versions of Terraform when creating a preview of a deployment (#7251) feat: Annotations are now supported to help client tools identify deployments during automation PiperOrigin-RevId: 627386467 Source-Link: https://github.com/googleapis/googleapis/commit/64be76add7caaf889f8a949aff5f5295dfe973dd Source-Link: https://github.com/googleapis/googleapis-gen/commit/0491a38e727fbf4808752f2a3f102325488635ce Copy-Tag: eyJwIjoiQ29uZmlnLy5Pd2xCb3QueWFtbCIsImgiOiIwNDkxYTM4ZTcyN2ZiZjQ4MDg3NTJmMmEzZjEwMjMyNTQ4ODYzNWNlIn0= Co-authored-by: Ajumal --- Config/metadata/V1/Config.php | Bin 19239 -> 19463 bytes Config/src/V1/Deployment.php | 46 ++++++++++ Config/src/V1/Preview.php | 86 ++++++++++++++++++ .../tests/Unit/V1/Client/ConfigClientTest.php | 12 +++ 4 files changed, 144 insertions(+) diff --git a/Config/metadata/V1/Config.php b/Config/metadata/V1/Config.php index 60d2b172d4941592598a022e2691aa64798165aa..87d54d274f6e3233410399836183994404433dc6 100644 GIT binary patch delta 156 zcmZ2Jjj??O;|32FrZ;_?y;yP?nJ(~e-pLxmA}r*~#hsX!mtT@tl9``ZEFq!5JlRlG zO;FDfA?TV{QdBvagUf_Z%7{w#JRXi(&Ecfi;95;NeC%0 qYH&`j;Z)!g2C34Fn2Ic=HW8j9Hkx2H2EEm^yY24g|Yw{@-JKf delta 51 zcmV-30L=e~m;tAj0kB8}0*#HcN(5~I0?iJyxdl`Nlkh7rv%m^k9RZxP8z_.google.cloud.config.v1.QuotaValidation quota_validation = 23 [(.google.api.field_behavior) = OPTIONAL]; */ protected $quota_validation = 0; + /** + * Optional. Arbitrary key-value metadata storage e.g. to help client tools + * identify deployments during automation. See + * https://google.aip.dev/148#annotations for details on format and size + * limitations. + * + * Generated from protobuf field map annotations = 24 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $annotations; protected $blueprint; /** @@ -255,6 +264,11 @@ class Deployment extends \Google\Protobuf\Internal\Message * Optional. Input to control quota checks for resources in terraform * configuration files. There are limited resources on which quota validation * applies. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Optional. Arbitrary key-value metadata storage e.g. to help client tools + * identify deployments during automation. See + * https://google.aip.dev/148#annotations for details on format and size + * limitations. * } */ public function __construct($data = NULL) { @@ -981,6 +995,38 @@ public function setQuotaValidation($var) return $this; } + /** + * Optional. Arbitrary key-value metadata storage e.g. to help client tools + * identify deployments during automation. See + * https://google.aip.dev/148#annotations for details on format and size + * limitations. + * + * Generated from protobuf field map annotations = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Optional. Arbitrary key-value metadata storage e.g. to help client tools + * identify deployments during automation. See + * https://google.aip.dev/148#annotations for details on format and size + * limitations. + * + * Generated from protobuf field map annotations = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + /** * @return string */ diff --git a/Config/src/V1/Preview.php b/Config/src/V1/Preview.php index e2ee4206c55c..4ad58204222f 100644 --- a/Config/src/V1/Preview.php +++ b/Config/src/V1/Preview.php @@ -137,6 +137,20 @@ class Preview extends \Google\Protobuf\Internal\Message * Generated from protobuf field string logs = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $logs = ''; + /** + * Output only. The current Terraform version set on the preview. + * It is in the format of "Major.Minor.Patch", for example, "1.3.10". + * + * Generated from protobuf field string tf_version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $tf_version = ''; + /** + * Optional. The user-specified Terraform version constraint. + * Example: "=1.3.10". + * + * Generated from protobuf field optional string tf_version_constraint = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $tf_version_constraint = null; protected $blueprint; /** @@ -203,6 +217,12 @@ class Preview extends \Google\Protobuf\Internal\Message * Output only. Artifacts from preview. * @type string $logs * Output only. Location of preview logs in `gs://{bucket}/{object}` format. + * @type string $tf_version + * Output only. The current Terraform version set on the preview. + * It is in the format of "Major.Minor.Patch", for example, "1.3.10". + * @type string $tf_version_constraint + * Optional. The user-specified Terraform version constraint. + * Example: "=1.3.10". * } */ public function __construct($data = NULL) { @@ -755,6 +775,72 @@ public function setLogs($var) return $this; } + /** + * Output only. The current Terraform version set on the preview. + * It is in the format of "Major.Minor.Patch", for example, "1.3.10". + * + * Generated from protobuf field string tf_version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTfVersion() + { + return $this->tf_version; + } + + /** + * Output only. The current Terraform version set on the preview. + * It is in the format of "Major.Minor.Patch", for example, "1.3.10". + * + * Generated from protobuf field string tf_version = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTfVersion($var) + { + GPBUtil::checkString($var, True); + $this->tf_version = $var; + + return $this; + } + + /** + * Optional. The user-specified Terraform version constraint. + * Example: "=1.3.10". + * + * Generated from protobuf field optional string tf_version_constraint = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getTfVersionConstraint() + { + return isset($this->tf_version_constraint) ? $this->tf_version_constraint : ''; + } + + public function hasTfVersionConstraint() + { + return isset($this->tf_version_constraint); + } + + public function clearTfVersionConstraint() + { + unset($this->tf_version_constraint); + } + + /** + * Optional. The user-specified Terraform version constraint. + * Example: "=1.3.10". + * + * Generated from protobuf field optional string tf_version_constraint = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setTfVersionConstraint($var) + { + GPBUtil::checkString($var, True); + $this->tf_version_constraint = $var; + + return $this; + } + /** * @return string */ diff --git a/Config/tests/Unit/V1/Client/ConfigClientTest.php b/Config/tests/Unit/V1/Client/ConfigClientTest.php index d306b73b3ddd..e0098efe69a6 100644 --- a/Config/tests/Unit/V1/Client/ConfigClientTest.php +++ b/Config/tests/Unit/V1/Client/ConfigClientTest.php @@ -299,6 +299,8 @@ public function createPreviewTest() $build = 'build94094958'; $errorLogs = 'errorLogs1635955078'; $logs = 'logs3327407'; + $tfVersion = 'tfVersion1712341003'; + $tfVersionConstraint = 'tfVersionConstraint594495121'; $expectedResponse = new Preview(); $expectedResponse->setName($name); $expectedResponse->setDeployment($deployment); @@ -308,6 +310,8 @@ public function createPreviewTest() $expectedResponse->setBuild($build); $expectedResponse->setErrorLogs($errorLogs); $expectedResponse->setLogs($logs); + $expectedResponse->setTfVersion($tfVersion); + $expectedResponse->setTfVersionConstraint($tfVersionConstraint); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); @@ -587,6 +591,8 @@ public function deletePreviewTest() $build = 'build94094958'; $errorLogs = 'errorLogs1635955078'; $logs = 'logs3327407'; + $tfVersion = 'tfVersion1712341003'; + $tfVersionConstraint = 'tfVersionConstraint594495121'; $expectedResponse = new Preview(); $expectedResponse->setName($name2); $expectedResponse->setDeployment($deployment); @@ -596,6 +602,8 @@ public function deletePreviewTest() $expectedResponse->setBuild($build); $expectedResponse->setErrorLogs($errorLogs); $expectedResponse->setLogs($logs); + $expectedResponse->setTfVersion($tfVersion); + $expectedResponse->setTfVersionConstraint($tfVersionConstraint); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); @@ -1132,6 +1140,8 @@ public function getPreviewTest() $build = 'build94094958'; $errorLogs = 'errorLogs1635955078'; $logs = 'logs3327407'; + $tfVersion = 'tfVersion1712341003'; + $tfVersionConstraint = 'tfVersionConstraint594495121'; $expectedResponse = new Preview(); $expectedResponse->setName($name2); $expectedResponse->setDeployment($deployment); @@ -1141,6 +1151,8 @@ public function getPreviewTest() $expectedResponse->setBuild($build); $expectedResponse->setErrorLogs($errorLogs); $expectedResponse->setLogs($logs); + $expectedResponse->setTfVersion($tfVersion); + $expectedResponse->setTfVersionConstraint($tfVersionConstraint); $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->previewName('[PROJECT]', '[LOCATION]', '[PREVIEW]'); From 5cd4215e4c17b57081a2133882464225b962ac56 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Thu, 25 Apr 2024 17:15:37 -0700 Subject: [PATCH 63/86] feat: introduce StorageControl (#7245) --- StorageControl/.OwlBot.yaml | 4 + StorageControl/.gitattributes | 8 + .../.github/pull_request_template.md | 24 + StorageControl/.repo-metadata.json | 8 + StorageControl/CONTRIBUTING.md | 10 + StorageControl/LICENSE | 202 ++++ StorageControl/README.md | 44 + StorageControl/VERSION | 1 + StorageControl/composer.json | 31 + StorageControl/metadata/V2/StorageControl.php | Bin 0 -> 7875 bytes StorageControl/owlbot.py | 62 ++ StorageControl/phpunit.xml.dist | 16 + .../V2/StorageControlClient/create_folder.php | 83 ++ .../create_managed_folder.php | 77 ++ .../V2/StorageControlClient/delete_folder.php | 72 ++ .../delete_managed_folder.php | 75 ++ .../V2/StorageControlClient/get_folder.php | 74 ++ .../get_managed_folder.php | 77 ++ .../get_storage_layout.php | 72 ++ .../V2/StorageControlClient/list_folders.php | 79 ++ .../list_managed_folders.php | 76 ++ .../V2/StorageControlClient/rename_folder.php | 91 ++ .../src/V2/Client/StorageControlClient.php | 597 ++++++++++++ .../V2/CommonLongRunningOperationMetadata.php | 273 ++++++ StorageControl/src/V2/CreateFolderRequest.php | 281 ++++++ .../src/V2/CreateManagedFolderRequest.php | 221 +++++ StorageControl/src/V2/DeleteFolderRequest.php | 222 +++++ .../src/V2/DeleteManagedFolderRequest.php | 271 ++++++ StorageControl/src/V2/Folder.php | 259 +++++ StorageControl/src/V2/GetFolderRequest.php | 222 +++++ .../src/V2/GetManagedFolderRequest.php | 225 +++++ .../src/V2/GetStorageLayoutRequest.php | 162 ++++ StorageControl/src/V2/ListFoldersRequest.php | 374 ++++++++ StorageControl/src/V2/ListFoldersResponse.php | 105 +++ .../src/V2/ListManagedFoldersRequest.php | 233 +++++ .../src/V2/ListManagedFoldersResponse.php | 105 +++ StorageControl/src/V2/ManagedFolder.php | 205 ++++ StorageControl/src/V2/PendingRenameInfo.php | 67 ++ .../src/V2/RenameFolderMetadata.php | 146 +++ StorageControl/src/V2/RenameFolderRequest.php | 262 ++++++ StorageControl/src/V2/StorageLayout.php | 239 +++++ .../StorageLayout/CustomPlacementConfig.php | 70 ++ .../StorageLayout/HierarchicalNamespace.php | 68 ++ StorageControl/src/V2/gapic_metadata.json | 68 ++ .../storage_control_client_config.json | 98 ++ .../storage_control_descriptor_config.php | 222 +++++ .../V2/Client/StorageControlClientTest.php | 882 ++++++++++++++++++ composer.json | 7 +- 48 files changed, 7068 insertions(+), 2 deletions(-) create mode 100644 StorageControl/.OwlBot.yaml create mode 100644 StorageControl/.gitattributes create mode 100644 StorageControl/.github/pull_request_template.md create mode 100644 StorageControl/.repo-metadata.json create mode 100644 StorageControl/CONTRIBUTING.md create mode 100644 StorageControl/LICENSE create mode 100644 StorageControl/README.md create mode 100644 StorageControl/VERSION create mode 100644 StorageControl/composer.json create mode 100644 StorageControl/metadata/V2/StorageControl.php create mode 100644 StorageControl/owlbot.py create mode 100644 StorageControl/phpunit.xml.dist create mode 100644 StorageControl/samples/V2/StorageControlClient/create_folder.php create mode 100644 StorageControl/samples/V2/StorageControlClient/create_managed_folder.php create mode 100644 StorageControl/samples/V2/StorageControlClient/delete_folder.php create mode 100644 StorageControl/samples/V2/StorageControlClient/delete_managed_folder.php create mode 100644 StorageControl/samples/V2/StorageControlClient/get_folder.php create mode 100644 StorageControl/samples/V2/StorageControlClient/get_managed_folder.php create mode 100644 StorageControl/samples/V2/StorageControlClient/get_storage_layout.php create mode 100644 StorageControl/samples/V2/StorageControlClient/list_folders.php create mode 100644 StorageControl/samples/V2/StorageControlClient/list_managed_folders.php create mode 100644 StorageControl/samples/V2/StorageControlClient/rename_folder.php create mode 100644 StorageControl/src/V2/Client/StorageControlClient.php create mode 100644 StorageControl/src/V2/CommonLongRunningOperationMetadata.php create mode 100644 StorageControl/src/V2/CreateFolderRequest.php create mode 100644 StorageControl/src/V2/CreateManagedFolderRequest.php create mode 100644 StorageControl/src/V2/DeleteFolderRequest.php create mode 100644 StorageControl/src/V2/DeleteManagedFolderRequest.php create mode 100644 StorageControl/src/V2/Folder.php create mode 100644 StorageControl/src/V2/GetFolderRequest.php create mode 100644 StorageControl/src/V2/GetManagedFolderRequest.php create mode 100644 StorageControl/src/V2/GetStorageLayoutRequest.php create mode 100644 StorageControl/src/V2/ListFoldersRequest.php create mode 100644 StorageControl/src/V2/ListFoldersResponse.php create mode 100644 StorageControl/src/V2/ListManagedFoldersRequest.php create mode 100644 StorageControl/src/V2/ListManagedFoldersResponse.php create mode 100644 StorageControl/src/V2/ManagedFolder.php create mode 100644 StorageControl/src/V2/PendingRenameInfo.php create mode 100644 StorageControl/src/V2/RenameFolderMetadata.php create mode 100644 StorageControl/src/V2/RenameFolderRequest.php create mode 100644 StorageControl/src/V2/StorageLayout.php create mode 100644 StorageControl/src/V2/StorageLayout/CustomPlacementConfig.php create mode 100644 StorageControl/src/V2/StorageLayout/HierarchicalNamespace.php create mode 100644 StorageControl/src/V2/gapic_metadata.json create mode 100644 StorageControl/src/V2/resources/storage_control_client_config.json create mode 100644 StorageControl/src/V2/resources/storage_control_descriptor_config.php create mode 100644 StorageControl/tests/Unit/V2/Client/StorageControlClientTest.php diff --git a/StorageControl/.OwlBot.yaml b/StorageControl/.OwlBot.yaml new file mode 100644 index 000000000000..db48c19e8d01 --- /dev/null +++ b/StorageControl/.OwlBot.yaml @@ -0,0 +1,4 @@ +deep-copy-regex: + - source: /google/storage/control/(v2)/.*-php/(.*) + dest: /owl-bot-staging/StorageControl/$1/$2 +api-name: StorageControl diff --git a/StorageControl/.gitattributes b/StorageControl/.gitattributes new file mode 100644 index 000000000000..8119e7fcc1b2 --- /dev/null +++ b/StorageControl/.gitattributes @@ -0,0 +1,8 @@ +/*.xml.dist export-ignore +/.OwlBot.yaml export-ignore +/.github export-ignore +/.repo-metadata.json export-ignore +/owlbot.py export-ignore +/src/**/gapic_metadata.json export-ignore +/samples export-ignore +/tests export-ignore diff --git a/StorageControl/.github/pull_request_template.md b/StorageControl/.github/pull_request_template.md new file mode 100644 index 000000000000..c747bcf4652b --- /dev/null +++ b/StorageControl/.github/pull_request_template.md @@ -0,0 +1,24 @@ +**PLEASE READ THIS ENTIRE MESSAGE** + +Hello, and thank you for your contribution! Please note that this repository is +a read-only split of `googleapis/google-cloud-php`. As such, we are +unable to accept pull requests to this repository. + +We welcome your pull request and would be happy to consider it for inclusion in +our library if you follow these steps: + +* Clone the parent client library repository: + +```sh +$ git clone git@github.com:googleapis/google-cloud-php.git +``` + +* Move your changes into the correct location in that library. Library code +belongs in `StorageControl/src`, and tests in `StorageControl/tests`. + +* Push the changes in a new branch to a fork, and open a new pull request +[here](https://github.com/googleapis/google-cloud-php). + +Thanks again, and we look forward to seeing your proposed change! + +The Google Cloud PHP team diff --git a/StorageControl/.repo-metadata.json b/StorageControl/.repo-metadata.json new file mode 100644 index 000000000000..74e764e608ed --- /dev/null +++ b/StorageControl/.repo-metadata.json @@ -0,0 +1,8 @@ +{ + "language": "php", + "distribution_name": "google/cloud-storage-control", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-storage-control/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "storage" +} diff --git a/StorageControl/CONTRIBUTING.md b/StorageControl/CONTRIBUTING.md new file mode 100644 index 000000000000..76ea811cacdb --- /dev/null +++ b/StorageControl/CONTRIBUTING.md @@ -0,0 +1,10 @@ +# How to Contribute + +We'd love to accept your patches and contributions to this project. We accept +and review pull requests against the main +[Google Cloud PHP](https://github.com/googleapis/google-cloud-php) +repository, which contains all of our client libraries. You will also need to +sign a Contributor License Agreement. For more details about how to contribute, +see the +[CONTRIBUTING.md](https://github.com/googleapis/google-cloud-php/blob/main/CONTRIBUTING.md) +file in the main Google Cloud PHP repository. diff --git a/StorageControl/LICENSE b/StorageControl/LICENSE new file mode 100644 index 000000000000..8f71f43fee3f --- /dev/null +++ b/StorageControl/LICENSE @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/StorageControl/README.md b/StorageControl/README.md new file mode 100644 index 000000000000..026d2255300f --- /dev/null +++ b/StorageControl/README.md @@ -0,0 +1,44 @@ +# Google Cloud Storage Control for PHP + +> Idiomatic PHP client for [Google Cloud Storage Control](https://cloud.google.com/storage). + +[![Latest Stable Version](https://poser.pugx.org/google/cloud-storage-control/v/stable)](https://packagist.org/packages/google/cloud-storage-control) [![Packagist](https://img.shields.io/packagist/dm/google/cloud-storage-control.svg)](https://packagist.org/packages/google/cloud-storage-control) + +* [API documentation](https://cloud.google.com/php/docs/reference/cloud-storage-control/latest) + +**NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any +support requests, bug reports, or development contributions should be directed to +that project. + +### Installation + +To begin, install the preferred dependency manager for PHP, [Composer](https://getcomposer.org/). + +Now, install this component: + +```sh +$ composer require google/cloud-storage-control +``` + +> Browse the complete list of [Google Cloud APIs](https://cloud.google.com/php/docs/reference) +> for PHP + +This component requires the gRPC extension. Please see our [gRPC installation guide](https://cloud.google.com/php/grpc) +for more information on how to configure the extension. + +### Authentication + +Please see our [Authentication guide](https://github.com/googleapis/google-cloud-php/blob/main/AUTHENTICATION.md) for more information +on authenticating your client. Once authenticated, you'll be ready to start making requests. + +### Sample + +See the [samples directory](https://github.com/googleapis/google-cloud-php-storage-control/tree/main/samples) for a canonical list of samples. + +### Version + +This component is considered alpha. As such, it is still a work-in-progress and is more likely to get backwards-incompatible updates. + +### Next Steps + +1. Understand the [official documentation](https://cloud.google.com/storage/docs/overview). diff --git a/StorageControl/VERSION b/StorageControl/VERSION new file mode 100644 index 000000000000..77d6f4ca2371 --- /dev/null +++ b/StorageControl/VERSION @@ -0,0 +1 @@ +0.0.0 diff --git a/StorageControl/composer.json b/StorageControl/composer.json new file mode 100644 index 000000000000..ca487cadc5b2 --- /dev/null +++ b/StorageControl/composer.json @@ -0,0 +1,31 @@ +{ + "name": "google/cloud-storage-control", + "description": "Google Cloud Storage Control Client for PHP", + "license": "Apache-2.0", + "minimum-stability": "stable", + "autoload": { + "psr-4": { + "Google\\Cloud\\Storage\\Control\\": "src", + "GPBMetadata\\Google\\Storage\\Control\\": "metadata" + } + }, + "extra": { + "component": { + "id": "cloud-storage-control", + "path": "StorageControl", + "target": "googleapis/google-cloud-php-storage-control" + } + }, + "require": { + "php": "^8.0", + "ext-grpc": "*", + "google/gax": "^1.30.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "suggest": { + "ext-grpc": "Enables use of gRPC, a universal high-performance RPC framework created by Google.", + "ext-protobuf": "Provides a significant increase in throughput over the pure PHP protobuf implementation. See https://cloud.google.com/php/grpc for installation instructions." + } +} diff --git a/StorageControl/metadata/V2/StorageControl.php b/StorageControl/metadata/V2/StorageControl.php new file mode 100644 index 0000000000000000000000000000000000000000..6292a961c287f7376a684775318050b6606f1887 GIT binary patch literal 7875 zcmds6-EZ7j6~~_4Ho2imdqb1iDQ&$@*=DopjCOX*O73QnCu!44{fI(U2{e-Bc}YctB`X2_$%01dpuXj{qKcs-S5IGA;#HN|M##6j zBo1wdXq#J&dnB=2c49X-nVIIdxtZoVH`9Dnzk!hB*>S9iPvQ&u1ZnUW_I5ni(c;8T z;NKNDwp`y$T-$Sh0FzqN+O`)HFwrmD?)gsQ2EIlW9{3Jfep}-wS`zh0esoQX zNYab^8_aKN;4ph?4v3l=y3KXZC4OQUN7Fgd9;S24C0?sRcI`bkh)$q-$8QIdscjRH zHxv1}9rO~{?~Fgx-N5feJ>LhV=7W%?I3OL5ub;sU!M@oIlY2nKK+;Rpuh5su0<8@SJnwKmNHYe%F3 zU#67{eF83kEj|jvHL4v6M8&6aPA}rHi7!jyi+6-gEy%DrHZ0=`SZ_5#qc1+DPG=vJ zG{js$e+Ql0B7O@{-zJo1Xnx`aG@T7oRy1XKx>0&=mh=}YI&~}XS|q~f&}&ru=<5`| zfM&bEO&v~pq$f`JAkXO$r#U9h6Tq?bUS5eu%4mkzigJ-b>R(7gKreGT<0Pc64hZ9v?u2zek)T zu6-h&4r@C-=VLCj=CL34vRz7}^wu>FXSTMTFS0$c#$kvl zcpefbB5n6EBOCD&th9*dc3o&m%2O%43f9oPM;^OQ(24AD*L5r?Ls3%Z%Z&kj37wNA zfMFP=2+Q)~nC@E~`VN|xq7jEsUkR?GlmQ^YOF)XFGZinQIiEaEtlY$DmQU-yP|-Z+ z@xjSPDR6B1(9!u8aF6S=R=_%17Fpa>TtG3LIL4tE$|M6RhKK)^QOsv5($|A-H}Gk* zv(1~Gtk+5V>f@z~*1s`I)w^g4GJ;n(PC1iSH_A3+378B>+;MRXP_QwN%l*n%Fyp_EDk%+^s!|6D;|%co8jjz?$?>Kp`(RT8@M zU`#wyUn`*0F~VF%XL)0r%Pf|~;OUUWV|=Xty@bw)oy}eQ02-$LW~7AAqbV**xZWy_n7|1H?iIoX~U>{~w6GqzFYCGyzb<`p*{e^AgHwD*(3lQqQuT@t*SzF5Y% ze`}{dMwLM`5KXL!=HwLOb!DbLb}A0-Y3pCip;=K5#6c$hOhI4G?-g;iAmj6bA|)%M zdu;uKXXYZ`c&_r!SNwy;@#$aw@iTQ1S`4u>#WP}uPiYbV1f0un_zIoN3#QI3q>}-f zW+$jscAiE(VrMRF_!ZcRJ)zk~q&%{jF!Fz^fR)F95%MBV34IUNCj+Vmgo9v0XLW zX6XJ?^HO$W>#odxH@q6H8J|X;pa(GM}_ODkAssy5>Dq;w3a1>lV|GhvqK<> zD)IFKcZZkPN|DFX0Q%-Lvw2l4cbUmn<)0&$|1Y!i9%+QaDGV>3l~+y%A{}JsMx=uz zJWe`D3MWqo@Rgk)N#pUqFz-6RQP zqgLDB-xuCzC&+d$*{wNV&}&_Tjc3vhqVDQs;#D{|ZCwj|?_i{2i|nONwtJqJ-ZW04 zM+dVe9gHdMM{w@e__c~I!imCg5F7J?PDH)mqIGaf`R*DEQmO|g;Cd&$GR#7)|Dh8=Osy|I7ns7A;BF*e>HM?Ae+truq61QU* zOv*5XCHT!pH4Kn4H-;Y1H`u)ZUdjsg@GFBIIKza=zjrme+gjyUpShdTp|_+=l3!^a IqC + + + + src + + + src/V[!a-zA-Z]* + + + + + tests/Unit + + + diff --git a/StorageControl/samples/V2/StorageControlClient/create_folder.php b/StorageControl/samples/V2/StorageControlClient/create_folder.php new file mode 100644 index 000000000000..14d0a5f64d18 --- /dev/null +++ b/StorageControl/samples/V2/StorageControlClient/create_folder.php @@ -0,0 +1,83 @@ +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/StorageControl/samples/V2/StorageControlClient/create_managed_folder.php b/StorageControl/samples/V2/StorageControlClient/create_managed_folder.php new file mode 100644 index 000000000000..367c733b53f7 --- /dev/null +++ b/StorageControl/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/StorageControl/samples/V2/StorageControlClient/delete_folder.php b/StorageControl/samples/V2/StorageControlClient/delete_folder.php new file mode 100644 index 000000000000..ca3512485a12 --- /dev/null +++ b/StorageControl/samples/V2/StorageControlClient/delete_folder.php @@ -0,0 +1,72 @@ +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/StorageControl/samples/V2/StorageControlClient/delete_managed_folder.php b/StorageControl/samples/V2/StorageControlClient/delete_managed_folder.php new file mode 100644 index 000000000000..5fec0fb26789 --- /dev/null +++ b/StorageControl/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]', + '[MANAGEDFOLDER]' + ); + + delete_managed_folder_sample($formattedName); +} +// [END storage_v2_generated_StorageControl_DeleteManagedFolder_sync] diff --git a/StorageControl/samples/V2/StorageControlClient/get_folder.php b/StorageControl/samples/V2/StorageControlClient/get_folder.php new file mode 100644 index 000000000000..bf29421ecfd1 --- /dev/null +++ b/StorageControl/samples/V2/StorageControlClient/get_folder.php @@ -0,0 +1,74 @@ +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/StorageControl/samples/V2/StorageControlClient/get_managed_folder.php b/StorageControl/samples/V2/StorageControlClient/get_managed_folder.php new file mode 100644 index 000000000000..1d48475f4ef5 --- /dev/null +++ b/StorageControl/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]', + '[MANAGEDFOLDER]' + ); + + get_managed_folder_sample($formattedName); +} +// [END storage_v2_generated_StorageControl_GetManagedFolder_sync] diff --git a/StorageControl/samples/V2/StorageControlClient/get_storage_layout.php b/StorageControl/samples/V2/StorageControlClient/get_storage_layout.php new file mode 100644 index 000000000000..3a8b9e36aeb6 --- /dev/null +++ b/StorageControl/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/StorageControl/samples/V2/StorageControlClient/list_folders.php b/StorageControl/samples/V2/StorageControlClient/list_folders.php new file mode 100644 index 000000000000..f85807165986 --- /dev/null +++ b/StorageControl/samples/V2/StorageControlClient/list_folders.php @@ -0,0 +1,79 @@ +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/StorageControl/samples/V2/StorageControlClient/list_managed_folders.php b/StorageControl/samples/V2/StorageControlClient/list_managed_folders.php new file mode 100644 index 000000000000..7b9623d4f14a --- /dev/null +++ b/StorageControl/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/StorageControl/samples/V2/StorageControlClient/rename_folder.php b/StorageControl/samples/V2/StorageControlClient/rename_folder.php new file mode 100644 index 000000000000..cf5a4e3e05fc --- /dev/null +++ b/StorageControl/samples/V2/StorageControlClient/rename_folder.php @@ -0,0 +1,91 @@ +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/StorageControl/src/V2/Client/StorageControlClient.php b/StorageControl/src/V2/Client/StorageControlClient.php new file mode 100644 index 000000000000..9a766ef1fb6d --- /dev/null +++ b/StorageControl/src/V2/Client/StorageControlClient.php @@ -0,0 +1,597 @@ + 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, + ], + ]; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return ['grpc', 'grpc-fallback']; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) + ? $this->descriptors[$methodName]['longRunning'] + : []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * 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 + * 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, + 'managedFolder' => $managedFolder, + ]); + } + + /** + * 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 + * - bucket: projects/{project}/buckets/{bucket} + * - folder: projects/{project}/buckets/{bucket}/folders/{folder=**} + * - managedFolder: projects/{project}/buckets/{bucket}/managedFolders/{managedFolder=**} + * - 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 $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 string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `grpc`. *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' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new folder. This operation is only applicable to a hierarchical + * namespace enabled bucket. + * Hierarchical namespace buckets are in allowlist preview. + * + * 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. + * Hierarchical namespace buckets are in allowlist preview. + * + * 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(); + } + + /** + * 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(); + } + + /** + * Returns metadata for the specified folder. This operation is only + * applicable to a hierarchical namespace enabled bucket. + * Hierarchical namespace buckets are in allowlist preview. + * + * 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 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 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(); + } + + /** + * Retrieves a list of folders. This operation is only applicable to a + * hierarchical namespace enabled bucket. + * Hierarchical namespace buckets are in allowlist preview. + * + * 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); + } + + /** + * 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. + * Hierarchical namespace buckets are in allowlist preview. + * + * 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(); + } +} diff --git a/StorageControl/src/V2/CommonLongRunningOperationMetadata.php b/StorageControl/src/V2/CommonLongRunningOperationMetadata.php new file mode 100644 index 000000000000..67e1c36d73d3 --- /dev/null +++ b/StorageControl/src/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/StorageControl/src/V2/CreateFolderRequest.php b/StorageControl/src/V2/CreateFolderRequest.php new file mode 100644 index 000000000000..805011c9fe0c --- /dev/null +++ b/StorageControl/src/V2/CreateFolderRequest.php @@ -0,0 +1,281 @@ +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/StorageControl/src/V2/CreateManagedFolderRequest.php b/StorageControl/src/V2/CreateManagedFolderRequest.php new file mode 100644 index 000000000000..e5320e9019f0 --- /dev/null +++ b/StorageControl/src/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/StorageControl/src/V2/DeleteFolderRequest.php b/StorageControl/src/V2/DeleteFolderRequest.php new file mode 100644 index 000000000000..6958ada830b8 --- /dev/null +++ b/StorageControl/src/V2/DeleteFolderRequest.php @@ -0,0 +1,222 @@ +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/StorageControl/src/V2/DeleteManagedFolderRequest.php b/StorageControl/src/V2/DeleteManagedFolderRequest.php new file mode 100644 index 000000000000..957f9300a277 --- /dev/null +++ b/StorageControl/src/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/StorageControl/src/V2/Folder.php b/StorageControl/src/V2/Folder.php new file mode 100644 index 000000000000..8c1eba3f85dd --- /dev/null +++ b/StorageControl/src/V2/Folder.php @@ -0,0 +1,259 @@ +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/StorageControl/src/V2/GetFolderRequest.php b/StorageControl/src/V2/GetFolderRequest.php new file mode 100644 index 000000000000..2319f89f3424 --- /dev/null +++ b/StorageControl/src/V2/GetFolderRequest.php @@ -0,0 +1,222 @@ +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/StorageControl/src/V2/GetManagedFolderRequest.php b/StorageControl/src/V2/GetManagedFolderRequest.php new file mode 100644 index 000000000000..b4deee313827 --- /dev/null +++ b/StorageControl/src/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/StorageControl/src/V2/GetStorageLayoutRequest.php b/StorageControl/src/V2/GetStorageLayoutRequest.php new file mode 100644 index 000000000000..ca2429d9ac1f --- /dev/null +++ b/StorageControl/src/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/StorageControl/src/V2/ListFoldersRequest.php b/StorageControl/src/V2/ListFoldersRequest.php new file mode 100644 index 000000000000..58c36f44ffeb --- /dev/null +++ b/StorageControl/src/V2/ListFoldersRequest.php @@ -0,0 +1,374 @@ +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/StorageControl/src/V2/ListFoldersResponse.php b/StorageControl/src/V2/ListFoldersResponse.php new file mode 100644 index 000000000000..eb67af3ca9e8 --- /dev/null +++ b/StorageControl/src/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/StorageControl/src/V2/ListManagedFoldersRequest.php b/StorageControl/src/V2/ListManagedFoldersRequest.php new file mode 100644 index 000000000000..4af92f638e5a --- /dev/null +++ b/StorageControl/src/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/StorageControl/src/V2/ListManagedFoldersResponse.php b/StorageControl/src/V2/ListManagedFoldersResponse.php new file mode 100644 index 000000000000..7ca7daea2e9c --- /dev/null +++ b/StorageControl/src/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/StorageControl/src/V2/ManagedFolder.php b/StorageControl/src/V2/ManagedFolder.php new file mode 100644 index 000000000000..46a6d1984b82 --- /dev/null +++ b/StorageControl/src/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/StorageControl/src/V2/PendingRenameInfo.php b/StorageControl/src/V2/PendingRenameInfo.php new file mode 100644 index 000000000000..52172ad37498 --- /dev/null +++ b/StorageControl/src/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/StorageControl/src/V2/RenameFolderMetadata.php b/StorageControl/src/V2/RenameFolderMetadata.php new file mode 100644 index 000000000000..d9d0313fd1a7 --- /dev/null +++ b/StorageControl/src/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/StorageControl/src/V2/RenameFolderRequest.php b/StorageControl/src/V2/RenameFolderRequest.php new file mode 100644 index 000000000000..fd0605ae9953 --- /dev/null +++ b/StorageControl/src/V2/RenameFolderRequest.php @@ -0,0 +1,262 @@ +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/StorageControl/src/V2/StorageLayout.php b/StorageControl/src/V2/StorageLayout.php new file mode 100644 index 000000000000..a48fbe8ef2ee --- /dev/null +++ b/StorageControl/src/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/StorageControl/src/V2/StorageLayout/CustomPlacementConfig.php b/StorageControl/src/V2/StorageLayout/CustomPlacementConfig.php new file mode 100644 index 000000000000..97704ea47229 --- /dev/null +++ b/StorageControl/src/V2/StorageLayout/CustomPlacementConfig.php @@ -0,0 +1,70 @@ +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; + } + +} + + diff --git a/StorageControl/src/V2/StorageLayout/HierarchicalNamespace.php b/StorageControl/src/V2/StorageLayout/HierarchicalNamespace.php new file mode 100644 index 000000000000..6ee8111687cf --- /dev/null +++ b/StorageControl/src/V2/StorageLayout/HierarchicalNamespace.php @@ -0,0 +1,68 @@ +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; + } + +} + + diff --git a/StorageControl/src/V2/gapic_metadata.json b/StorageControl/src/V2/gapic_metadata.json new file mode 100644 index 000000000000..61ee835d8977 --- /dev/null +++ b/StorageControl/src/V2/gapic_metadata.json @@ -0,0 +1,68 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.storage.control.v2", + "libraryPackage": "Google\\Cloud\\Storage\\Control\\V2", + "services": { + "StorageControl": { + "clients": { + "grpc": { + "libraryClient": "StorageControlGapicClient", + "rpcs": { + "CreateFolder": { + "methods": [ + "createFolder" + ] + }, + "CreateManagedFolder": { + "methods": [ + "createManagedFolder" + ] + }, + "DeleteFolder": { + "methods": [ + "deleteFolder" + ] + }, + "DeleteManagedFolder": { + "methods": [ + "deleteManagedFolder" + ] + }, + "GetFolder": { + "methods": [ + "getFolder" + ] + }, + "GetManagedFolder": { + "methods": [ + "getManagedFolder" + ] + }, + "GetStorageLayout": { + "methods": [ + "getStorageLayout" + ] + }, + "ListFolders": { + "methods": [ + "listFolders" + ] + }, + "ListManagedFolders": { + "methods": [ + "listManagedFolders" + ] + }, + "RenameFolder": { + "methods": [ + "renameFolder" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/StorageControl/src/V2/resources/storage_control_client_config.json b/StorageControl/src/V2/resources/storage_control_client_config.json new file mode 100644 index 000000000000..b6522d27f8ab --- /dev/null +++ b/StorageControl/src/V2/resources/storage_control_client_config.json @@ -0,0 +1,98 @@ +{ + "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": { + "CreateFolder": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_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" + }, + "DeleteManagedFolder": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetFolder": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetManagedFolder": { + "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" + }, + "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" + }, + "RenameFolder": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/StorageControl/src/V2/resources/storage_control_descriptor_config.php b/StorageControl/src/V2/resources/storage_control_descriptor_config.php new file mode 100644 index 000000000000..351dee8ec73e --- /dev/null +++ b/StorageControl/src/V2/resources/storage_control_descriptor_config.php @@ -0,0 +1,222 @@ + [ + 'google.storage.control.v2.StorageControl' => [ + '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, + ], + ], + '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, + ], + ], + '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, + ], + ], + '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, + ], + ], + '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, + ], + ], + '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, + ], + ], + 'templateMap' => [ + 'bucket' => 'projects/{project}/buckets/{bucket}', + 'folder' => 'projects/{project}/buckets/{bucket}/folders/{folder=**}', + 'managedFolder' => 'projects/{project}/buckets/{bucket}/managedFolders/{managedFolder=**}', + 'storageLayout' => 'projects/{project}/buckets/{bucket}/storageLayout', + ], + ], + ], +]; diff --git a/StorageControl/tests/Unit/V2/Client/StorageControlClientTest.php b/StorageControl/tests/Unit/V2/Client/StorageControlClientTest.php new file mode 100644 index 000000000000..9d0b66f96030 --- /dev/null +++ b/StorageControl/tests/Unit/V2/Client/StorageControlClientTest.php @@ -0,0 +1,882 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return StorageControlClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new StorageControlClient($options); + } + + /** @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 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]', '[MANAGEDFOLDER]'); + $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]', '[MANAGEDFOLDER]'); + $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 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 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]', '[MANAGEDFOLDER]'); + $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]', '[MANAGEDFOLDER]'); + $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 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 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 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 createFolderAsyncTest() + { + $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->createFolderAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.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()); + } +} diff --git a/composer.json b/composer.json index 5894eee6c8e8..2fabda4d1214 100644 --- a/composer.json +++ b/composer.json @@ -218,6 +218,7 @@ "google/cloud-speech": "1.18.1", "google/cloud-sql-admin": "0.16.1", "google/cloud-storage": "1.41.3", + "google/cloud-storage-control": "0.0.0", "google/cloud-storage-transfer": "1.4.3", "google/cloud-storageinsights": "0.3.3", "google/cloud-support": "0.2.3", @@ -261,12 +262,12 @@ "GPBMetadata\\Google\\Api\\Servicemanagement\\": "ServiceManagement/metadata", "GPBMetadata\\Google\\Api\\Serviceusage\\": "ServiceUsage/metadata", "GPBMetadata\\Google\\Appengine\\": "AppEngineAdmin/metadata", + "GPBMetadata\\Google\\Apps\\Card\\": "AppsChat/metadata/Card", "GPBMetadata\\Google\\Apps\\Events\\Subscriptions\\": "AppsEventsSubscriptions/metadata", "GPBMetadata\\Google\\Apps\\Meet\\": "AppsMeet/metadata", "GPBMetadata\\Google\\Apps\\Script\\Type\\": "GSuiteAddOns/external/metadata", "GPBMetadata\\Google\\Bigtable\\": "Bigtable/metadata", "GPBMetadata\\Google\\Chat\\": "AppsChat/metadata/Chat", - "GPBMetadata\\Google\\Apps\\Card\\": "AppsChat/metadata/Card", "GPBMetadata\\Google\\Cloud\\Accessapproval\\": "AccessApproval/metadata", "GPBMetadata\\Google\\Cloud\\Advisorynotifications\\": "AdvisoryNotifications/metadata", "GPBMetadata\\Google\\Cloud\\Aiplatform\\": "AiPlatform/metadata", @@ -434,13 +435,14 @@ "GPBMetadata\\Google\\Shopping\\Merchant\\Reports\\": "ShoppingMerchantReports/metadata", "GPBMetadata\\Google\\Shopping\\Type\\": "ShoppingCommonProtos/metadata/Type", "GPBMetadata\\Google\\Spanner\\": "Spanner/metadata", + "GPBMetadata\\Google\\Storage\\Control\\": "StorageControl/metadata", "GPBMetadata\\Google\\Storagetransfer\\": "StorageTransfer/metadata", "GPBMetadata\\Grafeas\\": "Grafeas/metadata", "Google\\Analytics\\Admin\\": "AnalyticsAdmin/src", "Google\\Analytics\\Data\\": "AnalyticsData/src", "Google\\ApiCore\\LongRunning\\": "LongRunning/src/ApiCore/LongRunning", - "Google\\Apps\\Chat\\": "AppsChat/src/Chat", "Google\\Apps\\Card\\": "AppsChat/src/Card", + "Google\\Apps\\Chat\\": "AppsChat/src/Chat", "Google\\Apps\\Events\\Subscriptions\\": "AppsEventsSubscriptions/src", "Google\\Apps\\Meet\\": "AppsMeet/src", "Google\\Apps\\Script\\Type\\": "GSuiteAddOns/external/protos", @@ -593,6 +595,7 @@ "Google\\Cloud\\StorageInsights\\": "StorageInsights/src", "Google\\Cloud\\StorageTransfer\\": "StorageTransfer/src", "Google\\Cloud\\Storage\\": "Storage/src", + "Google\\Cloud\\Storage\\Control\\": "StorageControl/src", "Google\\Cloud\\Support\\": "Support/src", "Google\\Cloud\\Talent\\": "Talent/src", "Google\\Cloud\\Tasks\\": "Tasks/src", From 6744443c0689dd56d6b7882d7c444a1fc2f07179 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 26 Apr 2024 18:30:21 +0530 Subject: [PATCH 64/86] feat: Add Secret Version Delayed Destroy changes for client libraries (#7250) docs: Users can now enable secret version delayed destruction PiperOrigin-RevId: 626820938 Source-Link: https://github.com/googleapis/googleapis/commit/034570432b14b429c5f597701132b6d9ceb553a2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/2532a567ea4749c5f5e1c0bb7a3f710b06279390 Copy-Tag: eyJwIjoiU2VjcmV0TWFuYWdlci8uT3dsQm90LnlhbWwiLCJoIjoiMjUzMmE1NjdlYTQ3NDljNWY1ZTFjMGJiN2EzZjcxMGIwNjI3OTM5MCJ9 Co-authored-by: Ajumal --- SecretManager/metadata/V1/Resources.php | Bin 4230 -> 4756 bytes SecretManager/metadata/V1/Service.php | 50 +++-- .../access_secret_version.php | 9 +- .../add_secret_version.php | 2 +- .../create_secret.php | 8 +- .../destroy_secret_version.php | 3 +- .../disable_secret_version.php | 3 +- .../enable_secret_version.php | 3 +- .../SecretManagerServiceClient/get_secret.php | 2 +- .../get_secret_version.php | 9 +- .../list_secret_versions.php | 2 +- .../list_secrets.php | 6 +- .../update_secret.php | 5 +- .../src/V1/AccessSecretVersionRequest.php | 45 ++-- .../src/V1/AccessSecretVersionResponse.php | 12 +- .../src/V1/AddSecretVersionRequest.php | 10 +- .../V1/Client/SecretManagerServiceClient.php | 98 +++++++++ SecretManager/src/V1/CreateSecretRequest.php | 15 +- .../src/V1/DestroySecretVersionRequest.php | 15 +- .../src/V1/DisableSecretVersionRequest.php | 15 +- .../src/V1/EnableSecretVersionRequest.php | 15 +- .../Gapic/SecretManagerServiceGapicClient.php | 198 ++++++++++++++++-- SecretManager/src/V1/GetSecretRequest.php | 10 +- .../src/V1/GetSecretVersionRequest.php | 45 ++-- .../src/V1/ListSecretVersionsRequest.php | 10 +- .../src/V1/ListSecretVersionsResponse.php | 20 +- SecretManager/src/V1/ListSecretsRequest.php | 22 +- SecretManager/src/V1/ListSecretsResponse.php | 20 +- SecretManager/src/V1/Secret.php | 154 +++++++++++++- SecretManager/src/V1/SecretVersion.php | 120 +++++++++++ SecretManager/src/V1/Topic.php | 20 +- ...cret_manager_service_descriptor_config.php | 5 + ...ret_manager_service_rest_client_config.php | 104 +++++++++ .../Client/SecretManagerServiceClientTest.php | 9 - .../V1/SecretManagerServiceClientTest.php | 9 - 35 files changed, 883 insertions(+), 190 deletions(-) diff --git a/SecretManager/metadata/V1/Resources.php b/SecretManager/metadata/V1/Resources.php index 6033f84c64ab9bb93625965a030b2b559a4d1810..17447424407f99b4a0f827c27a7de843b89d6c20 100644 GIT binary patch delta 329 zcmZouoT9qnJQLF|xycuqRx>@~m|Vx4%*eR;5wjGNq>we2a9L_mab|vAd`fC@Nl|`f zd`U@;1mEQAEXs_GlP_>8F!E3S$mufqFY7FhnT)R-r!sOWPhQWVJox~dYK)LYK~a8I zYH~@jel?U;tDlpfoLB-h5GV#?*6J6hCKsiGltCD^TI^5}BQ^-biHD0TwW1)i2&`A> z5ZmT&Y#EF)LiSu@#mO0|DWy57DF`QK=B7$;Oio}|n;gU|&&WABfyZ-l9EUgCBcKcK mF-~5~k*y&VM4a0uzv0l4*W!b?A`B81#YVg+{LK=adF%ik%y!uT delta 88 zcmV-e0H^wt7X>V>Kq6D+#2WSD4_X$e|Zt6j63M!L82P2bh3P!Ug3vLH@^&TYv diff --git a/SecretManager/metadata/V1/Service.php b/SecretManager/metadata/V1/Service.php index 19f886966a4d..720a08a68ac8 100644 --- a/SecretManager/metadata/V1/Service.php +++ b/SecretManager/metadata/V1/Service.php @@ -25,11 +25,10 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\FieldMask::initOnce(); $pool->internalAddGeneratedFile( ' -) -+google/cloud/secretmanager/v1/service.protogoogle.cloud.secretmanager.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto-google/cloud/secretmanager/v1/resources.protogoogle/iam/v1/iam_policy.protogoogle/iam/v1/policy.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"Ÿ -ListSecretsRequestC -parent ( B3àAúA- -+cloudresourcemanager.googleapis.com/Project +¦0 ++google/cloud/secretmanager/v1/service.protogoogle.cloud.secretmanager.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto-google/cloud/secretmanager/v1/resources.protogoogle/iam/v1/iam_policy.protogoogle/iam/v1/policy.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"— +ListSecretsRequest; +parent ( B+àAúA%#secretmanager.googleapis.com/Secret page_size (BàA page_token ( BàA @@ -38,10 +37,9 @@ public static function initOnce() { secrets ( 2%.google.cloud.secretmanager.v1.Secret next_page_token (  -total_size ("® -CreateSecretRequestC -parent ( B3àAúA- -+cloudresourcemanager.googleapis.com/Project +total_size ("¦ +CreateSecretRequest; +parent ( B+àAúA%#secretmanager.googleapis.com/Secret secret_id ( BàA: secret ( 2%.google.cloud.secretmanager.v1.SecretBàA"š AddSecretVersionRequest; @@ -91,23 +89,23 @@ public static function initOnce() { DestroySecretVersionRequest@ name ( B2àAúA, *secretmanager.googleapis.com/SecretVersion -etag ( BàA2Ï -SecretManagerService¦ - ListSecrets1.google.cloud.secretmanager.v1.ListSecretsRequest2.google.cloud.secretmanager.v1.ListSecretsResponse"0ÚAparent‚Óä“!/v1/{parent=projects/*}/secrets´ - CreateSecret2.google.cloud.secretmanager.v1.CreateSecretRequest%.google.cloud.secretmanager.v1.Secret"IÚAparent,secret_id,secret‚Óä“)"/v1/{parent=projects/*}/secrets:secret -AddSecretVersion6.google.cloud.secretmanager.v1.AddSecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"HÚAparent,payload‚Óä“1",/v1/{parent=projects/*/secrets/*}:addVersion:*“ - GetSecret/.google.cloud.secretmanager.v1.GetSecretRequest%.google.cloud.secretmanager.v1.Secret".ÚAname‚Óä“!/v1/{name=projects/*/secrets/*}¶ - UpdateSecret2.google.cloud.secretmanager.v1.UpdateSecretRequest%.google.cloud.secretmanager.v1.Secret"KÚAsecret,update_mask‚Óä“02&/v1/{secret.name=projects/*/secrets/*}:secretŠ - DeleteSecret2.google.cloud.secretmanager.v1.DeleteSecretRequest.google.protobuf.Empty".ÚAname‚Óä“!*/v1/{name=projects/*/secrets/*}Æ -ListSecretVersions8.google.cloud.secretmanager.v1.ListSecretVersionsRequest9.google.cloud.secretmanager.v1.ListSecretVersionsResponse";ÚAparent‚Óä“,*/v1/{parent=projects/*/secrets/*}/versions³ -GetSecretVersion6.google.cloud.secretmanager.v1.GetSecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"9ÚAname‚Óä“,*/v1/{name=projects/*/secrets/*/versions/*}Î -AccessSecretVersion9.google.cloud.secretmanager.v1.AccessSecretVersionRequest:.google.cloud.secretmanager.v1.AccessSecretVersionResponse"@ÚAname‚Óä“31/v1/{name=projects/*/secrets/*/versions/*}:accessÆ -DisableSecretVersion:.google.cloud.secretmanager.v1.DisableSecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"DÚAname‚Óä“7"2/v1/{name=projects/*/secrets/*/versions/*}:disable:*à -EnableSecretVersion9.google.cloud.secretmanager.v1.EnableSecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"CÚAname‚Óä“6"1/v1/{name=projects/*/secrets/*/versions/*}:enable:*Æ -DestroySecretVersion:.google.cloud.secretmanager.v1.DestroySecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"DÚAname‚Óä“7"2/v1/{name=projects/*/secrets/*/versions/*}:destroy:*† - SetIamPolicy".google.iam.v1.SetIamPolicyRequest.google.iam.v1.Policy";‚Óä“5"0/v1/{resource=projects/*/secrets/*}:setIamPolicy:*ƒ - GetIamPolicy".google.iam.v1.GetIamPolicyRequest.google.iam.v1.Policy"8‚Óä“20/v1/{resource=projects/*/secrets/*}:getIamPolicy¬ -TestIamPermissions(.google.iam.v1.TestIamPermissionsRequest).google.iam.v1.TestIamPermissionsResponse"A‚Óä“;"6/v1/{resource=projects/*/secrets/*}:testIamPermissions:*PÊAsecretmanager.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBè +etag ( BàA2è +SecretManagerServiceÕ + ListSecrets1.google.cloud.secretmanager.v1.ListSecretsRequest2.google.cloud.secretmanager.v1.ListSecretsResponse"_ÚAparent‚Óä“P/v1/{parent=projects/*}/secretsZ-+/v1/{parent=projects/*/locations/*}/secretsì + CreateSecret2.google.cloud.secretmanager.v1.CreateSecretRequest%.google.cloud.secretmanager.v1.Secret"€ÚAparent,secret_id,secret‚Óä“`"/v1/{parent=projects/*}/secrets:secretZ5"+/v1/{parent=projects/*/locations/*}/secrets:secret‚ +AddSecretVersion6.google.cloud.secretmanager.v1.AddSecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"‡ÚAparent,payload‚Óä“p",/v1/{parent=projects/*/secrets/*}:addVersion:*Z="8/v1/{parent=projects/*/locations/*/secrets/*}:addVersion:* + GetSecret/.google.cloud.secretmanager.v1.GetSecretRequest%.google.cloud.secretmanager.v1.Secret"]ÚAname‚Óä“P/v1/{name=projects/*/secrets/*}Z-+/v1/{name=projects/*/locations/*/secrets/*}õ + UpdateSecret2.google.cloud.secretmanager.v1.UpdateSecretRequest%.google.cloud.secretmanager.v1.Secret"‰ÚAsecret,update_mask‚Óä“n2&/v1/{secret.name=projects/*/secrets/*}:secretZ<22/v1/{secret.name=projects/*/locations/*/secrets/*}:secret¹ + DeleteSecret2.google.cloud.secretmanager.v1.DeleteSecretRequest.google.protobuf.Empty"]ÚAname‚Óä“P*/v1/{name=projects/*/secrets/*}Z-*+/v1/{name=projects/*/locations/*/secrets/*}€ +ListSecretVersions8.google.cloud.secretmanager.v1.ListSecretVersionsRequest9.google.cloud.secretmanager.v1.ListSecretVersionsResponse"uÚAparent‚Óä“f*/v1/{parent=projects/*/secrets/*}/versionsZ86/v1/{parent=projects/*/locations/*/secrets/*}/versionsí +GetSecretVersion6.google.cloud.secretmanager.v1.GetSecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"sÚAname‚Óä“f*/v1/{name=projects/*/secrets/*/versions/*}Z86/v1/{name=projects/*/locations/*/secrets/*/versions/*} +AccessSecretVersion9.google.cloud.secretmanager.v1.AccessSecretVersionRequest:.google.cloud.secretmanager.v1.AccessSecretVersionResponse"ÚAname‚Óä“t1/v1/{name=projects/*/secrets/*/versions/*}:accessZ?=/v1/{name=projects/*/locations/*/secrets/*/versions/*}:accessŒ +DisableSecretVersion:.google.cloud.secretmanager.v1.DisableSecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"‰ÚAname‚Óä“|"2/v1/{name=projects/*/secrets/*/versions/*}:disable:*ZC">/v1/{name=projects/*/locations/*/secrets/*/versions/*}:disable:*ˆ +EnableSecretVersion9.google.cloud.secretmanager.v1.EnableSecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"‡ÚAname‚Óä“z"1/v1/{name=projects/*/secrets/*/versions/*}:enable:*ZB"=/v1/{name=projects/*/locations/*/secrets/*/versions/*}:enable:*Œ +DestroySecretVersion:.google.cloud.secretmanager.v1.DestroySecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"‰ÚAname‚Óä“|"2/v1/{name=projects/*/secrets/*/versions/*}:destroy:*ZC">/v1/{name=projects/*/locations/*/secrets/*/versions/*}:destroy:*É + SetIamPolicy".google.iam.v1.SetIamPolicyRequest.google.iam.v1.Policy"~‚Óä“x"0/v1/{resource=projects/*/secrets/*}:setIamPolicy:*ZA"setReplication($secretReplication); + $secret = new Secret(); $request = (new CreateSecretRequest()) ->setParent($formattedParent) ->setSecretId($secretId) diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/destroy_secret_version.php b/SecretManager/samples/V1/SecretManagerServiceClient/destroy_secret_version.php index c341d3064e85..63e0830a6867 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/destroy_secret_version.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/destroy_secret_version.php @@ -38,7 +38,8 @@ * * @param string $formattedName The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in - * the format `projects/*/secrets/*/versions/*`. Please see + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. Please see * {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field. */ function destroy_secret_version_sample(string $formattedName): void diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/disable_secret_version.php b/SecretManager/samples/V1/SecretManagerServiceClient/disable_secret_version.php index 187ea02b7839..e3986eaf84ae 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/disable_secret_version.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/disable_secret_version.php @@ -37,7 +37,8 @@ * * @param string $formattedName The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in - * the format `projects/*/secrets/*/versions/*`. Please see + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. Please see * {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field. */ function disable_secret_version_sample(string $formattedName): void diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/enable_secret_version.php b/SecretManager/samples/V1/SecretManagerServiceClient/enable_secret_version.php index 0f30e13556da..73e4d6dfce4a 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/enable_secret_version.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/enable_secret_version.php @@ -37,7 +37,8 @@ * * @param string $formattedName The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in - * the format `projects/*/secrets/*/versions/*`. Please see + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. Please see * {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field. */ function enable_secret_version_sample(string $formattedName): void diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/get_secret.php b/SecretManager/samples/V1/SecretManagerServiceClient/get_secret.php index 14f0523fb22d..abe188f790eb 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/get_secret.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/get_secret.php @@ -33,7 +33,7 @@ * * @param string $formattedName The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*/secrets/*`. Please see + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. Please see * {@see SecretManagerServiceClient::secretName()} for help formatting this field. */ function get_secret_sample(string $formattedName): void diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/get_secret_version.php b/SecretManager/samples/V1/SecretManagerServiceClient/get_secret_version.php index a7baf9974bed..0ac985a33767 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/get_secret_version.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/get_secret_version.php @@ -37,10 +37,13 @@ * * @param string $formattedName The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Please see + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Please see * {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field. */ function get_secret_version_sample(string $formattedName): void diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/list_secret_versions.php b/SecretManager/samples/V1/SecretManagerServiceClient/list_secret_versions.php index 60a231f14b50..b074fa02d896 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/list_secret_versions.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/list_secret_versions.php @@ -36,7 +36,7 @@ * @param string $formattedParent The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] associated with the * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in - * the format `projects/*/secrets/*`. Please see + * the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. Please see * {@see SecretManagerServiceClient::secretName()} for help formatting this field. */ function list_secret_versions_sample(string $formattedParent): void diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/list_secrets.php b/SecretManager/samples/V1/SecretManagerServiceClient/list_secrets.php index dfd1cf50ca86..a4bf43cb2334 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/list_secrets.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/list_secrets.php @@ -33,9 +33,9 @@ * Lists [Secrets][google.cloud.secretmanager.v1.Secret]. * * @param string $formattedParent The resource name of the project associated with the - * [Secrets][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*`. Please see - * {@see SecretManagerServiceClient::projectName()} for help formatting this field. + * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*` + * Please see {@see SecretManagerServiceClient::projectName()} for help formatting this field. */ function list_secrets_sample(string $formattedParent): void { diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/update_secret.php b/SecretManager/samples/V1/SecretManagerServiceClient/update_secret.php index a38220555f73..84430ff273a5 100644 --- a/SecretManager/samples/V1/SecretManagerServiceClient/update_secret.php +++ b/SecretManager/samples/V1/SecretManagerServiceClient/update_secret.php @@ -25,7 +25,6 @@ // [START secretmanager_v1_generated_SecretManagerService_UpdateSecret_sync] use Google\ApiCore\ApiException; use Google\Cloud\SecretManager\V1\Client\SecretManagerServiceClient; -use Google\Cloud\SecretManager\V1\Replication; use Google\Cloud\SecretManager\V1\Secret; use Google\Cloud\SecretManager\V1\UpdateSecretRequest; use Google\Protobuf\FieldMask; @@ -46,9 +45,7 @@ function update_secret_sample(): void $secretManagerServiceClient = new SecretManagerServiceClient(); // Prepare the request message. - $secretReplication = new Replication(); - $secret = (new Secret()) - ->setReplication($secretReplication); + $secret = new Secret(); $updateMask = new FieldMask(); $request = (new UpdateSecretRequest()) ->setSecret($secret) diff --git a/SecretManager/src/V1/AccessSecretVersionRequest.php b/SecretManager/src/V1/AccessSecretVersionRequest.php index 022c5103edae..39b085553f0b 100644 --- a/SecretManager/src/V1/AccessSecretVersionRequest.php +++ b/SecretManager/src/V1/AccessSecretVersionRequest.php @@ -19,9 +19,12 @@ class AccessSecretVersionRequest extends \Google\Protobuf\Internal\Message /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -30,10 +33,13 @@ class AccessSecretVersionRequest extends \Google\Protobuf\Internal\Message /** * @param string $name Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Please see + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Please see * {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field. * * @return \Google\Cloud\SecretManager\V1\AccessSecretVersionRequest @@ -55,9 +61,12 @@ public static function build(string $name): self * @type string $name * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * } */ public function __construct($data = NULL) { @@ -68,9 +77,12 @@ public function __construct($data = NULL) { /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -83,9 +95,12 @@ public function getName() /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/SecretManager/src/V1/AccessSecretVersionResponse.php b/SecretManager/src/V1/AccessSecretVersionResponse.php index e5b0ae63fb21..05ba2a7b5571 100644 --- a/SecretManager/src/V1/AccessSecretVersionResponse.php +++ b/SecretManager/src/V1/AccessSecretVersionResponse.php @@ -19,7 +19,8 @@ class AccessSecretVersionResponse extends \Google\Protobuf\Internal\Message /** * The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { */ @@ -40,7 +41,8 @@ class AccessSecretVersionResponse extends \Google\Protobuf\Internal\Message * @type string $name * The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * @type \Google\Cloud\SecretManager\V1\SecretPayload $payload * Secret payload * } @@ -53,7 +55,8 @@ public function __construct($data = NULL) { /** * The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { * @return string @@ -66,7 +69,8 @@ public function getName() /** * The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { * @param string $var diff --git a/SecretManager/src/V1/AddSecretVersionRequest.php b/SecretManager/src/V1/AddSecretVersionRequest.php index 44da58621e23..4e6fbe5e99ae 100644 --- a/SecretManager/src/V1/AddSecretVersionRequest.php +++ b/SecretManager/src/V1/AddSecretVersionRequest.php @@ -20,7 +20,7 @@ class AddSecretVersionRequest extends \Google\Protobuf\Internal\Message * Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] to associate with the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*`. + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -37,7 +37,7 @@ class AddSecretVersionRequest extends \Google\Protobuf\Internal\Message * @param string $parent Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] to associate with the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*`. Please see + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. Please see * {@see SecretManagerServiceClient::secretName()} for help formatting this field. * @param \Google\Cloud\SecretManager\V1\SecretPayload $payload Required. The secret payload of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. @@ -63,7 +63,7 @@ public static function build(string $parent, \Google\Cloud\SecretManager\V1\Secr * Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] to associate with the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*`. + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * @type \Google\Cloud\SecretManager\V1\SecretPayload $payload * Required. The secret payload of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. @@ -78,7 +78,7 @@ public function __construct($data = NULL) { * Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] to associate with the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*`. + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -92,7 +92,7 @@ public function getParent() * Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] to associate with the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*`. + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/SecretManager/src/V1/Client/SecretManagerServiceClient.php b/SecretManager/src/V1/Client/SecretManagerServiceClient.php index 3232855ab61f..d7041c336da1 100644 --- a/SecretManager/src/V1/Client/SecretManagerServiceClient.php +++ b/SecretManager/src/V1/Client/SecretManagerServiceClient.php @@ -136,6 +136,23 @@ private static function getClientDefaults() ]; } + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a project * resource. @@ -151,6 +168,82 @@ public static function projectName(string $project): string ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_secret resource. + * + * @param string $project + * @param string $location + * @param string $secret + * + * @return string The formatted project_location_secret resource. + */ + public static function projectLocationSecretName(string $project, string $location, string $secret): string + { + return self::getPathTemplate('projectLocationSecret')->render([ + 'project' => $project, + 'location' => $location, + 'secret' => $secret, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_secret_secret_version resource. + * + * @param string $project + * @param string $location + * @param string $secret + * @param string $secretVersion + * + * @return string The formatted project_location_secret_secret_version resource. + */ + public static function projectLocationSecretSecretVersionName(string $project, string $location, string $secret, string $secretVersion): string + { + return self::getPathTemplate('projectLocationSecretSecretVersion')->render([ + 'project' => $project, + 'location' => $location, + 'secret' => $secret, + 'secret_version' => $secretVersion, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_secret resource. + * + * @param string $project + * @param string $secret + * + * @return string The formatted project_secret resource. + */ + public static function projectSecretName(string $project, string $secret): string + { + return self::getPathTemplate('projectSecret')->render([ + 'project' => $project, + 'secret' => $secret, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_secret_secret_version resource. + * + * @param string $project + * @param string $secret + * @param string $secretVersion + * + * @return string The formatted project_secret_secret_version resource. + */ + public static function projectSecretSecretVersionName(string $project, string $secret, string $secretVersion): string + { + return self::getPathTemplate('projectSecretSecretVersion')->render([ + 'project' => $project, + 'secret' => $secret, + 'secret_version' => $secretVersion, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a secret * resource. @@ -208,7 +301,12 @@ public static function topicName(string $project, string $topic): string * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: * Template: Pattern + * - location: projects/{project}/locations/{location} * - project: projects/{project} + * - projectLocationSecret: projects/{project}/locations/{location}/secrets/{secret} + * - projectLocationSecretSecretVersion: projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version} + * - projectSecret: projects/{project}/secrets/{secret} + * - projectSecretSecretVersion: projects/{project}/secrets/{secret}/versions/{secret_version} * - secret: projects/{project}/secrets/{secret} * - secretVersion: projects/{project}/secrets/{secret}/versions/{secret_version} * - topic: projects/{project}/topics/{topic} diff --git a/SecretManager/src/V1/CreateSecretRequest.php b/SecretManager/src/V1/CreateSecretRequest.php index df487a7b3aad..2047caaa1cfb 100644 --- a/SecretManager/src/V1/CreateSecretRequest.php +++ b/SecretManager/src/V1/CreateSecretRequest.php @@ -18,7 +18,8 @@ class CreateSecretRequest extends \Google\Protobuf\Internal\Message { /** * Required. The resource name of the project to associate with the - * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`. + * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -42,7 +43,8 @@ class CreateSecretRequest extends \Google\Protobuf\Internal\Message /** * @param string $parent Required. The resource name of the project to associate with the - * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`. Please see + * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*`. Please see * {@see SecretManagerServiceClient::projectName()} for help formatting this field. * @param string $secretId Required. This must be unique within the project. * @@ -72,7 +74,8 @@ public static function build(string $parent, string $secretId, \Google\Cloud\Sec * * @type string $parent * Required. The resource name of the project to associate with the - * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`. + * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*`. * @type string $secret_id * Required. This must be unique within the project. * A secret ID is a string with a maximum length of 255 characters and can @@ -90,7 +93,8 @@ public function __construct($data = NULL) { /** * Required. The resource name of the project to associate with the - * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`. + * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -102,7 +106,8 @@ public function getParent() /** * Required. The resource name of the project to associate with the - * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`. + * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/SecretManager/src/V1/DestroySecretVersionRequest.php b/SecretManager/src/V1/DestroySecretVersionRequest.php index 00eaf0dc2bb0..04d4aec6b7d6 100644 --- a/SecretManager/src/V1/DestroySecretVersionRequest.php +++ b/SecretManager/src/V1/DestroySecretVersionRequest.php @@ -19,7 +19,8 @@ class DestroySecretVersionRequest extends \Google\Protobuf\Internal\Message /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -37,7 +38,8 @@ class DestroySecretVersionRequest extends \Google\Protobuf\Internal\Message /** * @param string $name Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in - * the format `projects/*/secrets/*/versions/*`. Please see + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. Please see * {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field. * * @return \Google\Cloud\SecretManager\V1\DestroySecretVersionRequest @@ -59,7 +61,8 @@ public static function build(string $name): self * @type string $name * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * @type string $etag * Optional. Etag of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request @@ -75,7 +78,8 @@ public function __construct($data = NULL) { /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -88,7 +92,8 @@ public function getName() /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/SecretManager/src/V1/DisableSecretVersionRequest.php b/SecretManager/src/V1/DisableSecretVersionRequest.php index fe7c574a3f2c..5662346c2c04 100644 --- a/SecretManager/src/V1/DisableSecretVersionRequest.php +++ b/SecretManager/src/V1/DisableSecretVersionRequest.php @@ -19,7 +19,8 @@ class DisableSecretVersionRequest extends \Google\Protobuf\Internal\Message /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -37,7 +38,8 @@ class DisableSecretVersionRequest extends \Google\Protobuf\Internal\Message /** * @param string $name Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in - * the format `projects/*/secrets/*/versions/*`. Please see + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. Please see * {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field. * * @return \Google\Cloud\SecretManager\V1\DisableSecretVersionRequest @@ -59,7 +61,8 @@ public static function build(string $name): self * @type string $name * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * @type string $etag * Optional. Etag of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request @@ -75,7 +78,8 @@ public function __construct($data = NULL) { /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -88,7 +92,8 @@ public function getName() /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/SecretManager/src/V1/EnableSecretVersionRequest.php b/SecretManager/src/V1/EnableSecretVersionRequest.php index 79bc681fadc6..306965874f85 100644 --- a/SecretManager/src/V1/EnableSecretVersionRequest.php +++ b/SecretManager/src/V1/EnableSecretVersionRequest.php @@ -19,7 +19,8 @@ class EnableSecretVersionRequest extends \Google\Protobuf\Internal\Message /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -37,7 +38,8 @@ class EnableSecretVersionRequest extends \Google\Protobuf\Internal\Message /** * @param string $name Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in - * the format `projects/*/secrets/*/versions/*`. Please see + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. Please see * {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field. * * @return \Google\Cloud\SecretManager\V1\EnableSecretVersionRequest @@ -59,7 +61,8 @@ public static function build(string $name): self * @type string $name * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * @type string $etag * Optional. Etag of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request @@ -75,7 +78,8 @@ public function __construct($data = NULL) { /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -88,7 +92,8 @@ public function getName() /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/SecretManager/src/V1/Gapic/SecretManagerServiceGapicClient.php b/SecretManager/src/V1/Gapic/SecretManagerServiceGapicClient.php index 72cebb265d8c..36f65f18c86a 100644 --- a/SecretManager/src/V1/Gapic/SecretManagerServiceGapicClient.php +++ b/SecretManager/src/V1/Gapic/SecretManagerServiceGapicClient.php @@ -117,8 +117,18 @@ class SecretManagerServiceGapicClient 'https://www.googleapis.com/auth/cloud-platform', ]; + private static $locationNameTemplate; + private static $projectNameTemplate; + private static $projectLocationSecretNameTemplate; + + private static $projectLocationSecretSecretVersionNameTemplate; + + private static $projectSecretNameTemplate; + + private static $projectSecretSecretVersionNameTemplate; + private static $secretNameTemplate; private static $secretVersionNameTemplate; @@ -146,6 +156,15 @@ private static function getClientDefaults() ]; } + private static function getLocationNameTemplate() + { + if (self::$locationNameTemplate == null) { + self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); + } + + return self::$locationNameTemplate; + } + private static function getProjectNameTemplate() { if (self::$projectNameTemplate == null) { @@ -155,6 +174,42 @@ private static function getProjectNameTemplate() return self::$projectNameTemplate; } + private static function getProjectLocationSecretNameTemplate() + { + if (self::$projectLocationSecretNameTemplate == null) { + self::$projectLocationSecretNameTemplate = new PathTemplate('projects/{project}/locations/{location}/secrets/{secret}'); + } + + return self::$projectLocationSecretNameTemplate; + } + + private static function getProjectLocationSecretSecretVersionNameTemplate() + { + if (self::$projectLocationSecretSecretVersionNameTemplate == null) { + self::$projectLocationSecretSecretVersionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}'); + } + + return self::$projectLocationSecretSecretVersionNameTemplate; + } + + private static function getProjectSecretNameTemplate() + { + if (self::$projectSecretNameTemplate == null) { + self::$projectSecretNameTemplate = new PathTemplate('projects/{project}/secrets/{secret}'); + } + + return self::$projectSecretNameTemplate; + } + + private static function getProjectSecretSecretVersionNameTemplate() + { + if (self::$projectSecretSecretVersionNameTemplate == null) { + self::$projectSecretSecretVersionNameTemplate = new PathTemplate('projects/{project}/secrets/{secret}/versions/{secret_version}'); + } + + return self::$projectSecretSecretVersionNameTemplate; + } + private static function getSecretNameTemplate() { if (self::$secretNameTemplate == null) { @@ -186,7 +241,12 @@ private static function getPathTemplateMap() { if (self::$pathTemplateMap == null) { self::$pathTemplateMap = [ + 'location' => self::getLocationNameTemplate(), 'project' => self::getProjectNameTemplate(), + 'projectLocationSecret' => self::getProjectLocationSecretNameTemplate(), + 'projectLocationSecretSecretVersion' => self::getProjectLocationSecretSecretVersionNameTemplate(), + 'projectSecret' => self::getProjectSecretNameTemplate(), + 'projectSecretSecretVersion' => self::getProjectSecretSecretVersionNameTemplate(), 'secret' => self::getSecretNameTemplate(), 'secretVersion' => self::getSecretVersionNameTemplate(), 'topic' => self::getTopicNameTemplate(), @@ -196,6 +256,23 @@ private static function getPathTemplateMap() return self::$pathTemplateMap; } + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName($project, $location) + { + return self::getLocationNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a project * resource. @@ -211,6 +288,82 @@ public static function projectName($project) ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_secret resource. + * + * @param string $project + * @param string $location + * @param string $secret + * + * @return string The formatted project_location_secret resource. + */ + public static function projectLocationSecretName($project, $location, $secret) + { + return self::getProjectLocationSecretNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'secret' => $secret, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_secret_secret_version resource. + * + * @param string $project + * @param string $location + * @param string $secret + * @param string $secretVersion + * + * @return string The formatted project_location_secret_secret_version resource. + */ + public static function projectLocationSecretSecretVersionName($project, $location, $secret, $secretVersion) + { + return self::getProjectLocationSecretSecretVersionNameTemplate()->render([ + 'project' => $project, + 'location' => $location, + 'secret' => $secret, + 'secret_version' => $secretVersion, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_secret resource. + * + * @param string $project + * @param string $secret + * + * @return string The formatted project_secret resource. + */ + public static function projectSecretName($project, $secret) + { + return self::getProjectSecretNameTemplate()->render([ + 'project' => $project, + 'secret' => $secret, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_secret_secret_version resource. + * + * @param string $project + * @param string $secret + * @param string $secretVersion + * + * @return string The formatted project_secret_secret_version resource. + */ + public static function projectSecretSecretVersionName($project, $secret, $secretVersion) + { + return self::getProjectSecretSecretVersionNameTemplate()->render([ + 'project' => $project, + 'secret' => $secret, + 'secret_version' => $secretVersion, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a secret * resource. @@ -268,7 +421,12 @@ public static function topicName($project, $topic) * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: * Template: Pattern + * - location: projects/{project}/locations/{location} * - project: projects/{project} + * - projectLocationSecret: projects/{project}/locations/{location}/secrets/{secret} + * - projectLocationSecretSecretVersion: projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version} + * - projectSecret: projects/{project}/secrets/{secret} + * - projectSecretSecretVersion: projects/{project}/secrets/{secret}/versions/{secret_version} * - secret: projects/{project}/secrets/{secret} * - secretVersion: projects/{project}/secrets/{secret}/versions/{secret_version} * - topic: projects/{project}/topics/{topic} @@ -388,10 +546,13 @@ public function __construct(array $options = []) * * @param string $name Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * @param array $optionalArgs { * Optional. * @@ -436,7 +597,7 @@ public function accessSecretVersion($name, array $optionalArgs = []) * @param string $parent Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] to associate with the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*`. + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * @param SecretPayload $payload Required. The secret payload of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * @param array $optionalArgs { @@ -482,7 +643,8 @@ public function addSecretVersion($parent, $payload, array $optionalArgs = []) * ``` * * @param string $parent Required. The resource name of the project to associate with the - * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`. + * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*`. * @param string $secretId Required. This must be unique within the project. * * A secret ID is a string with a maximum length of 255 characters and can @@ -584,7 +746,8 @@ public function deleteSecret($name, array $optionalArgs = []) * * @param string $name Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * @param array $optionalArgs { * Optional. * @@ -638,7 +801,8 @@ public function destroySecretVersion($name, array $optionalArgs = []) * * @param string $name Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * @param array $optionalArgs { * Optional. * @@ -692,7 +856,8 @@ public function disableSecretVersion($name, array $optionalArgs = []) * * @param string $name Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in - * the format `projects/*/secrets/*/versions/*`. + * the format `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * @param array $optionalArgs { * Optional. * @@ -790,7 +955,7 @@ public function getIamPolicy($resource, array $optionalArgs = []) * * @param string $name Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*/secrets/*`. + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * @param array $optionalArgs { * Optional. * @@ -835,10 +1000,13 @@ public function getSecret($name, array $optionalArgs = []) * * @param string $name Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * @param array $optionalArgs { * Optional. * @@ -893,7 +1061,7 @@ public function getSecretVersion($name, array $optionalArgs = []) * @param string $parent Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] associated with the * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in - * the format `projects/*/secrets/*`. + * the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * @param array $optionalArgs { * Optional. * @@ -972,8 +1140,8 @@ public function listSecretVersions($parent, array $optionalArgs = []) * ``` * * @param string $parent Required. The resource name of the project associated with the - * [Secrets][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*`. + * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*` * @param array $optionalArgs { * Optional. * diff --git a/SecretManager/src/V1/GetSecretRequest.php b/SecretManager/src/V1/GetSecretRequest.php index 90f8705c6adb..ef2cd694b906 100644 --- a/SecretManager/src/V1/GetSecretRequest.php +++ b/SecretManager/src/V1/GetSecretRequest.php @@ -19,7 +19,7 @@ class GetSecretRequest extends \Google\Protobuf\Internal\Message /** * Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*/secrets/*`. + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -28,7 +28,7 @@ class GetSecretRequest extends \Google\Protobuf\Internal\Message /** * @param string $name Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*/secrets/*`. Please see + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. Please see * {@see SecretManagerServiceClient::secretName()} for help formatting this field. * * @return \Google\Cloud\SecretManager\V1\GetSecretRequest @@ -50,7 +50,7 @@ public static function build(string $name): self * @type string $name * Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*/secrets/*`. + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * } */ public function __construct($data = NULL) { @@ -61,7 +61,7 @@ public function __construct($data = NULL) { /** * Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*/secrets/*`. + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -74,7 +74,7 @@ public function getName() /** * Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*/secrets/*`. + * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/SecretManager/src/V1/GetSecretVersionRequest.php b/SecretManager/src/V1/GetSecretVersionRequest.php index 6ac5e42e7fd2..d0788e670269 100644 --- a/SecretManager/src/V1/GetSecretVersionRequest.php +++ b/SecretManager/src/V1/GetSecretVersionRequest.php @@ -19,9 +19,12 @@ class GetSecretVersionRequest extends \Google\Protobuf\Internal\Message /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -30,10 +33,13 @@ class GetSecretVersionRequest extends \Google\Protobuf\Internal\Message /** * @param string $name Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. * - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Please see + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Please see * {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field. * * @return \Google\Cloud\SecretManager\V1\GetSecretVersionRequest @@ -55,9 +61,12 @@ public static function build(string $name): self * @type string $name * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * } */ public function __construct($data = NULL) { @@ -68,9 +77,12 @@ public function __construct($data = NULL) { /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -83,9 +95,12 @@ public function getName() /** * Required. The resource name of the * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format - * `projects/*/secrets/*/versions/*`. - * `projects/*/secrets/*/versions/latest` is an alias to the most recently - * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. + * `projects/*/secrets/*/versions/*` or + * `projects/*/locations/*/secrets/*/versions/*`. + * `projects/*/secrets/*/versions/latest` or + * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most + * recently created + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/SecretManager/src/V1/ListSecretVersionsRequest.php b/SecretManager/src/V1/ListSecretVersionsRequest.php index 4053e960474e..13cee276dd74 100644 --- a/SecretManager/src/V1/ListSecretVersionsRequest.php +++ b/SecretManager/src/V1/ListSecretVersionsRequest.php @@ -20,7 +20,7 @@ class ListSecretVersionsRequest extends \Google\Protobuf\Internal\Message * Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] associated with the * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in - * the format `projects/*/secrets/*`. + * the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -55,7 +55,7 @@ class ListSecretVersionsRequest extends \Google\Protobuf\Internal\Message * @param string $parent Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] associated with the * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in - * the format `projects/*/secrets/*`. Please see + * the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. Please see * {@see SecretManagerServiceClient::secretName()} for help formatting this field. * * @return \Google\Cloud\SecretManager\V1\ListSecretVersionsRequest @@ -78,7 +78,7 @@ public static function build(string $parent): self * Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] associated with the * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in - * the format `projects/*/secrets/*`. + * the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * @type int $page_size * Optional. The maximum number of results to be returned in a single page. If * set to 0, the server decides the number of results to return. If the @@ -103,7 +103,7 @@ public function __construct($data = NULL) { * Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] associated with the * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in - * the format `projects/*/secrets/*`. + * the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -117,7 +117,7 @@ public function getParent() * Required. The resource name of the * [Secret][google.cloud.secretmanager.v1.Secret] associated with the * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in - * the format `projects/*/secrets/*`. + * the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/SecretManager/src/V1/ListSecretVersionsResponse.php b/SecretManager/src/V1/ListSecretVersionsResponse.php index 22df5857848e..ed985751b8eb 100644 --- a/SecretManager/src/V1/ListSecretVersionsResponse.php +++ b/SecretManager/src/V1/ListSecretVersionsResponse.php @@ -33,7 +33,10 @@ class ListSecretVersionsResponse extends \Google\Protobuf\Internal\Message private $next_page_token = ''; /** * The total number of - * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] but 0 when + * the + * [ListSecretsRequest.filter][google.cloud.secretmanager.v1.ListSecretsRequest.filter] + * field is set. * * Generated from protobuf field int32 total_size = 3; */ @@ -54,7 +57,10 @@ class ListSecretVersionsResponse extends \Google\Protobuf\Internal\Message * to retrieve the next page. * @type int $total_size * The total number of - * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] but 0 when + * the + * [ListSecretsRequest.filter][google.cloud.secretmanager.v1.ListSecretsRequest.filter] + * field is set. * } */ public function __construct($data = NULL) { @@ -122,7 +128,10 @@ public function setNextPageToken($var) /** * The total number of - * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] but 0 when + * the + * [ListSecretsRequest.filter][google.cloud.secretmanager.v1.ListSecretsRequest.filter] + * field is set. * * Generated from protobuf field int32 total_size = 3; * @return int @@ -134,7 +143,10 @@ public function getTotalSize() /** * The total number of - * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] but 0 when + * the + * [ListSecretsRequest.filter][google.cloud.secretmanager.v1.ListSecretsRequest.filter] + * field is set. * * Generated from protobuf field int32 total_size = 3; * @param int $var diff --git a/SecretManager/src/V1/ListSecretsRequest.php b/SecretManager/src/V1/ListSecretsRequest.php index b86481071939..0745e9613c9d 100644 --- a/SecretManager/src/V1/ListSecretsRequest.php +++ b/SecretManager/src/V1/ListSecretsRequest.php @@ -18,8 +18,8 @@ class ListSecretsRequest extends \Google\Protobuf\Internal\Message { /** * Required. The resource name of the project associated with the - * [Secrets][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*`. + * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -52,9 +52,9 @@ class ListSecretsRequest extends \Google\Protobuf\Internal\Message /** * @param string $parent Required. The resource name of the project associated with the - * [Secrets][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*`. Please see - * {@see SecretManagerServiceClient::projectName()} for help formatting this field. + * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*` + * Please see {@see SecretManagerServiceClient::projectName()} for help formatting this field. * * @return \Google\Cloud\SecretManager\V1\ListSecretsRequest * @@ -74,8 +74,8 @@ public static function build(string $parent): self * * @type string $parent * Required. The resource name of the project associated with the - * [Secrets][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*`. + * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*` * @type int $page_size * Optional. The maximum number of results to be returned in a single page. If * set to 0, the server decides the number of results to return. If the @@ -98,8 +98,8 @@ public function __construct($data = NULL) { /** * Required. The resource name of the project associated with the - * [Secrets][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*`. + * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -111,8 +111,8 @@ public function getParent() /** * Required. The resource name of the project associated with the - * [Secrets][google.cloud.secretmanager.v1.Secret], in the format - * `projects/*`. + * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*` + * or `projects/*/locations/*` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/SecretManager/src/V1/ListSecretsResponse.php b/SecretManager/src/V1/ListSecretsResponse.php index 0dfe831310d1..a147839fd2ef 100644 --- a/SecretManager/src/V1/ListSecretsResponse.php +++ b/SecretManager/src/V1/ListSecretsResponse.php @@ -32,7 +32,10 @@ class ListSecretsResponse extends \Google\Protobuf\Internal\Message */ private $next_page_token = ''; /** - * The total number of [Secrets][google.cloud.secretmanager.v1.Secret]. + * The total number of [Secrets][google.cloud.secretmanager.v1.Secret] but 0 + * when the + * [ListSecretsRequest.filter][google.cloud.secretmanager.v1.ListSecretsRequest.filter] + * field is set. * * Generated from protobuf field int32 total_size = 3; */ @@ -52,7 +55,10 @@ class ListSecretsResponse extends \Google\Protobuf\Internal\Message * [ListSecretsRequest.page_token][google.cloud.secretmanager.v1.ListSecretsRequest.page_token] * to retrieve the next page. * @type int $total_size - * The total number of [Secrets][google.cloud.secretmanager.v1.Secret]. + * The total number of [Secrets][google.cloud.secretmanager.v1.Secret] but 0 + * when the + * [ListSecretsRequest.filter][google.cloud.secretmanager.v1.ListSecretsRequest.filter] + * field is set. * } */ public function __construct($data = NULL) { @@ -119,7 +125,10 @@ public function setNextPageToken($var) } /** - * The total number of [Secrets][google.cloud.secretmanager.v1.Secret]. + * The total number of [Secrets][google.cloud.secretmanager.v1.Secret] but 0 + * when the + * [ListSecretsRequest.filter][google.cloud.secretmanager.v1.ListSecretsRequest.filter] + * field is set. * * Generated from protobuf field int32 total_size = 3; * @return int @@ -130,7 +139,10 @@ public function getTotalSize() } /** - * The total number of [Secrets][google.cloud.secretmanager.v1.Secret]. + * The total number of [Secrets][google.cloud.secretmanager.v1.Secret] but 0 + * when the + * [ListSecretsRequest.filter][google.cloud.secretmanager.v1.ListSecretsRequest.filter] + * field is set. * * Generated from protobuf field int32 total_size = 3; * @param int $var diff --git a/SecretManager/src/V1/Secret.php b/SecretManager/src/V1/Secret.php index b8c8dd8514cf..ea3c57532afa 100644 --- a/SecretManager/src/V1/Secret.php +++ b/SecretManager/src/V1/Secret.php @@ -28,11 +28,11 @@ class Secret extends \Google\Protobuf\Internal\Message */ private $name = ''; /** - * Required. Immutable. The replication policy of the secret data attached to + * Optional. Immutable. The replication policy of the secret data attached to * the [Secret][google.cloud.secretmanager.v1.Secret]. * The replication policy cannot be changed after the Secret has been created. * - * Generated from protobuf field .google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field .google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; */ private $replication = null; /** @@ -85,7 +85,7 @@ class Secret extends \Google\Protobuf\Internal\Message * letter and cannot be the string 'latest' or 'NEW'. * No more than 50 aliases can be assigned to a given secret. * Version-Alias pairs will be viewable via GetSecret and modifiable via - * UpdateSecret. At launch access by alias will only be supported on + * UpdateSecret. Access by alias is only be supported on * GetSecretVersion and AccessSecretVersion. * * Generated from protobuf field map version_aliases = 11 [(.google.api.field_behavior) = OPTIONAL]; @@ -105,6 +105,29 @@ class Secret extends \Google\Protobuf\Internal\Message * Generated from protobuf field map annotations = 13 [(.google.api.field_behavior) = OPTIONAL]; */ private $annotations; + /** + * Optional. Secret Version TTL after destruction request + * This is a part of the Delayed secret version destroy feature. + * For secret with TTL>0, version destruction doesn't happen immediately + * on calling destroy instead the version goes to a disabled state and + * destruction happens after the TTL expires. + * + * Generated from protobuf field .google.protobuf.Duration version_destroy_ttl = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $version_destroy_ttl = null; + /** + * Optional. The customer-managed encryption configuration of the Regionalised + * Secrets. If no configuration is provided, Google-managed default encryption + * is used. + * Updates to the [Secret][google.cloud.secretmanager.v1.Secret] encryption + * configuration only apply to + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] added + * afterwards. They do not apply retroactively to existing + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. + * + * Generated from protobuf field .google.cloud.secretmanager.v1.CustomerManagedEncryption customer_managed_encryption = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $customer_managed_encryption = null; protected $expiration; /** @@ -118,7 +141,7 @@ class Secret extends \Google\Protobuf\Internal\Message * [Secret][google.cloud.secretmanager.v1.Secret] in the format * `projects/*/secrets/*`. * @type \Google\Cloud\SecretManager\V1\Replication $replication - * Required. Immutable. The replication policy of the secret data attached to + * Optional. Immutable. The replication policy of the secret data attached to * the [Secret][google.cloud.secretmanager.v1.Secret]. * The replication policy cannot be changed after the Secret has been created. * @type \Google\Protobuf\Timestamp $create_time @@ -158,7 +181,7 @@ class Secret extends \Google\Protobuf\Internal\Message * letter and cannot be the string 'latest' or 'NEW'. * No more than 50 aliases can be assigned to a given secret. * Version-Alias pairs will be viewable via GetSecret and modifiable via - * UpdateSecret. At launch access by alias will only be supported on + * UpdateSecret. Access by alias is only be supported on * GetSecretVersion and AccessSecretVersion. * @type array|\Google\Protobuf\Internal\MapField $annotations * Optional. Custom metadata about the secret. @@ -170,6 +193,21 @@ class Secret extends \Google\Protobuf\Internal\Message * ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and * alphanumerics in between these symbols. * The total size of annotation keys and values must be less than 16KiB. + * @type \Google\Protobuf\Duration $version_destroy_ttl + * Optional. Secret Version TTL after destruction request + * This is a part of the Delayed secret version destroy feature. + * For secret with TTL>0, version destruction doesn't happen immediately + * on calling destroy instead the version goes to a disabled state and + * destruction happens after the TTL expires. + * @type \Google\Cloud\SecretManager\V1\CustomerManagedEncryption $customer_managed_encryption + * Optional. The customer-managed encryption configuration of the Regionalised + * Secrets. If no configuration is provided, Google-managed default encryption + * is used. + * Updates to the [Secret][google.cloud.secretmanager.v1.Secret] encryption + * configuration only apply to + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] added + * afterwards. They do not apply retroactively to existing + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. * } */ public function __construct($data = NULL) { @@ -208,11 +246,11 @@ public function setName($var) } /** - * Required. Immutable. The replication policy of the secret data attached to + * Optional. Immutable. The replication policy of the secret data attached to * the [Secret][google.cloud.secretmanager.v1.Secret]. * The replication policy cannot be changed after the Secret has been created. * - * Generated from protobuf field .google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field .google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; * @return \Google\Cloud\SecretManager\V1\Replication|null */ public function getReplication() @@ -231,11 +269,11 @@ public function clearReplication() } /** - * Required. Immutable. The replication policy of the secret data attached to + * Optional. Immutable. The replication policy of the secret data attached to * the [Secret][google.cloud.secretmanager.v1.Secret]. * The replication policy cannot be changed after the Secret has been created. * - * Generated from protobuf field .google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; + * Generated from protobuf field .google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; * @param \Google\Cloud\SecretManager\V1\Replication $var * @return $this */ @@ -497,7 +535,7 @@ public function setRotation($var) * letter and cannot be the string 'latest' or 'NEW'. * No more than 50 aliases can be assigned to a given secret. * Version-Alias pairs will be viewable via GetSecret and modifiable via - * UpdateSecret. At launch access by alias will only be supported on + * UpdateSecret. Access by alias is only be supported on * GetSecretVersion and AccessSecretVersion. * * Generated from protobuf field map version_aliases = 11 [(.google.api.field_behavior) = OPTIONAL]; @@ -516,7 +554,7 @@ public function getVersionAliases() * letter and cannot be the string 'latest' or 'NEW'. * No more than 50 aliases can be assigned to a given secret. * Version-Alias pairs will be viewable via GetSecret and modifiable via - * UpdateSecret. At launch access by alias will only be supported on + * UpdateSecret. Access by alias is only be supported on * GetSecretVersion and AccessSecretVersion. * * Generated from protobuf field map version_aliases = 11 [(.google.api.field_behavior) = OPTIONAL]; @@ -573,6 +611,100 @@ public function setAnnotations($var) return $this; } + /** + * Optional. Secret Version TTL after destruction request + * This is a part of the Delayed secret version destroy feature. + * For secret with TTL>0, version destruction doesn't happen immediately + * on calling destroy instead the version goes to a disabled state and + * destruction happens after the TTL expires. + * + * Generated from protobuf field .google.protobuf.Duration version_destroy_ttl = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getVersionDestroyTtl() + { + return $this->version_destroy_ttl; + } + + public function hasVersionDestroyTtl() + { + return isset($this->version_destroy_ttl); + } + + public function clearVersionDestroyTtl() + { + unset($this->version_destroy_ttl); + } + + /** + * Optional. Secret Version TTL after destruction request + * This is a part of the Delayed secret version destroy feature. + * For secret with TTL>0, version destruction doesn't happen immediately + * on calling destroy instead the version goes to a disabled state and + * destruction happens after the TTL expires. + * + * Generated from protobuf field .google.protobuf.Duration version_destroy_ttl = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setVersionDestroyTtl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->version_destroy_ttl = $var; + + return $this; + } + + /** + * Optional. The customer-managed encryption configuration of the Regionalised + * Secrets. If no configuration is provided, Google-managed default encryption + * is used. + * Updates to the [Secret][google.cloud.secretmanager.v1.Secret] encryption + * configuration only apply to + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] added + * afterwards. They do not apply retroactively to existing + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. + * + * Generated from protobuf field .google.cloud.secretmanager.v1.CustomerManagedEncryption customer_managed_encryption = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\SecretManager\V1\CustomerManagedEncryption|null + */ + public function getCustomerManagedEncryption() + { + return $this->customer_managed_encryption; + } + + public function hasCustomerManagedEncryption() + { + return isset($this->customer_managed_encryption); + } + + public function clearCustomerManagedEncryption() + { + unset($this->customer_managed_encryption); + } + + /** + * Optional. The customer-managed encryption configuration of the Regionalised + * Secrets. If no configuration is provided, Google-managed default encryption + * is used. + * Updates to the [Secret][google.cloud.secretmanager.v1.Secret] encryption + * configuration only apply to + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] added + * afterwards. They do not apply retroactively to existing + * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. + * + * Generated from protobuf field .google.cloud.secretmanager.v1.CustomerManagedEncryption customer_managed_encryption = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\SecretManager\V1\CustomerManagedEncryption $var + * @return $this + */ + public function setCustomerManagedEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecretManager\V1\CustomerManagedEncryption::class); + $this->customer_managed_encryption = $var; + + return $this; + } + /** * @return string */ diff --git a/SecretManager/src/V1/SecretVersion.php b/SecretManager/src/V1/SecretVersion.php index 2782b22c7e39..778619b5cb07 100644 --- a/SecretManager/src/V1/SecretVersion.php +++ b/SecretManager/src/V1/SecretVersion.php @@ -75,6 +75,26 @@ class SecretVersion extends \Google\Protobuf\Internal\Message * Generated from protobuf field bool client_specified_payload_checksum = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $client_specified_payload_checksum = false; + /** + * Optional. Output only. Scheduled destroy time for secret version. + * This is a part of the Delayed secret version destroy feature. For a + * Secret with a valid version destroy TTL, when a secert version is + * destroyed, the version is moved to disabled state and it is scheduled for + * destruction. The version is destroyed only after the + * `scheduled_destroy_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp scheduled_destroy_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $scheduled_destroy_time = null; + /** + * Output only. The customer-managed encryption status of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Only + * populated if customer-managed encryption is used and + * [Secret][google.cloud.secretmanager.v1.Secret] is a Regionalised Secret. + * + * Generated from protobuf field .google.cloud.secretmanager.v1.CustomerManagedEncryptionStatus customer_managed_encryption = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $customer_managed_encryption = null; /** * Constructor. @@ -114,6 +134,18 @@ class SecretVersion extends \Google\Protobuf\Internal\Message * [SecretManagerService][google.cloud.secretmanager.v1.SecretManagerService] * on * [SecretManagerService.AddSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.AddSecretVersion]. + * @type \Google\Protobuf\Timestamp $scheduled_destroy_time + * Optional. Output only. Scheduled destroy time for secret version. + * This is a part of the Delayed secret version destroy feature. For a + * Secret with a valid version destroy TTL, when a secert version is + * destroyed, the version is moved to disabled state and it is scheduled for + * destruction. The version is destroyed only after the + * `scheduled_destroy_time`. + * @type \Google\Cloud\SecretManager\V1\CustomerManagedEncryptionStatus $customer_managed_encryption + * Output only. The customer-managed encryption status of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Only + * populated if customer-managed encryption is used and + * [Secret][google.cloud.secretmanager.v1.Secret] is a Regionalised Secret. * } */ public function __construct($data = NULL) { @@ -369,5 +401,93 @@ public function setClientSpecifiedPayloadChecksum($var) return $this; } + /** + * Optional. Output only. Scheduled destroy time for secret version. + * This is a part of the Delayed secret version destroy feature. For a + * Secret with a valid version destroy TTL, when a secert version is + * destroyed, the version is moved to disabled state and it is scheduled for + * destruction. The version is destroyed only after the + * `scheduled_destroy_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp scheduled_destroy_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduledDestroyTime() + { + return $this->scheduled_destroy_time; + } + + public function hasScheduledDestroyTime() + { + return isset($this->scheduled_destroy_time); + } + + public function clearScheduledDestroyTime() + { + unset($this->scheduled_destroy_time); + } + + /** + * Optional. Output only. Scheduled destroy time for secret version. + * This is a part of the Delayed secret version destroy feature. For a + * Secret with a valid version destroy TTL, when a secert version is + * destroyed, the version is moved to disabled state and it is scheduled for + * destruction. The version is destroyed only after the + * `scheduled_destroy_time`. + * + * Generated from protobuf field .google.protobuf.Timestamp scheduled_destroy_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduledDestroyTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->scheduled_destroy_time = $var; + + return $this; + } + + /** + * Output only. The customer-managed encryption status of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Only + * populated if customer-managed encryption is used and + * [Secret][google.cloud.secretmanager.v1.Secret] is a Regionalised Secret. + * + * Generated from protobuf field .google.cloud.secretmanager.v1.CustomerManagedEncryptionStatus customer_managed_encryption = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\SecretManager\V1\CustomerManagedEncryptionStatus|null + */ + public function getCustomerManagedEncryption() + { + return $this->customer_managed_encryption; + } + + public function hasCustomerManagedEncryption() + { + return isset($this->customer_managed_encryption); + } + + public function clearCustomerManagedEncryption() + { + unset($this->customer_managed_encryption); + } + + /** + * Output only. The customer-managed encryption status of the + * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Only + * populated if customer-managed encryption is used and + * [Secret][google.cloud.secretmanager.v1.Secret] is a Regionalised Secret. + * + * Generated from protobuf field .google.cloud.secretmanager.v1.CustomerManagedEncryptionStatus customer_managed_encryption = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\SecretManager\V1\CustomerManagedEncryptionStatus $var + * @return $this + */ + public function setCustomerManagedEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\SecretManager\V1\CustomerManagedEncryptionStatus::class); + $this->customer_managed_encryption = $var; + + return $this; + } + } diff --git a/SecretManager/src/V1/Topic.php b/SecretManager/src/V1/Topic.php index 7c8138533aed..37c0b0adb94f 100644 --- a/SecretManager/src/V1/Topic.php +++ b/SecretManager/src/V1/Topic.php @@ -19,8 +19,9 @@ class Topic extends \Google\Protobuf\Internal\Message /** * Required. The resource name of the Pub/Sub topic that will be published to, * in the following format: `projects/*/topics/*`. For publication to succeed, - * the Secret Manager P4SA must have `pubsub.publisher` permissions on the - * topic. + * the Secret Manager service agent must have the `pubsub.topic.publish` + * permission on the topic. The Pub/Sub Publisher role + * (`roles/pubsub.publisher`) includes this permission. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; */ @@ -35,8 +36,9 @@ class Topic extends \Google\Protobuf\Internal\Message * @type string $name * Required. The resource name of the Pub/Sub topic that will be published to, * in the following format: `projects/*/topics/*`. For publication to succeed, - * the Secret Manager P4SA must have `pubsub.publisher` permissions on the - * topic. + * the Secret Manager service agent must have the `pubsub.topic.publish` + * permission on the topic. The Pub/Sub Publisher role + * (`roles/pubsub.publisher`) includes this permission. * } */ public function __construct($data = NULL) { @@ -47,8 +49,9 @@ public function __construct($data = NULL) { /** * Required. The resource name of the Pub/Sub topic that will be published to, * in the following format: `projects/*/topics/*`. For publication to succeed, - * the Secret Manager P4SA must have `pubsub.publisher` permissions on the - * topic. + * the Secret Manager service agent must have the `pubsub.topic.publish` + * permission on the topic. The Pub/Sub Publisher role + * (`roles/pubsub.publisher`) includes this permission. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -61,8 +64,9 @@ public function getName() /** * Required. The resource name of the Pub/Sub topic that will be published to, * in the following format: `projects/*/topics/*`. For publication to succeed, - * the Secret Manager P4SA must have `pubsub.publisher` permissions on the - * topic. + * the Secret Manager service agent must have the `pubsub.topic.publish` + * permission on the topic. The Pub/Sub Publisher role + * (`roles/pubsub.publisher`) includes this permission. * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; * @param string $var diff --git a/SecretManager/src/V1/resources/secret_manager_service_descriptor_config.php b/SecretManager/src/V1/resources/secret_manager_service_descriptor_config.php index fc12f035380c..17c40a342374 100644 --- a/SecretManager/src/V1/resources/secret_manager_service_descriptor_config.php +++ b/SecretManager/src/V1/resources/secret_manager_service_descriptor_config.php @@ -221,7 +221,12 @@ ], ], 'templateMap' => [ + 'location' => 'projects/{project}/locations/{location}', 'project' => 'projects/{project}', + 'projectLocationSecret' => 'projects/{project}/locations/{location}/secrets/{secret}', + 'projectLocationSecretSecretVersion' => 'projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}', + 'projectSecret' => 'projects/{project}/secrets/{secret}', + 'projectSecretSecretVersion' => 'projects/{project}/secrets/{secret}/versions/{secret_version}', 'secret' => 'projects/{project}/secrets/{secret}', 'secretVersion' => 'projects/{project}/secrets/{secret}/versions/{secret_version}', 'topic' => 'projects/{project}/topics/{topic}', diff --git a/SecretManager/src/V1/resources/secret_manager_service_rest_client_config.php b/SecretManager/src/V1/resources/secret_manager_service_rest_client_config.php index 02f86aaecf44..6dc68c1b4731 100644 --- a/SecretManager/src/V1/resources/secret_manager_service_rest_client_config.php +++ b/SecretManager/src/V1/resources/secret_manager_service_rest_client_config.php @@ -50,6 +50,12 @@ 'AccessSecretVersion' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/secrets/*/versions/*}:access', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/secrets/*/versions/*}:access', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -62,6 +68,13 @@ 'method' => 'post', 'uriTemplate' => '/v1/{parent=projects/*/secrets/*}:addVersion', 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/secrets/*}:addVersion', + 'body' => '*', + ], + ], 'placeholders' => [ 'parent' => [ 'getters' => [ @@ -74,6 +87,16 @@ 'method' => 'post', 'uriTemplate' => '/v1/{parent=projects/*}/secrets', 'body' => 'secret', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/secrets', + 'body' => 'secret', + 'queryParams' => [ + 'secret_id', + ], + ], + ], 'placeholders' => [ 'parent' => [ 'getters' => [ @@ -88,6 +111,12 @@ 'DeleteSecret' => [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/secrets/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/secrets/*}', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -100,6 +129,13 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/secrets/*/versions/*}:destroy', 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/secrets/*/versions/*}:destroy', + 'body' => '*', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -112,6 +148,13 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/secrets/*/versions/*}:disable', 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/secrets/*/versions/*}:disable', + 'body' => '*', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -124,6 +167,13 @@ 'method' => 'post', 'uriTemplate' => '/v1/{name=projects/*/secrets/*/versions/*}:enable', 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/secrets/*/versions/*}:enable', + 'body' => '*', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -135,6 +185,12 @@ 'GetIamPolicy' => [ 'method' => 'get', 'uriTemplate' => '/v1/{resource=projects/*/secrets/*}:getIamPolicy', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/secrets/*}:getIamPolicy', + ], + ], 'placeholders' => [ 'resource' => [ 'getters' => [ @@ -146,6 +202,12 @@ 'GetSecret' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/secrets/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/secrets/*}', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -157,6 +219,12 @@ 'GetSecretVersion' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/secrets/*/versions/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/secrets/*/versions/*}', + ], + ], 'placeholders' => [ 'name' => [ 'getters' => [ @@ -168,6 +236,12 @@ 'ListSecretVersions' => [ 'method' => 'get', 'uriTemplate' => '/v1/{parent=projects/*/secrets/*}/versions', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/secrets/*}/versions', + ], + ], 'placeholders' => [ 'parent' => [ 'getters' => [ @@ -179,6 +253,12 @@ 'ListSecrets' => [ 'method' => 'get', 'uriTemplate' => '/v1/{parent=projects/*}/secrets', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/secrets', + ], + ], 'placeholders' => [ 'parent' => [ 'getters' => [ @@ -191,6 +271,13 @@ 'method' => 'post', 'uriTemplate' => '/v1/{resource=projects/*/secrets/*}:setIamPolicy', 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/secrets/*}:setIamPolicy', + 'body' => '*', + ], + ], 'placeholders' => [ 'resource' => [ 'getters' => [ @@ -203,6 +290,13 @@ 'method' => 'post', 'uriTemplate' => '/v1/{resource=projects/*/secrets/*}:testIamPermissions', 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{resource=projects/*/locations/*/secrets/*}:testIamPermissions', + 'body' => '*', + ], + ], 'placeholders' => [ 'resource' => [ 'getters' => [ @@ -215,6 +309,16 @@ 'method' => 'patch', 'uriTemplate' => '/v1/{secret.name=projects/*/secrets/*}', 'body' => 'secret', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{secret.name=projects/*/locations/*/secrets/*}', + 'body' => 'secret', + 'queryParams' => [ + 'update_mask', + ], + ], + ], 'placeholders' => [ 'secret.name' => [ 'getters' => [ diff --git a/SecretManager/tests/Unit/V1/Client/SecretManagerServiceClientTest.php b/SecretManager/tests/Unit/V1/Client/SecretManagerServiceClientTest.php index bbbb3fa93d16..7f5b590fa420 100644 --- a/SecretManager/tests/Unit/V1/Client/SecretManagerServiceClientTest.php +++ b/SecretManager/tests/Unit/V1/Client/SecretManagerServiceClientTest.php @@ -46,7 +46,6 @@ use Google\Cloud\SecretManager\V1\ListSecretVersionsResponse; use Google\Cloud\SecretManager\V1\ListSecretsRequest; use Google\Cloud\SecretManager\V1\ListSecretsResponse; -use Google\Cloud\SecretManager\V1\Replication; use Google\Cloud\SecretManager\V1\Secret; use Google\Cloud\SecretManager\V1\SecretPayload; use Google\Cloud\SecretManager\V1\SecretVersion; @@ -241,8 +240,6 @@ public function createSecretTest() $formattedParent = $gapicClient->projectName('[PROJECT]'); $secretId = 'secretId-739547894'; $secret = new Secret(); - $secretReplication = new Replication(); - $secret->setReplication($secretReplication); $request = (new CreateSecretRequest()) ->setParent($formattedParent) ->setSecretId($secretId) @@ -285,8 +282,6 @@ public function createSecretExceptionTest() $formattedParent = $gapicClient->projectName('[PROJECT]'); $secretId = 'secretId-739547894'; $secret = new Secret(); - $secretReplication = new Replication(); - $secret->setReplication($secretReplication); $request = (new CreateSecretRequest()) ->setParent($formattedParent) ->setSecretId($secretId) @@ -1074,8 +1069,6 @@ public function updateSecretTest() $transport->addResponse($expectedResponse); // Mock request $secret = new Secret(); - $secretReplication = new Replication(); - $secret->setReplication($secretReplication); $updateMask = new FieldMask(); $request = (new UpdateSecretRequest()) ->setSecret($secret) @@ -1114,8 +1107,6 @@ public function updateSecretExceptionTest() $transport->addResponse(null, $status); // Mock request $secret = new Secret(); - $secretReplication = new Replication(); - $secret->setReplication($secretReplication); $updateMask = new FieldMask(); $request = (new UpdateSecretRequest()) ->setSecret($secret) diff --git a/SecretManager/tests/Unit/V1/SecretManagerServiceClientTest.php b/SecretManager/tests/Unit/V1/SecretManagerServiceClientTest.php index c18a8df8f800..7155d85fd35d 100644 --- a/SecretManager/tests/Unit/V1/SecretManagerServiceClientTest.php +++ b/SecretManager/tests/Unit/V1/SecretManagerServiceClientTest.php @@ -31,7 +31,6 @@ use Google\Cloud\SecretManager\V1\AccessSecretVersionResponse; use Google\Cloud\SecretManager\V1\ListSecretVersionsResponse; use Google\Cloud\SecretManager\V1\ListSecretsResponse; -use Google\Cloud\SecretManager\V1\Replication; use Google\Cloud\SecretManager\V1\Secret; use Google\Cloud\SecretManager\V1\SecretManagerServiceClient; use Google\Cloud\SecretManager\V1\SecretPayload; @@ -216,8 +215,6 @@ public function createSecretTest() $formattedParent = $gapicClient->projectName('[PROJECT]'); $secretId = 'secretId-739547894'; $secret = new Secret(); - $secretReplication = new Replication(); - $secret->setReplication($secretReplication); $response = $gapicClient->createSecret($formattedParent, $secretId, $secret); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); @@ -256,8 +253,6 @@ public function createSecretExceptionTest() $formattedParent = $gapicClient->projectName('[PROJECT]'); $secretId = 'secretId-739547894'; $secret = new Secret(); - $secretReplication = new Replication(); - $secret->setReplication($secretReplication); try { $gapicClient->createSecret($formattedParent, $secretId, $secret); // If the $gapicClient method call did not throw, fail the test @@ -993,8 +988,6 @@ public function updateSecretTest() $transport->addResponse($expectedResponse); // Mock request $secret = new Secret(); - $secretReplication = new Replication(); - $secret->setReplication($secretReplication); $updateMask = new FieldMask(); $response = $gapicClient->updateSecret($secret, $updateMask); $this->assertEquals($expectedResponse, $response); @@ -1030,8 +1023,6 @@ public function updateSecretExceptionTest() $transport->addResponse(null, $status); // Mock request $secret = new Secret(); - $secretReplication = new Replication(); - $secret->setReplication($secretReplication); $updateMask = new FieldMask(); try { $gapicClient->updateSecret($secret, $updateMask); From 6d164d92ffd8160de15bb8bd73c43e78008c4aac Mon Sep 17 00:00:00 2001 From: Saransh Dhingra Date: Fri, 26 Apr 2024 20:15:13 +0530 Subject: [PATCH 65/86] feat: Improved latency for executeStreaminSql calls (#7254) --- Spanner/composer.json | 2 +- Spanner/src/Connection/Grpc.php | 87 ++++++++++++++++++++++ Spanner/tests/Unit/Connection/GrpcTest.php | 33 ++++++++ composer.json | 2 +- 4 files changed, 122 insertions(+), 2 deletions(-) diff --git a/Spanner/composer.json b/Spanner/composer.json index 42ab1da8a32f..379d4e2d1492 100644 --- a/Spanner/composer.json +++ b/Spanner/composer.json @@ -7,7 +7,7 @@ "php": "^8.0", "ext-grpc": "*", "google/cloud-core": "^1.52.7", - "google/gax": "^1.30" + "google/gax": "^1.32" }, "require-dev": { "phpunit/phpunit": "^9.0", diff --git a/Spanner/src/Connection/Grpc.php b/Spanner/src/Connection/Grpc.php index ef357964b1b3..a3563b882e3a 100644 --- a/Spanner/src/Connection/Grpc.php +++ b/Spanner/src/Connection/Grpc.php @@ -55,6 +55,7 @@ use Google\Cloud\Spanner\V1\Mutation; use Google\Cloud\Spanner\V1\Mutation\Delete; use Google\Cloud\Spanner\V1\Mutation\Write; +use Google\Cloud\Spanner\V1\PartialResultSet; use Google\Cloud\Spanner\V1\PartitionOptions; use Google\Cloud\Spanner\V1\RequestOptions; use Google\Cloud\Spanner\V1\Session; @@ -68,6 +69,7 @@ use Google\Protobuf; use Google\Protobuf\FieldMask; use Google\Protobuf\GPBEmpty; +use Google\Protobuf\Internal\RepeatedField; use Google\Protobuf\ListValue; use Google\Protobuf\Struct; use Google\Protobuf\Value; @@ -235,6 +237,24 @@ public function __construct(array $config = []) 'google.protobuf.Timestamp' => function ($v) { return $this->formatTimestampFromApi($v); } + ], [], [], [ + // A custom encoder that short-circuits the encodeMessage in Serializer class, + // but only if the argument is of the type PartialResultSet. + PartialResultSet::class => function ($msg) { + $data = json_decode($msg->serializeToJsonString(), true); + + // The transaction id is serialized as a base64 encoded string in $data. So, we + // add a step to get the transaction id using a getter instead of the serialized value. + // The null-safe operator is used to handle edge cases where the relevant fields are not present. + $data['metadata']['transaction']['id'] = (string) $msg?->getMetadata()?->getTransaction()?->getId(); + + // Helps convert metadata enum values from string types to their respective code/annotation + // pairs. Ex: INT64 is converted to {code: 2, typeAnnotation: 0}. + $fields = $msg->getMetadata()?->getRowType()?->getFields(); + $data['metadata']['rowType']['fields'] = $this->getFieldDataFromRepeatedFields($fields); + + return $data; + } ]); //@codeCoverageIgnoreEnd @@ -1620,4 +1640,71 @@ private function setDirectedReadOptions(array &$args) ); } } + + /** + * Utiltiy method to take in a Google\Cloud\Spanner\V1\Type value and return + * the data as an array. The method takes care of array and struct elements. + * + * @param Type $type The "type" object + * + * @return array The formatted data. + */ + private function getTypeData(Type $type): array + { + $data = [ + 'code' => $type->getCode(), + 'typeAnnotation' => $type->getTypeAnnotation(), + 'protoTypeFqn' => $type->getProtoTypeFqn() + ]; + + // If this is a struct field, then recursisevly call getTypeData + if ($type->hasStructType()) { + $nestedType = $type->getStructType(); + $fields = $nestedType->getFields(); + $data['structType'] = [ + 'fields' => $this->getFieldDataFromRepeatedFields($fields) + ]; + } + // If this is an array field, then recursisevly call getTypeData + if ($type->hasArrayElementType()) { + $nestedType = $type->getArrayElementType(); + $data['arrayElementType'] = $this->getTypeData($nestedType); + } + + return $data; + } + + /** + * Utility method to return "fields data" in the format: + * [ + * "name" => "" + * "type" => [] + * ]. + * + * The type is converted from a string like INT64 to ["code" => 2, "typeAnnotation" => 0] + * conforming with the Google\Cloud\Spanner\V1\TypeCode class. + * + * @param ?RepeatedField $fields The array contain list of fields. + * + * @return array The formatted fields data. + */ + private function getFieldDataFromRepeatedFields(?RepeatedField $fields): array + { + if (is_null($fields)) { + return []; + } + + $fieldsData = []; + foreach ($fields as $key => $field) { + $type = $field->getType(); + $typeData = $this->getTypeData($type); + + $fieldsData[$key] = [ + 'name' => $field->getName(), + 'type' => $typeData + ]; + } + + return $fieldsData; + } } diff --git a/Spanner/tests/Unit/Connection/GrpcTest.php b/Spanner/tests/Unit/Connection/GrpcTest.php index b776ef4d42cc..07822d51cea5 100644 --- a/Spanner/tests/Unit/Connection/GrpcTest.php +++ b/Spanner/tests/Unit/Connection/GrpcTest.php @@ -21,6 +21,7 @@ use Google\ApiCore\CredentialsWrapper; use Google\ApiCore\OperationResponse; use Google\ApiCore\Serializer; +use Google\ApiCore\Testing\MockResponse; use Google\ApiCore\Transport\TransportInterface; use Google\Cloud\Core\GrpcRequestWrapper; use Google\Cloud\Core\GrpcTrait; @@ -40,6 +41,7 @@ use Google\Cloud\Spanner\V1\Mutation; use Google\Cloud\Spanner\V1\Mutation\Delete; use Google\Cloud\Spanner\V1\Mutation\Write; +use Google\Cloud\Spanner\V1\PartialResultSet; use Google\Cloud\Spanner\V1\PartitionOptions; use Google\Cloud\Spanner\V1\RequestOptions; use Google\Cloud\Spanner\V1\Session; @@ -1418,6 +1420,37 @@ public function larOptions() ]; } + public function testPartialResultSetCustomEncoder() + { + $partialResultSet = new PartialResultSet(); + $partialResultSet->mergeFromJsonString(json_encode([ + 'metadata' => [ + 'transaction' => [ + 'id' => base64_encode(0b00010100) // bytedata is represented as a base64-encoded string in JSON + ], + 'rowType' => [ + 'fields' => [ + ['type' => ['code' => 'INT64']] // enums are represented as their string equivalents in JSON + ] + ], + ], + ])); + + $this->assertEquals(0b00010100, $partialResultSet->getMetadata()->getTransaction()->getId()); + $this->assertEquals(2, $partialResultSet->getMetadata()->getRowType()->getFields()[0]->getType()->getCode()); + + // decode the message and ensure it's decoded as expected + $grpc = new Grpc(); + $serializerProp = new \ReflectionProperty($grpc, 'serializer'); + $serializerProp->setAccessible(true); + $serializer = $serializerProp->getValue($grpc); + $arr = $serializer->encodeMessage($partialResultSet); + + // We expect this to be the binary string + $this->assertEquals(0b00010100, $arr['metadata']['transaction']['id']); + // We expect this to be the integer + $this->assertEquals(2, $arr['metadata']['rowType']['fields'][0]['type']['code']); + } private function assertCallCorrect( $method, array $args, diff --git a/composer.json b/composer.json index 2fabda4d1214..70de38f8dc68 100644 --- a/composer.json +++ b/composer.json @@ -50,7 +50,7 @@ "monolog/monolog": "^2.9||^3.0", "psr/http-message": "^1.0|^2.0", "ramsey/uuid": "^4.0", - "google/gax": "^1.30", + "google/gax": "^1.32", "google/common-protos": "^4.4", "google/auth": "^1.34" }, From 389ab2df8050901de3f8c6a29705a43307367416 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 26 Apr 2024 16:36:45 +0000 Subject: [PATCH 66/86] feat: add `RESOURCE_EXHAUSTED` to the list of retryable error codes (#7259) PiperOrigin-RevId: 628281023 Source-Link: https://github.com/googleapis/googleapis/commit/60536a2a263b6d33b0b1adb5b10c10e34ccf4528 Source-Link: https://github.com/googleapis/googleapis-gen/commit/c5cfd5b956f9eadff54096c9f1c8a57ab01db294 Copy-Tag: eyJwIjoiU3Bhbm5lci8uT3dsQm90LnlhbWwiLCJoIjoiYzVjZmQ1Yjk1NmY5ZWFkZmY1NDA5NmM5ZjFjOGE1N2FiMDFkYjI5NCJ9 --- Spanner/src/V1/resources/spanner_client_config.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Spanner/src/V1/resources/spanner_client_config.json b/Spanner/src/V1/resources/spanner_client_config.json index 69bbfabd0c2d..e185586d033d 100644 --- a/Spanner/src/V1/resources/spanner_client_config.json +++ b/Spanner/src/V1/resources/spanner_client_config.json @@ -5,13 +5,16 @@ "no_retry_codes": [], "no_retry_1_codes": [], "retry_policy_1_codes": [ - "UNAVAILABLE" + "UNAVAILABLE", + "RESOURCE_EXHAUSTED" ], "retry_policy_2_codes": [ - "UNAVAILABLE" + "UNAVAILABLE", + "RESOURCE_EXHAUSTED" ], "retry_policy_3_codes": [ - "UNAVAILABLE" + "UNAVAILABLE", + "RESOURCE_EXHAUSTED" ] }, "retry_params": { From 1751df73ba49cca3af5f52865bdde09443f61d75 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 26 Apr 2024 16:37:25 +0000 Subject: [PATCH 67/86] chore(docs): fix phpdoc reference (#7258) PiperOrigin-RevId: 628185661 Source-Link: https://github.com/googleapis/googleapis/commit/a532f528221cf502dcc3d75d3dfde6e9de501fa8 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1f600553fed21e1b79238ca034c91d448efe1546 Copy-Tag: eyJwIjoiQ29tcHV0ZS8uT3dsQm90LnlhbWwiLCJoIjoiMWY2MDA1NTNmZWQyMWUxYjc5MjM4Y2EwMzRjOTFkNDQ4ZWZlMTU0NiJ9 --- Compute/src/V1/Client/AcceleratorTypesClient.php | 2 +- Compute/src/V1/Client/AddressesClient.php | 2 +- Compute/src/V1/Client/AutoscalersClient.php | 2 +- Compute/src/V1/Client/BackendBucketsClient.php | 2 +- Compute/src/V1/Client/BackendServicesClient.php | 2 +- Compute/src/V1/Client/DiskTypesClient.php | 2 +- Compute/src/V1/Client/DisksClient.php | 2 +- Compute/src/V1/Client/ExternalVpnGatewaysClient.php | 2 +- Compute/src/V1/Client/FirewallPoliciesClient.php | 2 +- Compute/src/V1/Client/FirewallsClient.php | 2 +- Compute/src/V1/Client/ForwardingRulesClient.php | 2 +- Compute/src/V1/Client/GlobalAddressesClient.php | 2 +- Compute/src/V1/Client/GlobalForwardingRulesClient.php | 2 +- Compute/src/V1/Client/GlobalNetworkEndpointGroupsClient.php | 2 +- Compute/src/V1/Client/GlobalOperationsClient.php | 2 +- Compute/src/V1/Client/GlobalOrganizationOperationsClient.php | 2 +- Compute/src/V1/Client/GlobalPublicDelegatedPrefixesClient.php | 2 +- Compute/src/V1/Client/HealthChecksClient.php | 2 +- Compute/src/V1/Client/ImageFamilyViewsClient.php | 2 +- Compute/src/V1/Client/ImagesClient.php | 2 +- Compute/src/V1/Client/InstanceGroupManagersClient.php | 2 +- Compute/src/V1/Client/InstanceGroupsClient.php | 2 +- Compute/src/V1/Client/InstanceTemplatesClient.php | 2 +- Compute/src/V1/Client/InstancesClient.php | 2 +- Compute/src/V1/Client/InstantSnapshotsClient.php | 2 +- Compute/src/V1/Client/InterconnectAttachmentsClient.php | 2 +- Compute/src/V1/Client/InterconnectLocationsClient.php | 2 +- Compute/src/V1/Client/InterconnectRemoteLocationsClient.php | 2 +- Compute/src/V1/Client/InterconnectsClient.php | 2 +- Compute/src/V1/Client/LicenseCodesClient.php | 2 +- Compute/src/V1/Client/LicensesClient.php | 2 +- Compute/src/V1/Client/MachineImagesClient.php | 2 +- Compute/src/V1/Client/MachineTypesClient.php | 2 +- Compute/src/V1/Client/NetworkAttachmentsClient.php | 2 +- Compute/src/V1/Client/NetworkEdgeSecurityServicesClient.php | 2 +- Compute/src/V1/Client/NetworkEndpointGroupsClient.php | 2 +- Compute/src/V1/Client/NetworkFirewallPoliciesClient.php | 2 +- Compute/src/V1/Client/NetworksClient.php | 2 +- Compute/src/V1/Client/NodeGroupsClient.php | 2 +- Compute/src/V1/Client/NodeTemplatesClient.php | 2 +- Compute/src/V1/Client/NodeTypesClient.php | 2 +- Compute/src/V1/Client/PacketMirroringsClient.php | 2 +- Compute/src/V1/Client/ProjectsClient.php | 2 +- Compute/src/V1/Client/PublicAdvertisedPrefixesClient.php | 2 +- Compute/src/V1/Client/PublicDelegatedPrefixesClient.php | 2 +- Compute/src/V1/Client/RegionAutoscalersClient.php | 2 +- Compute/src/V1/Client/RegionBackendServicesClient.php | 2 +- Compute/src/V1/Client/RegionCommitmentsClient.php | 2 +- Compute/src/V1/Client/RegionDiskTypesClient.php | 2 +- Compute/src/V1/Client/RegionDisksClient.php | 2 +- Compute/src/V1/Client/RegionHealthCheckServicesClient.php | 2 +- Compute/src/V1/Client/RegionHealthChecksClient.php | 2 +- Compute/src/V1/Client/RegionInstanceGroupManagersClient.php | 2 +- Compute/src/V1/Client/RegionInstanceGroupsClient.php | 2 +- Compute/src/V1/Client/RegionInstanceTemplatesClient.php | 2 +- Compute/src/V1/Client/RegionInstancesClient.php | 2 +- Compute/src/V1/Client/RegionInstantSnapshotsClient.php | 2 +- Compute/src/V1/Client/RegionNetworkEndpointGroupsClient.php | 2 +- Compute/src/V1/Client/RegionNetworkFirewallPoliciesClient.php | 2 +- Compute/src/V1/Client/RegionNotificationEndpointsClient.php | 2 +- Compute/src/V1/Client/RegionOperationsClient.php | 2 +- Compute/src/V1/Client/RegionSecurityPoliciesClient.php | 2 +- Compute/src/V1/Client/RegionSslCertificatesClient.php | 2 +- Compute/src/V1/Client/RegionSslPoliciesClient.php | 2 +- Compute/src/V1/Client/RegionTargetHttpProxiesClient.php | 2 +- Compute/src/V1/Client/RegionTargetHttpsProxiesClient.php | 2 +- Compute/src/V1/Client/RegionTargetTcpProxiesClient.php | 2 +- Compute/src/V1/Client/RegionUrlMapsClient.php | 2 +- Compute/src/V1/Client/RegionZonesClient.php | 2 +- Compute/src/V1/Client/RegionsClient.php | 2 +- Compute/src/V1/Client/ReservationsClient.php | 2 +- Compute/src/V1/Client/ResourcePoliciesClient.php | 2 +- Compute/src/V1/Client/RoutersClient.php | 2 +- Compute/src/V1/Client/RoutesClient.php | 2 +- Compute/src/V1/Client/SecurityPoliciesClient.php | 2 +- Compute/src/V1/Client/ServiceAttachmentsClient.php | 2 +- Compute/src/V1/Client/SnapshotSettingsServiceClient.php | 2 +- Compute/src/V1/Client/SnapshotsClient.php | 2 +- Compute/src/V1/Client/SslCertificatesClient.php | 2 +- Compute/src/V1/Client/SslPoliciesClient.php | 2 +- Compute/src/V1/Client/SubnetworksClient.php | 2 +- Compute/src/V1/Client/TargetGrpcProxiesClient.php | 2 +- Compute/src/V1/Client/TargetHttpProxiesClient.php | 2 +- Compute/src/V1/Client/TargetHttpsProxiesClient.php | 2 +- Compute/src/V1/Client/TargetInstancesClient.php | 2 +- Compute/src/V1/Client/TargetPoolsClient.php | 2 +- Compute/src/V1/Client/TargetSslProxiesClient.php | 2 +- Compute/src/V1/Client/TargetTcpProxiesClient.php | 2 +- Compute/src/V1/Client/TargetVpnGatewaysClient.php | 2 +- Compute/src/V1/Client/UrlMapsClient.php | 2 +- Compute/src/V1/Client/VpnGatewaysClient.php | 2 +- Compute/src/V1/Client/VpnTunnelsClient.php | 2 +- Compute/src/V1/Client/ZoneOperationsClient.php | 2 +- Compute/src/V1/Client/ZonesClient.php | 2 +- 94 files changed, 94 insertions(+), 94 deletions(-) diff --git a/Compute/src/V1/Client/AcceleratorTypesClient.php b/Compute/src/V1/Client/AcceleratorTypesClient.php index 018de93e1540..7123486abeb8 100644 --- a/Compute/src/V1/Client/AcceleratorTypesClient.php +++ b/Compute/src/V1/Client/AcceleratorTypesClient.php @@ -106,7 +106,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/AddressesClient.php b/Compute/src/V1/Client/AddressesClient.php index ae5f3c7f9191..4c13d632b254 100644 --- a/Compute/src/V1/Client/AddressesClient.php +++ b/Compute/src/V1/Client/AddressesClient.php @@ -115,7 +115,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/AutoscalersClient.php b/Compute/src/V1/Client/AutoscalersClient.php index 3b2f08bafa77..6e2fb6238518 100644 --- a/Compute/src/V1/Client/AutoscalersClient.php +++ b/Compute/src/V1/Client/AutoscalersClient.php @@ -115,7 +115,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/BackendBucketsClient.php b/Compute/src/V1/Client/BackendBucketsClient.php index a9078039bda7..b11c594acbc4 100644 --- a/Compute/src/V1/Client/BackendBucketsClient.php +++ b/Compute/src/V1/Client/BackendBucketsClient.php @@ -127,7 +127,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/BackendServicesClient.php b/Compute/src/V1/Client/BackendServicesClient.php index 9cb5f05744a1..9c308b500c61 100644 --- a/Compute/src/V1/Client/BackendServicesClient.php +++ b/Compute/src/V1/Client/BackendServicesClient.php @@ -136,7 +136,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/DiskTypesClient.php b/Compute/src/V1/Client/DiskTypesClient.php index 0095e6a9307b..18d2c0299e90 100644 --- a/Compute/src/V1/Client/DiskTypesClient.php +++ b/Compute/src/V1/Client/DiskTypesClient.php @@ -103,7 +103,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/DisksClient.php b/Compute/src/V1/Client/DisksClient.php index e3f349e245ce..fa9e7d1bff02 100644 --- a/Compute/src/V1/Client/DisksClient.php +++ b/Compute/src/V1/Client/DisksClient.php @@ -139,7 +139,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/ExternalVpnGatewaysClient.php b/Compute/src/V1/Client/ExternalVpnGatewaysClient.php index 9cffa601442d..a78dea2ffce5 100644 --- a/Compute/src/V1/Client/ExternalVpnGatewaysClient.php +++ b/Compute/src/V1/Client/ExternalVpnGatewaysClient.php @@ -114,7 +114,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/FirewallPoliciesClient.php b/Compute/src/V1/Client/FirewallPoliciesClient.php index 8d713cc70e18..15538477a9de 100644 --- a/Compute/src/V1/Client/FirewallPoliciesClient.php +++ b/Compute/src/V1/Client/FirewallPoliciesClient.php @@ -142,7 +142,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/FirewallsClient.php b/Compute/src/V1/Client/FirewallsClient.php index d9f9eb6aa0be..e9bd6402834f 100644 --- a/Compute/src/V1/Client/FirewallsClient.php +++ b/Compute/src/V1/Client/FirewallsClient.php @@ -113,7 +113,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/ForwardingRulesClient.php b/Compute/src/V1/Client/ForwardingRulesClient.php index 7dd0f2271da6..0a57dc9da2c5 100644 --- a/Compute/src/V1/Client/ForwardingRulesClient.php +++ b/Compute/src/V1/Client/ForwardingRulesClient.php @@ -117,7 +117,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/GlobalAddressesClient.php b/Compute/src/V1/Client/GlobalAddressesClient.php index 3e4bd624212a..f320067e3e6c 100644 --- a/Compute/src/V1/Client/GlobalAddressesClient.php +++ b/Compute/src/V1/Client/GlobalAddressesClient.php @@ -113,7 +113,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/GlobalForwardingRulesClient.php b/Compute/src/V1/Client/GlobalForwardingRulesClient.php index 8ad6dc6b8eb0..b540552dd865 100644 --- a/Compute/src/V1/Client/GlobalForwardingRulesClient.php +++ b/Compute/src/V1/Client/GlobalForwardingRulesClient.php @@ -115,7 +115,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/GlobalNetworkEndpointGroupsClient.php b/Compute/src/V1/Client/GlobalNetworkEndpointGroupsClient.php index 20c2b86ef969..a5b161020f30 100644 --- a/Compute/src/V1/Client/GlobalNetworkEndpointGroupsClient.php +++ b/Compute/src/V1/Client/GlobalNetworkEndpointGroupsClient.php @@ -115,7 +115,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/GlobalOperationsClient.php b/Compute/src/V1/Client/GlobalOperationsClient.php index 393e8b1cbef7..0093b203ae83 100644 --- a/Compute/src/V1/Client/GlobalOperationsClient.php +++ b/Compute/src/V1/Client/GlobalOperationsClient.php @@ -107,7 +107,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/GlobalOrganizationOperationsClient.php b/Compute/src/V1/Client/GlobalOrganizationOperationsClient.php index 39ddea999f9c..43e410c3220c 100644 --- a/Compute/src/V1/Client/GlobalOrganizationOperationsClient.php +++ b/Compute/src/V1/Client/GlobalOrganizationOperationsClient.php @@ -103,7 +103,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/GlobalPublicDelegatedPrefixesClient.php b/Compute/src/V1/Client/GlobalPublicDelegatedPrefixesClient.php index 250c8bb1ea69..3d8bf036459f 100644 --- a/Compute/src/V1/Client/GlobalPublicDelegatedPrefixesClient.php +++ b/Compute/src/V1/Client/GlobalPublicDelegatedPrefixesClient.php @@ -111,7 +111,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/HealthChecksClient.php b/Compute/src/V1/Client/HealthChecksClient.php index 0462d46d0077..b77833615c89 100644 --- a/Compute/src/V1/Client/HealthChecksClient.php +++ b/Compute/src/V1/Client/HealthChecksClient.php @@ -115,7 +115,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/ImageFamilyViewsClient.php b/Compute/src/V1/Client/ImageFamilyViewsClient.php index 18b3cf73e4f6..19430ed31531 100644 --- a/Compute/src/V1/Client/ImageFamilyViewsClient.php +++ b/Compute/src/V1/Client/ImageFamilyViewsClient.php @@ -98,7 +98,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/ImagesClient.php b/Compute/src/V1/Client/ImagesClient.php index 8ff40113c8a0..fd8e47a03eb4 100644 --- a/Compute/src/V1/Client/ImagesClient.php +++ b/Compute/src/V1/Client/ImagesClient.php @@ -125,7 +125,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/InstanceGroupManagersClient.php b/Compute/src/V1/Client/InstanceGroupManagersClient.php index 1514d7d365a6..2981a3fb7585 100644 --- a/Compute/src/V1/Client/InstanceGroupManagersClient.php +++ b/Compute/src/V1/Client/InstanceGroupManagersClient.php @@ -141,7 +141,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/InstanceGroupsClient.php b/Compute/src/V1/Client/InstanceGroupsClient.php index 02456a05c30e..f16ad4e32e5c 100644 --- a/Compute/src/V1/Client/InstanceGroupsClient.php +++ b/Compute/src/V1/Client/InstanceGroupsClient.php @@ -119,7 +119,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/InstanceTemplatesClient.php b/Compute/src/V1/Client/InstanceTemplatesClient.php index b81d6d4c09e8..46e805993660 100644 --- a/Compute/src/V1/Client/InstanceTemplatesClient.php +++ b/Compute/src/V1/Client/InstanceTemplatesClient.php @@ -119,7 +119,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/InstancesClient.php b/Compute/src/V1/Client/InstancesClient.php index fd1123362a76..a64052a89195 100644 --- a/Compute/src/V1/Client/InstancesClient.php +++ b/Compute/src/V1/Client/InstancesClient.php @@ -205,7 +205,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/InstantSnapshotsClient.php b/Compute/src/V1/Client/InstantSnapshotsClient.php index 7630ca83dbcc..1c5d71f0b965 100644 --- a/Compute/src/V1/Client/InstantSnapshotsClient.php +++ b/Compute/src/V1/Client/InstantSnapshotsClient.php @@ -121,7 +121,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/InterconnectAttachmentsClient.php b/Compute/src/V1/Client/InterconnectAttachmentsClient.php index c2b34f523ddc..ceb7a6025538 100644 --- a/Compute/src/V1/Client/InterconnectAttachmentsClient.php +++ b/Compute/src/V1/Client/InterconnectAttachmentsClient.php @@ -115,7 +115,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/InterconnectLocationsClient.php b/Compute/src/V1/Client/InterconnectLocationsClient.php index 82a5deeca64d..88af4f7b1b08 100644 --- a/Compute/src/V1/Client/InterconnectLocationsClient.php +++ b/Compute/src/V1/Client/InterconnectLocationsClient.php @@ -101,7 +101,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/InterconnectRemoteLocationsClient.php b/Compute/src/V1/Client/InterconnectRemoteLocationsClient.php index b5b57af9de1c..f08b0facc2df 100644 --- a/Compute/src/V1/Client/InterconnectRemoteLocationsClient.php +++ b/Compute/src/V1/Client/InterconnectRemoteLocationsClient.php @@ -101,7 +101,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/InterconnectsClient.php b/Compute/src/V1/Client/InterconnectsClient.php index 8c8637fdebad..9130d1e3c4b1 100644 --- a/Compute/src/V1/Client/InterconnectsClient.php +++ b/Compute/src/V1/Client/InterconnectsClient.php @@ -119,7 +119,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/LicenseCodesClient.php b/Compute/src/V1/Client/LicenseCodesClient.php index fe42120a5e38..5528f944bee8 100644 --- a/Compute/src/V1/Client/LicenseCodesClient.php +++ b/Compute/src/V1/Client/LicenseCodesClient.php @@ -101,7 +101,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/LicensesClient.php b/Compute/src/V1/Client/LicensesClient.php index c9464716b816..742d34f1f73e 100644 --- a/Compute/src/V1/Client/LicensesClient.php +++ b/Compute/src/V1/Client/LicensesClient.php @@ -117,7 +117,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/MachineImagesClient.php b/Compute/src/V1/Client/MachineImagesClient.php index b0b6e522b8de..e00295f9bdc6 100644 --- a/Compute/src/V1/Client/MachineImagesClient.php +++ b/Compute/src/V1/Client/MachineImagesClient.php @@ -117,7 +117,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/MachineTypesClient.php b/Compute/src/V1/Client/MachineTypesClient.php index 3983f4d4f83a..170704115b34 100644 --- a/Compute/src/V1/Client/MachineTypesClient.php +++ b/Compute/src/V1/Client/MachineTypesClient.php @@ -103,7 +103,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/NetworkAttachmentsClient.php b/Compute/src/V1/Client/NetworkAttachmentsClient.php index 0b76fe7b4623..31afa702f873 100644 --- a/Compute/src/V1/Client/NetworkAttachmentsClient.php +++ b/Compute/src/V1/Client/NetworkAttachmentsClient.php @@ -121,7 +121,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/NetworkEdgeSecurityServicesClient.php b/Compute/src/V1/Client/NetworkEdgeSecurityServicesClient.php index b37790773331..f535e617cf73 100644 --- a/Compute/src/V1/Client/NetworkEdgeSecurityServicesClient.php +++ b/Compute/src/V1/Client/NetworkEdgeSecurityServicesClient.php @@ -111,7 +111,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/NetworkEndpointGroupsClient.php b/Compute/src/V1/Client/NetworkEndpointGroupsClient.php index 23f90d1dceb8..f76cee0f73f5 100644 --- a/Compute/src/V1/Client/NetworkEndpointGroupsClient.php +++ b/Compute/src/V1/Client/NetworkEndpointGroupsClient.php @@ -120,7 +120,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/NetworkFirewallPoliciesClient.php b/Compute/src/V1/Client/NetworkFirewallPoliciesClient.php index 893f115f033d..c3feeef644b4 100644 --- a/Compute/src/V1/Client/NetworkFirewallPoliciesClient.php +++ b/Compute/src/V1/Client/NetworkFirewallPoliciesClient.php @@ -137,7 +137,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/NetworksClient.php b/Compute/src/V1/Client/NetworksClient.php index e3fe12941d18..6a7143814753 100644 --- a/Compute/src/V1/Client/NetworksClient.php +++ b/Compute/src/V1/Client/NetworksClient.php @@ -124,7 +124,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/NodeGroupsClient.php b/Compute/src/V1/Client/NodeGroupsClient.php index 9334ab19f9fc..f715a6778eff 100644 --- a/Compute/src/V1/Client/NodeGroupsClient.php +++ b/Compute/src/V1/Client/NodeGroupsClient.php @@ -131,7 +131,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/NodeTemplatesClient.php b/Compute/src/V1/Client/NodeTemplatesClient.php index 835e2f26a1ec..405ac3d1006b 100644 --- a/Compute/src/V1/Client/NodeTemplatesClient.php +++ b/Compute/src/V1/Client/NodeTemplatesClient.php @@ -119,7 +119,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/NodeTypesClient.php b/Compute/src/V1/Client/NodeTypesClient.php index c40514d0b0b5..f8a501a1dbb0 100644 --- a/Compute/src/V1/Client/NodeTypesClient.php +++ b/Compute/src/V1/Client/NodeTypesClient.php @@ -103,7 +103,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/PacketMirroringsClient.php b/Compute/src/V1/Client/PacketMirroringsClient.php index d2617674734b..2f58d920ef8c 100644 --- a/Compute/src/V1/Client/PacketMirroringsClient.php +++ b/Compute/src/V1/Client/PacketMirroringsClient.php @@ -116,7 +116,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/ProjectsClient.php b/Compute/src/V1/Client/ProjectsClient.php index be86546f2c0b..f58e0dbffb8b 100644 --- a/Compute/src/V1/Client/ProjectsClient.php +++ b/Compute/src/V1/Client/ProjectsClient.php @@ -129,7 +129,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/PublicAdvertisedPrefixesClient.php b/Compute/src/V1/Client/PublicAdvertisedPrefixesClient.php index 4a303872be71..94fd6452c59a 100644 --- a/Compute/src/V1/Client/PublicAdvertisedPrefixesClient.php +++ b/Compute/src/V1/Client/PublicAdvertisedPrefixesClient.php @@ -115,7 +115,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/PublicDelegatedPrefixesClient.php b/Compute/src/V1/Client/PublicDelegatedPrefixesClient.php index 1278ada2e4cd..50170d8b584a 100644 --- a/Compute/src/V1/Client/PublicDelegatedPrefixesClient.php +++ b/Compute/src/V1/Client/PublicDelegatedPrefixesClient.php @@ -117,7 +117,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionAutoscalersClient.php b/Compute/src/V1/Client/RegionAutoscalersClient.php index f073813abdf4..5913b2d2c56d 100644 --- a/Compute/src/V1/Client/RegionAutoscalersClient.php +++ b/Compute/src/V1/Client/RegionAutoscalersClient.php @@ -113,7 +113,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionBackendServicesClient.php b/Compute/src/V1/Client/RegionBackendServicesClient.php index a36018d2f8a5..a2b886035294 100644 --- a/Compute/src/V1/Client/RegionBackendServicesClient.php +++ b/Compute/src/V1/Client/RegionBackendServicesClient.php @@ -128,7 +128,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionCommitmentsClient.php b/Compute/src/V1/Client/RegionCommitmentsClient.php index 2f73162d4605..7bc009a23d5f 100644 --- a/Compute/src/V1/Client/RegionCommitmentsClient.php +++ b/Compute/src/V1/Client/RegionCommitmentsClient.php @@ -111,7 +111,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionDiskTypesClient.php b/Compute/src/V1/Client/RegionDiskTypesClient.php index 33605ec270b5..a2770e96ec02 100644 --- a/Compute/src/V1/Client/RegionDiskTypesClient.php +++ b/Compute/src/V1/Client/RegionDiskTypesClient.php @@ -101,7 +101,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionDisksClient.php b/Compute/src/V1/Client/RegionDisksClient.php index 510372c98a58..c3f8c08a62f7 100644 --- a/Compute/src/V1/Client/RegionDisksClient.php +++ b/Compute/src/V1/Client/RegionDisksClient.php @@ -137,7 +137,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionHealthCheckServicesClient.php b/Compute/src/V1/Client/RegionHealthCheckServicesClient.php index f12b9057cd42..73d00c933699 100644 --- a/Compute/src/V1/Client/RegionHealthCheckServicesClient.php +++ b/Compute/src/V1/Client/RegionHealthCheckServicesClient.php @@ -111,7 +111,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionHealthChecksClient.php b/Compute/src/V1/Client/RegionHealthChecksClient.php index f41ff8027800..ce7e536c45ba 100644 --- a/Compute/src/V1/Client/RegionHealthChecksClient.php +++ b/Compute/src/V1/Client/RegionHealthChecksClient.php @@ -113,7 +113,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionInstanceGroupManagersClient.php b/Compute/src/V1/Client/RegionInstanceGroupManagersClient.php index 8e0b6ac82a4d..36f54abcb0bd 100644 --- a/Compute/src/V1/Client/RegionInstanceGroupManagersClient.php +++ b/Compute/src/V1/Client/RegionInstanceGroupManagersClient.php @@ -139,7 +139,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionInstanceGroupsClient.php b/Compute/src/V1/Client/RegionInstanceGroupsClient.php index 38db223c16ca..1310135cbab0 100644 --- a/Compute/src/V1/Client/RegionInstanceGroupsClient.php +++ b/Compute/src/V1/Client/RegionInstanceGroupsClient.php @@ -109,7 +109,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionInstanceTemplatesClient.php b/Compute/src/V1/Client/RegionInstanceTemplatesClient.php index b956ad325355..6c311d35be58 100644 --- a/Compute/src/V1/Client/RegionInstanceTemplatesClient.php +++ b/Compute/src/V1/Client/RegionInstanceTemplatesClient.php @@ -109,7 +109,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionInstancesClient.php b/Compute/src/V1/Client/RegionInstancesClient.php index 0ae31f446f5d..e06dd9aa7930 100644 --- a/Compute/src/V1/Client/RegionInstancesClient.php +++ b/Compute/src/V1/Client/RegionInstancesClient.php @@ -101,7 +101,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionInstantSnapshotsClient.php b/Compute/src/V1/Client/RegionInstantSnapshotsClient.php index c6b57a6036d0..2abae1233e2b 100644 --- a/Compute/src/V1/Client/RegionInstantSnapshotsClient.php +++ b/Compute/src/V1/Client/RegionInstantSnapshotsClient.php @@ -119,7 +119,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionNetworkEndpointGroupsClient.php b/Compute/src/V1/Client/RegionNetworkEndpointGroupsClient.php index 0858a68eddc0..e5727481fc3d 100644 --- a/Compute/src/V1/Client/RegionNetworkEndpointGroupsClient.php +++ b/Compute/src/V1/Client/RegionNetworkEndpointGroupsClient.php @@ -115,7 +115,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionNetworkFirewallPoliciesClient.php b/Compute/src/V1/Client/RegionNetworkFirewallPoliciesClient.php index 794a0fa8c14d..61587e52da6e 100644 --- a/Compute/src/V1/Client/RegionNetworkFirewallPoliciesClient.php +++ b/Compute/src/V1/Client/RegionNetworkFirewallPoliciesClient.php @@ -140,7 +140,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionNotificationEndpointsClient.php b/Compute/src/V1/Client/RegionNotificationEndpointsClient.php index 2e99e0fde9c7..8b02f44bfef5 100644 --- a/Compute/src/V1/Client/RegionNotificationEndpointsClient.php +++ b/Compute/src/V1/Client/RegionNotificationEndpointsClient.php @@ -109,7 +109,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionOperationsClient.php b/Compute/src/V1/Client/RegionOperationsClient.php index 8b75eb535b36..92dd739bd74d 100644 --- a/Compute/src/V1/Client/RegionOperationsClient.php +++ b/Compute/src/V1/Client/RegionOperationsClient.php @@ -105,7 +105,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionSecurityPoliciesClient.php b/Compute/src/V1/Client/RegionSecurityPoliciesClient.php index e4b61e836219..b25152cd021b 100644 --- a/Compute/src/V1/Client/RegionSecurityPoliciesClient.php +++ b/Compute/src/V1/Client/RegionSecurityPoliciesClient.php @@ -120,7 +120,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionSslCertificatesClient.php b/Compute/src/V1/Client/RegionSslCertificatesClient.php index fa3be54fda1f..47f0a4339c8a 100644 --- a/Compute/src/V1/Client/RegionSslCertificatesClient.php +++ b/Compute/src/V1/Client/RegionSslCertificatesClient.php @@ -109,7 +109,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionSslPoliciesClient.php b/Compute/src/V1/Client/RegionSslPoliciesClient.php index 4be919527d9d..c06c4118c4a0 100644 --- a/Compute/src/V1/Client/RegionSslPoliciesClient.php +++ b/Compute/src/V1/Client/RegionSslPoliciesClient.php @@ -114,7 +114,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionTargetHttpProxiesClient.php b/Compute/src/V1/Client/RegionTargetHttpProxiesClient.php index a268ad306217..1d5114eac0b8 100644 --- a/Compute/src/V1/Client/RegionTargetHttpProxiesClient.php +++ b/Compute/src/V1/Client/RegionTargetHttpProxiesClient.php @@ -111,7 +111,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionTargetHttpsProxiesClient.php b/Compute/src/V1/Client/RegionTargetHttpsProxiesClient.php index c767a9e49cdf..9d9789004718 100644 --- a/Compute/src/V1/Client/RegionTargetHttpsProxiesClient.php +++ b/Compute/src/V1/Client/RegionTargetHttpsProxiesClient.php @@ -115,7 +115,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionTargetTcpProxiesClient.php b/Compute/src/V1/Client/RegionTargetTcpProxiesClient.php index 68da407c2c10..794d3d042fc3 100644 --- a/Compute/src/V1/Client/RegionTargetTcpProxiesClient.php +++ b/Compute/src/V1/Client/RegionTargetTcpProxiesClient.php @@ -109,7 +109,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionUrlMapsClient.php b/Compute/src/V1/Client/RegionUrlMapsClient.php index 4576eaf9b293..c32882775c0a 100644 --- a/Compute/src/V1/Client/RegionUrlMapsClient.php +++ b/Compute/src/V1/Client/RegionUrlMapsClient.php @@ -116,7 +116,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionZonesClient.php b/Compute/src/V1/Client/RegionZonesClient.php index 76ba5748bddf..680b1aa3824a 100644 --- a/Compute/src/V1/Client/RegionZonesClient.php +++ b/Compute/src/V1/Client/RegionZonesClient.php @@ -98,7 +98,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RegionsClient.php b/Compute/src/V1/Client/RegionsClient.php index dcc5ec6c5a22..96fc3f6b948d 100644 --- a/Compute/src/V1/Client/RegionsClient.php +++ b/Compute/src/V1/Client/RegionsClient.php @@ -101,7 +101,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/ReservationsClient.php b/Compute/src/V1/Client/ReservationsClient.php index ab9445355c82..8097ea103f97 100644 --- a/Compute/src/V1/Client/ReservationsClient.php +++ b/Compute/src/V1/Client/ReservationsClient.php @@ -123,7 +123,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/ResourcePoliciesClient.php b/Compute/src/V1/Client/ResourcePoliciesClient.php index be52a34455db..a3e2e1b49a2c 100644 --- a/Compute/src/V1/Client/ResourcePoliciesClient.php +++ b/Compute/src/V1/Client/ResourcePoliciesClient.php @@ -121,7 +121,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RoutersClient.php b/Compute/src/V1/Client/RoutersClient.php index 7a8874961d08..90c3f4c51228 100644 --- a/Compute/src/V1/Client/RoutersClient.php +++ b/Compute/src/V1/Client/RoutersClient.php @@ -126,7 +126,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/RoutesClient.php b/Compute/src/V1/Client/RoutesClient.php index 87a5e38b947b..54b3ac6abfa1 100644 --- a/Compute/src/V1/Client/RoutesClient.php +++ b/Compute/src/V1/Client/RoutesClient.php @@ -109,7 +109,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/SecurityPoliciesClient.php b/Compute/src/V1/Client/SecurityPoliciesClient.php index 441fd6b62f02..21aeb29e6e53 100644 --- a/Compute/src/V1/Client/SecurityPoliciesClient.php +++ b/Compute/src/V1/Client/SecurityPoliciesClient.php @@ -127,7 +127,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/ServiceAttachmentsClient.php b/Compute/src/V1/Client/ServiceAttachmentsClient.php index 9853e2f77c65..a18d832105bb 100644 --- a/Compute/src/V1/Client/ServiceAttachmentsClient.php +++ b/Compute/src/V1/Client/ServiceAttachmentsClient.php @@ -121,7 +121,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/SnapshotSettingsServiceClient.php b/Compute/src/V1/Client/SnapshotSettingsServiceClient.php index b33f9c7053e0..a4184857f310 100644 --- a/Compute/src/V1/Client/SnapshotSettingsServiceClient.php +++ b/Compute/src/V1/Client/SnapshotSettingsServiceClient.php @@ -104,7 +104,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/SnapshotsClient.php b/Compute/src/V1/Client/SnapshotsClient.php index 8292da6a809e..d639ccdca5c8 100644 --- a/Compute/src/V1/Client/SnapshotsClient.php +++ b/Compute/src/V1/Client/SnapshotsClient.php @@ -119,7 +119,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/SslCertificatesClient.php b/Compute/src/V1/Client/SslCertificatesClient.php index 7e52886d20dc..4b705db636a7 100644 --- a/Compute/src/V1/Client/SslCertificatesClient.php +++ b/Compute/src/V1/Client/SslCertificatesClient.php @@ -111,7 +111,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/SslPoliciesClient.php b/Compute/src/V1/Client/SslPoliciesClient.php index 447ce2d65813..cfbf83d5946c 100644 --- a/Compute/src/V1/Client/SslPoliciesClient.php +++ b/Compute/src/V1/Client/SslPoliciesClient.php @@ -116,7 +116,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/SubnetworksClient.php b/Compute/src/V1/Client/SubnetworksClient.php index 48164b4f7bca..de1765330fb0 100644 --- a/Compute/src/V1/Client/SubnetworksClient.php +++ b/Compute/src/V1/Client/SubnetworksClient.php @@ -127,7 +127,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/TargetGrpcProxiesClient.php b/Compute/src/V1/Client/TargetGrpcProxiesClient.php index 61386dee42a1..048efa419b3b 100644 --- a/Compute/src/V1/Client/TargetGrpcProxiesClient.php +++ b/Compute/src/V1/Client/TargetGrpcProxiesClient.php @@ -111,7 +111,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/TargetHttpProxiesClient.php b/Compute/src/V1/Client/TargetHttpProxiesClient.php index e8ca7a24467e..04f961ac7fcf 100644 --- a/Compute/src/V1/Client/TargetHttpProxiesClient.php +++ b/Compute/src/V1/Client/TargetHttpProxiesClient.php @@ -115,7 +115,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/TargetHttpsProxiesClient.php b/Compute/src/V1/Client/TargetHttpsProxiesClient.php index 999449aa5ab2..c95f0c4ed7e0 100644 --- a/Compute/src/V1/Client/TargetHttpsProxiesClient.php +++ b/Compute/src/V1/Client/TargetHttpsProxiesClient.php @@ -123,7 +123,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/TargetInstancesClient.php b/Compute/src/V1/Client/TargetInstancesClient.php index cd1fd9757d80..4451b9625f56 100644 --- a/Compute/src/V1/Client/TargetInstancesClient.php +++ b/Compute/src/V1/Client/TargetInstancesClient.php @@ -113,7 +113,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/TargetPoolsClient.php b/Compute/src/V1/Client/TargetPoolsClient.php index b3e9443e119e..e5c24c2f1798 100644 --- a/Compute/src/V1/Client/TargetPoolsClient.php +++ b/Compute/src/V1/Client/TargetPoolsClient.php @@ -126,7 +126,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/TargetSslProxiesClient.php b/Compute/src/V1/Client/TargetSslProxiesClient.php index ee463988677e..86b46aafb42d 100644 --- a/Compute/src/V1/Client/TargetSslProxiesClient.php +++ b/Compute/src/V1/Client/TargetSslProxiesClient.php @@ -119,7 +119,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/TargetTcpProxiesClient.php b/Compute/src/V1/Client/TargetTcpProxiesClient.php index 76567a173e9d..8fa2766f31db 100644 --- a/Compute/src/V1/Client/TargetTcpProxiesClient.php +++ b/Compute/src/V1/Client/TargetTcpProxiesClient.php @@ -115,7 +115,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/TargetVpnGatewaysClient.php b/Compute/src/V1/Client/TargetVpnGatewaysClient.php index f5e9e8f44df9..cff46f2d46e3 100644 --- a/Compute/src/V1/Client/TargetVpnGatewaysClient.php +++ b/Compute/src/V1/Client/TargetVpnGatewaysClient.php @@ -113,7 +113,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/UrlMapsClient.php b/Compute/src/V1/Client/UrlMapsClient.php index 5e65818d9873..69d7d80e693a 100644 --- a/Compute/src/V1/Client/UrlMapsClient.php +++ b/Compute/src/V1/Client/UrlMapsClient.php @@ -120,7 +120,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/VpnGatewaysClient.php b/Compute/src/V1/Client/VpnGatewaysClient.php index 277fcc8b58e3..94f752985825 100644 --- a/Compute/src/V1/Client/VpnGatewaysClient.php +++ b/Compute/src/V1/Client/VpnGatewaysClient.php @@ -119,7 +119,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/VpnTunnelsClient.php b/Compute/src/V1/Client/VpnTunnelsClient.php index d4e0d089bbfb..a9cd4395ba42 100644 --- a/Compute/src/V1/Client/VpnTunnelsClient.php +++ b/Compute/src/V1/Client/VpnTunnelsClient.php @@ -113,7 +113,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/ZoneOperationsClient.php b/Compute/src/V1/Client/ZoneOperationsClient.php index 28a6c0edcd2e..2e7ff6f097c8 100644 --- a/Compute/src/V1/Client/ZoneOperationsClient.php +++ b/Compute/src/V1/Client/ZoneOperationsClient.php @@ -105,7 +105,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ diff --git a/Compute/src/V1/Client/ZonesClient.php b/Compute/src/V1/Client/ZonesClient.php index 9219a7e47fc0..e92d8cb66ea1 100644 --- a/Compute/src/V1/Client/ZonesClient.php +++ b/Compute/src/V1/Client/ZonesClient.php @@ -101,7 +101,7 @@ private static function defaultTransport() return 'rest'; } - /** Implements GapicClientTrait::supportedTransports. */ + /** Implements ClientOptionsTrait::supportedTransports. */ private static function supportedTransports() { return [ From efd69d3f5dab8ddb2830757b7b09bd1ab0bf8b29 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 26 Apr 2024 16:51:58 +0000 Subject: [PATCH 68/86] chore(main): release 0.243.0 (#7255) --- CHANGELOG.md | 75 +++++++++++++++++++++++++++++++++++ Compute/VERSION | 2 +- Config/VERSION | 2 +- Monitoring/VERSION | 2 +- RecaptchaEnterprise/VERSION | 2 +- SecretManager/VERSION | 2 +- Spanner/VERSION | 2 +- Spanner/src/SpannerClient.php | 2 +- StorageControl/VERSION | 2 +- composer.json | 14 +++---- 10 files changed, 90 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2cc14cd47aa..751aceb2c074 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,80 @@ # Changelog +## 0.243.0 + +
google/cloud-compute 1.16.2 + + + +
+ +
google/cloud-config 0.5.0 + + + +### Features + +* Annotations are now supported to help client tools identify deployments during automation ([0a27dbb](https://github.com/googleapis/google-cloud-php/commit/0a27dbbbda4ee70a6e65d6975066a407b071c62f)) +* Infrastructure manager supports 1.2.3, 1.3.10, 1.4.7, 1.5.7 versions of Terraform when creating a preview of a deployment ([#7251](https://github.com/googleapis/google-cloud-php/issues/7251)) ([0a27dbb](https://github.com/googleapis/google-cloud-php/commit/0a27dbbbda4ee70a6e65d6975066a407b071c62f)) + +
+ +
google/cloud-monitoring 1.10.1 + + + +### Bug Fixes + +* Defined class prefix of GMON for Objective C ([#7256](https://github.com/googleapis/google-cloud-php/issues/7256)) ([d120277](https://github.com/googleapis/google-cloud-php/commit/d12027711154292c14917c6ef76382fc7fca2dab)) + +
+ +
google/cloud-recaptcha-enterprise 1.12.0 + + + +### Features + +* Add Fraud Prevention settings field ([#7252](https://github.com/googleapis/google-cloud-php/issues/7252)) ([d65086e](https://github.com/googleapis/google-cloud-php/commit/d65086eea0e1b90f24f04d7085c5769679f75250)) + +
+ +
google/cloud-secret-manager 1.15.0 + + + +### Features + +* Add Secret Version Delayed Destroy changes for client libraries ([#7250](https://github.com/googleapis/google-cloud-php/issues/7250)) ([6744443](https://github.com/googleapis/google-cloud-php/commit/6744443c0689dd56d6b7882d7c444a1fc2f07179)) + + +### Documentation + +* Users can now enable secret version delayed destruction ([6744443](https://github.com/googleapis/google-cloud-php/commit/6744443c0689dd56d6b7882d7c444a1fc2f07179)) + +
+ +
google/cloud-spanner 1.76.0 + + + +### Features + +* Add `RESOURCE_EXHAUSTED` to the list of retryable error codes ([#7259](https://github.com/googleapis/google-cloud-php/issues/7259)) ([389ab2d](https://github.com/googleapis/google-cloud-php/commit/389ab2df8050901de3f8c6a29705a43307367416)) +* Improved latency for executeStreaminSql calls ([#7254](https://github.com/googleapis/google-cloud-php/issues/7254)) ([6d164d9](https://github.com/googleapis/google-cloud-php/commit/6d164d92ffd8160de15bb8bd73c43e78008c4aac)) + +
+ +
google/cloud-storage-control 0.1.0 + + + +### Features + +* Introduce StorageControl ([#7245](https://github.com/googleapis/google-cloud-php/issues/7245)) ([5cd4215](https://github.com/googleapis/google-cloud-php/commit/5cd4215e4c17b57081a2133882464225b962ac56)) + +
+ ## 0.242.0
google/cloud-access-approval 1.2.3 diff --git a/Compute/VERSION b/Compute/VERSION index 41c11ffb730c..4a02d2c3170b 100644 --- a/Compute/VERSION +++ b/Compute/VERSION @@ -1 +1 @@ -1.16.1 +1.16.2 diff --git a/Config/VERSION b/Config/VERSION index 267577d47e49..8f0916f768f0 100644 --- a/Config/VERSION +++ b/Config/VERSION @@ -1 +1 @@ -0.4.1 +0.5.0 diff --git a/Monitoring/VERSION b/Monitoring/VERSION index 81c871de46b3..4dae2985b58c 100644 --- a/Monitoring/VERSION +++ b/Monitoring/VERSION @@ -1 +1 @@ -1.10.0 +1.10.1 diff --git a/RecaptchaEnterprise/VERSION b/RecaptchaEnterprise/VERSION index 720c7384c619..0eed1a29efd6 100644 --- a/RecaptchaEnterprise/VERSION +++ b/RecaptchaEnterprise/VERSION @@ -1 +1 @@ -1.11.1 +1.12.0 diff --git a/SecretManager/VERSION b/SecretManager/VERSION index a4cc55716f5d..141f2e805beb 100644 --- a/SecretManager/VERSION +++ b/SecretManager/VERSION @@ -1 +1 @@ -1.14.2 +1.15.0 diff --git a/Spanner/VERSION b/Spanner/VERSION index 008463d94849..32a6ce3c719b 100644 --- a/Spanner/VERSION +++ b/Spanner/VERSION @@ -1 +1 @@ -1.75.2 +1.76.0 diff --git a/Spanner/src/SpannerClient.php b/Spanner/src/SpannerClient.php index 73541a14187a..eafe3220ec71 100644 --- a/Spanner/src/SpannerClient.php +++ b/Spanner/src/SpannerClient.php @@ -120,7 +120,7 @@ class SpannerClient use LROTrait; use ValidateTrait; - const VERSION = '1.75.2'; + const VERSION = '1.76.0'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/spanner.data'; const ADMIN_SCOPE = 'https://www.googleapis.com/auth/spanner.admin'; diff --git a/StorageControl/VERSION b/StorageControl/VERSION index 77d6f4ca2371..6e8bf73aa550 100644 --- a/StorageControl/VERSION +++ b/StorageControl/VERSION @@ -1 +1 @@ -0.0.0 +0.1.0 diff --git a/composer.json b/composer.json index 70de38f8dc68..37c2a0716d85 100644 --- a/composer.json +++ b/composer.json @@ -116,9 +116,9 @@ "google/cloud-cloudcontrolspartner": "0.1.1", "google/cloud-commerce-consumer-procurement": "0.2.3", "google/cloud-common-protos": "0.5.1", - "google/cloud-compute": "1.16.1", + "google/cloud-compute": "1.16.2", "google/cloud-confidentialcomputing": "0.8.1", - "google/cloud-config": "0.4.1", + "google/cloud-config": "0.5.0", "google/cloud-contact-center-insights": "1.9.3", "google/cloud-container": "1.30.1", "google/cloud-container-analysis": "0.5.5", @@ -172,7 +172,7 @@ "google/cloud-media-translation": "0.4.2", "google/cloud-memcache": "1.3.3", "google/cloud-migrationcenter": "0.4.3", - "google/cloud-monitoring": "1.10.0", + "google/cloud-monitoring": "1.10.1", "google/cloud-netapp": "0.2.5", "google/cloud-network-connectivity": "1.5.3", "google/cloud-network-management": "1.7.1", @@ -192,7 +192,7 @@ "google/cloud-pubsub": "2.1.1", "google/cloud-quotas": "0.2.1", "google/cloud-rapidmigrationassessment": "0.3.3", - "google/cloud-recaptcha-enterprise": "1.11.1", + "google/cloud-recaptcha-enterprise": "1.12.0", "google/cloud-recommendations-ai": "0.7.3", "google/cloud-recommender": "1.11.3", "google/cloud-redis": "1.9.3", @@ -202,7 +202,7 @@ "google/cloud-retail": "1.6.2", "google/cloud-run": "0.9.1", "google/cloud-scheduler": "1.10.3", - "google/cloud-secret-manager": "1.14.2", + "google/cloud-secret-manager": "1.15.0", "google/cloud-securesourcemanager": "0.2.3", "google/cloud-security-center": "1.28.0", "google/cloud-security-private-ca": "1.7.1", @@ -214,11 +214,11 @@ "google/cloud-service-usage": "1.3.2", "google/cloud-servicehealth": "0.1.4", "google/cloud-shell": "1.3.3", - "google/cloud-spanner": "1.75.2", + "google/cloud-spanner": "1.76.0", "google/cloud-speech": "1.18.1", "google/cloud-sql-admin": "0.16.1", "google/cloud-storage": "1.41.3", - "google/cloud-storage-control": "0.0.0", + "google/cloud-storage-control": "0.1.0", "google/cloud-storage-transfer": "1.4.3", "google/cloud-storageinsights": "0.3.3", "google/cloud-support": "0.2.3", From dfcc0f19bcd2814e4f19eac16c954bdef8ae92af Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Mon, 29 Apr 2024 13:04:17 -0700 Subject: [PATCH 69/86] chore: fix docs url for google/apps-chat (#7264) --- AppsChat/.repo-metadata.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AppsChat/.repo-metadata.json b/AppsChat/.repo-metadata.json index 917a35ff0820..0b70a325cd0a 100644 --- a/AppsChat/.repo-metadata.json +++ b/AppsChat/.repo-metadata.json @@ -1,8 +1,8 @@ { "language": "php", - "distribution_name": "google/chat", + "distribution_name": "google/apps-chat", "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/chat/latest", + "client_documentation": "https://cloud.google.com/php/docs/reference/apps-chat/latest", "library_type": "GAPIC_AUTO", "api_shortname": "chat" } From 45225ba9261d735d8d8f271d0ae07e79afee845d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 17:00:44 +0530 Subject: [PATCH 70/86] feat: add `Weight` to common types for Shopping APIs to be used for accounts bundle (#7266) docs: A comment for field `amount_micros` in message `.google.shopping.type.Price` is changed PiperOrigin-RevId: 629159171 Source-Link: https://github.com/googleapis/googleapis/commit/a3a2dc62816053b6e9dc2b67d52048133794b178 Source-Link: https://github.com/googleapis/googleapis-gen/commit/7a598761f9021328bc2dea46ec0c0852adc26d83 Copy-Tag: eyJwIjoiU2hvcHBpbmdDb21tb25Qcm90b3MvLk93bEJvdC55YW1sIiwiaCI6IjdhNTk4NzYxZjkwMjEzMjhiYzJkZWE0NmVjMGMwODUyYWRjMjZkODMifQ== --- ShoppingCommonProtos/metadata/Type/Types.php | Bin 1634 -> 1815 bytes ShoppingCommonProtos/src/Type/Price.php | 8 -- ShoppingCommonProtos/src/Type/Weight.php | 131 ++++++++++++++++++ .../src/Type/Weight/WeightUnit.php | 64 +++++++++ 4 files changed, 195 insertions(+), 8 deletions(-) create mode 100644 ShoppingCommonProtos/src/Type/Weight.php create mode 100644 ShoppingCommonProtos/src/Type/Weight/WeightUnit.php diff --git a/ShoppingCommonProtos/metadata/Type/Types.php b/ShoppingCommonProtos/metadata/Type/Types.php index b0f3259bdbf862dba573343c24580b2fcce97e75..e9a56532be36860e96e9d3166a6cd55c74540994 100644 GIT binary patch delta 183 zcmaFFGo5e4Sw^NNuF2;aEx9%_aoptional int64 amount_micros = 1; */ @@ -43,8 +41,6 @@ class Price extends \Google\Protobuf\Internal\Message * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). - * This field can also be set as infinity by setting to -1. - * This field only support -1 and positive value. * @type string $currency_code * The currency of the price using three-letter acronyms according to [ISO * 4217](http://en.wikipedia.org/wiki/ISO_4217). @@ -59,8 +55,6 @@ public function __construct($data = NULL) { * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). - * This field can also be set as infinity by setting to -1. - * This field only support -1 and positive value. * * Generated from protobuf field optional int64 amount_micros = 1; * @return int|string @@ -84,8 +78,6 @@ public function clearAmountMicros() * The price represented as a number in micros (1 million micros is an * equivalent to one's currency standard unit, for example, 1 USD = 1000000 * micros). - * This field can also be set as infinity by setting to -1. - * This field only support -1 and positive value. * * Generated from protobuf field optional int64 amount_micros = 1; * @param int|string $var diff --git a/ShoppingCommonProtos/src/Type/Weight.php b/ShoppingCommonProtos/src/Type/Weight.php new file mode 100644 index 000000000000..755cc80f58fd --- /dev/null +++ b/ShoppingCommonProtos/src/Type/Weight.php @@ -0,0 +1,131 @@ +google.shopping.type.Weight + */ +class Weight extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The weight represented as a number in micros (1 million micros is + * an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + * micros). + * This field can also be set as infinity by setting to -1. + * This field only support -1 and positive value. + * + * Generated from protobuf field optional int64 amount_micros = 1; + */ + protected $amount_micros = null; + /** + * Required. The weight unit. + * Acceptable values are: kg and lb + * + * Generated from protobuf field .google.shopping.type.Weight.WeightUnit unit = 2; + */ + protected $unit = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $amount_micros + * Required. The weight represented as a number in micros (1 million micros is + * an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + * micros). + * This field can also be set as infinity by setting to -1. + * This field only support -1 and positive value. + * @type int $unit + * Required. The weight unit. + * Acceptable values are: kg and lb + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Shopping\Type\Types::initOnce(); + parent::__construct($data); + } + + /** + * Required. The weight represented as a number in micros (1 million micros is + * an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + * micros). + * This field can also be set as infinity by setting to -1. + * This field only support -1 and positive value. + * + * Generated from protobuf field optional int64 amount_micros = 1; + * @return int|string + */ + public function getAmountMicros() + { + return isset($this->amount_micros) ? $this->amount_micros : 0; + } + + public function hasAmountMicros() + { + return isset($this->amount_micros); + } + + public function clearAmountMicros() + { + unset($this->amount_micros); + } + + /** + * Required. The weight represented as a number in micros (1 million micros is + * an equivalent to one's currency standard unit, for example, 1 kg = 1000000 + * micros). + * This field can also be set as infinity by setting to -1. + * This field only support -1 and positive value. + * + * Generated from protobuf field optional int64 amount_micros = 1; + * @param int|string $var + * @return $this + */ + public function setAmountMicros($var) + { + GPBUtil::checkInt64($var); + $this->amount_micros = $var; + + return $this; + } + + /** + * Required. The weight unit. + * Acceptable values are: kg and lb + * + * Generated from protobuf field .google.shopping.type.Weight.WeightUnit unit = 2; + * @return int + */ + public function getUnit() + { + return $this->unit; + } + + /** + * Required. The weight unit. + * Acceptable values are: kg and lb + * + * Generated from protobuf field .google.shopping.type.Weight.WeightUnit unit = 2; + * @param int $var + * @return $this + */ + public function setUnit($var) + { + GPBUtil::checkEnum($var, \Google\Shopping\Type\Weight\WeightUnit::class); + $this->unit = $var; + + return $this; + } + +} + diff --git a/ShoppingCommonProtos/src/Type/Weight/WeightUnit.php b/ShoppingCommonProtos/src/Type/Weight/WeightUnit.php new file mode 100644 index 000000000000..c51ac683e3c1 --- /dev/null +++ b/ShoppingCommonProtos/src/Type/Weight/WeightUnit.php @@ -0,0 +1,64 @@ +google.shopping.type.Weight.WeightUnit + */ +class WeightUnit +{ + /** + * unit unspecified + * + * Generated from protobuf enum WEIGHT_UNIT_UNSPECIFIED = 0; + */ + const WEIGHT_UNIT_UNSPECIFIED = 0; + /** + * lb unit. + * + * Generated from protobuf enum POUND = 1; + */ + const POUND = 1; + /** + * kg unit. + * + * Generated from protobuf enum KILOGRAM = 2; + */ + const KILOGRAM = 2; + + private static $valueToName = [ + self::WEIGHT_UNIT_UNSPECIFIED => 'WEIGHT_UNIT_UNSPECIFIED', + self::POUND => 'POUND', + self::KILOGRAM => 'KILOGRAM', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WeightUnit::class, \Google\Shopping\Type\Weight_WeightUnit::class); + From 6c54a89e5107311b8c375c8699dee92f95fae09d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 17:01:51 +0530 Subject: [PATCH 71/86] feat(parallelstore/v1beta): add ImportData and ExportData RPCs (#7267) docs: fix typo in Instance.reserved_ip_range field doc PiperOrigin-RevId: 629176948 Source-Link: https://github.com/googleapis/googleapis/commit/35125cf48a2001711cdba1b69de8a02346dc48e7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/dda684fed325b4b3b8ce8035cf9b53176381c388 Copy-Tag: eyJwIjoiUGFyYWxsZWxzdG9yZS8uT3dsQm90LnlhbWwiLCJoIjoiZGRhNjg0ZmVkMzI1YjRiM2I4Y2U4MDM1Y2Y5YjUzMTc2MzgxYzM4OCJ9 --- .../metadata/V1Beta/Parallelstore.php | Bin 4994 -> 6731 bytes .../ParallelstoreClient/export_data.php | 83 ++++++ .../ParallelstoreClient/import_data.php | 83 ++++++ .../src/V1beta/Client/ParallelstoreClient.php | 60 ++++ .../src/V1beta/ExportDataMetadata.php | 77 +++++ .../src/V1beta/ExportDataRequest.php | 232 +++++++++++++++ .../src/V1beta/ExportDataResponse.php | 33 +++ .../src/V1beta/ImportDataMetadata.php | 77 +++++ .../src/V1beta/ImportDataRequest.php | 232 +++++++++++++++ .../src/V1beta/ImportDataResponse.php | 33 +++ Parallelstore/src/V1beta/Instance.php | 58 +++- Parallelstore/src/V1beta/TransferCounters.php | 261 +++++++++++++++++ .../src/V1beta/TransferOperationMetadata.php | 271 ++++++++++++++++++ Parallelstore/src/V1beta/TransferType.php | 61 ++++ Parallelstore/src/V1beta/gapic_metadata.json | 10 + .../parallelstore_client_config.json | 10 + .../parallelstore_descriptor_config.php | 38 +++ .../parallelstore_rest_client_config.php | 24 ++ .../V1beta/Client/ParallelstoreClientTest.php | 256 +++++++++++++++++ 19 files changed, 1895 insertions(+), 4 deletions(-) create mode 100644 Parallelstore/samples/V1beta/ParallelstoreClient/export_data.php create mode 100644 Parallelstore/samples/V1beta/ParallelstoreClient/import_data.php create mode 100644 Parallelstore/src/V1beta/ExportDataMetadata.php create mode 100644 Parallelstore/src/V1beta/ExportDataRequest.php create mode 100644 Parallelstore/src/V1beta/ExportDataResponse.php create mode 100644 Parallelstore/src/V1beta/ImportDataMetadata.php create mode 100644 Parallelstore/src/V1beta/ImportDataRequest.php create mode 100644 Parallelstore/src/V1beta/ImportDataResponse.php create mode 100644 Parallelstore/src/V1beta/TransferCounters.php create mode 100644 Parallelstore/src/V1beta/TransferOperationMetadata.php create mode 100644 Parallelstore/src/V1beta/TransferType.php diff --git a/Parallelstore/metadata/V1Beta/Parallelstore.php b/Parallelstore/metadata/V1Beta/Parallelstore.php index 42e78776f16b5a99590f585851ea7158d16c6e62..b61f54a8f05fe1c9e924f0011758d4ceafd1d37c 100644 GIT binary patch delta 1195 zcmbtTL2DC1813vPY5Hvv(@E8Bt+b?KV?@N5Qz^)%-OwDGrfGzDTDHlguD02AcT+4L z3Ox%R_UaGtDC7@_;H4rSM7&1vCV2BE=%;|VtNz!Dr7a4%99}AG9=y6Yc==CB65t@Qia<-`7tMN z&_eblf;0!lY8N4C?mnVXcC-$4(Dvt;6R8Pl_sAt2^phas%W#4BI*$#@B5n2(5mS<3 zH;4Twiulqor1*uFX&JQNH!k8CNDTW&sBc-!tB~OKe7`htvyHk^-6^Yet?{6yYWJ%< zHFd30uBhwj2@DXcY}U5wjWqJlYLlIX!iNMTYr3uP@00$oL@6?jKO=x3UARa`b8Tw; z7ri&B<)VG6setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $parallelstoreClient->exportData($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ExportDataResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ParallelstoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + export_data_sample($formattedName); +} +// [END parallelstore_v1beta_generated_Parallelstore_ExportData_sync] diff --git a/Parallelstore/samples/V1beta/ParallelstoreClient/import_data.php b/Parallelstore/samples/V1beta/ParallelstoreClient/import_data.php new file mode 100644 index 000000000000..06e718eeeb0c --- /dev/null +++ b/Parallelstore/samples/V1beta/ParallelstoreClient/import_data.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $parallelstoreClient->importData($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ImportDataResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ParallelstoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + import_data_sample($formattedName); +} +// [END parallelstore_v1beta_generated_Parallelstore_ImportData_sync] diff --git a/Parallelstore/src/V1beta/Client/ParallelstoreClient.php b/Parallelstore/src/V1beta/Client/ParallelstoreClient.php index 9526bf14718b..5a1b3310ffc1 100644 --- a/Parallelstore/src/V1beta/Client/ParallelstoreClient.php +++ b/Parallelstore/src/V1beta/Client/ParallelstoreClient.php @@ -42,7 +42,9 @@ use Google\Cloud\Location\Location; use Google\Cloud\Parallelstore\V1beta\CreateInstanceRequest; use Google\Cloud\Parallelstore\V1beta\DeleteInstanceRequest; +use Google\Cloud\Parallelstore\V1beta\ExportDataRequest; use Google\Cloud\Parallelstore\V1beta\GetInstanceRequest; +use Google\Cloud\Parallelstore\V1beta\ImportDataRequest; use Google\Cloud\Parallelstore\V1beta\Instance; use Google\Cloud\Parallelstore\V1beta\ListInstancesRequest; use Google\Cloud\Parallelstore\V1beta\UpdateInstanceRequest; @@ -78,7 +80,9 @@ * * @method PromiseInterface createInstanceAsync(CreateInstanceRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteInstanceAsync(DeleteInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface exportDataAsync(ExportDataRequest $request, array $optionalArgs = []) * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface importDataAsync(ImportDataRequest $request, array $optionalArgs = []) * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) * @method PromiseInterface updateInstanceAsync(UpdateInstanceRequest $request, array $optionalArgs = []) * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) @@ -406,6 +410,34 @@ public function deleteInstance(DeleteInstanceRequest $request, array $callOption return $this->startApiCall('DeleteInstance', $request, $callOptions)->wait(); } + /** + * ExportData copies data from Parallelstore to Cloud Storage + * + * The async variant is {@see ParallelstoreClient::exportDataAsync()} . + * + * @example samples/V1beta/ParallelstoreClient/export_data.php + * + * @param ExportDataRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function exportData(ExportDataRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ExportData', $request, $callOptions)->wait(); + } + /** * Gets details of a single Instance. * @@ -434,6 +466,34 @@ public function getInstance(GetInstanceRequest $request, array $callOptions = [] return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); } + /** + * ImportData copies data from Cloud Storage to Parallelstore. + * + * The async variant is {@see ParallelstoreClient::importDataAsync()} . + * + * @example samples/V1beta/ParallelstoreClient/import_data.php + * + * @param ImportDataRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function importData(ImportDataRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ImportData', $request, $callOptions)->wait(); + } + /** * Lists Instances in a given project and location. * diff --git a/Parallelstore/src/V1beta/ExportDataMetadata.php b/Parallelstore/src/V1beta/ExportDataMetadata.php new file mode 100644 index 000000000000..c813b06e40d9 --- /dev/null +++ b/Parallelstore/src/V1beta/ExportDataMetadata.php @@ -0,0 +1,77 @@ +google.cloud.parallelstore.v1beta.ExportDataMetadata + */ +class ExportDataMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Contains the data transfer operation metadata. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferOperationMetadata operation_metadata = 1; + */ + protected $operation_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Parallelstore\V1beta\TransferOperationMetadata $operation_metadata + * Contains the data transfer operation metadata. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Contains the data transfer operation metadata. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferOperationMetadata operation_metadata = 1; + * @return \Google\Cloud\Parallelstore\V1beta\TransferOperationMetadata|null + */ + public function getOperationMetadata() + { + return $this->operation_metadata; + } + + public function hasOperationMetadata() + { + return isset($this->operation_metadata); + } + + public function clearOperationMetadata() + { + unset($this->operation_metadata); + } + + /** + * Contains the data transfer operation metadata. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferOperationMetadata operation_metadata = 1; + * @param \Google\Cloud\Parallelstore\V1beta\TransferOperationMetadata $var + * @return $this + */ + public function setOperationMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\TransferOperationMetadata::class); + $this->operation_metadata = $var; + + return $this; + } + +} + diff --git a/Parallelstore/src/V1beta/ExportDataRequest.php b/Parallelstore/src/V1beta/ExportDataRequest.php new file mode 100644 index 000000000000..1bd142857555 --- /dev/null +++ b/Parallelstore/src/V1beta/ExportDataRequest.php @@ -0,0 +1,232 @@ +google.cloud.parallelstore.v1beta.ExportDataRequest + */ +class ExportDataRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + protected $source; + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $source_path + * Optional. Root directory path to the Paralellstore filesystem, starting + * with '/'. Sets to '/' if no value is set. + * @type string $destination_gcs_uri + * URI to a Cloud Storage object in format: + * 'gs:///'. + * @type string $name + * Required. Name of the resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Root directory path to the Paralellstore filesystem, starting + * with '/'. Sets to '/' if no value is set. + * + * Generated from protobuf field string source_path = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSourcePath() + { + return $this->readOneof(2); + } + + public function hasSourcePath() + { + return $this->hasOneof(2); + } + + /** + * Optional. Root directory path to the Paralellstore filesystem, starting + * with '/'. Sets to '/' if no value is set. + * + * Generated from protobuf field string source_path = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSourcePath($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * URI to a Cloud Storage object in format: + * 'gs:///'. + * + * Generated from protobuf field string destination_gcs_uri = 3; + * @return string + */ + public function getDestinationGcsUri() + { + return $this->readOneof(3); + } + + public function hasDestinationGcsUri() + { + return $this->hasOneof(3); + } + + /** + * URI to a Cloud Storage object in format: + * 'gs:///'. + * + * Generated from protobuf field string destination_gcs_uri = 3; + * @param string $var + * @return $this + */ + public function setDestinationGcsUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/Parallelstore/src/V1beta/ExportDataResponse.php b/Parallelstore/src/V1beta/ExportDataResponse.php new file mode 100644 index 000000000000..84a49b91541e --- /dev/null +++ b/Parallelstore/src/V1beta/ExportDataResponse.php @@ -0,0 +1,33 @@ +google.cloud.parallelstore.v1beta.ExportDataResponse + */ +class ExportDataResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + +} + diff --git a/Parallelstore/src/V1beta/ImportDataMetadata.php b/Parallelstore/src/V1beta/ImportDataMetadata.php new file mode 100644 index 000000000000..54b589c2f5b9 --- /dev/null +++ b/Parallelstore/src/V1beta/ImportDataMetadata.php @@ -0,0 +1,77 @@ +google.cloud.parallelstore.v1beta.ImportDataMetadata + */ +class ImportDataMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Contains the data transfer operation metadata. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferOperationMetadata operation_metadata = 1; + */ + protected $operation_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Parallelstore\V1beta\TransferOperationMetadata $operation_metadata + * Contains the data transfer operation metadata. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Contains the data transfer operation metadata. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferOperationMetadata operation_metadata = 1; + * @return \Google\Cloud\Parallelstore\V1beta\TransferOperationMetadata|null + */ + public function getOperationMetadata() + { + return $this->operation_metadata; + } + + public function hasOperationMetadata() + { + return isset($this->operation_metadata); + } + + public function clearOperationMetadata() + { + unset($this->operation_metadata); + } + + /** + * Contains the data transfer operation metadata. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferOperationMetadata operation_metadata = 1; + * @param \Google\Cloud\Parallelstore\V1beta\TransferOperationMetadata $var + * @return $this + */ + public function setOperationMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\TransferOperationMetadata::class); + $this->operation_metadata = $var; + + return $this; + } + +} + diff --git a/Parallelstore/src/V1beta/ImportDataRequest.php b/Parallelstore/src/V1beta/ImportDataRequest.php new file mode 100644 index 000000000000..07cbafdb8fe0 --- /dev/null +++ b/Parallelstore/src/V1beta/ImportDataRequest.php @@ -0,0 +1,232 @@ +google.cloud.parallelstore.v1beta.ImportDataRequest + */ +class ImportDataRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + protected $source; + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $source_gcs_uri + * URI to a Cloud Storage object in format: + * 'gs:///'. + * @type string $destination_path + * Optional. Root directory path to the Paralellstore filesystem, starting + * with '/'. Sets to '/' if no value is set. + * @type string $name + * Required. Name of the resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * URI to a Cloud Storage object in format: + * 'gs:///'. + * + * Generated from protobuf field string source_gcs_uri = 2; + * @return string + */ + public function getSourceGcsUri() + { + return $this->readOneof(2); + } + + public function hasSourceGcsUri() + { + return $this->hasOneof(2); + } + + /** + * URI to a Cloud Storage object in format: + * 'gs:///'. + * + * Generated from protobuf field string source_gcs_uri = 2; + * @param string $var + * @return $this + */ + public function setSourceGcsUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Optional. Root directory path to the Paralellstore filesystem, starting + * with '/'. Sets to '/' if no value is set. + * + * Generated from protobuf field string destination_path = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDestinationPath() + { + return $this->readOneof(3); + } + + public function hasDestinationPath() + { + return $this->hasOneof(3); + } + + /** + * Optional. Root directory path to the Paralellstore filesystem, starting + * with '/'. Sets to '/' if no value is set. + * + * Generated from protobuf field string destination_path = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDestinationPath($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/Parallelstore/src/V1beta/ImportDataResponse.php b/Parallelstore/src/V1beta/ImportDataResponse.php new file mode 100644 index 000000000000..fd575fa1fb1c --- /dev/null +++ b/Parallelstore/src/V1beta/ImportDataResponse.php @@ -0,0 +1,33 @@ +google.cloud.parallelstore.v1beta.ImportDataResponse + */ +class ImportDataResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + +} + diff --git a/Parallelstore/src/V1beta/Instance.php b/Parallelstore/src/V1beta/Instance.php index 8fe160bd3c1e..b0dd62712176 100644 --- a/Parallelstore/src/V1beta/Instance.php +++ b/Parallelstore/src/V1beta/Instance.php @@ -98,7 +98,7 @@ class Instance extends \Google\Protobuf\Internal\Message */ protected $network = ''; /** - * Optional. Immutable. Contains the id of allocated IP address range + * Optional. Immutable. Contains the id of the allocated IP address range * associated with the private service access connection for example, * "test-default" associated with IP range 10.0.0.0/29. If no range id is * provided all ranges will be considered. @@ -106,6 +106,16 @@ class Instance extends \Google\Protobuf\Internal\Message * Generated from protobuf field string reserved_ip_range = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { */ protected $reserved_ip_range = ''; + /** + * Output only. Immutable. Contains the id of the allocated IP address range + * associated with the private service access connection for example, + * "test-default" associated with IP range 10.0.0.0/29. This field is + * populated by the service and and contains the value currently used by the + * service. + * + * Generated from protobuf field string effective_reserved_ip_range = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $effective_reserved_ip_range = ''; /** * Constructor. @@ -156,10 +166,16 @@ class Instance extends \Google\Protobuf\Internal\Message * [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the * instance is connected. * @type string $reserved_ip_range - * Optional. Immutable. Contains the id of allocated IP address range + * Optional. Immutable. Contains the id of the allocated IP address range * associated with the private service access connection for example, * "test-default" associated with IP range 10.0.0.0/29. If no range id is * provided all ranges will be considered. + * @type string $effective_reserved_ip_range + * Output only. Immutable. Contains the id of the allocated IP address range + * associated with the private service access connection for example, + * "test-default" associated with IP range 10.0.0.0/29. This field is + * populated by the service and and contains the value currently used by the + * service. * } */ public function __construct($data = NULL) { @@ -492,7 +508,7 @@ public function setNetwork($var) } /** - * Optional. Immutable. Contains the id of allocated IP address range + * Optional. Immutable. Contains the id of the allocated IP address range * associated with the private service access connection for example, * "test-default" associated with IP range 10.0.0.0/29. If no range id is * provided all ranges will be considered. @@ -506,7 +522,7 @@ public function getReservedIpRange() } /** - * Optional. Immutable. Contains the id of allocated IP address range + * Optional. Immutable. Contains the id of the allocated IP address range * associated with the private service access connection for example, * "test-default" associated with IP range 10.0.0.0/29. If no range id is * provided all ranges will be considered. @@ -523,5 +539,39 @@ public function setReservedIpRange($var) return $this; } + /** + * Output only. Immutable. Contains the id of the allocated IP address range + * associated with the private service access connection for example, + * "test-default" associated with IP range 10.0.0.0/29. This field is + * populated by the service and and contains the value currently used by the + * service. + * + * Generated from protobuf field string effective_reserved_ip_range = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getEffectiveReservedIpRange() + { + return $this->effective_reserved_ip_range; + } + + /** + * Output only. Immutable. Contains the id of the allocated IP address range + * associated with the private service access connection for example, + * "test-default" associated with IP range 10.0.0.0/29. This field is + * populated by the service and and contains the value currently used by the + * service. + * + * Generated from protobuf field string effective_reserved_ip_range = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEffectiveReservedIpRange($var) + { + GPBUtil::checkString($var, True); + $this->effective_reserved_ip_range = $var; + + return $this; + } + } diff --git a/Parallelstore/src/V1beta/TransferCounters.php b/Parallelstore/src/V1beta/TransferCounters.php new file mode 100644 index 000000000000..1f3c823561c5 --- /dev/null +++ b/Parallelstore/src/V1beta/TransferCounters.php @@ -0,0 +1,261 @@ +google.cloud.parallelstore.v1beta.TransferCounters + */ +class TransferCounters extends \Google\Protobuf\Internal\Message +{ + /** + * Objects found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * + * Generated from protobuf field int64 objects_found = 1; + */ + protected $objects_found = 0; + /** + * Bytes found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * + * Generated from protobuf field int64 bytes_found = 2; + */ + protected $bytes_found = 0; + /** + * Objects in the data source that are not transferred because they already + * exist in the data destination. + * + * Generated from protobuf field int64 objects_skipped = 3; + */ + protected $objects_skipped = 0; + /** + * Bytes in the data source that are not transferred because they already + * exist in the data destination. + * + * Generated from protobuf field int64 bytes_skipped = 4; + */ + protected $bytes_skipped = 0; + /** + * Objects that are copied to the data destination. + * + * Generated from protobuf field int64 objects_copied = 5; + */ + protected $objects_copied = 0; + /** + * Bytes that are copied to the data destination. + * + * Generated from protobuf field int64 bytes_copied = 6; + */ + protected $bytes_copied = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $objects_found + * Objects found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * @type int|string $bytes_found + * Bytes found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * @type int|string $objects_skipped + * Objects in the data source that are not transferred because they already + * exist in the data destination. + * @type int|string $bytes_skipped + * Bytes in the data source that are not transferred because they already + * exist in the data destination. + * @type int|string $objects_copied + * Objects that are copied to the data destination. + * @type int|string $bytes_copied + * Bytes that are copied to the data destination. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Objects found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * + * Generated from protobuf field int64 objects_found = 1; + * @return int|string + */ + public function getObjectsFound() + { + return $this->objects_found; + } + + /** + * Objects found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * + * Generated from protobuf field int64 objects_found = 1; + * @param int|string $var + * @return $this + */ + public function setObjectsFound($var) + { + GPBUtil::checkInt64($var); + $this->objects_found = $var; + + return $this; + } + + /** + * Bytes found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * + * Generated from protobuf field int64 bytes_found = 2; + * @return int|string + */ + public function getBytesFound() + { + return $this->bytes_found; + } + + /** + * Bytes found in the data source that are scheduled to be transferred, + * excluding any that are filtered based on object conditions or skipped due + * to sync. + * + * Generated from protobuf field int64 bytes_found = 2; + * @param int|string $var + * @return $this + */ + public function setBytesFound($var) + { + GPBUtil::checkInt64($var); + $this->bytes_found = $var; + + return $this; + } + + /** + * Objects in the data source that are not transferred because they already + * exist in the data destination. + * + * Generated from protobuf field int64 objects_skipped = 3; + * @return int|string + */ + public function getObjectsSkipped() + { + return $this->objects_skipped; + } + + /** + * Objects in the data source that are not transferred because they already + * exist in the data destination. + * + * Generated from protobuf field int64 objects_skipped = 3; + * @param int|string $var + * @return $this + */ + public function setObjectsSkipped($var) + { + GPBUtil::checkInt64($var); + $this->objects_skipped = $var; + + return $this; + } + + /** + * Bytes in the data source that are not transferred because they already + * exist in the data destination. + * + * Generated from protobuf field int64 bytes_skipped = 4; + * @return int|string + */ + public function getBytesSkipped() + { + return $this->bytes_skipped; + } + + /** + * Bytes in the data source that are not transferred because they already + * exist in the data destination. + * + * Generated from protobuf field int64 bytes_skipped = 4; + * @param int|string $var + * @return $this + */ + public function setBytesSkipped($var) + { + GPBUtil::checkInt64($var); + $this->bytes_skipped = $var; + + return $this; + } + + /** + * Objects that are copied to the data destination. + * + * Generated from protobuf field int64 objects_copied = 5; + * @return int|string + */ + public function getObjectsCopied() + { + return $this->objects_copied; + } + + /** + * Objects that are copied to the data destination. + * + * Generated from protobuf field int64 objects_copied = 5; + * @param int|string $var + * @return $this + */ + public function setObjectsCopied($var) + { + GPBUtil::checkInt64($var); + $this->objects_copied = $var; + + return $this; + } + + /** + * Bytes that are copied to the data destination. + * + * Generated from protobuf field int64 bytes_copied = 6; + * @return int|string + */ + public function getBytesCopied() + { + return $this->bytes_copied; + } + + /** + * Bytes that are copied to the data destination. + * + * Generated from protobuf field int64 bytes_copied = 6; + * @param int|string $var + * @return $this + */ + public function setBytesCopied($var) + { + GPBUtil::checkInt64($var); + $this->bytes_copied = $var; + + return $this; + } + +} + diff --git a/Parallelstore/src/V1beta/TransferOperationMetadata.php b/Parallelstore/src/V1beta/TransferOperationMetadata.php new file mode 100644 index 000000000000..0f22496d37a4 --- /dev/null +++ b/Parallelstore/src/V1beta/TransferOperationMetadata.php @@ -0,0 +1,271 @@ +google.cloud.parallelstore.v1beta.TransferOperationMetadata + */ +class TransferOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. CCFE supplied fields BEGIN + * 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; + /** + * Information about the progress of the transfer operation. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferCounters counters = 3; + */ + protected $counters = null; + /** + * Required. The origin of the data transfer. + * + * Generated from protobuf field string source = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source = ''; + /** + * Required. The destination of the data transfer. + * + * Generated from protobuf field string destination = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $destination = ''; + /** + * The type of transfer occurring. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferType transfer_type = 6; + */ + protected $transfer_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. CCFE supplied fields BEGIN + * The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type \Google\Cloud\Parallelstore\V1beta\TransferCounters $counters + * Information about the progress of the transfer operation. + * @type string $source + * Required. The origin of the data transfer. + * @type string $destination + * Required. The destination of the data transfer. + * @type int $transfer_type + * The type of transfer occurring. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Parallelstore\V1Beta\Parallelstore::initOnce(); + parent::__construct($data); + } + + /** + * Output only. CCFE supplied fields BEGIN + * 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. CCFE supplied fields BEGIN + * 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; + } + + /** + * Information about the progress of the transfer operation. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferCounters counters = 3; + * @return \Google\Cloud\Parallelstore\V1beta\TransferCounters|null + */ + public function getCounters() + { + return $this->counters; + } + + public function hasCounters() + { + return isset($this->counters); + } + + public function clearCounters() + { + unset($this->counters); + } + + /** + * Information about the progress of the transfer operation. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferCounters counters = 3; + * @param \Google\Cloud\Parallelstore\V1beta\TransferCounters $var + * @return $this + */ + public function setCounters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Parallelstore\V1beta\TransferCounters::class); + $this->counters = $var; + + return $this; + } + + /** + * Required. The origin of the data transfer. + * + * Generated from protobuf field string source = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSource() + { + return $this->source; + } + + /** + * Required. The origin of the data transfer. + * + * Generated from protobuf field string source = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkString($var, True); + $this->source = $var; + + return $this; + } + + /** + * Required. The destination of the data transfer. + * + * Generated from protobuf field string destination = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDestination() + { + return $this->destination; + } + + /** + * Required. The destination of the data transfer. + * + * Generated from protobuf field string destination = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDestination($var) + { + GPBUtil::checkString($var, True); + $this->destination = $var; + + return $this; + } + + /** + * The type of transfer occurring. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferType transfer_type = 6; + * @return int + */ + public function getTransferType() + { + return $this->transfer_type; + } + + /** + * The type of transfer occurring. + * + * Generated from protobuf field .google.cloud.parallelstore.v1beta.TransferType transfer_type = 6; + * @param int $var + * @return $this + */ + public function setTransferType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Parallelstore\V1beta\TransferType::class); + $this->transfer_type = $var; + + return $this; + } + +} + diff --git a/Parallelstore/src/V1beta/TransferType.php b/Parallelstore/src/V1beta/TransferType.php new file mode 100644 index 000000000000..32f4f425911f --- /dev/null +++ b/Parallelstore/src/V1beta/TransferType.php @@ -0,0 +1,61 @@ +google.cloud.parallelstore.v1beta.TransferType + */ +class TransferType +{ + /** + * Zero is an illegal value. + * + * Generated from protobuf enum TRANSFER_TYPE_UNSPECIFIED = 0; + */ + const TRANSFER_TYPE_UNSPECIFIED = 0; + /** + * Imports to Parallelstore. + * + * Generated from protobuf enum IMPORT = 1; + */ + const IMPORT = 1; + /** + * Exports from Parallelstore. + * + * Generated from protobuf enum EXPORT = 2; + */ + const EXPORT = 2; + + private static $valueToName = [ + self::TRANSFER_TYPE_UNSPECIFIED => 'TRANSFER_TYPE_UNSPECIFIED', + self::IMPORT => 'IMPORT', + self::EXPORT => 'EXPORT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/Parallelstore/src/V1beta/gapic_metadata.json b/Parallelstore/src/V1beta/gapic_metadata.json index 3ac4eb95c092..7b389692ba7c 100644 --- a/Parallelstore/src/V1beta/gapic_metadata.json +++ b/Parallelstore/src/V1beta/gapic_metadata.json @@ -20,11 +20,21 @@ "deleteInstance" ] }, + "ExportData": { + "methods": [ + "exportData" + ] + }, "GetInstance": { "methods": [ "getInstance" ] }, + "ImportData": { + "methods": [ + "importData" + ] + }, "ListInstances": { "methods": [ "listInstances" diff --git a/Parallelstore/src/V1beta/resources/parallelstore_client_config.json b/Parallelstore/src/V1beta/resources/parallelstore_client_config.json index 9374df2d3c32..bc53acd55a4a 100644 --- a/Parallelstore/src/V1beta/resources/parallelstore_client_config.json +++ b/Parallelstore/src/V1beta/resources/parallelstore_client_config.json @@ -26,11 +26,21 @@ "retry_codes_name": "no_retry_codes", "retry_params_name": "no_retry_params" }, + "ExportData": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, "GetInstance": { "timeout_millis": 60000, "retry_codes_name": "no_retry_codes", "retry_params_name": "no_retry_params" }, + "ImportData": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, "ListInstances": { "timeout_millis": 60000, "retry_codes_name": "no_retry_codes", diff --git a/Parallelstore/src/V1beta/resources/parallelstore_descriptor_config.php b/Parallelstore/src/V1beta/resources/parallelstore_descriptor_config.php index 5305a99ff5c2..e08deca08012 100644 --- a/Parallelstore/src/V1beta/resources/parallelstore_descriptor_config.php +++ b/Parallelstore/src/V1beta/resources/parallelstore_descriptor_config.php @@ -61,6 +61,44 @@ ], ], ], + 'ExportData' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Parallelstore\V1beta\ExportDataResponse', + 'metadataReturnType' => '\Google\Cloud\Parallelstore\V1beta\ExportDataMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ImportData' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Parallelstore\V1beta\ImportDataResponse', + 'metadataReturnType' => '\Google\Cloud\Parallelstore\V1beta\ImportDataMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], 'UpdateInstance' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\Parallelstore\V1beta\Instance', diff --git a/Parallelstore/src/V1beta/resources/parallelstore_rest_client_config.php b/Parallelstore/src/V1beta/resources/parallelstore_rest_client_config.php index 8da2dd0c98a5..f20e236b21ac 100644 --- a/Parallelstore/src/V1beta/resources/parallelstore_rest_client_config.php +++ b/Parallelstore/src/V1beta/resources/parallelstore_rest_client_config.php @@ -73,6 +73,18 @@ ], ], ], + 'ExportData' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/instances/*}:exportData', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'GetInstance' => [ 'method' => 'get', 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/instances/*}', @@ -84,6 +96,18 @@ ], ], ], + 'ImportData' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/instances/*}:importData', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'ListInstances' => [ 'method' => 'get', 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*}/instances', diff --git a/Parallelstore/tests/Unit/V1beta/Client/ParallelstoreClientTest.php b/Parallelstore/tests/Unit/V1beta/Client/ParallelstoreClientTest.php index a97a8583cd3e..bb647a1a1913 100644 --- a/Parallelstore/tests/Unit/V1beta/Client/ParallelstoreClientTest.php +++ b/Parallelstore/tests/Unit/V1beta/Client/ParallelstoreClientTest.php @@ -34,7 +34,11 @@ use Google\Cloud\Parallelstore\V1beta\Client\ParallelstoreClient; use Google\Cloud\Parallelstore\V1beta\CreateInstanceRequest; use Google\Cloud\Parallelstore\V1beta\DeleteInstanceRequest; +use Google\Cloud\Parallelstore\V1beta\ExportDataRequest; +use Google\Cloud\Parallelstore\V1beta\ExportDataResponse; use Google\Cloud\Parallelstore\V1beta\GetInstanceRequest; +use Google\Cloud\Parallelstore\V1beta\ImportDataRequest; +use Google\Cloud\Parallelstore\V1beta\ImportDataResponse; use Google\Cloud\Parallelstore\V1beta\Instance; use Google\Cloud\Parallelstore\V1beta\ListInstancesRequest; use Google\Cloud\Parallelstore\V1beta\ListInstancesResponse; @@ -104,6 +108,7 @@ public function createInstanceTest() $daosVersion = 'daosVersion-1809382982'; $network = 'network1843485230'; $reservedIpRange = 'reservedIpRange-1082940580'; + $effectiveReservedIpRange = 'effectiveReservedIpRange-598066492'; $expectedResponse = new Instance(); $expectedResponse->setName($name); $expectedResponse->setDescription($description); @@ -111,6 +116,7 @@ public function createInstanceTest() $expectedResponse->setDaosVersion($daosVersion); $expectedResponse->setNetwork($network); $expectedResponse->setReservedIpRange($reservedIpRange); + $expectedResponse->setEffectiveReservedIpRange($effectiveReservedIpRange); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); @@ -351,6 +357,128 @@ public function deleteInstanceExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } + /** @test */ + public function exportDataTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/exportDataTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ExportDataResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/exportDataTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ExportDataRequest())->setName($formattedName); + $response = $gapicClient->exportData($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.parallelstore.v1beta.Parallelstore/ExportData', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportDataTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function exportDataExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/exportDataTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ExportDataRequest())->setName($formattedName); + $response = $gapicClient->exportData($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportDataTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + /** @test */ public function getInstanceTest() { @@ -366,6 +494,7 @@ public function getInstanceTest() $daosVersion = 'daosVersion-1809382982'; $network = 'network1843485230'; $reservedIpRange = 'reservedIpRange-1082940580'; + $effectiveReservedIpRange = 'effectiveReservedIpRange-598066492'; $expectedResponse = new Instance(); $expectedResponse->setName($name2); $expectedResponse->setDescription($description); @@ -373,6 +502,7 @@ public function getInstanceTest() $expectedResponse->setDaosVersion($daosVersion); $expectedResponse->setNetwork($network); $expectedResponse->setReservedIpRange($reservedIpRange); + $expectedResponse->setEffectiveReservedIpRange($effectiveReservedIpRange); $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); @@ -426,6 +556,128 @@ public function getInstanceExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function importDataTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importDataTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ImportDataResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importDataTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ImportDataRequest())->setName($formattedName); + $response = $gapicClient->importData($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.parallelstore.v1beta.Parallelstore/ImportData', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importDataTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function importDataExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importDataTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new ImportDataRequest())->setName($formattedName); + $response = $gapicClient->importData($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importDataTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + /** @test */ public function listInstancesTest() { @@ -524,6 +776,7 @@ public function updateInstanceTest() $daosVersion = 'daosVersion-1809382982'; $network = 'network1843485230'; $reservedIpRange = 'reservedIpRange-1082940580'; + $effectiveReservedIpRange = 'effectiveReservedIpRange-598066492'; $expectedResponse = new Instance(); $expectedResponse->setName($name); $expectedResponse->setDescription($description); @@ -531,6 +784,7 @@ public function updateInstanceTest() $expectedResponse->setDaosVersion($daosVersion); $expectedResponse->setNetwork($network); $expectedResponse->setReservedIpRange($reservedIpRange); + $expectedResponse->setEffectiveReservedIpRange($effectiveReservedIpRange); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); @@ -794,6 +1048,7 @@ public function createInstanceAsyncTest() $daosVersion = 'daosVersion-1809382982'; $network = 'network1843485230'; $reservedIpRange = 'reservedIpRange-1082940580'; + $effectiveReservedIpRange = 'effectiveReservedIpRange-598066492'; $expectedResponse = new Instance(); $expectedResponse->setName($name); $expectedResponse->setDescription($description); @@ -801,6 +1056,7 @@ public function createInstanceAsyncTest() $expectedResponse->setDaosVersion($daosVersion); $expectedResponse->setNetwork($network); $expectedResponse->setReservedIpRange($reservedIpRange); + $expectedResponse->setEffectiveReservedIpRange($effectiveReservedIpRange); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); From 1841c79f63399cc8270b8c77f65a36d754801db1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 17:02:52 +0530 Subject: [PATCH 72/86] feat: Update Compute Engine API to revision 20240421 (#899) (#7268) * feat: Update Compute Engine API to revision 20240407 (#890) Source-Link: https://github.com/googleapis/googleapis/commit/018c0e32cbf681b72c4555038026d38afb438a86 Source-Link: https://github.com/googleapis/googleapis-gen/commit/dad8476c94eb1ecb2fd72f296825e9621ea8b45d Copy-Tag: eyJwIjoiQ29tcHV0ZS8uT3dsQm90LnlhbWwiLCJoIjoiZGFkODQ3NmM5NGViMWVjYjJmZDcyZjI5NjgyNWU5NjIxZWE4YjQ1ZCJ9 * feat: Update Compute Engine API to revision 20240421 (#899) Source-Link: https://github.com/googleapis/googleapis/commit/55499b55001daf2f59359b4d9f90b7d5459347e9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/cf5049b70792820065db38e7127f32eab7705944 Copy-Tag: eyJwIjoiQ29tcHV0ZS8uT3dsQm90LnlhbWwiLCJoIjoiY2Y1MDQ5YjcwNzkyODIwMDY1ZGIzOGU3MTI3ZjMyZWFiNzcwNTk0NCJ9 --- Compute/metadata/V1/Compute.php | Bin 643761 -> 666201 bytes .../cancel.php | 89 ++ .../delete.php | 89 ++ .../get.php | 80 ++ .../insert.php | 87 ++ .../list.php | 72 ++ .../V1/InstanceSettingsServiceClient/get.php | 67 + .../InstanceSettingsServiceClient/patch.php | 80 ++ .../NodeGroupsClient/perform_maintenance.php | 87 ++ .../aggregated_list.php | 68 + .../samples/V1/StoragePoolTypesClient/get.php | 69 + .../V1/StoragePoolTypesClient/list.php | 70 ++ .../V1/StoragePoolsClient/aggregated_list.php | 68 + .../samples/V1/StoragePoolsClient/delete.php | 78 ++ Compute/samples/V1/StoragePoolsClient/get.php | 69 + .../V1/StoragePoolsClient/get_iam_policy.php | 69 + .../samples/V1/StoragePoolsClient/insert.php | 80 ++ .../samples/V1/StoragePoolsClient/list.php | 67 + .../V1/StoragePoolsClient/list_disks.php | 69 + .../V1/StoragePoolsClient/set_iam_policy.php | 78 ++ .../test_iam_permissions.php | 78 ++ .../samples/V1/StoragePoolsClient/update.php | 82 ++ .../AggregatedListStoragePoolTypesRequest.php | 388 ++++++ .../V1/AggregatedListStoragePoolsRequest.php | 388 ++++++ .../V1/AllocationSpecificSKUReservation.php | 2 +- .../src/V1/AttachedDiskInitializeParams.php | 44 + ...stanceGroupManagerResizeRequestRequest.php | 232 ++++ ...stanceGroupManagerResizeRequestsClient.php | 363 ++++++ .../Client/InstanceSettingsServiceClient.php | 279 +++++ Compute/src/V1/Client/NodeGroupsClient.php | 26 + .../src/V1/Client/StoragePoolTypesClient.php | 253 ++++ Compute/src/V1/Client/StoragePoolsClient.php | 492 ++++++++ Compute/src/V1/Commitment/Type.php | 5 + Compute/src/V1/CorsPolicy.php | 16 +- ...stanceGroupManagerResizeRequestRequest.php | 232 ++++ Compute/src/V1/DeleteStoragePoolRequest.php | 196 +++ Compute/src/V1/Disk.php | 44 + Compute/src/V1/Disk/Status.php | 7 + Compute/src/V1/Enums/Commitment/Type.php | 2 + Compute/src/V1/Enums/Disk/Status.php | 2 + .../State.php | 46 + .../src/V1/Enums/InstantSnapshot/Status.php | 2 + .../Enums/NodeGroup/MaintenanceInterval.php | 38 + .../V1/Enums/PublicDelegatedPrefix/Mode.php | 38 + .../Mode.php | 39 + Compute/src/V1/Enums/Quota/Metric.php | 10 + .../src/V1/Enums/QuotaStatusWarning/Code.php | 90 ++ .../V1/Enums/RouterInterface/IpVersion.php | 38 + .../StatusReason.php | 4 + .../StoragePool/CapacityProvisioningType.php | 35 + .../PerformanceProvisioningType.php | 35 + Compute/src/V1/Enums/StoragePool/State.php | 42 + .../src/V1/Enums/StoragePoolDisk/Status.php | 46 + Compute/src/V1/Error.php | 2 +- Compute/src/V1/ErrorInfo.php | 8 +- Compute/src/V1/ForwardingRule.php | 44 + ...eGroupManagerResizeRequestsGapicClient.php | 642 ++++++++++ .../InstanceSettingsServiceGapicClient.php | 355 ++++++ .../src/V1/Gapic/NodeGroupsGapicClient.php | 81 ++ .../V1/Gapic/StoragePoolTypesGapicClient.php | 422 +++++++ .../src/V1/Gapic/StoragePoolsGapicClient.php | 939 ++++++++++++++ .../src/V1/GetIamPolicyStoragePoolRequest.php | 196 +++ ...stanceGroupManagerResizeRequestRequest.php | 188 +++ Compute/src/V1/GetInstanceSettingRequest.php | 116 ++ Compute/src/V1/GetStoragePoolRequest.php | 152 +++ Compute/src/V1/GetStoragePoolTypeRequest.php | 152 +++ Compute/src/V1/GuestOsFeature.php | 8 +- Compute/src/V1/GuestOsFeature/Type.php | 2 +- ...stanceGroupManagerResizeRequestRequest.php | 242 ++++ Compute/src/V1/InsertStoragePoolRequest.php | 206 +++ .../V1/InstanceGroupManagerResizeRequest.php | 565 +++++++++ .../State.php | 90 ++ ...nstanceGroupManagerResizeRequestStatus.php | 120 ++ ...pManagerResizeRequestStatusLastAttempt.php | 76 ++ ...stanceGroupManagerResizeRequestsClient.php | 34 + ...GroupManagerResizeRequestsListResponse.php | 287 +++++ .../V1/InstanceGroupManagerStatusStateful.php | 8 +- Compute/src/V1/InstanceSettings.php | 209 ++++ Compute/src/V1/InstanceSettingsMetadata.php | 110 ++ .../src/V1/InstanceSettingsServiceClient.php | 34 + ...rewallsResponseEffectiveFirewallPolicy.php | 8 +- .../Type.php | 2 +- Compute/src/V1/InstantSnapshot/Status.php | 7 + .../InterconnectRemoteLocationConstraints.php | 8 +- .../PortPairRemoteLocation.php | 2 +- .../src/V1/ListDisksStoragePoolsRequest.php | 372 ++++++ ...tanceGroupManagerResizeRequestsRequest.php | 372 ++++++ .../src/V1/ListStoragePoolTypesRequest.php | 336 +++++ Compute/src/V1/ListStoragePoolsRequest.php | 336 +++++ Compute/src/V1/NetworkEndpointGroup.php | 8 +- .../NetworkEndpointType.php | 2 +- Compute/src/V1/NodeGroup.php | 48 + .../src/V1/NodeGroup/MaintenanceInterval.php | 62 + Compute/src/V1/NodeGroupNode.php | 44 + .../NodeGroupsPerformMaintenanceRequest.php | 110 ++ Compute/src/V1/PacketMirroring.php | 8 +- Compute/src/V1/PacketMirroringFilter.php | 8 +- .../src/V1/PatchInstanceSettingRequest.php | 250 ++++ Compute/src/V1/PathMatcher.php | 24 +- .../V1/PerformMaintenanceNodeGroupRequest.php | 242 ++++ Compute/src/V1/PublicDelegatedPrefix.php | 92 ++ Compute/src/V1/PublicDelegatedPrefix/Mode.php | 62 + ...elegatedPrefixPublicDelegatedSubPrefix.php | 92 ++ .../Mode.php | 62 + Compute/src/V1/Quota/Metric.php | 25 + Compute/src/V1/QuotaStatusWarning.php | 159 +++ Compute/src/V1/QuotaStatusWarning/Code.php | 244 ++++ Compute/src/V1/Region.php | 44 + ...rewallsResponseEffectiveFirewallPolicy.php | 8 +- .../Type.php | 2 +- .../V1/ResourcePolicyGroupPlacementPolicy.php | 2 +- Compute/src/V1/RouterBgp.php | 44 + Compute/src/V1/RouterBgpPeer.php | 224 +++- Compute/src/V1/RouterInterface.php | 56 +- Compute/src/V1/RouterInterface/IpVersion.php | 58 + Compute/src/V1/RouterStatusBgpPeerStatus.php | 140 ++- .../StatusReason.php | 14 + Compute/src/V1/ServiceAttachment.php | 16 +- .../src/V1/SetIamPolicyStoragePoolRequest.php | 198 +++ Compute/src/V1/StoragePool.php | 871 +++++++++++++ .../StoragePool/CapacityProvisioningType.php | 52 + .../PerformanceProvisioningType.php | 52 + Compute/src/V1/StoragePool/State.php | 76 ++ Compute/src/V1/StoragePoolAggregatedList.php | 357 ++++++ Compute/src/V1/StoragePoolDisk.php | 500 ++++++++ Compute/src/V1/StoragePoolDisk/Status.php | 90 ++ Compute/src/V1/StoragePoolList.php | 358 ++++++ Compute/src/V1/StoragePoolListDisks.php | 357 ++++++ Compute/src/V1/StoragePoolResourceStatus.php | 473 +++++++ Compute/src/V1/StoragePoolType.php | 770 ++++++++++++ .../src/V1/StoragePoolTypeAggregatedList.php | 286 +++++ Compute/src/V1/StoragePoolTypeList.php | 287 +++++ Compute/src/V1/StoragePoolTypesClient.php | 34 + Compute/src/V1/StoragePoolTypesScopedList.php | 110 ++ Compute/src/V1/StoragePoolsClient.php | 34 + Compute/src/V1/StoragePoolsScopedList.php | 110 ++ .../TestIamPermissionsStoragePoolRequest.php | 198 +++ Compute/src/V1/UpdateStoragePoolRequest.php | 286 +++++ Compute/src/V1/UrlMap.php | 8 +- Compute/src/V1/gapic_metadata.json | 141 +++ ...manager_resize_requests_client_config.json | 70 ++ ...ager_resize_requests_descriptor_config.php | 216 ++++ ...ger_resize_requests_rest_client_config.php | 230 ++++ ...stance_settings_service_client_config.json | 55 + ...nce_settings_service_descriptor_config.php | 78 ++ ...ce_settings_service_rest_client_config.php | 142 +++ .../resources/node_groups_client_config.json | 5 + .../node_groups_descriptor_config.php | 38 + .../node_groups_rest_client_config.php | 22 + .../storage_pool_types_client_config.json | 50 + .../storage_pool_types_descriptor_config.php | 98 ++ .../storage_pool_types_rest_client_config.php | 76 ++ .../storage_pools_client_config.json | 95 ++ .../storage_pools_descriptor_config.php | 294 +++++ .../storage_pools_rest_client_config.php | 303 +++++ .../tests/Unit/V1/Client/DisksClientTest.php | 2 + .../V1/Client/ForwardingRulesClientTest.php | 2 + .../GlobalForwardingRulesClientTest.php | 2 + ...lobalPublicDelegatedPrefixesClientTest.php | 4 + ...ceGroupManagerResizeRequestsClientTest.php | 732 +++++++++++ .../InstanceSettingsServiceClientTest.php | 305 +++++ .../Unit/V1/Client/NodeGroupsClientTest.php | 137 ++ .../PublicDelegatedPrefixesClientTest.php | 4 + .../Unit/V1/Client/RegionDisksClientTest.php | 2 + .../V1/Client/StoragePoolTypesClientTest.php | 378 ++++++ .../Unit/V1/Client/StoragePoolsClientTest.php | 1111 +++++++++++++++++ Compute/tests/Unit/V1/DisksClientTest.php | 2 + .../Unit/V1/ForwardingRulesClientTest.php | 2 + .../V1/GlobalForwardingRulesClientTest.php | 2 + ...lobalPublicDelegatedPrefixesClientTest.php | 4 + ...ceGroupManagerResizeRequestsClientTest.php | 607 +++++++++ .../V1/InstanceSettingsServiceClientTest.php | 252 ++++ .../tests/Unit/V1/NodeGroupsClientTest.php | 126 ++ .../V1/PublicDelegatedPrefixesClientTest.php | 4 + .../tests/Unit/V1/RegionDisksClientTest.php | 2 + .../Unit/V1/StoragePoolTypesClientTest.php | 313 +++++ .../tests/Unit/V1/StoragePoolsClientTest.php | 975 +++++++++++++++ 177 files changed, 26203 insertions(+), 96 deletions(-) create mode 100644 Compute/samples/V1/InstanceGroupManagerResizeRequestsClient/cancel.php create mode 100644 Compute/samples/V1/InstanceGroupManagerResizeRequestsClient/delete.php create mode 100644 Compute/samples/V1/InstanceGroupManagerResizeRequestsClient/get.php create mode 100644 Compute/samples/V1/InstanceGroupManagerResizeRequestsClient/insert.php create mode 100644 Compute/samples/V1/InstanceGroupManagerResizeRequestsClient/list.php create mode 100644 Compute/samples/V1/InstanceSettingsServiceClient/get.php create mode 100644 Compute/samples/V1/InstanceSettingsServiceClient/patch.php create mode 100644 Compute/samples/V1/NodeGroupsClient/perform_maintenance.php create mode 100644 Compute/samples/V1/StoragePoolTypesClient/aggregated_list.php create mode 100644 Compute/samples/V1/StoragePoolTypesClient/get.php create mode 100644 Compute/samples/V1/StoragePoolTypesClient/list.php create mode 100644 Compute/samples/V1/StoragePoolsClient/aggregated_list.php create mode 100644 Compute/samples/V1/StoragePoolsClient/delete.php create mode 100644 Compute/samples/V1/StoragePoolsClient/get.php create mode 100644 Compute/samples/V1/StoragePoolsClient/get_iam_policy.php create mode 100644 Compute/samples/V1/StoragePoolsClient/insert.php create mode 100644 Compute/samples/V1/StoragePoolsClient/list.php create mode 100644 Compute/samples/V1/StoragePoolsClient/list_disks.php create mode 100644 Compute/samples/V1/StoragePoolsClient/set_iam_policy.php create mode 100644 Compute/samples/V1/StoragePoolsClient/test_iam_permissions.php create mode 100644 Compute/samples/V1/StoragePoolsClient/update.php create mode 100644 Compute/src/V1/AggregatedListStoragePoolTypesRequest.php create mode 100644 Compute/src/V1/AggregatedListStoragePoolsRequest.php create mode 100644 Compute/src/V1/CancelInstanceGroupManagerResizeRequestRequest.php create mode 100644 Compute/src/V1/Client/InstanceGroupManagerResizeRequestsClient.php create mode 100644 Compute/src/V1/Client/InstanceSettingsServiceClient.php create mode 100644 Compute/src/V1/Client/StoragePoolTypesClient.php create mode 100644 Compute/src/V1/Client/StoragePoolsClient.php create mode 100644 Compute/src/V1/DeleteInstanceGroupManagerResizeRequestRequest.php create mode 100644 Compute/src/V1/DeleteStoragePoolRequest.php create mode 100644 Compute/src/V1/Enums/InstanceGroupManagerResizeRequest/State.php create mode 100644 Compute/src/V1/Enums/NodeGroup/MaintenanceInterval.php create mode 100644 Compute/src/V1/Enums/PublicDelegatedPrefix/Mode.php create mode 100644 Compute/src/V1/Enums/PublicDelegatedPrefixPublicDelegatedSubPrefix/Mode.php create mode 100644 Compute/src/V1/Enums/QuotaStatusWarning/Code.php create mode 100644 Compute/src/V1/Enums/RouterInterface/IpVersion.php create mode 100644 Compute/src/V1/Enums/StoragePool/CapacityProvisioningType.php create mode 100644 Compute/src/V1/Enums/StoragePool/PerformanceProvisioningType.php create mode 100644 Compute/src/V1/Enums/StoragePool/State.php create mode 100644 Compute/src/V1/Enums/StoragePoolDisk/Status.php create mode 100644 Compute/src/V1/Gapic/InstanceGroupManagerResizeRequestsGapicClient.php create mode 100644 Compute/src/V1/Gapic/InstanceSettingsServiceGapicClient.php create mode 100644 Compute/src/V1/Gapic/StoragePoolTypesGapicClient.php create mode 100644 Compute/src/V1/Gapic/StoragePoolsGapicClient.php create mode 100644 Compute/src/V1/GetIamPolicyStoragePoolRequest.php create mode 100644 Compute/src/V1/GetInstanceGroupManagerResizeRequestRequest.php create mode 100644 Compute/src/V1/GetInstanceSettingRequest.php create mode 100644 Compute/src/V1/GetStoragePoolRequest.php create mode 100644 Compute/src/V1/GetStoragePoolTypeRequest.php create mode 100644 Compute/src/V1/InsertInstanceGroupManagerResizeRequestRequest.php create mode 100644 Compute/src/V1/InsertStoragePoolRequest.php create mode 100644 Compute/src/V1/InstanceGroupManagerResizeRequest.php create mode 100644 Compute/src/V1/InstanceGroupManagerResizeRequest/State.php create mode 100644 Compute/src/V1/InstanceGroupManagerResizeRequestStatus.php create mode 100644 Compute/src/V1/InstanceGroupManagerResizeRequestStatusLastAttempt.php create mode 100644 Compute/src/V1/InstanceGroupManagerResizeRequestsClient.php create mode 100644 Compute/src/V1/InstanceGroupManagerResizeRequestsListResponse.php create mode 100644 Compute/src/V1/InstanceSettings.php create mode 100644 Compute/src/V1/InstanceSettingsMetadata.php create mode 100644 Compute/src/V1/InstanceSettingsServiceClient.php create mode 100644 Compute/src/V1/ListDisksStoragePoolsRequest.php create mode 100644 Compute/src/V1/ListInstanceGroupManagerResizeRequestsRequest.php create mode 100644 Compute/src/V1/ListStoragePoolTypesRequest.php create mode 100644 Compute/src/V1/ListStoragePoolsRequest.php create mode 100644 Compute/src/V1/NodeGroup/MaintenanceInterval.php create mode 100644 Compute/src/V1/NodeGroupsPerformMaintenanceRequest.php create mode 100644 Compute/src/V1/PatchInstanceSettingRequest.php create mode 100644 Compute/src/V1/PerformMaintenanceNodeGroupRequest.php create mode 100644 Compute/src/V1/PublicDelegatedPrefix/Mode.php create mode 100644 Compute/src/V1/PublicDelegatedPrefixPublicDelegatedSubPrefix/Mode.php create mode 100644 Compute/src/V1/QuotaStatusWarning.php create mode 100644 Compute/src/V1/QuotaStatusWarning/Code.php create mode 100644 Compute/src/V1/RouterInterface/IpVersion.php create mode 100644 Compute/src/V1/SetIamPolicyStoragePoolRequest.php create mode 100644 Compute/src/V1/StoragePool.php create mode 100644 Compute/src/V1/StoragePool/CapacityProvisioningType.php create mode 100644 Compute/src/V1/StoragePool/PerformanceProvisioningType.php create mode 100644 Compute/src/V1/StoragePool/State.php create mode 100644 Compute/src/V1/StoragePoolAggregatedList.php create mode 100644 Compute/src/V1/StoragePoolDisk.php create mode 100644 Compute/src/V1/StoragePoolDisk/Status.php create mode 100644 Compute/src/V1/StoragePoolList.php create mode 100644 Compute/src/V1/StoragePoolListDisks.php create mode 100644 Compute/src/V1/StoragePoolResourceStatus.php create mode 100644 Compute/src/V1/StoragePoolType.php create mode 100644 Compute/src/V1/StoragePoolTypeAggregatedList.php create mode 100644 Compute/src/V1/StoragePoolTypeList.php create mode 100644 Compute/src/V1/StoragePoolTypesClient.php create mode 100644 Compute/src/V1/StoragePoolTypesScopedList.php create mode 100644 Compute/src/V1/StoragePoolsClient.php create mode 100644 Compute/src/V1/StoragePoolsScopedList.php create mode 100644 Compute/src/V1/TestIamPermissionsStoragePoolRequest.php create mode 100644 Compute/src/V1/UpdateStoragePoolRequest.php create mode 100644 Compute/src/V1/resources/instance_group_manager_resize_requests_client_config.json create mode 100644 Compute/src/V1/resources/instance_group_manager_resize_requests_descriptor_config.php create mode 100644 Compute/src/V1/resources/instance_group_manager_resize_requests_rest_client_config.php create mode 100644 Compute/src/V1/resources/instance_settings_service_client_config.json create mode 100644 Compute/src/V1/resources/instance_settings_service_descriptor_config.php create mode 100644 Compute/src/V1/resources/instance_settings_service_rest_client_config.php create mode 100644 Compute/src/V1/resources/storage_pool_types_client_config.json create mode 100644 Compute/src/V1/resources/storage_pool_types_descriptor_config.php create mode 100644 Compute/src/V1/resources/storage_pool_types_rest_client_config.php create mode 100644 Compute/src/V1/resources/storage_pools_client_config.json create mode 100644 Compute/src/V1/resources/storage_pools_descriptor_config.php create mode 100644 Compute/src/V1/resources/storage_pools_rest_client_config.php create mode 100644 Compute/tests/Unit/V1/Client/InstanceGroupManagerResizeRequestsClientTest.php create mode 100644 Compute/tests/Unit/V1/Client/InstanceSettingsServiceClientTest.php create mode 100644 Compute/tests/Unit/V1/Client/StoragePoolTypesClientTest.php create mode 100644 Compute/tests/Unit/V1/Client/StoragePoolsClientTest.php create mode 100644 Compute/tests/Unit/V1/InstanceGroupManagerResizeRequestsClientTest.php create mode 100644 Compute/tests/Unit/V1/InstanceSettingsServiceClientTest.php create mode 100644 Compute/tests/Unit/V1/StoragePoolTypesClientTest.php create mode 100644 Compute/tests/Unit/V1/StoragePoolsClientTest.php diff --git a/Compute/metadata/V1/Compute.php b/Compute/metadata/V1/Compute.php index 2f7aba18e1dc09be43701d1cd3d86f756cc071b5..b68815909706962ca230c559e36e95eebe21fcb1 100644 GIT binary patch delta 9640 zcmb_hd3@7Vwx9c3liMx*HA&O7X`8f#7F$}%ri>0WZKTC+bV1~SF>ND6+9pj>1-F75 zC<85K;OOvF(7FwZU`Ky0ID$Gn8OMRDBZ>&rQBg<4swg~1eD`;gHc1zk&*%Nu=APd< z=bq(zmb>f0iSNFZyR(30&+gCdo5H@@9H@3nG4+18*Rj-D>vp$7hl-uhcf7%c0-NVa zV(6sr#kOt~nCF-JVwS#{%XG)~9q(>pjgkq+`hwruJ>+A<@qL5aQ6|b&!>L}Tqi;t* z%OqM8aGX7os_&&uA1=cGLU?kiqrKVL3TQXd$M{^=I_sProlc)W;1TKrd)B7u({a4l zsT|n7!4tzRw>-NPzL^gZBiOG~-t3r#!)Um#yHY=YH=t$5pizmX&Ml=!S%2za^c*Lwlkhq(<0uC%d zNm?lh$23-#EGVg{EU{MFG&|pU@UQZ~0%T@2Bh4(MMd+aKGg=Az1Y|KqXDR6HO>On>*+=$XqDpYSo7jS7r$w0>+ zwa5e=&ofiyH#edeSa{6Gsno+)lDjvdAG6^O8EK+odd?H*QOI}-Y2_V_9Nm~s2g-5BJ|x6PL{`H}4-8BbEJh1Xj7%H5f2GH1cy{$p5)jIV@;8Uk z&Kh&r){|_miC4nYh}9t| zXj*A_>A;?IN`Ud@f)X%b{}aQ*N6#_oNCl34j6O-Ne6kP=#6kW}pW&iWjgQk$)e{JOXIy{}>52R;u9H*qPsDL8ouutwa<8jCSGqL9|K5>Cl%w%Mw} z0>MXz-)U82k^a@`vx=CvU+ZpnT23I?x`s(k8bfKAq2i{d{6@L!RXDcQ;q%)ae!sKL z<2Up^_Q-+2WHIPx>loiw66%s5aXBI!s1{DI*X^Zv9m&kniHoTt(;_fBXtoG0R2fN8 zCd|rmgaqfVI~iSElm@UwWHaIJR%TkD=jPZEXHy^#OLsT7YbceS_3^B-l_CZN6Y z;b)i`Eb64_JtlAi0q$gZ&2HwS1==?moL1@b`ITzn3!y>a#kL9HnZ<4%A3ic*@?5rF zZcSpJ(TFD*TtIki-i?xR*i`{XWtO}%iGZw}oz331AgPbRsfwrw%#lge&qfJPFgQ8l zWJvxwIB+|wg1#oT1h21UZ-d%;_79tHVB_V_uVaf{%sMP*e#FM2tQ@RubGX|5&UOVC z?aE)?s~xR|!GqiP1Pg))xgQfrDyaIHU5L~$ITieV+R&5me-tMZ$yS$IT2A_c-ORvW z2DnN`|8pT1NaoI{unxAlIsK$OoZ@J0bvKi2ZfbSfJznRPt`+uHXZuqBGQ-nP zKPu4zpcoETd$u5fBq|LHcyzp|;o69fh6ld>doTuvqi%HvmyTj! zYX`R$Y6p=yz<-`ZTAU?bZXQ~4=Z4g>M2yR9mA1Jh4HY%jnn#}e-y5XKc!F&qiLvUE zN_$1^f*JOUYw9j7sVl3fo@=jbthCun>uf>tR|eMq1zC1L?J_14UiET4rZjA{k9#G! zp^f_;)OIk*N>ekP>MS4eaZN1q0S9xg;fj8ZMcmhLneZ`UvmnPU7!eDvU&EyZ?&(d1 zhIbuj4eF{u33J=6AaNj$qxp)ZuL>Ne_EH1iN$u(bcub{4JhHc-zyny7L zs+=}usW^r}y^@_S&($*w4-6d&B(zA!mf&3BaT7H2xLaM#E~n4%{a4@3&SZ1d#7_yX zw&=4z4R#+w^e_X*)5>wBgVYc@PxQb1;X!fP*-*71iO@qwS+$`0Q-cWIxTR;4tyyrBhW0*}m9QuySPZ@72L-6BwToGbO z0&!Wyr^*EbGwx1>?lT1Y1bE^Mmjh;xU_rA3-FdTN{x{rJU_Z;n#VbW7Jm|^G&vNPU z%%>REiTtB^5e`LNWBIz38pHGCr9>!C4{sK_OYhT!j{gf_d|TYQE` z{&r>xJ(tM2#YW)`7Ht#aU^?cF%svFQn9py_!)8(irrB$4wmN%Fb+9DVR99YRFRiJr zww2PtvHAH^2apsboe@bojeHVK`o`d`2N7I{`DPL(2QWWzI53nj$pTdjzdZaCi4~iC ze+++*3q&uk8QRv+k#lpgV1yk{5O`hO#y88eJNYBN;#*^ImUK>NSZ z9Dlgy=}^XqirEWrnzA+uizegJus%zh3~wBO50yM(%W1ynVBIKkm)qkr!2V~a6S4%h zoDP2H;Z#ZoZSzrb!d>g%siiz#uYK6B=H49Y2Xj61)>zxT6d=zN|j>?*^C(vSmcBkWIh08S|vXE#=t z*)FcAww2jSOKM9>D;h4d*Vff6sHi9POX)ZoE~~X^eq)(OTEt-MrPzHGqx10MiD6E) zwmQ z^9`^#C1Uh}LmB)`c;PL+0EgWPyPjvygRXvVGw8lYWl@oSxtYJT_&A3XBA6&s8(D@* zWc+qCFC$Sr)ROy1+qoe_DQn8+BL}7}Mv2fj$fO3UHkuF{SiUh2anRMwSb({k(;=RY zJc6XbxfE^Q(DQ41*LG%#t?l;2^j zvePxh(x#DX2Wl>*OoRnnjxka9g@Fvd04l#h`NNp=r9sdu7TW~QcerxHCk)m`7-)F3 zg~5Yd9&ntHKhl2C*3UgmKQ^7@qg*s1J2QG%eHTkdCTRlJ(NzVh`^uVFfp#)MwRsG0 zeShMMU8isENtqRRL`Sg%WCtVQ6Yv*`;{n zub=MxItWj+5RxJirlq*FcK_}|%8OHYk#;3~?q5bmrlrd~oqogqEe|$PD%w*mo`{o& z$h`Jzye_h&X%D&ojgy<(D5cP)Fr11lzu-c>>-)|GwWI+>z;T?9sLHn}pom+H z&0`aH*&{A++q&KV3`$Vo*Q$h0(5&vxc0Wz)F@0psBe+Cn#b4qUYbs6&CUejeT|-ri z=7lv8Cq$f5%ut5&Av?B2XlpfM!|=ff16y-&)-Q+=f=8F8jYmg?XJgBF=V7~9PKZ%S zrGP#~iGWAdeN_?8R7^v!FbupS>f`H!pDW!s8|=nOLp0_W)UW?J@b2lLk7#pVh%<(1 zX_@SL;jKReV~a+KBHh*g)6(x-zwW=np`u71>kBIVvsYf*7mg6Ah)5qn3;y{?lehiP zq+_8xX|YbjF$!G>rwpI(eNPUa#squ#7i$p@je{tSE`M`qozB2oU#CZzEr_vb7%F(? zGpy}CF_+?S2iX%r_EvVLvaHqAWMMOn!Jjg;Rhis}?G@<_>TL_o96qHbD#&!i4aqV$ zs=Em?9g8T;G;~UtCdA`ddxSXx8BZp|oO66~>hP}kDHfX|K$iqmVDCQ5W+Rs$S;01~ z<~jmj%Cq2mBWH^|fDMSNQ>^ps#&MCXe1^cCd&o%0LQxfC ziev;OTTr>2`YC_OV$fLy{cwF!o?%E&yh*;&ChSVn-N#@C*&~chEhW??H z5gT1FKP49M{pfH>F(lqB>S05T7?+SAs)3>R6xh2$)bqC>%W4EAmxzmCcCSjz4{Z&7 zh1W$>-%!}Bv~8^tc}^07kDWmkpr=)ghiW~FAEm&nzd!-@`bpP@#aqS|FYRS8OCHUn zz(Ai7dM*^n(AXlzj(XIBjK@?K`gj%nAYzfDl}R39jho*5Fu+_dMd*?*FDjvnE6TT`D7e zl*7_426HrD0#mLxLgxEKR*^?kfqFNJ*G9%i=yRhI8)@_@D~+^9;dgVN!iD_eaTDb& z0DJ4je6VaG2D{=C@wYSpR6{C&d56#`-&-cWH^KB8hm*;D>0{>5TSqB$c)tyKHR?6;%H?9*!_2=k<+YNk zTCM+x!P2Phv=h*FF%=qb6(uM#siyNMNqCgQIZ2hBFxHY9b`A)7_6}qL^FdW6T#=#5 zDGbp?Z0u+K+_GE0=IvCK{C2AP&WrU=30M;WW)vHxw_*PIWCIy7Xq@U5CPv|x`9Yy} z2sUfUa2)*bD0M?*%dGqkjtfLf@dzoFm4{2xNsYRSJoD!(Pl)-E$Vn%A=$Wi0FV+tU zap|G6VM&G8MN-3}hlI%^AE#IShgflhP?+<$SP>J!3~Jj{k0%^UA}iI1+n#?&yeR6n zs}6}-Q9tZBBvvLz@bO9Sqaj3sZIX%v(<6d_!%Sg5FBX`tKU|VB?wu(V!qJ6l3%#=` zl6~}jZ;)OE)BlLsQ7R#W+L9L**lJn+lfstl6N0uijxPu9GN>Hh`%|EvE>0S8HI0fTU4{)JCoWIMZ5Yvm6eg!!Pc3h u>|Owk#{?-Qq#A9Iqw(;LA+O=!DBJFVNHoy=uK^6gnuz-XJ2*a(wh663#+67-D zpo2|eyzbf`I1r}1jAmhWa0mn=I8-zlLqNkT4CNsrl9*sHgU(y}&ppXKC%^Ca_xXL# zxp=;)XK&zOkh1F^R|S&g^oPaD&XwlmYs=0Rv1@wSrA+K_C1)vjECc%ar?H#+!Cf7%oE3*`@xH=o= zYm`{F3H-|SA}g+10A^AZ5L*_25g>|PRS*@U7J`?G`89BE47ryp$`ptKp6CEO=65EGI?SH;tEKMFlhByKyLoZ0vTBN_-dx6XameAhm-@@f5kij4vc$WI=8l zfH_~5BP$wX)s3O>(pvlQt}9EuP^6n`QMR;LaeD&1V8x>e@PiGz=0YCiDItRs>}W;U z3=Z6f;D&rWg)knRIE?BE7ZzS5W5u*>aGVOq4oE#EE}wu~fUoz#Y0-QNM1j!XfP*td z>KQU&l*p+jkIKZ=4$?GI+&V^Dv*Ak-{)vpEP?Kg*gLWUWiSje#<{a@xfF8*a@$q!s z9Ilyy=$m{Iyd zVGg{nFb|&Rd<6d5EqU>}Oon%%qUMp?*kmNaJ`SGv*?kH_2F1;V_j%*ZFM;GX083~w>JjV2&#dUFl6N}b->@3@R6!! zu}dwg!@E`<#0H@P9&6)Pb;{wO`acVg1$i+T@pgL27OHeF;8%8DjD~VLS?r2dcHq;+JRkdudHa*b)RIqplZBc=21o05sa*QGoF5xiZh_FZ4b7vbeHZcmeGMiok#_@$ihtjB#FJO}TdP+tpo zi!>T*w(-@%vV-fQ;=Es)UWNTFl1&&|q)wMO-6ggDCYsi3F8jr(O{{tkK!}I_E diff --git a/Compute/samples/V1/InstanceGroupManagerResizeRequestsClient/cancel.php b/Compute/samples/V1/InstanceGroupManagerResizeRequestsClient/cancel.php new file mode 100644 index 000000000000..3646ae02c227 --- /dev/null +++ b/Compute/samples/V1/InstanceGroupManagerResizeRequestsClient/cancel.php @@ -0,0 +1,89 @@ +cancel( + $instanceGroupManager, + $project, + $resizeRequest, + $zone + ); + $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 +{ + $instanceGroupManager = '[INSTANCE_GROUP_MANAGER]'; + $project = '[PROJECT]'; + $resizeRequest = '[RESIZE_REQUEST]'; + $zone = '[ZONE]'; + + cancel_sample($instanceGroupManager, $project, $resizeRequest, $zone); +} +// [END compute_v1_generated_InstanceGroupManagerResizeRequests_Cancel_sync] diff --git a/Compute/samples/V1/InstanceGroupManagerResizeRequestsClient/delete.php b/Compute/samples/V1/InstanceGroupManagerResizeRequestsClient/delete.php new file mode 100644 index 000000000000..2a37cc86ce28 --- /dev/null +++ b/Compute/samples/V1/InstanceGroupManagerResizeRequestsClient/delete.php @@ -0,0 +1,89 @@ +delete( + $instanceGroupManager, + $project, + $resizeRequest, + $zone + ); + $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 +{ + $instanceGroupManager = '[INSTANCE_GROUP_MANAGER]'; + $project = '[PROJECT]'; + $resizeRequest = '[RESIZE_REQUEST]'; + $zone = '[ZONE]'; + + delete_sample($instanceGroupManager, $project, $resizeRequest, $zone); +} +// [END compute_v1_generated_InstanceGroupManagerResizeRequests_Delete_sync] diff --git a/Compute/samples/V1/InstanceGroupManagerResizeRequestsClient/get.php b/Compute/samples/V1/InstanceGroupManagerResizeRequestsClient/get.php new file mode 100644 index 000000000000..eb562b7b4435 --- /dev/null +++ b/Compute/samples/V1/InstanceGroupManagerResizeRequestsClient/get.php @@ -0,0 +1,80 @@ +zone scoping this request. Name should conform to RFC1035. + */ +function get_sample( + string $instanceGroupManager, + string $project, + string $resizeRequest, + string $zone +): void { + // Create a client. + $instanceGroupManagerResizeRequestsClient = new InstanceGroupManagerResizeRequestsClient(); + + // Call the API and handle any network failures. + try { + /** @var InstanceGroupManagerResizeRequest $response */ + $response = $instanceGroupManagerResizeRequestsClient->get( + $instanceGroupManager, + $project, + $resizeRequest, + $zone + ); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $instanceGroupManager = '[INSTANCE_GROUP_MANAGER]'; + $project = '[PROJECT]'; + $resizeRequest = '[RESIZE_REQUEST]'; + $zone = '[ZONE]'; + + get_sample($instanceGroupManager, $project, $resizeRequest, $zone); +} +// [END compute_v1_generated_InstanceGroupManagerResizeRequests_Get_sync] diff --git a/Compute/samples/V1/InstanceGroupManagerResizeRequestsClient/insert.php b/Compute/samples/V1/InstanceGroupManagerResizeRequestsClient/insert.php new file mode 100644 index 000000000000..f02c8379c094 --- /dev/null +++ b/Compute/samples/V1/InstanceGroupManagerResizeRequestsClient/insert.php @@ -0,0 +1,87 @@ +insert( + $instanceGroupManager, + $instanceGroupManagerResizeRequestResource, + $project, + $zone + ); + $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 +{ + $instanceGroupManager = '[INSTANCE_GROUP_MANAGER]'; + $project = '[PROJECT]'; + $zone = '[ZONE]'; + + insert_sample($instanceGroupManager, $project, $zone); +} +// [END compute_v1_generated_InstanceGroupManagerResizeRequests_Insert_sync] diff --git a/Compute/samples/V1/InstanceGroupManagerResizeRequestsClient/list.php b/Compute/samples/V1/InstanceGroupManagerResizeRequestsClient/list.php new file mode 100644 index 000000000000..a9583e0f1fee --- /dev/null +++ b/Compute/samples/V1/InstanceGroupManagerResizeRequestsClient/list.php @@ -0,0 +1,72 @@ +list($instanceGroupManager, $project, $zone); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $instanceGroupManager = '[INSTANCE_GROUP_MANAGER]'; + $project = '[PROJECT]'; + $zone = '[ZONE]'; + + list_sample($instanceGroupManager, $project, $zone); +} +// [END compute_v1_generated_InstanceGroupManagerResizeRequests_List_sync] diff --git a/Compute/samples/V1/InstanceSettingsServiceClient/get.php b/Compute/samples/V1/InstanceSettingsServiceClient/get.php new file mode 100644 index 000000000000..7e15d801afd4 --- /dev/null +++ b/Compute/samples/V1/InstanceSettingsServiceClient/get.php @@ -0,0 +1,67 @@ +get($project, $zone); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $project = '[PROJECT]'; + $zone = '[ZONE]'; + + get_sample($project, $zone); +} +// [END compute_v1_generated_InstanceSettingsService_Get_sync] diff --git a/Compute/samples/V1/InstanceSettingsServiceClient/patch.php b/Compute/samples/V1/InstanceSettingsServiceClient/patch.php new file mode 100644 index 000000000000..fd51e68f9d7a --- /dev/null +++ b/Compute/samples/V1/InstanceSettingsServiceClient/patch.php @@ -0,0 +1,80 @@ +patch($instanceSettingsResource, $project, $zone); + $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 +{ + $project = '[PROJECT]'; + $zone = '[ZONE]'; + + patch_sample($project, $zone); +} +// [END compute_v1_generated_InstanceSettingsService_Patch_sync] diff --git a/Compute/samples/V1/NodeGroupsClient/perform_maintenance.php b/Compute/samples/V1/NodeGroupsClient/perform_maintenance.php new file mode 100644 index 000000000000..aef9adf0c70b --- /dev/null +++ b/Compute/samples/V1/NodeGroupsClient/perform_maintenance.php @@ -0,0 +1,87 @@ +performMaintenance( + $nodeGroup, + $nodeGroupsPerformMaintenanceRequestResource, + $project, + $zone + ); + $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 +{ + $nodeGroup = '[NODE_GROUP]'; + $project = '[PROJECT]'; + $zone = '[ZONE]'; + + perform_maintenance_sample($nodeGroup, $project, $zone); +} +// [END compute_v1_generated_NodeGroups_PerformMaintenance_sync] diff --git a/Compute/samples/V1/StoragePoolTypesClient/aggregated_list.php b/Compute/samples/V1/StoragePoolTypesClient/aggregated_list.php new file mode 100644 index 000000000000..3433f29781e1 --- /dev/null +++ b/Compute/samples/V1/StoragePoolTypesClient/aggregated_list.php @@ -0,0 +1,68 @@ +aggregatedList($project); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $project = '[PROJECT]'; + + aggregated_list_sample($project); +} +// [END compute_v1_generated_StoragePoolTypes_AggregatedList_sync] diff --git a/Compute/samples/V1/StoragePoolTypesClient/get.php b/Compute/samples/V1/StoragePoolTypesClient/get.php new file mode 100644 index 000000000000..13112067289f --- /dev/null +++ b/Compute/samples/V1/StoragePoolTypesClient/get.php @@ -0,0 +1,69 @@ +get($project, $storagePoolType, $zone); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $project = '[PROJECT]'; + $storagePoolType = '[STORAGE_POOL_TYPE]'; + $zone = '[ZONE]'; + + get_sample($project, $storagePoolType, $zone); +} +// [END compute_v1_generated_StoragePoolTypes_Get_sync] diff --git a/Compute/samples/V1/StoragePoolTypesClient/list.php b/Compute/samples/V1/StoragePoolTypesClient/list.php new file mode 100644 index 000000000000..a21a0947a5a8 --- /dev/null +++ b/Compute/samples/V1/StoragePoolTypesClient/list.php @@ -0,0 +1,70 @@ +list($project, $zone); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $project = '[PROJECT]'; + $zone = '[ZONE]'; + + list_sample($project, $zone); +} +// [END compute_v1_generated_StoragePoolTypes_List_sync] diff --git a/Compute/samples/V1/StoragePoolsClient/aggregated_list.php b/Compute/samples/V1/StoragePoolsClient/aggregated_list.php new file mode 100644 index 000000000000..b5c86c924463 --- /dev/null +++ b/Compute/samples/V1/StoragePoolsClient/aggregated_list.php @@ -0,0 +1,68 @@ +aggregatedList($project); + + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $project = '[PROJECT]'; + + aggregated_list_sample($project); +} +// [END compute_v1_generated_StoragePools_AggregatedList_sync] diff --git a/Compute/samples/V1/StoragePoolsClient/delete.php b/Compute/samples/V1/StoragePoolsClient/delete.php new file mode 100644 index 000000000000..190e28a52b7e --- /dev/null +++ b/Compute/samples/V1/StoragePoolsClient/delete.php @@ -0,0 +1,78 @@ +delete($project, $storagePool, $zone); + $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 +{ + $project = '[PROJECT]'; + $storagePool = '[STORAGE_POOL]'; + $zone = '[ZONE]'; + + delete_sample($project, $storagePool, $zone); +} +// [END compute_v1_generated_StoragePools_Delete_sync] diff --git a/Compute/samples/V1/StoragePoolsClient/get.php b/Compute/samples/V1/StoragePoolsClient/get.php new file mode 100644 index 000000000000..41174f76f0f8 --- /dev/null +++ b/Compute/samples/V1/StoragePoolsClient/get.php @@ -0,0 +1,69 @@ +get($project, $storagePool, $zone); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $project = '[PROJECT]'; + $storagePool = '[STORAGE_POOL]'; + $zone = '[ZONE]'; + + get_sample($project, $storagePool, $zone); +} +// [END compute_v1_generated_StoragePools_Get_sync] diff --git a/Compute/samples/V1/StoragePoolsClient/get_iam_policy.php b/Compute/samples/V1/StoragePoolsClient/get_iam_policy.php new file mode 100644 index 000000000000..17860c59fff9 --- /dev/null +++ b/Compute/samples/V1/StoragePoolsClient/get_iam_policy.php @@ -0,0 +1,69 @@ +getIamPolicy($project, $resource, $zone); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $project = '[PROJECT]'; + $resource = '[RESOURCE]'; + $zone = '[ZONE]'; + + get_iam_policy_sample($project, $resource, $zone); +} +// [END compute_v1_generated_StoragePools_GetIamPolicy_sync] diff --git a/Compute/samples/V1/StoragePoolsClient/insert.php b/Compute/samples/V1/StoragePoolsClient/insert.php new file mode 100644 index 000000000000..42a79ce37a24 --- /dev/null +++ b/Compute/samples/V1/StoragePoolsClient/insert.php @@ -0,0 +1,80 @@ +insert($project, $storagePoolResource, $zone); + $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 +{ + $project = '[PROJECT]'; + $zone = '[ZONE]'; + + insert_sample($project, $zone); +} +// [END compute_v1_generated_StoragePools_Insert_sync] diff --git a/Compute/samples/V1/StoragePoolsClient/list.php b/Compute/samples/V1/StoragePoolsClient/list.php new file mode 100644 index 000000000000..56998977d58f --- /dev/null +++ b/Compute/samples/V1/StoragePoolsClient/list.php @@ -0,0 +1,67 @@ +list($project, $zone); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $project = '[PROJECT]'; + $zone = '[ZONE]'; + + list_sample($project, $zone); +} +// [END compute_v1_generated_StoragePools_List_sync] diff --git a/Compute/samples/V1/StoragePoolsClient/list_disks.php b/Compute/samples/V1/StoragePoolsClient/list_disks.php new file mode 100644 index 000000000000..c29debf06152 --- /dev/null +++ b/Compute/samples/V1/StoragePoolsClient/list_disks.php @@ -0,0 +1,69 @@ +listDisks($project, $storagePool, $zone); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $project = '[PROJECT]'; + $storagePool = '[STORAGE_POOL]'; + $zone = '[ZONE]'; + + list_disks_sample($project, $storagePool, $zone); +} +// [END compute_v1_generated_StoragePools_ListDisks_sync] diff --git a/Compute/samples/V1/StoragePoolsClient/set_iam_policy.php b/Compute/samples/V1/StoragePoolsClient/set_iam_policy.php new file mode 100644 index 000000000000..26c4568415b1 --- /dev/null +++ b/Compute/samples/V1/StoragePoolsClient/set_iam_policy.php @@ -0,0 +1,78 @@ +setIamPolicy( + $project, + $resource, + $zone, + $zoneSetPolicyRequestResource + ); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $project = '[PROJECT]'; + $resource = '[RESOURCE]'; + $zone = '[ZONE]'; + + set_iam_policy_sample($project, $resource, $zone); +} +// [END compute_v1_generated_StoragePools_SetIamPolicy_sync] diff --git a/Compute/samples/V1/StoragePoolsClient/test_iam_permissions.php b/Compute/samples/V1/StoragePoolsClient/test_iam_permissions.php new file mode 100644 index 000000000000..cc205dd335fd --- /dev/null +++ b/Compute/samples/V1/StoragePoolsClient/test_iam_permissions.php @@ -0,0 +1,78 @@ +testIamPermissions( + $project, + $resource, + $testPermissionsRequestResource, + $zone + ); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $project = '[PROJECT]'; + $resource = '[RESOURCE]'; + $zone = '[ZONE]'; + + test_iam_permissions_sample($project, $resource, $zone); +} +// [END compute_v1_generated_StoragePools_TestIamPermissions_sync] diff --git a/Compute/samples/V1/StoragePoolsClient/update.php b/Compute/samples/V1/StoragePoolsClient/update.php new file mode 100644 index 000000000000..0056fd9dac69 --- /dev/null +++ b/Compute/samples/V1/StoragePoolsClient/update.php @@ -0,0 +1,82 @@ +update($project, $storagePool, $storagePoolResource, $zone); + $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 +{ + $project = '[PROJECT]'; + $storagePool = '[STORAGE_POOL]'; + $zone = '[ZONE]'; + + update_sample($project, $storagePool, $zone); +} +// [END compute_v1_generated_StoragePools_Update_sync] diff --git a/Compute/src/V1/AggregatedListStoragePoolTypesRequest.php b/Compute/src/V1/AggregatedListStoragePoolTypesRequest.php new file mode 100644 index 000000000000..cfb46370197e --- /dev/null +++ b/Compute/src/V1/AggregatedListStoragePoolTypesRequest.php @@ -0,0 +1,388 @@ +google.cloud.compute.v1.AggregatedListStoragePoolTypesRequest + */ +class AggregatedListStoragePoolTypesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * + * Generated from protobuf field optional string filter = 336120696; + */ + private $filter = null; + /** + * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + * + * Generated from protobuf field optional bool include_all_scopes = 391327988; + */ + private $include_all_scopes = null; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * + * Generated from protobuf field optional uint32 max_results = 54715419; + */ + private $max_results = null; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * + * Generated from protobuf field optional string order_by = 160562920; + */ + private $order_by = null; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * + * Generated from protobuf field optional string page_token = 19994697; + */ + private $page_token = null; + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + */ + private $project = ''; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * + * Generated from protobuf field optional bool return_partial_success = 517198390; + */ + private $return_partial_success = null; + /** + * The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. + * + * Generated from protobuf field optional int64 service_project_number = 316757497; + */ + private $service_project_number = null; + + /** + * @param string $project Project ID for this request. + * + * @return \Google\Cloud\Compute\V1\AggregatedListStoragePoolTypesRequest + * + * @experimental + */ + public static function build(string $project): self + { + return (new self()) + ->setProject($project); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $filter + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * @type bool $include_all_scopes + * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + * @type int $max_results + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * @type string $order_by + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * @type string $page_token + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * @type string $project + * Project ID for this request. + * @type bool $return_partial_success + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * @type int|string $service_project_number + * The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * + * Generated from protobuf field optional string filter = 336120696; + * @return string + */ + public function getFilter() + { + return isset($this->filter) ? $this->filter : ''; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * + * Generated from protobuf field optional string filter = 336120696; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + * + * Generated from protobuf field optional bool include_all_scopes = 391327988; + * @return bool + */ + public function getIncludeAllScopes() + { + return isset($this->include_all_scopes) ? $this->include_all_scopes : false; + } + + public function hasIncludeAllScopes() + { + return isset($this->include_all_scopes); + } + + public function clearIncludeAllScopes() + { + unset($this->include_all_scopes); + } + + /** + * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + * + * Generated from protobuf field optional bool include_all_scopes = 391327988; + * @param bool $var + * @return $this + */ + public function setIncludeAllScopes($var) + { + GPBUtil::checkBool($var); + $this->include_all_scopes = $var; + + return $this; + } + + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * + * Generated from protobuf field optional uint32 max_results = 54715419; + * @return int + */ + public function getMaxResults() + { + return isset($this->max_results) ? $this->max_results : 0; + } + + public function hasMaxResults() + { + return isset($this->max_results); + } + + public function clearMaxResults() + { + unset($this->max_results); + } + + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * + * Generated from protobuf field optional uint32 max_results = 54715419; + * @param int $var + * @return $this + */ + public function setMaxResults($var) + { + GPBUtil::checkUint32($var); + $this->max_results = $var; + + return $this; + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * + * Generated from protobuf field optional string order_by = 160562920; + * @return string + */ + public function getOrderBy() + { + return isset($this->order_by) ? $this->order_by : ''; + } + + public function hasOrderBy() + { + return isset($this->order_by); + } + + public function clearOrderBy() + { + unset($this->order_by); + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * + * Generated from protobuf field optional string order_by = 160562920; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * + * Generated from protobuf field optional string page_token = 19994697; + * @return string + */ + public function getPageToken() + { + return isset($this->page_token) ? $this->page_token : ''; + } + + public function hasPageToken() + { + return isset($this->page_token); + } + + public function clearPageToken() + { + unset($this->page_token); + } + + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * + * Generated from protobuf field optional string page_token = 19994697; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * + * Generated from protobuf field optional bool return_partial_success = 517198390; + * @return bool + */ + public function getReturnPartialSuccess() + { + return isset($this->return_partial_success) ? $this->return_partial_success : false; + } + + public function hasReturnPartialSuccess() + { + return isset($this->return_partial_success); + } + + public function clearReturnPartialSuccess() + { + unset($this->return_partial_success); + } + + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * + * Generated from protobuf field optional bool return_partial_success = 517198390; + * @param bool $var + * @return $this + */ + public function setReturnPartialSuccess($var) + { + GPBUtil::checkBool($var); + $this->return_partial_success = $var; + + return $this; + } + + /** + * The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. + * + * Generated from protobuf field optional int64 service_project_number = 316757497; + * @return int|string + */ + public function getServiceProjectNumber() + { + return isset($this->service_project_number) ? $this->service_project_number : 0; + } + + public function hasServiceProjectNumber() + { + return isset($this->service_project_number); + } + + public function clearServiceProjectNumber() + { + unset($this->service_project_number); + } + + /** + * The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. + * + * Generated from protobuf field optional int64 service_project_number = 316757497; + * @param int|string $var + * @return $this + */ + public function setServiceProjectNumber($var) + { + GPBUtil::checkInt64($var); + $this->service_project_number = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/AggregatedListStoragePoolsRequest.php b/Compute/src/V1/AggregatedListStoragePoolsRequest.php new file mode 100644 index 000000000000..183ea6a70e60 --- /dev/null +++ b/Compute/src/V1/AggregatedListStoragePoolsRequest.php @@ -0,0 +1,388 @@ +google.cloud.compute.v1.AggregatedListStoragePoolsRequest + */ +class AggregatedListStoragePoolsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * + * Generated from protobuf field optional string filter = 336120696; + */ + private $filter = null; + /** + * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + * + * Generated from protobuf field optional bool include_all_scopes = 391327988; + */ + private $include_all_scopes = null; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * + * Generated from protobuf field optional uint32 max_results = 54715419; + */ + private $max_results = null; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * + * Generated from protobuf field optional string order_by = 160562920; + */ + private $order_by = null; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * + * Generated from protobuf field optional string page_token = 19994697; + */ + private $page_token = null; + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + */ + private $project = ''; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * + * Generated from protobuf field optional bool return_partial_success = 517198390; + */ + private $return_partial_success = null; + /** + * The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. + * + * Generated from protobuf field optional int64 service_project_number = 316757497; + */ + private $service_project_number = null; + + /** + * @param string $project Project ID for this request. + * + * @return \Google\Cloud\Compute\V1\AggregatedListStoragePoolsRequest + * + * @experimental + */ + public static function build(string $project): self + { + return (new self()) + ->setProject($project); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $filter + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * @type bool $include_all_scopes + * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + * @type int $max_results + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * @type string $order_by + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * @type string $page_token + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * @type string $project + * Project ID for this request. + * @type bool $return_partial_success + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * @type int|string $service_project_number + * The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * + * Generated from protobuf field optional string filter = 336120696; + * @return string + */ + public function getFilter() + { + return isset($this->filter) ? $this->filter : ''; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * + * Generated from protobuf field optional string filter = 336120696; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + * + * Generated from protobuf field optional bool include_all_scopes = 391327988; + * @return bool + */ + public function getIncludeAllScopes() + { + return isset($this->include_all_scopes) ? $this->include_all_scopes : false; + } + + public function hasIncludeAllScopes() + { + return isset($this->include_all_scopes); + } + + public function clearIncludeAllScopes() + { + unset($this->include_all_scopes); + } + + /** + * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + * + * Generated from protobuf field optional bool include_all_scopes = 391327988; + * @param bool $var + * @return $this + */ + public function setIncludeAllScopes($var) + { + GPBUtil::checkBool($var); + $this->include_all_scopes = $var; + + return $this; + } + + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * + * Generated from protobuf field optional uint32 max_results = 54715419; + * @return int + */ + public function getMaxResults() + { + return isset($this->max_results) ? $this->max_results : 0; + } + + public function hasMaxResults() + { + return isset($this->max_results); + } + + public function clearMaxResults() + { + unset($this->max_results); + } + + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * + * Generated from protobuf field optional uint32 max_results = 54715419; + * @param int $var + * @return $this + */ + public function setMaxResults($var) + { + GPBUtil::checkUint32($var); + $this->max_results = $var; + + return $this; + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * + * Generated from protobuf field optional string order_by = 160562920; + * @return string + */ + public function getOrderBy() + { + return isset($this->order_by) ? $this->order_by : ''; + } + + public function hasOrderBy() + { + return isset($this->order_by); + } + + public function clearOrderBy() + { + unset($this->order_by); + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * + * Generated from protobuf field optional string order_by = 160562920; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * + * Generated from protobuf field optional string page_token = 19994697; + * @return string + */ + public function getPageToken() + { + return isset($this->page_token) ? $this->page_token : ''; + } + + public function hasPageToken() + { + return isset($this->page_token); + } + + public function clearPageToken() + { + unset($this->page_token); + } + + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * + * Generated from protobuf field optional string page_token = 19994697; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * + * Generated from protobuf field optional bool return_partial_success = 517198390; + * @return bool + */ + public function getReturnPartialSuccess() + { + return isset($this->return_partial_success) ? $this->return_partial_success : false; + } + + public function hasReturnPartialSuccess() + { + return isset($this->return_partial_success); + } + + public function clearReturnPartialSuccess() + { + unset($this->return_partial_success); + } + + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * + * Generated from protobuf field optional bool return_partial_success = 517198390; + * @param bool $var + * @return $this + */ + public function setReturnPartialSuccess($var) + { + GPBUtil::checkBool($var); + $this->return_partial_success = $var; + + return $this; + } + + /** + * The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. + * + * Generated from protobuf field optional int64 service_project_number = 316757497; + * @return int|string + */ + public function getServiceProjectNumber() + { + return isset($this->service_project_number) ? $this->service_project_number : 0; + } + + public function hasServiceProjectNumber() + { + return isset($this->service_project_number); + } + + public function clearServiceProjectNumber() + { + unset($this->service_project_number); + } + + /** + * The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. + * + * Generated from protobuf field optional int64 service_project_number = 316757497; + * @param int|string $var + * @return $this + */ + public function setServiceProjectNumber($var) + { + GPBUtil::checkInt64($var); + $this->service_project_number = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/AllocationSpecificSKUReservation.php b/Compute/src/V1/AllocationSpecificSKUReservation.php index 1ba87c3161e2..2aa63edd9128 100644 --- a/Compute/src/V1/AllocationSpecificSKUReservation.php +++ b/Compute/src/V1/AllocationSpecificSKUReservation.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * This reservation type allows to pre allocate specific instance configuration. Next ID: 6 + * This reservation type allows to pre allocate specific instance configuration. * * Generated from protobuf message google.cloud.compute.v1.AllocationSpecificSKUReservation */ diff --git a/Compute/src/V1/AttachedDiskInitializeParams.php b/Compute/src/V1/AttachedDiskInitializeParams.php index f2cdffce7c0b..ebe91f0c690f 100644 --- a/Compute/src/V1/AttachedDiskInitializeParams.php +++ b/Compute/src/V1/AttachedDiskInitializeParams.php @@ -125,6 +125,12 @@ class AttachedDiskInitializeParams extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional .google.cloud.compute.v1.CustomerEncryptionKey source_snapshot_encryption_key = 303679322; */ private $source_snapshot_encryption_key = null; + /** + * The storage pool in which the new disk is created. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /storagePools/storagePool - projects/project/zones/zone/storagePools/storagePool - zones/zone/storagePools/storagePool + * + * Generated from protobuf field optional string storage_pool = 360473440; + */ + private $storage_pool = null; /** * Constructor. @@ -170,6 +176,8 @@ class AttachedDiskInitializeParams extends \Google\Protobuf\Internal\Message * The source snapshot to create this disk. When creating a new instance, one of initializeParams.sourceSnapshot or initializeParams.sourceImage or disks.source is required except for local SSD. To create a disk with a snapshot that you created, specify the snapshot name in the following format: global/snapshots/my-backup If the source snapshot is deleted later, this field will not be set. * @type \Google\Cloud\Compute\V1\CustomerEncryptionKey $source_snapshot_encryption_key * The customer-supplied encryption key of the source snapshot. + * @type string $storage_pool + * The storage pool in which the new disk is created. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /storagePools/storagePool - projects/project/zones/zone/storagePools/storagePool - zones/zone/storagePools/storagePool * } */ public function __construct($data = NULL) { @@ -779,5 +787,41 @@ public function setSourceSnapshotEncryptionKey($var) return $this; } + /** + * The storage pool in which the new disk is created. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /storagePools/storagePool - projects/project/zones/zone/storagePools/storagePool - zones/zone/storagePools/storagePool + * + * Generated from protobuf field optional string storage_pool = 360473440; + * @return string + */ + public function getStoragePool() + { + return isset($this->storage_pool) ? $this->storage_pool : ''; + } + + public function hasStoragePool() + { + return isset($this->storage_pool); + } + + public function clearStoragePool() + { + unset($this->storage_pool); + } + + /** + * The storage pool in which the new disk is created. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /storagePools/storagePool - projects/project/zones/zone/storagePools/storagePool - zones/zone/storagePools/storagePool + * + * Generated from protobuf field optional string storage_pool = 360473440; + * @param string $var + * @return $this + */ + public function setStoragePool($var) + { + GPBUtil::checkString($var, True); + $this->storage_pool = $var; + + return $this; + } + } diff --git a/Compute/src/V1/CancelInstanceGroupManagerResizeRequestRequest.php b/Compute/src/V1/CancelInstanceGroupManagerResizeRequestRequest.php new file mode 100644 index 000000000000..9ca95fd4f7cd --- /dev/null +++ b/Compute/src/V1/CancelInstanceGroupManagerResizeRequestRequest.php @@ -0,0 +1,232 @@ +google.cloud.compute.v1.CancelInstanceGroupManagerResizeRequestRequest + */ +class CancelInstanceGroupManagerResizeRequestRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the managed instance group. The name should conform to RFC1035 or be a resource ID. + * + * Generated from protobuf field string instance_group_manager = 249363395 [(.google.api.field_behavior) = REQUIRED]; + */ + private $instance_group_manager = ''; + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + */ + private $project = ''; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field optional string request_id = 37109963; + */ + private $request_id = null; + /** + * The name of the resize request to cancel. The name should conform to RFC1035 or be a resource ID. + * + * Generated from protobuf field string resize_request = 216941060 [(.google.api.field_behavior) = REQUIRED]; + */ + private $resize_request = ''; + /** + * The name of the zone where the managed instance group is located. The name should conform to RFC1035. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + */ + private $zone = ''; + + /** + * @param string $project Project ID for this request. + * @param string $zone The name of the zone where the managed instance group is located. The name should conform to RFC1035. + * @param string $instanceGroupManager The name of the managed instance group. The name should conform to RFC1035 or be a resource ID. + * @param string $resizeRequest The name of the resize request to cancel. The name should conform to RFC1035 or be a resource ID. + * + * @return \Google\Cloud\Compute\V1\CancelInstanceGroupManagerResizeRequestRequest + * + * @experimental + */ + public static function build(string $project, string $zone, string $instanceGroupManager, string $resizeRequest): self + { + return (new self()) + ->setProject($project) + ->setZone($zone) + ->setInstanceGroupManager($instanceGroupManager) + ->setResizeRequest($resizeRequest); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance_group_manager + * The name of the managed instance group. The name should conform to RFC1035 or be a resource ID. + * @type string $project + * Project ID for this request. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * @type string $resize_request + * The name of the resize request to cancel. The name should conform to RFC1035 or be a resource ID. + * @type string $zone + * The name of the zone where the managed instance group is located. The name should conform to RFC1035. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * The name of the managed instance group. The name should conform to RFC1035 or be a resource ID. + * + * Generated from protobuf field string instance_group_manager = 249363395 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstanceGroupManager() + { + return $this->instance_group_manager; + } + + /** + * The name of the managed instance group. The name should conform to RFC1035 or be a resource ID. + * + * Generated from protobuf field string instance_group_manager = 249363395 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstanceGroupManager($var) + { + GPBUtil::checkString($var, True); + $this->instance_group_manager = $var; + + return $this; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field optional string request_id = 37109963; + * @return string + */ + public function getRequestId() + { + return isset($this->request_id) ? $this->request_id : ''; + } + + public function hasRequestId() + { + return isset($this->request_id); + } + + public function clearRequestId() + { + unset($this->request_id); + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field optional string request_id = 37109963; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * The name of the resize request to cancel. The name should conform to RFC1035 or be a resource ID. + * + * Generated from protobuf field string resize_request = 216941060 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getResizeRequest() + { + return $this->resize_request; + } + + /** + * The name of the resize request to cancel. The name should conform to RFC1035 or be a resource ID. + * + * Generated from protobuf field string resize_request = 216941060 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setResizeRequest($var) + { + GPBUtil::checkString($var, True); + $this->resize_request = $var; + + return $this; + } + + /** + * The name of the zone where the managed instance group is located. The name should conform to RFC1035. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The name of the zone where the managed instance group is located. The name should conform to RFC1035. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/Client/InstanceGroupManagerResizeRequestsClient.php b/Compute/src/V1/Client/InstanceGroupManagerResizeRequestsClient.php new file mode 100644 index 000000000000..a5bb6788c7ce --- /dev/null +++ b/Compute/src/V1/Client/InstanceGroupManagerResizeRequestsClient.php @@ -0,0 +1,363 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/instance_group_manager_resize_requests_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/instance_group_manager_resize_requests_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/instance_group_manager_resize_requests_rest_client_config.php', + ], + ], + 'operationsClientClass' => ZoneOperationsClient::class, + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return [ + 'rest', + ]; + } + + /** + * Return an ZoneOperationsClient object with the same endpoint as $this. + * + * @return ZoneOperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** Return the default longrunning operation descriptor config. */ + private function getDefaultOperationDescriptor() + { + return [ + 'additionalArgumentMethods' => [ + 'getProject', + 'getZone', + ], + 'getOperationMethod' => 'get', + 'cancelOperationMethod' => null, + 'deleteOperationMethod' => 'delete', + 'operationErrorCodeMethod' => 'getHttpErrorStatusCode', + 'operationErrorMessageMethod' => 'getHttpErrorMessage', + 'operationNameMethod' => 'getName', + 'operationStatusMethod' => 'getStatus', + 'operationStatusDoneValue' => \Google\Cloud\Compute\V1\Operation\Status::DONE, + ]; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : $this->getDefaultOperationDescriptor(); + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'compute.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `rest`. *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Cancels the specified resize request and removes it from the queue. Cancelled resize request does no longer wait for the resources to be provisioned. Cancel is only possible for requests that are accepted in the queue. + * + * The async variant is + * {@see InstanceGroupManagerResizeRequestsClient::cancelAsync()} . + * + * @param CancelInstanceGroupManagerResizeRequestRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function cancel(CancelInstanceGroupManagerResizeRequestRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('Cancel', $request, $callOptions)->wait(); + } + + /** + * Deletes the specified, inactive resize request. Requests that are still active cannot be deleted. Deleting request does not delete instances that were provisioned previously. + * + * The async variant is + * {@see InstanceGroupManagerResizeRequestsClient::deleteAsync()} . + * + * @param DeleteInstanceGroupManagerResizeRequestRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function delete(DeleteInstanceGroupManagerResizeRequestRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('Delete', $request, $callOptions)->wait(); + } + + /** + * Returns all of the details about the specified resize request. + * + * The async variant is {@see InstanceGroupManagerResizeRequestsClient::getAsync()} + * . + * + * @param GetInstanceGroupManagerResizeRequestRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return InstanceGroupManagerResizeRequest + * + * @throws ApiException Thrown if the API call fails. + */ + public function get(GetInstanceGroupManagerResizeRequestRequest $request, array $callOptions = []): InstanceGroupManagerResizeRequest + { + return $this->startApiCall('Get', $request, $callOptions)->wait(); + } + + /** + * Creates a new resize request that starts provisioning VMs immediately or queues VM creation. + * + * The async variant is + * {@see InstanceGroupManagerResizeRequestsClient::insertAsync()} . + * + * @param InsertInstanceGroupManagerResizeRequestRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function insert(InsertInstanceGroupManagerResizeRequestRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('Insert', $request, $callOptions)->wait(); + } + + /** + * Retrieves a list of resize requests that are contained in the managed instance group. + * + * The async variant is + * {@see InstanceGroupManagerResizeRequestsClient::listAsync()} . + * + * @param ListInstanceGroupManagerResizeRequestsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 list(ListInstanceGroupManagerResizeRequestsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('List', $request, $callOptions); + } +} diff --git a/Compute/src/V1/Client/InstanceSettingsServiceClient.php b/Compute/src/V1/Client/InstanceSettingsServiceClient.php new file mode 100644 index 000000000000..57b78ebc80e5 --- /dev/null +++ b/Compute/src/V1/Client/InstanceSettingsServiceClient.php @@ -0,0 +1,279 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/instance_settings_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/instance_settings_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/instance_settings_service_rest_client_config.php', + ], + ], + 'operationsClientClass' => ZoneOperationsClient::class, + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return [ + 'rest', + ]; + } + + /** + * Return an ZoneOperationsClient object with the same endpoint as $this. + * + * @return ZoneOperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** Return the default longrunning operation descriptor config. */ + private function getDefaultOperationDescriptor() + { + return [ + 'additionalArgumentMethods' => [ + 'getProject', + 'getZone', + ], + 'getOperationMethod' => 'get', + 'cancelOperationMethod' => null, + 'deleteOperationMethod' => 'delete', + 'operationErrorCodeMethod' => 'getHttpErrorStatusCode', + 'operationErrorMessageMethod' => 'getHttpErrorMessage', + 'operationNameMethod' => 'getName', + 'operationStatusMethod' => 'getStatus', + 'operationStatusDoneValue' => \Google\Cloud\Compute\V1\Operation\Status::DONE, + ]; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : $this->getDefaultOperationDescriptor(); + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'compute.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `rest`. *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Get Instance settings. + * + * The async variant is {@see InstanceSettingsServiceClient::getAsync()} . + * + * @param GetInstanceSettingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return InstanceSettings + * + * @throws ApiException Thrown if the API call fails. + */ + public function get(GetInstanceSettingRequest $request, array $callOptions = []): InstanceSettings + { + return $this->startApiCall('Get', $request, $callOptions)->wait(); + } + + /** + * Patch Instance settings + * + * The async variant is {@see InstanceSettingsServiceClient::patchAsync()} . + * + * @param PatchInstanceSettingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function patch(PatchInstanceSettingRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('Patch', $request, $callOptions)->wait(); + } +} diff --git a/Compute/src/V1/Client/NodeGroupsClient.php b/Compute/src/V1/Client/NodeGroupsClient.php index f715a6778eff..1e40c4c59cd5 100644 --- a/Compute/src/V1/Client/NodeGroupsClient.php +++ b/Compute/src/V1/Client/NodeGroupsClient.php @@ -44,6 +44,7 @@ use Google\Cloud\Compute\V1\ListNodesNodeGroupsRequest; use Google\Cloud\Compute\V1\NodeGroup; use Google\Cloud\Compute\V1\PatchNodeGroupRequest; +use Google\Cloud\Compute\V1\PerformMaintenanceNodeGroupRequest; use Google\Cloud\Compute\V1\Policy; use Google\Cloud\Compute\V1\SetIamPolicyNodeGroupRequest; use Google\Cloud\Compute\V1\SetNodeTemplateNodeGroupRequest; @@ -69,6 +70,7 @@ * @method PromiseInterface listAsync(ListNodeGroupsRequest $request, array $optionalArgs = []) * @method PromiseInterface listNodesAsync(ListNodesNodeGroupsRequest $request, array $optionalArgs = []) * @method PromiseInterface patchAsync(PatchNodeGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface performMaintenanceAsync(PerformMaintenanceNodeGroupRequest $request, array $optionalArgs = []) * @method PromiseInterface setIamPolicyAsync(SetIamPolicyNodeGroupRequest $request, array $optionalArgs = []) * @method PromiseInterface setNodeTemplateAsync(SetNodeTemplateNodeGroupRequest $request, array $optionalArgs = []) * @method PromiseInterface simulateMaintenanceEventAsync(SimulateMaintenanceEventNodeGroupRequest $request, array $optionalArgs = []) @@ -496,6 +498,30 @@ public function patch(PatchNodeGroupRequest $request, array $callOptions = []): return $this->startApiCall('Patch', $request, $callOptions)->wait(); } + /** + * Perform maintenance on a subset of nodes in the node group. + * + * The async variant is {@see NodeGroupsClient::performMaintenanceAsync()} . + * + * @param PerformMaintenanceNodeGroupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function performMaintenance(PerformMaintenanceNodeGroupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('PerformMaintenance', $request, $callOptions)->wait(); + } + /** * Sets the access control policy on the specified resource. Replaces any existing policy. * diff --git a/Compute/src/V1/Client/StoragePoolTypesClient.php b/Compute/src/V1/Client/StoragePoolTypesClient.php new file mode 100644 index 000000000000..cb07eaaf1f6e --- /dev/null +++ b/Compute/src/V1/Client/StoragePoolTypesClient.php @@ -0,0 +1,253 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/storage_pool_types_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/storage_pool_types_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/storage_pool_types_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return [ + 'rest', + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'compute.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `rest`. *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Retrieves an aggregated list of storage pool types. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`. + * + * The async variant is {@see StoragePoolTypesClient::aggregatedListAsync()} . + * + * @param AggregatedListStoragePoolTypesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 aggregatedList(AggregatedListStoragePoolTypesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('AggregatedList', $request, $callOptions); + } + + /** + * Returns the specified storage pool type. + * + * The async variant is {@see StoragePoolTypesClient::getAsync()} . + * + * @param GetStoragePoolTypeRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return StoragePoolType + * + * @throws ApiException Thrown if the API call fails. + */ + public function get(GetStoragePoolTypeRequest $request, array $callOptions = []): StoragePoolType + { + return $this->startApiCall('Get', $request, $callOptions)->wait(); + } + + /** + * Retrieves a list of storage pool types available to the specified project. + * + * The async variant is {@see StoragePoolTypesClient::listAsync()} . + * + * @param ListStoragePoolTypesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 list(ListStoragePoolTypesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('List', $request, $callOptions); + } +} diff --git a/Compute/src/V1/Client/StoragePoolsClient.php b/Compute/src/V1/Client/StoragePoolsClient.php new file mode 100644 index 000000000000..735007a9e3c6 --- /dev/null +++ b/Compute/src/V1/Client/StoragePoolsClient.php @@ -0,0 +1,492 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/storage_pools_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/storage_pools_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/storage_pools_rest_client_config.php', + ], + ], + 'operationsClientClass' => ZoneOperationsClient::class, + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements ClientOptionsTrait::supportedTransports. */ + private static function supportedTransports() + { + return [ + 'rest', + ]; + } + + /** + * Return an ZoneOperationsClient object with the same endpoint as $this. + * + * @return ZoneOperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** Return the default longrunning operation descriptor config. */ + private function getDefaultOperationDescriptor() + { + return [ + 'additionalArgumentMethods' => [ + 'getProject', + 'getZone', + ], + 'getOperationMethod' => 'get', + 'cancelOperationMethod' => null, + 'deleteOperationMethod' => 'delete', + 'operationErrorCodeMethod' => 'getHttpErrorStatusCode', + 'operationErrorMessageMethod' => 'getHttpErrorMessage', + 'operationNameMethod' => 'getName', + 'operationStatusMethod' => 'getStatus', + 'operationStatusDoneValue' => \Google\Cloud\Compute\V1\Operation\Status::DONE, + ]; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : $this->getDefaultOperationDescriptor(); + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'compute.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `rest`. *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Retrieves an aggregated list of storage pools. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`. + * + * The async variant is {@see StoragePoolsClient::aggregatedListAsync()} . + * + * @param AggregatedListStoragePoolsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 aggregatedList(AggregatedListStoragePoolsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('AggregatedList', $request, $callOptions); + } + + /** + * Deletes the specified storage pool. Deleting a storagePool removes its data permanently and is irreversible. However, deleting a storagePool does not delete any snapshots previously made from the storagePool. You must separately delete snapshots. + * + * The async variant is {@see StoragePoolsClient::deleteAsync()} . + * + * @param DeleteStoragePoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function delete(DeleteStoragePoolRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('Delete', $request, $callOptions)->wait(); + } + + /** + * Returns a specified storage pool. Gets a list of available storage pools by making a list() request. + * + * The async variant is {@see StoragePoolsClient::getAsync()} . + * + * @param GetStoragePoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return StoragePool + * + * @throws ApiException Thrown if the API call fails. + */ + public function get(GetStoragePoolRequest $request, array $callOptions = []): StoragePool + { + return $this->startApiCall('Get', $request, $callOptions)->wait(); + } + + /** + * Gets the access control policy for a resource. May be empty if no such policy or resource exists. + * + * The async variant is {@see StoragePoolsClient::getIamPolicyAsync()} . + * + * @param GetIamPolicyStoragePoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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(GetIamPolicyStoragePoolRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Creates a storage pool in the specified project using the data in the request. + * + * The async variant is {@see StoragePoolsClient::insertAsync()} . + * + * @param InsertStoragePoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function insert(InsertStoragePoolRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('Insert', $request, $callOptions)->wait(); + } + + /** + * Retrieves a list of storage pools contained within the specified zone. + * + * The async variant is {@see StoragePoolsClient::listAsync()} . + * + * @param ListStoragePoolsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return StoragePoolList + * + * @throws ApiException Thrown if the API call fails. + */ + public function list(ListStoragePoolsRequest $request, array $callOptions = []): StoragePoolList + { + return $this->startApiCall('List', $request, $callOptions)->wait(); + } + + /** + * Lists the disks in a specified storage pool. + * + * The async variant is {@see StoragePoolsClient::listDisksAsync()} . + * + * @param ListDisksStoragePoolsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return StoragePoolListDisks + * + * @throws ApiException Thrown if the API call fails. + */ + public function listDisks(ListDisksStoragePoolsRequest $request, array $callOptions = []): StoragePoolListDisks + { + return $this->startApiCall('ListDisks', $request, $callOptions)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces any existing policy. + * + * The async variant is {@see StoragePoolsClient::setIamPolicyAsync()} . + * + * @param SetIamPolicyStoragePoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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(SetIamPolicyStoragePoolRequest $request, array $callOptions = []): Policy + { + return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. + * + * The async variant is {@see StoragePoolsClient::testIamPermissionsAsync()} . + * + * @param TestIamPermissionsStoragePoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TestPermissionsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function testIamPermissions(TestIamPermissionsStoragePoolRequest $request, array $callOptions = []): TestPermissionsResponse + { + return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); + } + + /** + * Updates the specified storagePool with the data included in the request. The update is performed only on selected fields included as part of update-mask. Only the following fields can be modified: size_tb and provisioned_iops. + * + * The async variant is {@see StoragePoolsClient::updateAsync()} . + * + * @param UpdateStoragePoolRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function update(UpdateStoragePoolRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('Update', $request, $callOptions)->wait(); + } +} diff --git a/Compute/src/V1/Commitment/Type.php b/Compute/src/V1/Commitment/Type.php index 08ae27825c76..622892c7f02e 100644 --- a/Compute/src/V1/Commitment/Type.php +++ b/Compute/src/V1/Commitment/Type.php @@ -63,6 +63,10 @@ class Type * Generated from protobuf enum GENERAL_PURPOSE_N2D = 232471400; */ const GENERAL_PURPOSE_N2D = 232471400; + /** + * Generated from protobuf enum GENERAL_PURPOSE_N4 = 301912158; + */ + const GENERAL_PURPOSE_N4 = 301912158; /** * Generated from protobuf enum GENERAL_PURPOSE_T2D = 232477166; */ @@ -101,6 +105,7 @@ class Type self::GENERAL_PURPOSE_E2 => 'GENERAL_PURPOSE_E2', self::GENERAL_PURPOSE_N2 => 'GENERAL_PURPOSE_N2', self::GENERAL_PURPOSE_N2D => 'GENERAL_PURPOSE_N2D', + self::GENERAL_PURPOSE_N4 => 'GENERAL_PURPOSE_N4', self::GENERAL_PURPOSE_T2D => 'GENERAL_PURPOSE_T2D', self::GRAPHICS_OPTIMIZED => 'GRAPHICS_OPTIMIZED', self::MEMORY_OPTIMIZED => 'MEMORY_OPTIMIZED', diff --git a/Compute/src/V1/CorsPolicy.php b/Compute/src/V1/CorsPolicy.php index 3835f5f72c6e..ce35bedbf30f 100644 --- a/Compute/src/V1/CorsPolicy.php +++ b/Compute/src/V1/CorsPolicy.php @@ -34,7 +34,7 @@ class CorsPolicy extends \Google\Protobuf\Internal\Message */ private $allow_methods; /** - * Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. + * Specifies a regular expression that matches allowed origins. For more information, see regular expression syntax . An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. * * Generated from protobuf field repeated string allow_origin_regexes = 215385810; */ @@ -46,7 +46,7 @@ class CorsPolicy extends \Google\Protobuf\Internal\Message */ private $allow_origins; /** - * If true, the setting specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect. + * If true, disables the CORS policy. The default value is false, which indicates that the CORS policy is in effect. * * Generated from protobuf field optional bool disabled = 270940796; */ @@ -77,11 +77,11 @@ class CorsPolicy extends \Google\Protobuf\Internal\Message * @type array|\Google\Protobuf\Internal\RepeatedField $allow_methods * Specifies the content for the Access-Control-Allow-Methods header. * @type array|\Google\Protobuf\Internal\RepeatedField $allow_origin_regexes - * Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. + * Specifies a regular expression that matches allowed origins. For more information, see regular expression syntax . An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. * @type array|\Google\Protobuf\Internal\RepeatedField $allow_origins * Specifies the list of origins that is allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. * @type bool $disabled - * If true, the setting specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect. + * If true, disables the CORS policy. The default value is false, which indicates that the CORS policy is in effect. * @type array|\Google\Protobuf\Internal\RepeatedField $expose_headers * Specifies the content for the Access-Control-Expose-Headers header. * @type int $max_age @@ -182,7 +182,7 @@ public function setAllowMethods($var) } /** - * Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. + * Specifies a regular expression that matches allowed origins. For more information, see regular expression syntax . An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. * * Generated from protobuf field repeated string allow_origin_regexes = 215385810; * @return \Google\Protobuf\Internal\RepeatedField @@ -193,7 +193,7 @@ public function getAllowOriginRegexes() } /** - * Specifies a regular expression that matches allowed origins. For more information about the regular expression syntax, see Syntax. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. + * Specifies a regular expression that matches allowed origins. For more information, see regular expression syntax . An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. Regular expressions can only be used when the loadBalancingScheme is set to INTERNAL_SELF_MANAGED. * * Generated from protobuf field repeated string allow_origin_regexes = 215385810; * @param array|\Google\Protobuf\Internal\RepeatedField $var @@ -234,7 +234,7 @@ public function setAllowOrigins($var) } /** - * If true, the setting specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect. + * If true, disables the CORS policy. The default value is false, which indicates that the CORS policy is in effect. * * Generated from protobuf field optional bool disabled = 270940796; * @return bool @@ -255,7 +255,7 @@ public function clearDisabled() } /** - * If true, the setting specifies the CORS policy is disabled. The default value of false, which indicates that the CORS policy is in effect. + * If true, disables the CORS policy. The default value is false, which indicates that the CORS policy is in effect. * * Generated from protobuf field optional bool disabled = 270940796; * @param bool $var diff --git a/Compute/src/V1/DeleteInstanceGroupManagerResizeRequestRequest.php b/Compute/src/V1/DeleteInstanceGroupManagerResizeRequestRequest.php new file mode 100644 index 000000000000..91e7c2604594 --- /dev/null +++ b/Compute/src/V1/DeleteInstanceGroupManagerResizeRequestRequest.php @@ -0,0 +1,232 @@ +google.cloud.compute.v1.DeleteInstanceGroupManagerResizeRequestRequest + */ +class DeleteInstanceGroupManagerResizeRequestRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the managed instance group. The name should conform to RFC1035 or be a resource ID. + * + * Generated from protobuf field string instance_group_manager = 249363395 [(.google.api.field_behavior) = REQUIRED]; + */ + private $instance_group_manager = ''; + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + */ + private $project = ''; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field optional string request_id = 37109963; + */ + private $request_id = null; + /** + * The name of the resize request to delete. The name should conform to RFC1035 or be a resource ID. + * + * Generated from protobuf field string resize_request = 216941060 [(.google.api.field_behavior) = REQUIRED]; + */ + private $resize_request = ''; + /** + * The name of the zone where the managed instance group is located. The name should conform to RFC1035. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + */ + private $zone = ''; + + /** + * @param string $project Project ID for this request. + * @param string $zone The name of the zone where the managed instance group is located. The name should conform to RFC1035. + * @param string $instanceGroupManager The name of the managed instance group. The name should conform to RFC1035 or be a resource ID. + * @param string $resizeRequest The name of the resize request to delete. The name should conform to RFC1035 or be a resource ID. + * + * @return \Google\Cloud\Compute\V1\DeleteInstanceGroupManagerResizeRequestRequest + * + * @experimental + */ + public static function build(string $project, string $zone, string $instanceGroupManager, string $resizeRequest): self + { + return (new self()) + ->setProject($project) + ->setZone($zone) + ->setInstanceGroupManager($instanceGroupManager) + ->setResizeRequest($resizeRequest); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance_group_manager + * The name of the managed instance group. The name should conform to RFC1035 or be a resource ID. + * @type string $project + * Project ID for this request. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * @type string $resize_request + * The name of the resize request to delete. The name should conform to RFC1035 or be a resource ID. + * @type string $zone + * The name of the zone where the managed instance group is located. The name should conform to RFC1035. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * The name of the managed instance group. The name should conform to RFC1035 or be a resource ID. + * + * Generated from protobuf field string instance_group_manager = 249363395 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstanceGroupManager() + { + return $this->instance_group_manager; + } + + /** + * The name of the managed instance group. The name should conform to RFC1035 or be a resource ID. + * + * Generated from protobuf field string instance_group_manager = 249363395 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstanceGroupManager($var) + { + GPBUtil::checkString($var, True); + $this->instance_group_manager = $var; + + return $this; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field optional string request_id = 37109963; + * @return string + */ + public function getRequestId() + { + return isset($this->request_id) ? $this->request_id : ''; + } + + public function hasRequestId() + { + return isset($this->request_id); + } + + public function clearRequestId() + { + unset($this->request_id); + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field optional string request_id = 37109963; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * The name of the resize request to delete. The name should conform to RFC1035 or be a resource ID. + * + * Generated from protobuf field string resize_request = 216941060 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getResizeRequest() + { + return $this->resize_request; + } + + /** + * The name of the resize request to delete. The name should conform to RFC1035 or be a resource ID. + * + * Generated from protobuf field string resize_request = 216941060 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setResizeRequest($var) + { + GPBUtil::checkString($var, True); + $this->resize_request = $var; + + return $this; + } + + /** + * The name of the zone where the managed instance group is located. The name should conform to RFC1035. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The name of the zone where the managed instance group is located. The name should conform to RFC1035. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/DeleteStoragePoolRequest.php b/Compute/src/V1/DeleteStoragePoolRequest.php new file mode 100644 index 000000000000..159aae37c794 --- /dev/null +++ b/Compute/src/V1/DeleteStoragePoolRequest.php @@ -0,0 +1,196 @@ +google.cloud.compute.v1.DeleteStoragePoolRequest + */ +class DeleteStoragePoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + */ + private $project = ''; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field optional string request_id = 37109963; + */ + private $request_id = null; + /** + * Name of the storage pool to delete. + * + * Generated from protobuf field string storage_pool = 360473440 [(.google.api.field_behavior) = REQUIRED]; + */ + private $storage_pool = ''; + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + */ + private $zone = ''; + + /** + * @param string $project Project ID for this request. + * @param string $zone The name of the zone for this request. + * @param string $storagePool Name of the storage pool to delete. + * + * @return \Google\Cloud\Compute\V1\DeleteStoragePoolRequest + * + * @experimental + */ + public static function build(string $project, string $zone, string $storagePool): self + { + return (new self()) + ->setProject($project) + ->setZone($zone) + ->setStoragePool($storagePool); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project + * Project ID for this request. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * @type string $storage_pool + * Name of the storage pool to delete. + * @type string $zone + * The name of the zone for this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field optional string request_id = 37109963; + * @return string + */ + public function getRequestId() + { + return isset($this->request_id) ? $this->request_id : ''; + } + + public function hasRequestId() + { + return isset($this->request_id); + } + + public function clearRequestId() + { + unset($this->request_id); + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field optional string request_id = 37109963; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Name of the storage pool to delete. + * + * Generated from protobuf field string storage_pool = 360473440 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getStoragePool() + { + return $this->storage_pool; + } + + /** + * Name of the storage pool to delete. + * + * Generated from protobuf field string storage_pool = 360473440 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setStoragePool($var) + { + GPBUtil::checkString($var, True); + $this->storage_pool = $var; + + return $this; + } + + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/Disk.php b/Compute/src/V1/Disk.php index c96c02e67c20..4b604a559bc3 100644 --- a/Compute/src/V1/Disk.php +++ b/Compute/src/V1/Disk.php @@ -287,6 +287,12 @@ class Disk extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional string status = 181260274; */ private $status = null; + /** + * The storage pool in which the new disk is created. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /storagePools/storagePool - projects/project/zones/zone/storagePools/storagePool - zones/zone/storagePools/storagePool + * + * Generated from protobuf field optional string storage_pool = 360473440; + */ + private $storage_pool = null; /** * URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. For example: projects/project /zones/zone/diskTypes/pd-ssd . See Persistent disk types. * @@ -404,6 +410,8 @@ class Disk extends \Google\Protobuf\Internal\Message * @type string $status * [Output Only] The status of disk creation. - CREATING: Disk is provisioning. - RESTORING: Source data is being copied into the disk. - FAILED: Disk creation failed. - READY: Disk is ready for use. - DELETING: Disk is deleting. * Check the Status enum for the list of possible values. + * @type string $storage_pool + * The storage pool in which the new disk is created. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /storagePools/storagePool - projects/project/zones/zone/storagePools/storagePool - zones/zone/storagePools/storagePool * @type string $type * URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. For example: projects/project /zones/zone/diskTypes/pd-ssd . See Persistent disk types. * @type array|\Google\Protobuf\Internal\RepeatedField $users @@ -1971,6 +1979,42 @@ public function setStatus($var) return $this; } + /** + * The storage pool in which the new disk is created. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /storagePools/storagePool - projects/project/zones/zone/storagePools/storagePool - zones/zone/storagePools/storagePool + * + * Generated from protobuf field optional string storage_pool = 360473440; + * @return string + */ + public function getStoragePool() + { + return isset($this->storage_pool) ? $this->storage_pool : ''; + } + + public function hasStoragePool() + { + return isset($this->storage_pool); + } + + public function clearStoragePool() + { + unset($this->storage_pool); + } + + /** + * The storage pool in which the new disk is created. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /storagePools/storagePool - projects/project/zones/zone/storagePools/storagePool - zones/zone/storagePools/storagePool + * + * Generated from protobuf field optional string storage_pool = 360473440; + * @param string $var + * @return $this + */ + public function setStoragePool($var) + { + GPBUtil::checkString($var, True); + $this->storage_pool = $var; + + return $this; + } + /** * URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. For example: projects/project /zones/zone/diskTypes/pd-ssd . See Persistent disk types. * diff --git a/Compute/src/V1/Disk/Status.php b/Compute/src/V1/Disk/Status.php index d29234e8967a..fa8cc676520d 100644 --- a/Compute/src/V1/Disk/Status.php +++ b/Compute/src/V1/Disk/Status.php @@ -49,6 +49,12 @@ class Status * Generated from protobuf enum RESTORING = 404263851; */ const RESTORING = 404263851; + /** + * Disk is currently unavailable and cannot be accessed, attached or detached. + * + * Generated from protobuf enum UNAVAILABLE = 413756464; + */ + const UNAVAILABLE = 413756464; private static $valueToName = [ self::UNDEFINED_STATUS => 'UNDEFINED_STATUS', @@ -57,6 +63,7 @@ class Status self::FAILED => 'FAILED', self::READY => 'READY', self::RESTORING => 'RESTORING', + self::UNAVAILABLE => 'UNAVAILABLE', ]; public static function name($value) diff --git a/Compute/src/V1/Enums/Commitment/Type.php b/Compute/src/V1/Enums/Commitment/Type.php index e2f7061528ae..fc7ba84f86e5 100644 --- a/Compute/src/V1/Enums/Commitment/Type.php +++ b/Compute/src/V1/Enums/Commitment/Type.php @@ -54,6 +54,8 @@ class Type const GENERAL_PURPOSE_N2D = 'GENERAL_PURPOSE_N2D'; + const GENERAL_PURPOSE_N4 = 'GENERAL_PURPOSE_N4'; + const GENERAL_PURPOSE_T2D = 'GENERAL_PURPOSE_T2D'; const GRAPHICS_OPTIMIZED = 'GRAPHICS_OPTIMIZED'; diff --git a/Compute/src/V1/Enums/Disk/Status.php b/Compute/src/V1/Enums/Disk/Status.php index 58a2e59b809d..4842c50c4ae4 100644 --- a/Compute/src/V1/Enums/Disk/Status.php +++ b/Compute/src/V1/Enums/Disk/Status.php @@ -41,4 +41,6 @@ class Status const READY = 'READY'; const RESTORING = 'RESTORING'; + + const UNAVAILABLE = 'UNAVAILABLE'; } diff --git a/Compute/src/V1/Enums/InstanceGroupManagerResizeRequest/State.php b/Compute/src/V1/Enums/InstanceGroupManagerResizeRequest/State.php new file mode 100644 index 000000000000..03182434d8ea --- /dev/null +++ b/Compute/src/V1/Enums/InstanceGroupManagerResizeRequest/State.php @@ -0,0 +1,46 @@ +google.cloud.compute.v1.Error */ diff --git a/Compute/src/V1/ErrorInfo.php b/Compute/src/V1/ErrorInfo.php index a8d5a9f8a748..1b9cb075de9f 100644 --- a/Compute/src/V1/ErrorInfo.php +++ b/Compute/src/V1/ErrorInfo.php @@ -22,7 +22,7 @@ class ErrorInfo extends \Google\Protobuf\Internal\Message */ private $domain = null; /** - * Additional structured details about this error. Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in length. When identifying the current value of an exceeded limit, the units should be contained in the key, not the value. For example, rather than {"instanceLimit": "100/request"}, should be returned as, {"instanceLimitPerRequest": "100"}, if the client exceeds the number of instances that can be created in a single (batch) request. + * Additional structured details about this error. Keys must match /a-z+/ but should ideally be lowerCamelCase. Also they must be limited to 64 characters in length. When identifying the current value of an exceeded limit, the units should be contained in the key, not the value. For example, rather than {"instanceLimit": "100/request"}, should be returned as, {"instanceLimitPerRequest": "100"}, if the client exceeds the number of instances that can be created in a single (batch) request. * * Generated from protobuf field map metadatas = 8514340; */ @@ -43,7 +43,7 @@ class ErrorInfo extends \Google\Protobuf\Internal\Message * @type string $domain * The logical grouping to which the "reason" belongs. The error domain is typically the registered service name of the tool or product that generates the error. Example: "pubsub.googleapis.com". If the error is generated by some common infrastructure, the error domain must be a globally unique value that identifies the infrastructure. For Google API infrastructure, the error domain is "googleapis.com". * @type array|\Google\Protobuf\Internal\MapField $metadatas - * Additional structured details about this error. Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in length. When identifying the current value of an exceeded limit, the units should be contained in the key, not the value. For example, rather than {"instanceLimit": "100/request"}, should be returned as, {"instanceLimitPerRequest": "100"}, if the client exceeds the number of instances that can be created in a single (batch) request. + * Additional structured details about this error. Keys must match /a-z+/ but should ideally be lowerCamelCase. Also they must be limited to 64 characters in length. When identifying the current value of an exceeded limit, the units should be contained in the key, not the value. For example, rather than {"instanceLimit": "100/request"}, should be returned as, {"instanceLimitPerRequest": "100"}, if the client exceeds the number of instances that can be created in a single (batch) request. * @type string $reason * The reason of the error. This is a constant value that identifies the proximate cause of the error. Error reasons are unique within a particular domain of errors. This should be at most 63 characters and match a regular expression of `A-Z+[A-Z0-9]`, which represents UPPER_SNAKE_CASE. * } @@ -90,7 +90,7 @@ public function setDomain($var) } /** - * Additional structured details about this error. Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in length. When identifying the current value of an exceeded limit, the units should be contained in the key, not the value. For example, rather than {"instanceLimit": "100/request"}, should be returned as, {"instanceLimitPerRequest": "100"}, if the client exceeds the number of instances that can be created in a single (batch) request. + * Additional structured details about this error. Keys must match /a-z+/ but should ideally be lowerCamelCase. Also they must be limited to 64 characters in length. When identifying the current value of an exceeded limit, the units should be contained in the key, not the value. For example, rather than {"instanceLimit": "100/request"}, should be returned as, {"instanceLimitPerRequest": "100"}, if the client exceeds the number of instances that can be created in a single (batch) request. * * Generated from protobuf field map metadatas = 8514340; * @return \Google\Protobuf\Internal\MapField @@ -101,7 +101,7 @@ public function getMetadatas() } /** - * Additional structured details about this error. Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in length. When identifying the current value of an exceeded limit, the units should be contained in the key, not the value. For example, rather than {"instanceLimit": "100/request"}, should be returned as, {"instanceLimitPerRequest": "100"}, if the client exceeds the number of instances that can be created in a single (batch) request. + * Additional structured details about this error. Keys must match /a-z+/ but should ideally be lowerCamelCase. Also they must be limited to 64 characters in length. When identifying the current value of an exceeded limit, the units should be contained in the key, not the value. For example, rather than {"instanceLimit": "100/request"}, should be returned as, {"instanceLimitPerRequest": "100"}, if the client exceeds the number of instances that can be created in a single (batch) request. * * Generated from protobuf field map metadatas = 8514340; * @param array|\Google\Protobuf\Internal\MapField $var diff --git a/Compute/src/V1/ForwardingRule.php b/Compute/src/V1/ForwardingRule.php index ff6315c4259b..f64a59fea2b2 100644 --- a/Compute/src/V1/ForwardingRule.php +++ b/Compute/src/V1/ForwardingRule.php @@ -82,6 +82,12 @@ class ForwardingRule extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional uint64 id = 3355; */ private $id = null; + /** + * Resource reference of a PublicDelegatedPrefix. The PDP must be a sub-PDP in EXTERNAL_IPV6_FORWARDING_RULE_CREATION mode. Use one of the following formats to specify a sub-PDP when creating an IPv6 NetLB forwarding rule using BYOIP: Full resource URL, as in https://www.googleapis.com/compute/v1/projects/project_id/regions/region /publicDelegatedPrefixes/sub-pdp-name Partial URL, as in: - projects/project_id/regions/region/publicDelegatedPrefixes/sub-pdp-name - regions/region/publicDelegatedPrefixes/sub-pdp-name + * + * Generated from protobuf field optional string ip_collection = 176818358; + */ + private $ip_collection = null; /** * The IP Version that will be used by this forwarding rule. Valid options are IPV4 or IPV6. * Check the IpVersion enum for the list of possible values. @@ -254,6 +260,8 @@ class ForwardingRule extends \Google\Protobuf\Internal\Message * Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a ForwardingRule. Include the fingerprint in patch request to ensure that you do not overwrite changes that were applied from another concurrent request. To see the latest fingerprint, make a get() request to retrieve a ForwardingRule. * @type int|string $id * [Output Only] The unique identifier for the resource. This identifier is defined by the server. + * @type string $ip_collection + * Resource reference of a PublicDelegatedPrefix. The PDP must be a sub-PDP in EXTERNAL_IPV6_FORWARDING_RULE_CREATION mode. Use one of the following formats to specify a sub-PDP when creating an IPv6 NetLB forwarding rule using BYOIP: Full resource URL, as in https://www.googleapis.com/compute/v1/projects/project_id/regions/region /publicDelegatedPrefixes/sub-pdp-name Partial URL, as in: - projects/project_id/regions/region/publicDelegatedPrefixes/sub-pdp-name - regions/region/publicDelegatedPrefixes/sub-pdp-name * @type string $ip_version * The IP Version that will be used by this forwarding rule. Valid options are IPV4 or IPV6. * Check the IpVersion enum for the list of possible values. @@ -709,6 +717,42 @@ public function setId($var) return $this; } + /** + * Resource reference of a PublicDelegatedPrefix. The PDP must be a sub-PDP in EXTERNAL_IPV6_FORWARDING_RULE_CREATION mode. Use one of the following formats to specify a sub-PDP when creating an IPv6 NetLB forwarding rule using BYOIP: Full resource URL, as in https://www.googleapis.com/compute/v1/projects/project_id/regions/region /publicDelegatedPrefixes/sub-pdp-name Partial URL, as in: - projects/project_id/regions/region/publicDelegatedPrefixes/sub-pdp-name - regions/region/publicDelegatedPrefixes/sub-pdp-name + * + * Generated from protobuf field optional string ip_collection = 176818358; + * @return string + */ + public function getIpCollection() + { + return isset($this->ip_collection) ? $this->ip_collection : ''; + } + + public function hasIpCollection() + { + return isset($this->ip_collection); + } + + public function clearIpCollection() + { + unset($this->ip_collection); + } + + /** + * Resource reference of a PublicDelegatedPrefix. The PDP must be a sub-PDP in EXTERNAL_IPV6_FORWARDING_RULE_CREATION mode. Use one of the following formats to specify a sub-PDP when creating an IPv6 NetLB forwarding rule using BYOIP: Full resource URL, as in https://www.googleapis.com/compute/v1/projects/project_id/regions/region /publicDelegatedPrefixes/sub-pdp-name Partial URL, as in: - projects/project_id/regions/region/publicDelegatedPrefixes/sub-pdp-name - regions/region/publicDelegatedPrefixes/sub-pdp-name + * + * Generated from protobuf field optional string ip_collection = 176818358; + * @param string $var + * @return $this + */ + public function setIpCollection($var) + { + GPBUtil::checkString($var, True); + $this->ip_collection = $var; + + return $this; + } + /** * The IP Version that will be used by this forwarding rule. Valid options are IPV4 or IPV6. * Check the IpVersion enum for the list of possible values. diff --git a/Compute/src/V1/Gapic/InstanceGroupManagerResizeRequestsGapicClient.php b/Compute/src/V1/Gapic/InstanceGroupManagerResizeRequestsGapicClient.php new file mode 100644 index 000000000000..d7307c0349a5 --- /dev/null +++ b/Compute/src/V1/Gapic/InstanceGroupManagerResizeRequestsGapicClient.php @@ -0,0 +1,642 @@ +cancel($instanceGroupManager, $project, $resizeRequest, $zone); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // if creating/modifying, retrieve the target resource + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $instanceGroupManagerResizeRequestsClient->cancel($instanceGroupManager, $project, $resizeRequest, $zone); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $instanceGroupManagerResizeRequestsClient->resumeOperation($operationName, 'cancel'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // if creating/modifying, retrieve the target resource + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $instanceGroupManagerResizeRequestsClient->close(); + * } + * ``` + * + * @deprecated Please use the new service client {@see \Google\Cloud\Compute\V1\Client\InstanceGroupManagerResizeRequestsClient}. + */ +class InstanceGroupManagerResizeRequestsGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.compute.v1.InstanceGroupManagerResizeRequests'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'compute.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'compute.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/compute', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/instance_group_manager_resize_requests_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/instance_group_manager_resize_requests_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/instance_group_manager_resize_requests_rest_client_config.php', + ], + ], + 'operationsClientClass' => ZoneOperationsClient::class, + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements GapicClientTrait::supportedTransports. */ + private static function supportedTransports() + { + return [ + 'rest', + ]; + } + + /** + * Return an ZoneOperationsClient object with the same endpoint as $this. + * + * @return ZoneOperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** Return the default longrunning operation descriptor config. */ + private function getDefaultOperationDescriptor() + { + return [ + 'additionalArgumentMethods' => [ + 'getProject', + 'getZone', + ], + 'getOperationMethod' => 'get', + 'cancelOperationMethod' => null, + 'deleteOperationMethod' => 'delete', + 'operationErrorCodeMethod' => 'getHttpErrorStatusCode', + 'operationErrorMessageMethod' => 'getHttpErrorMessage', + 'operationNameMethod' => 'getName', + 'operationStatusMethod' => 'getStatus', + 'operationStatusDoneValue' => \Google\Cloud\Compute\V1\Operation\Status::DONE, + ]; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : $this->getDefaultOperationDescriptor(); + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'compute.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `rest`. *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Cancels the specified resize request and removes it from the queue. Cancelled resize request does no longer wait for the resources to be provisioned. Cancel is only possible for requests that are accepted in the queue. + * + * Sample code: + * ``` + * $instanceGroupManagerResizeRequestsClient = new InstanceGroupManagerResizeRequestsClient(); + * try { + * $instanceGroupManager = 'instance_group_manager'; + * $project = 'project'; + * $resizeRequest = 'resize_request'; + * $zone = 'zone'; + * $operationResponse = $instanceGroupManagerResizeRequestsClient->cancel($instanceGroupManager, $project, $resizeRequest, $zone); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // if creating/modifying, retrieve the target resource + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $instanceGroupManagerResizeRequestsClient->cancel($instanceGroupManager, $project, $resizeRequest, $zone); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $instanceGroupManagerResizeRequestsClient->resumeOperation($operationName, 'cancel'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // if creating/modifying, retrieve the target resource + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $instanceGroupManagerResizeRequestsClient->close(); + * } + * ``` + * + * @param string $instanceGroupManager The name of the managed instance group. The name should conform to RFC1035 or be a resource ID. + * @param string $project Project ID for this request. + * @param string $resizeRequest The name of the resize request to cancel. The name should conform to RFC1035 or be a resource ID. + * @param string $zone The name of the zone where the managed instance group is located. The name should conform to RFC1035. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function cancel($instanceGroupManager, $project, $resizeRequest, $zone, array $optionalArgs = []) + { + $request = new CancelInstanceGroupManagerResizeRequestRequest(); + $requestParamHeaders = []; + $request->setInstanceGroupManager($instanceGroupManager); + $request->setProject($project); + $request->setResizeRequest($resizeRequest); + $request->setZone($zone); + $requestParamHeaders['instance_group_manager'] = $instanceGroupManager; + $requestParamHeaders['project'] = $project; + $requestParamHeaders['resize_request'] = $resizeRequest; + $requestParamHeaders['zone'] = $zone; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('Cancel', $optionalArgs, $request, $this->getOperationsClient(), null, Operation::class)->wait(); + } + + /** + * Deletes the specified, inactive resize request. Requests that are still active cannot be deleted. Deleting request does not delete instances that were provisioned previously. + * + * Sample code: + * ``` + * $instanceGroupManagerResizeRequestsClient = new InstanceGroupManagerResizeRequestsClient(); + * try { + * $instanceGroupManager = 'instance_group_manager'; + * $project = 'project'; + * $resizeRequest = 'resize_request'; + * $zone = 'zone'; + * $operationResponse = $instanceGroupManagerResizeRequestsClient->delete($instanceGroupManager, $project, $resizeRequest, $zone); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // if creating/modifying, retrieve the target resource + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $instanceGroupManagerResizeRequestsClient->delete($instanceGroupManager, $project, $resizeRequest, $zone); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $instanceGroupManagerResizeRequestsClient->resumeOperation($operationName, 'delete'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // if creating/modifying, retrieve the target resource + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $instanceGroupManagerResizeRequestsClient->close(); + * } + * ``` + * + * @param string $instanceGroupManager The name of the managed instance group. The name should conform to RFC1035 or be a resource ID. + * @param string $project Project ID for this request. + * @param string $resizeRequest The name of the resize request to delete. The name should conform to RFC1035 or be a resource ID. + * @param string $zone The name of the zone where the managed instance group is located. The name should conform to RFC1035. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function delete($instanceGroupManager, $project, $resizeRequest, $zone, array $optionalArgs = []) + { + $request = new DeleteInstanceGroupManagerResizeRequestRequest(); + $requestParamHeaders = []; + $request->setInstanceGroupManager($instanceGroupManager); + $request->setProject($project); + $request->setResizeRequest($resizeRequest); + $request->setZone($zone); + $requestParamHeaders['instance_group_manager'] = $instanceGroupManager; + $requestParamHeaders['project'] = $project; + $requestParamHeaders['resize_request'] = $resizeRequest; + $requestParamHeaders['zone'] = $zone; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('Delete', $optionalArgs, $request, $this->getOperationsClient(), null, Operation::class)->wait(); + } + + /** + * Returns all of the details about the specified resize request. + * + * Sample code: + * ``` + * $instanceGroupManagerResizeRequestsClient = new InstanceGroupManagerResizeRequestsClient(); + * try { + * $instanceGroupManager = 'instance_group_manager'; + * $project = 'project'; + * $resizeRequest = 'resize_request'; + * $zone = 'zone'; + * $response = $instanceGroupManagerResizeRequestsClient->get($instanceGroupManager, $project, $resizeRequest, $zone); + * } finally { + * $instanceGroupManagerResizeRequestsClient->close(); + * } + * ``` + * + * @param string $instanceGroupManager The name of the managed instance group. Name should conform to RFC1035 or be a resource ID. + * @param string $project Project ID for this request. + * @param string $resizeRequest The name of the resize request. Name should conform to RFC1035 or be a resource ID. + * @param string $zone Name of the href="/compute/docs/regions-zones/#available">zone scoping this request. Name should conform to RFC1035. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Compute\V1\InstanceGroupManagerResizeRequest + * + * @throws ApiException if the remote call fails + */ + public function get($instanceGroupManager, $project, $resizeRequest, $zone, array $optionalArgs = []) + { + $request = new GetInstanceGroupManagerResizeRequestRequest(); + $requestParamHeaders = []; + $request->setInstanceGroupManager($instanceGroupManager); + $request->setProject($project); + $request->setResizeRequest($resizeRequest); + $request->setZone($zone); + $requestParamHeaders['instance_group_manager'] = $instanceGroupManager; + $requestParamHeaders['project'] = $project; + $requestParamHeaders['resize_request'] = $resizeRequest; + $requestParamHeaders['zone'] = $zone; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Get', InstanceGroupManagerResizeRequest::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a new resize request that starts provisioning VMs immediately or queues VM creation. + * + * Sample code: + * ``` + * $instanceGroupManagerResizeRequestsClient = new InstanceGroupManagerResizeRequestsClient(); + * try { + * $instanceGroupManager = 'instance_group_manager'; + * $instanceGroupManagerResizeRequestResource = new InstanceGroupManagerResizeRequest(); + * $project = 'project'; + * $zone = 'zone'; + * $operationResponse = $instanceGroupManagerResizeRequestsClient->insert($instanceGroupManager, $instanceGroupManagerResizeRequestResource, $project, $zone); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // if creating/modifying, retrieve the target resource + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $instanceGroupManagerResizeRequestsClient->insert($instanceGroupManager, $instanceGroupManagerResizeRequestResource, $project, $zone); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $instanceGroupManagerResizeRequestsClient->resumeOperation($operationName, 'insert'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // if creating/modifying, retrieve the target resource + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $instanceGroupManagerResizeRequestsClient->close(); + * } + * ``` + * + * @param string $instanceGroupManager The name of the managed instance group to which the resize request will be added. Name should conform to RFC1035 or be a resource ID. + * @param InstanceGroupManagerResizeRequest $instanceGroupManagerResizeRequestResource The body resource for this request + * @param string $project Project ID for this request. + * @param string $zone The name of the zone where the managed instance group is located and where the resize request will be created. Name should conform to RFC1035. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function insert($instanceGroupManager, $instanceGroupManagerResizeRequestResource, $project, $zone, array $optionalArgs = []) + { + $request = new InsertInstanceGroupManagerResizeRequestRequest(); + $requestParamHeaders = []; + $request->setInstanceGroupManager($instanceGroupManager); + $request->setInstanceGroupManagerResizeRequestResource($instanceGroupManagerResizeRequestResource); + $request->setProject($project); + $request->setZone($zone); + $requestParamHeaders['instance_group_manager'] = $instanceGroupManager; + $requestParamHeaders['project'] = $project; + $requestParamHeaders['zone'] = $zone; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('Insert', $optionalArgs, $request, $this->getOperationsClient(), null, Operation::class)->wait(); + } + + /** + * Retrieves a list of resize requests that are contained in the managed instance group. + * + * Sample code: + * ``` + * $instanceGroupManagerResizeRequestsClient = new InstanceGroupManagerResizeRequestsClient(); + * try { + * $instanceGroupManager = 'instance_group_manager'; + * $project = 'project'; + * $zone = 'zone'; + * // Iterate over pages of elements + * $pagedResponse = $instanceGroupManagerResizeRequestsClient->list($instanceGroupManager, $project, $zone); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $instanceGroupManagerResizeRequestsClient->list($instanceGroupManager, $project, $zone); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $instanceGroupManagerResizeRequestsClient->close(); + * } + * ``` + * + * @param string $instanceGroupManager The name of the managed instance group. The name should conform to RFC1035. + * @param string $project Project ID for this request. + * @param string $zone The name of the zone where the managed instance group is located. The name should conform to RFC1035. + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * @type int $maxResults + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * @type string $orderBy + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type bool $returnPartialSuccess + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function list($instanceGroupManager, $project, $zone, array $optionalArgs = []) + { + $request = new ListInstanceGroupManagerResizeRequestsRequest(); + $requestParamHeaders = []; + $request->setInstanceGroupManager($instanceGroupManager); + $request->setProject($project); + $request->setZone($zone); + $requestParamHeaders['instance_group_manager'] = $instanceGroupManager; + $requestParamHeaders['project'] = $project; + $requestParamHeaders['zone'] = $zone; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['maxResults'])) { + $request->setMaxResults($optionalArgs['maxResults']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['returnPartialSuccess'])) { + $request->setReturnPartialSuccess($optionalArgs['returnPartialSuccess']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('List', $optionalArgs, InstanceGroupManagerResizeRequestsListResponse::class, $request); + } +} diff --git a/Compute/src/V1/Gapic/InstanceSettingsServiceGapicClient.php b/Compute/src/V1/Gapic/InstanceSettingsServiceGapicClient.php new file mode 100644 index 000000000000..157f523700e0 --- /dev/null +++ b/Compute/src/V1/Gapic/InstanceSettingsServiceGapicClient.php @@ -0,0 +1,355 @@ +get($project, $zone); + * } finally { + * $instanceSettingsServiceClient->close(); + * } + * ``` + * + * @deprecated Please use the new service client {@see \Google\Cloud\Compute\V1\Client\InstanceSettingsServiceClient}. + */ +class InstanceSettingsServiceGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.compute.v1.InstanceSettingsService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'compute.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'compute.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/compute', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/instance_settings_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/instance_settings_service_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/instance_settings_service_rest_client_config.php', + ], + ], + 'operationsClientClass' => ZoneOperationsClient::class, + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements GapicClientTrait::supportedTransports. */ + private static function supportedTransports() + { + return [ + 'rest', + ]; + } + + /** + * Return an ZoneOperationsClient object with the same endpoint as $this. + * + * @return ZoneOperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** Return the default longrunning operation descriptor config. */ + private function getDefaultOperationDescriptor() + { + return [ + 'additionalArgumentMethods' => [ + 'getProject', + 'getZone', + ], + 'getOperationMethod' => 'get', + 'cancelOperationMethod' => null, + 'deleteOperationMethod' => 'delete', + 'operationErrorCodeMethod' => 'getHttpErrorStatusCode', + 'operationErrorMessageMethod' => 'getHttpErrorMessage', + 'operationNameMethod' => 'getName', + 'operationStatusMethod' => 'getStatus', + 'operationStatusDoneValue' => \Google\Cloud\Compute\V1\Operation\Status::DONE, + ]; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : $this->getDefaultOperationDescriptor(); + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'compute.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `rest`. *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Get Instance settings. + * + * Sample code: + * ``` + * $instanceSettingsServiceClient = new InstanceSettingsServiceClient(); + * try { + * $project = 'project'; + * $zone = 'zone'; + * $response = $instanceSettingsServiceClient->get($project, $zone); + * } finally { + * $instanceSettingsServiceClient->close(); + * } + * ``` + * + * @param string $project Project ID for this request. + * @param string $zone Name of the zone for this request. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Compute\V1\InstanceSettings + * + * @throws ApiException if the remote call fails + */ + public function get($project, $zone, array $optionalArgs = []) + { + $request = new GetInstanceSettingRequest(); + $requestParamHeaders = []; + $request->setProject($project); + $request->setZone($zone); + $requestParamHeaders['project'] = $project; + $requestParamHeaders['zone'] = $zone; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Get', InstanceSettings::class, $optionalArgs, $request)->wait(); + } + + /** + * Patch Instance settings + * + * Sample code: + * ``` + * $instanceSettingsServiceClient = new InstanceSettingsServiceClient(); + * try { + * $instanceSettingsResource = new InstanceSettings(); + * $project = 'project'; + * $zone = 'zone'; + * $operationResponse = $instanceSettingsServiceClient->patch($instanceSettingsResource, $project, $zone); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // if creating/modifying, retrieve the target resource + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $instanceSettingsServiceClient->patch($instanceSettingsResource, $project, $zone); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $instanceSettingsServiceClient->resumeOperation($operationName, 'patch'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // if creating/modifying, retrieve the target resource + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $instanceSettingsServiceClient->close(); + * } + * ``` + * + * @param InstanceSettings $instanceSettingsResource The body resource for this request + * @param string $project Project ID for this request. + * @param string $zone The zone scoping this request. It should conform to RFC1035. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * @type string $updateMask + * update_mask indicates fields to be updated as part of this request. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function patch($instanceSettingsResource, $project, $zone, array $optionalArgs = []) + { + $request = new PatchInstanceSettingRequest(); + $requestParamHeaders = []; + $request->setInstanceSettingsResource($instanceSettingsResource); + $request->setProject($project); + $request->setZone($zone); + $requestParamHeaders['project'] = $project; + $requestParamHeaders['zone'] = $zone; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('Patch', $optionalArgs, $request, $this->getOperationsClient(), null, Operation::class)->wait(); + } +} diff --git a/Compute/src/V1/Gapic/NodeGroupsGapicClient.php b/Compute/src/V1/Gapic/NodeGroupsGapicClient.php index c57a7942a477..dd49c8526e12 100644 --- a/Compute/src/V1/Gapic/NodeGroupsGapicClient.php +++ b/Compute/src/V1/Gapic/NodeGroupsGapicClient.php @@ -48,10 +48,12 @@ use Google\Cloud\Compute\V1\NodeGroupsAddNodesRequest; use Google\Cloud\Compute\V1\NodeGroupsDeleteNodesRequest; use Google\Cloud\Compute\V1\NodeGroupsListNodes; +use Google\Cloud\Compute\V1\NodeGroupsPerformMaintenanceRequest; use Google\Cloud\Compute\V1\NodeGroupsSetNodeTemplateRequest; use Google\Cloud\Compute\V1\NodeGroupsSimulateMaintenanceEventRequest; use Google\Cloud\Compute\V1\Operation; use Google\Cloud\Compute\V1\PatchNodeGroupRequest; +use Google\Cloud\Compute\V1\PerformMaintenanceNodeGroupRequest; use Google\Cloud\Compute\V1\Policy; use Google\Cloud\Compute\V1\SetIamPolicyNodeGroupRequest; use Google\Cloud\Compute\V1\SetNodeTemplateNodeGroupRequest; @@ -1044,6 +1046,85 @@ public function patch($nodeGroup, $nodeGroupResource, $project, $zone, array $op return $this->startOperationsCall('Patch', $optionalArgs, $request, $this->getOperationsClient(), null, Operation::class)->wait(); } + /** + * Perform maintenance on a subset of nodes in the node group. + * + * Sample code: + * ``` + * $nodeGroupsClient = new NodeGroupsClient(); + * try { + * $nodeGroup = 'node_group'; + * $nodeGroupsPerformMaintenanceRequestResource = new NodeGroupsPerformMaintenanceRequest(); + * $project = 'project'; + * $zone = 'zone'; + * $operationResponse = $nodeGroupsClient->performMaintenance($nodeGroup, $nodeGroupsPerformMaintenanceRequestResource, $project, $zone); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // if creating/modifying, retrieve the target resource + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $nodeGroupsClient->performMaintenance($nodeGroup, $nodeGroupsPerformMaintenanceRequestResource, $project, $zone); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $nodeGroupsClient->resumeOperation($operationName, 'performMaintenance'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // if creating/modifying, retrieve the target resource + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $nodeGroupsClient->close(); + * } + * ``` + * + * @param string $nodeGroup Name of the node group scoping this request. + * @param NodeGroupsPerformMaintenanceRequest $nodeGroupsPerformMaintenanceRequestResource The body resource for this request + * @param string $project Project ID for this request. + * @param string $zone The name of the zone for this request. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function performMaintenance($nodeGroup, $nodeGroupsPerformMaintenanceRequestResource, $project, $zone, array $optionalArgs = []) + { + $request = new PerformMaintenanceNodeGroupRequest(); + $requestParamHeaders = []; + $request->setNodeGroup($nodeGroup); + $request->setNodeGroupsPerformMaintenanceRequestResource($nodeGroupsPerformMaintenanceRequestResource); + $request->setProject($project); + $request->setZone($zone); + $requestParamHeaders['node_group'] = $nodeGroup; + $requestParamHeaders['project'] = $project; + $requestParamHeaders['zone'] = $zone; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('PerformMaintenance', $optionalArgs, $request, $this->getOperationsClient(), null, Operation::class)->wait(); + } + /** * Sets the access control policy on the specified resource. Replaces any existing policy. * diff --git a/Compute/src/V1/Gapic/StoragePoolTypesGapicClient.php b/Compute/src/V1/Gapic/StoragePoolTypesGapicClient.php new file mode 100644 index 000000000000..49784b29bd17 --- /dev/null +++ b/Compute/src/V1/Gapic/StoragePoolTypesGapicClient.php @@ -0,0 +1,422 @@ +aggregatedList($project); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $key => $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $storagePoolTypesClient->aggregatedList($project); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $storagePoolTypesClient->close(); + * } + * ``` + * + * @deprecated Please use the new service client {@see \Google\Cloud\Compute\V1\Client\StoragePoolTypesClient}. + */ +class StoragePoolTypesGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.compute.v1.StoragePoolTypes'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'compute.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'compute.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/compute.readonly', + 'https://www.googleapis.com/auth/compute', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/storage_pool_types_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/storage_pool_types_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/storage_pool_types_rest_client_config.php', + ], + ], + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements GapicClientTrait::supportedTransports. */ + private static function supportedTransports() + { + return [ + 'rest', + ]; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'compute.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `rest`. *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** + * Retrieves an aggregated list of storage pool types. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`. + * + * Sample code: + * ``` + * $storagePoolTypesClient = new StoragePoolTypesClient(); + * try { + * $project = 'project'; + * // Iterate over pages of elements + * $pagedResponse = $storagePoolTypesClient->aggregatedList($project); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $key => $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $storagePoolTypesClient->aggregatedList($project); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $storagePoolTypesClient->close(); + * } + * ``` + * + * @param string $project Project ID for this request. + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * @type bool $includeAllScopes + * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + * @type int $maxResults + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * @type string $orderBy + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type bool $returnPartialSuccess + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * @type int $serviceProjectNumber + * The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function aggregatedList($project, array $optionalArgs = []) + { + $request = new AggregatedListStoragePoolTypesRequest(); + $requestParamHeaders = []; + $request->setProject($project); + $requestParamHeaders['project'] = $project; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['includeAllScopes'])) { + $request->setIncludeAllScopes($optionalArgs['includeAllScopes']); + } + + if (isset($optionalArgs['maxResults'])) { + $request->setMaxResults($optionalArgs['maxResults']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['returnPartialSuccess'])) { + $request->setReturnPartialSuccess($optionalArgs['returnPartialSuccess']); + } + + if (isset($optionalArgs['serviceProjectNumber'])) { + $request->setServiceProjectNumber($optionalArgs['serviceProjectNumber']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('AggregatedList', $optionalArgs, StoragePoolTypeAggregatedList::class, $request); + } + + /** + * Returns the specified storage pool type. + * + * Sample code: + * ``` + * $storagePoolTypesClient = new StoragePoolTypesClient(); + * try { + * $project = 'project'; + * $storagePoolType = 'storage_pool_type'; + * $zone = 'zone'; + * $response = $storagePoolTypesClient->get($project, $storagePoolType, $zone); + * } finally { + * $storagePoolTypesClient->close(); + * } + * ``` + * + * @param string $project Project ID for this request. + * @param string $storagePoolType Name of the storage pool type to return. + * @param string $zone The name of the zone for this request. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Compute\V1\StoragePoolType + * + * @throws ApiException if the remote call fails + */ + public function get($project, $storagePoolType, $zone, array $optionalArgs = []) + { + $request = new GetStoragePoolTypeRequest(); + $requestParamHeaders = []; + $request->setProject($project); + $request->setStoragePoolType($storagePoolType); + $request->setZone($zone); + $requestParamHeaders['project'] = $project; + $requestParamHeaders['storage_pool_type'] = $storagePoolType; + $requestParamHeaders['zone'] = $zone; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Get', StoragePoolType::class, $optionalArgs, $request)->wait(); + } + + /** + * Retrieves a list of storage pool types available to the specified project. + * + * Sample code: + * ``` + * $storagePoolTypesClient = new StoragePoolTypesClient(); + * try { + * $project = 'project'; + * $zone = 'zone'; + * // Iterate over pages of elements + * $pagedResponse = $storagePoolTypesClient->list($project, $zone); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $storagePoolTypesClient->list($project, $zone); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $storagePoolTypesClient->close(); + * } + * ``` + * + * @param string $project Project ID for this request. + * @param string $zone The name of the zone for this request. + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * @type int $maxResults + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * @type string $orderBy + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type bool $returnPartialSuccess + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function list($project, $zone, array $optionalArgs = []) + { + $request = new ListStoragePoolTypesRequest(); + $requestParamHeaders = []; + $request->setProject($project); + $request->setZone($zone); + $requestParamHeaders['project'] = $project; + $requestParamHeaders['zone'] = $zone; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['maxResults'])) { + $request->setMaxResults($optionalArgs['maxResults']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['returnPartialSuccess'])) { + $request->setReturnPartialSuccess($optionalArgs['returnPartialSuccess']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('List', $optionalArgs, StoragePoolTypeList::class, $request); + } +} diff --git a/Compute/src/V1/Gapic/StoragePoolsGapicClient.php b/Compute/src/V1/Gapic/StoragePoolsGapicClient.php new file mode 100644 index 000000000000..11e57ad5c6f9 --- /dev/null +++ b/Compute/src/V1/Gapic/StoragePoolsGapicClient.php @@ -0,0 +1,939 @@ +aggregatedList($project); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $key => $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $storagePoolsClient->aggregatedList($project); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $storagePoolsClient->close(); + * } + * ``` + * + * @deprecated Please use the new service client {@see \Google\Cloud\Compute\V1\Client\StoragePoolsClient}. + */ +class StoragePoolsGapicClient +{ + use GapicClientTrait; + + /** The name of the service. */ + const SERVICE_NAME = 'google.cloud.compute.v1.StoragePools'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + const SERVICE_ADDRESS = 'compute.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'compute.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/compute', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/storage_pools_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/storage_pools_descriptor_config.php', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + 'useJwtAccessWithScope' => false, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/storage_pools_rest_client_config.php', + ], + ], + 'operationsClientClass' => ZoneOperationsClient::class, + ]; + } + + /** Implements GapicClientTrait::defaultTransport. */ + private static function defaultTransport() + { + return 'rest'; + } + + /** Implements GapicClientTrait::supportedTransports. */ + private static function supportedTransports() + { + return [ + 'rest', + ]; + } + + /** + * Return an ZoneOperationsClient object with the same endpoint as $this. + * + * @return ZoneOperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** Return the default longrunning operation descriptor config. */ + private function getDefaultOperationDescriptor() + { + return [ + 'additionalArgumentMethods' => [ + 'getProject', + 'getZone', + ], + 'getOperationMethod' => 'get', + 'cancelOperationMethod' => null, + 'deleteOperationMethod' => 'delete', + 'operationErrorCodeMethod' => 'getHttpErrorStatusCode', + 'operationErrorMessageMethod' => 'getHttpErrorMessage', + 'operationNameMethod' => 'getName', + 'operationStatusMethod' => 'getStatus', + 'operationStatusDoneValue' => \Google\Cloud\Compute\V1\Operation\Status::DONE, + ]; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : $this->getDefaultOperationDescriptor(); + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'compute.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. At the moment, supports only + * `rest`. *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** + * Retrieves an aggregated list of storage pools. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`. + * + * Sample code: + * ``` + * $storagePoolsClient = new StoragePoolsClient(); + * try { + * $project = 'project'; + * // Iterate over pages of elements + * $pagedResponse = $storagePoolsClient->aggregatedList($project); + * foreach ($pagedResponse->iteratePages() as $page) { + * foreach ($page as $key => $element) { + * // doSomethingWith($element); + * } + * } + * // Alternatively: + * // Iterate through all elements + * $pagedResponse = $storagePoolsClient->aggregatedList($project); + * foreach ($pagedResponse->iterateAllElements() as $element) { + * // doSomethingWith($element); + * } + * } finally { + * $storagePoolsClient->close(); + * } + * ``` + * + * @param string $project Project ID for this request. + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * @type bool $includeAllScopes + * Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included. + * @type int $maxResults + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * @type string $orderBy + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * @type string $pageToken + * A page token is used to specify a page of values to be returned. + * If no page token is specified (the default), the first page + * of values will be returned. Any page token used here must have + * been generated by a previous call to the API. + * @type bool $returnPartialSuccess + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * @type int $serviceProjectNumber + * The Shared VPC service project id or service project number for which aggregated list request is invoked for subnetworks list-usable api. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\PagedListResponse + * + * @throws ApiException if the remote call fails + */ + public function aggregatedList($project, array $optionalArgs = []) + { + $request = new AggregatedListStoragePoolsRequest(); + $requestParamHeaders = []; + $request->setProject($project); + $requestParamHeaders['project'] = $project; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['includeAllScopes'])) { + $request->setIncludeAllScopes($optionalArgs['includeAllScopes']); + } + + if (isset($optionalArgs['maxResults'])) { + $request->setMaxResults($optionalArgs['maxResults']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['returnPartialSuccess'])) { + $request->setReturnPartialSuccess($optionalArgs['returnPartialSuccess']); + } + + if (isset($optionalArgs['serviceProjectNumber'])) { + $request->setServiceProjectNumber($optionalArgs['serviceProjectNumber']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->getPagedListResponse('AggregatedList', $optionalArgs, StoragePoolAggregatedList::class, $request); + } + + /** + * Deletes the specified storage pool. Deleting a storagePool removes its data permanently and is irreversible. However, deleting a storagePool does not delete any snapshots previously made from the storagePool. You must separately delete snapshots. + * + * Sample code: + * ``` + * $storagePoolsClient = new StoragePoolsClient(); + * try { + * $project = 'project'; + * $storagePool = 'storage_pool'; + * $zone = 'zone'; + * $operationResponse = $storagePoolsClient->delete($project, $storagePool, $zone); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // if creating/modifying, retrieve the target resource + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $storagePoolsClient->delete($project, $storagePool, $zone); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $storagePoolsClient->resumeOperation($operationName, 'delete'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // if creating/modifying, retrieve the target resource + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $storagePoolsClient->close(); + * } + * ``` + * + * @param string $project Project ID for this request. + * @param string $storagePool Name of the storage pool to delete. + * @param string $zone The name of the zone for this request. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function delete($project, $storagePool, $zone, array $optionalArgs = []) + { + $request = new DeleteStoragePoolRequest(); + $requestParamHeaders = []; + $request->setProject($project); + $request->setStoragePool($storagePool); + $request->setZone($zone); + $requestParamHeaders['project'] = $project; + $requestParamHeaders['storage_pool'] = $storagePool; + $requestParamHeaders['zone'] = $zone; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('Delete', $optionalArgs, $request, $this->getOperationsClient(), null, Operation::class)->wait(); + } + + /** + * Returns a specified storage pool. Gets a list of available storage pools by making a list() request. + * + * Sample code: + * ``` + * $storagePoolsClient = new StoragePoolsClient(); + * try { + * $project = 'project'; + * $storagePool = 'storage_pool'; + * $zone = 'zone'; + * $response = $storagePoolsClient->get($project, $storagePool, $zone); + * } finally { + * $storagePoolsClient->close(); + * } + * ``` + * + * @param string $project Project ID for this request. + * @param string $storagePool Name of the storage pool to return. + * @param string $zone The name of the zone for this request. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Compute\V1\StoragePool + * + * @throws ApiException if the remote call fails + */ + public function get($project, $storagePool, $zone, array $optionalArgs = []) + { + $request = new GetStoragePoolRequest(); + $requestParamHeaders = []; + $request->setProject($project); + $request->setStoragePool($storagePool); + $request->setZone($zone); + $requestParamHeaders['project'] = $project; + $requestParamHeaders['storage_pool'] = $storagePool; + $requestParamHeaders['zone'] = $zone; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('Get', StoragePool::class, $optionalArgs, $request)->wait(); + } + + /** + * Gets the access control policy for a resource. May be empty if no such policy or resource exists. + * + * Sample code: + * ``` + * $storagePoolsClient = new StoragePoolsClient(); + * try { + * $project = 'project'; + * $resource = 'resource'; + * $zone = 'zone'; + * $response = $storagePoolsClient->getIamPolicy($project, $resource, $zone); + * } finally { + * $storagePoolsClient->close(); + * } + * ``` + * + * @param string $project Project ID for this request. + * @param string $resource Name or id of the resource for this request. + * @param string $zone The name of the zone for this request. + * @param array $optionalArgs { + * Optional. + * + * @type int $optionsRequestedPolicyVersion + * Requested IAM Policy version. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Compute\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function getIamPolicy($project, $resource, $zone, array $optionalArgs = []) + { + $request = new GetIamPolicyStoragePoolRequest(); + $requestParamHeaders = []; + $request->setProject($project); + $request->setResource($resource); + $request->setZone($zone); + $requestParamHeaders['project'] = $project; + $requestParamHeaders['resource'] = $resource; + $requestParamHeaders['zone'] = $zone; + if (isset($optionalArgs['optionsRequestedPolicyVersion'])) { + $request->setOptionsRequestedPolicyVersion($optionalArgs['optionsRequestedPolicyVersion']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Creates a storage pool in the specified project using the data in the request. + * + * Sample code: + * ``` + * $storagePoolsClient = new StoragePoolsClient(); + * try { + * $project = 'project'; + * $storagePoolResource = new StoragePool(); + * $zone = 'zone'; + * $operationResponse = $storagePoolsClient->insert($project, $storagePoolResource, $zone); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // if creating/modifying, retrieve the target resource + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $storagePoolsClient->insert($project, $storagePoolResource, $zone); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $storagePoolsClient->resumeOperation($operationName, 'insert'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // if creating/modifying, retrieve the target resource + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $storagePoolsClient->close(); + * } + * ``` + * + * @param string $project Project ID for this request. + * @param StoragePool $storagePoolResource The body resource for this request + * @param string $zone The name of the zone for this request. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function insert($project, $storagePoolResource, $zone, array $optionalArgs = []) + { + $request = new InsertStoragePoolRequest(); + $requestParamHeaders = []; + $request->setProject($project); + $request->setStoragePoolResource($storagePoolResource); + $request->setZone($zone); + $requestParamHeaders['project'] = $project; + $requestParamHeaders['zone'] = $zone; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('Insert', $optionalArgs, $request, $this->getOperationsClient(), null, Operation::class)->wait(); + } + + /** + * Retrieves a list of storage pools contained within the specified zone. + * + * Sample code: + * ``` + * $storagePoolsClient = new StoragePoolsClient(); + * try { + * $project = 'project'; + * $zone = 'zone'; + * $response = $storagePoolsClient->list($project, $zone); + * } finally { + * $storagePoolsClient->close(); + * } + * ``` + * + * @param string $project Project ID for this request. + * @param string $zone The name of the zone for this request. + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * @type int $maxResults + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * @type string $orderBy + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * @type string $pageToken + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * @type bool $returnPartialSuccess + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Compute\V1\StoragePoolList + * + * @throws ApiException if the remote call fails + */ + public function list($project, $zone, array $optionalArgs = []) + { + $request = new ListStoragePoolsRequest(); + $requestParamHeaders = []; + $request->setProject($project); + $request->setZone($zone); + $requestParamHeaders['project'] = $project; + $requestParamHeaders['zone'] = $zone; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['maxResults'])) { + $request->setMaxResults($optionalArgs['maxResults']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['returnPartialSuccess'])) { + $request->setReturnPartialSuccess($optionalArgs['returnPartialSuccess']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('List', StoragePoolList::class, $optionalArgs, $request)->wait(); + } + + /** + * Lists the disks in a specified storage pool. + * + * Sample code: + * ``` + * $storagePoolsClient = new StoragePoolsClient(); + * try { + * $project = 'project'; + * $storagePool = 'storage_pool'; + * $zone = 'zone'; + * $response = $storagePoolsClient->listDisks($project, $storagePool, $zone); + * } finally { + * $storagePoolsClient->close(); + * } + * ``` + * + * @param string $project Project ID for this request. + * @param string $storagePool Name of the storage pool to list disks of. + * @param string $zone The name of the zone for this request. + * @param array $optionalArgs { + * Optional. + * + * @type string $filter + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * @type int $maxResults + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * @type string $orderBy + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * @type string $pageToken + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * @type bool $returnPartialSuccess + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Compute\V1\StoragePoolListDisks + * + * @throws ApiException if the remote call fails + */ + public function listDisks($project, $storagePool, $zone, array $optionalArgs = []) + { + $request = new ListDisksStoragePoolsRequest(); + $requestParamHeaders = []; + $request->setProject($project); + $request->setStoragePool($storagePool); + $request->setZone($zone); + $requestParamHeaders['project'] = $project; + $requestParamHeaders['storage_pool'] = $storagePool; + $requestParamHeaders['zone'] = $zone; + if (isset($optionalArgs['filter'])) { + $request->setFilter($optionalArgs['filter']); + } + + if (isset($optionalArgs['maxResults'])) { + $request->setMaxResults($optionalArgs['maxResults']); + } + + if (isset($optionalArgs['orderBy'])) { + $request->setOrderBy($optionalArgs['orderBy']); + } + + if (isset($optionalArgs['pageToken'])) { + $request->setPageToken($optionalArgs['pageToken']); + } + + if (isset($optionalArgs['returnPartialSuccess'])) { + $request->setReturnPartialSuccess($optionalArgs['returnPartialSuccess']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('ListDisks', StoragePoolListDisks::class, $optionalArgs, $request)->wait(); + } + + /** + * Sets the access control policy on the specified resource. Replaces any existing policy. + * + * Sample code: + * ``` + * $storagePoolsClient = new StoragePoolsClient(); + * try { + * $project = 'project'; + * $resource = 'resource'; + * $zone = 'zone'; + * $zoneSetPolicyRequestResource = new ZoneSetPolicyRequest(); + * $response = $storagePoolsClient->setIamPolicy($project, $resource, $zone, $zoneSetPolicyRequestResource); + * } finally { + * $storagePoolsClient->close(); + * } + * ``` + * + * @param string $project Project ID for this request. + * @param string $resource Name or id of the resource for this request. + * @param string $zone The name of the zone for this request. + * @param ZoneSetPolicyRequest $zoneSetPolicyRequestResource The body resource for this request + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Compute\V1\Policy + * + * @throws ApiException if the remote call fails + */ + public function setIamPolicy($project, $resource, $zone, $zoneSetPolicyRequestResource, array $optionalArgs = []) + { + $request = new SetIamPolicyStoragePoolRequest(); + $requestParamHeaders = []; + $request->setProject($project); + $request->setResource($resource); + $request->setZone($zone); + $request->setZoneSetPolicyRequestResource($zoneSetPolicyRequestResource); + $requestParamHeaders['project'] = $project; + $requestParamHeaders['resource'] = $resource; + $requestParamHeaders['zone'] = $zone; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); + } + + /** + * Returns permissions that a caller has on the specified resource. + * + * Sample code: + * ``` + * $storagePoolsClient = new StoragePoolsClient(); + * try { + * $project = 'project'; + * $resource = 'resource'; + * $testPermissionsRequestResource = new TestPermissionsRequest(); + * $zone = 'zone'; + * $response = $storagePoolsClient->testIamPermissions($project, $resource, $testPermissionsRequestResource, $zone); + * } finally { + * $storagePoolsClient->close(); + * } + * ``` + * + * @param string $project Project ID for this request. + * @param string $resource Name or id of the resource for this request. + * @param TestPermissionsRequest $testPermissionsRequestResource The body resource for this request + * @param string $zone The name of the zone for this request. + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Compute\V1\TestPermissionsResponse + * + * @throws ApiException if the remote call fails + */ + public function testIamPermissions($project, $resource, $testPermissionsRequestResource, $zone, array $optionalArgs = []) + { + $request = new TestIamPermissionsStoragePoolRequest(); + $requestParamHeaders = []; + $request->setProject($project); + $request->setResource($resource); + $request->setTestPermissionsRequestResource($testPermissionsRequestResource); + $request->setZone($zone); + $requestParamHeaders['project'] = $project; + $requestParamHeaders['resource'] = $resource; + $requestParamHeaders['zone'] = $zone; + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startCall('TestIamPermissions', TestPermissionsResponse::class, $optionalArgs, $request)->wait(); + } + + /** + * Updates the specified storagePool with the data included in the request. The update is performed only on selected fields included as part of update-mask. Only the following fields can be modified: size_tb and provisioned_iops. + * + * Sample code: + * ``` + * $storagePoolsClient = new StoragePoolsClient(); + * try { + * $project = 'project'; + * $storagePool = 'storage_pool'; + * $storagePoolResource = new StoragePool(); + * $zone = 'zone'; + * $operationResponse = $storagePoolsClient->update($project, $storagePool, $storagePoolResource, $zone); + * $operationResponse->pollUntilComplete(); + * if ($operationResponse->operationSucceeded()) { + * // if creating/modifying, retrieve the target resource + * } else { + * $error = $operationResponse->getError(); + * // handleError($error) + * } + * // Alternatively: + * // start the operation, keep the operation name, and resume later + * $operationResponse = $storagePoolsClient->update($project, $storagePool, $storagePoolResource, $zone); + * $operationName = $operationResponse->getName(); + * // ... do other work + * $newOperationResponse = $storagePoolsClient->resumeOperation($operationName, 'update'); + * while (!$newOperationResponse->isDone()) { + * // ... do other work + * $newOperationResponse->reload(); + * } + * if ($newOperationResponse->operationSucceeded()) { + * // if creating/modifying, retrieve the target resource + * } else { + * $error = $newOperationResponse->getError(); + * // handleError($error) + * } + * } finally { + * $storagePoolsClient->close(); + * } + * ``` + * + * @param string $project Project ID for this request. + * @param string $storagePool The storagePool name for this request. + * @param StoragePool $storagePoolResource The body resource for this request + * @param string $zone The name of the zone for this request. + * @param array $optionalArgs { + * Optional. + * + * @type string $requestId + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * @type string $updateMask + * update_mask indicates fields to be updated as part of this request. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\ApiCore\OperationResponse + * + * @throws ApiException if the remote call fails + */ + public function update($project, $storagePool, $storagePoolResource, $zone, array $optionalArgs = []) + { + $request = new UpdateStoragePoolRequest(); + $requestParamHeaders = []; + $request->setProject($project); + $request->setStoragePool($storagePool); + $request->setStoragePoolResource($storagePoolResource); + $request->setZone($zone); + $requestParamHeaders['project'] = $project; + $requestParamHeaders['storage_pool'] = $storagePool; + $requestParamHeaders['zone'] = $zone; + if (isset($optionalArgs['requestId'])) { + $request->setRequestId($optionalArgs['requestId']); + } + + if (isset($optionalArgs['updateMask'])) { + $request->setUpdateMask($optionalArgs['updateMask']); + } + + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); + $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); + return $this->startOperationsCall('Update', $optionalArgs, $request, $this->getOperationsClient(), null, Operation::class)->wait(); + } +} diff --git a/Compute/src/V1/GetIamPolicyStoragePoolRequest.php b/Compute/src/V1/GetIamPolicyStoragePoolRequest.php new file mode 100644 index 000000000000..0b6619547082 --- /dev/null +++ b/Compute/src/V1/GetIamPolicyStoragePoolRequest.php @@ -0,0 +1,196 @@ +google.cloud.compute.v1.GetIamPolicyStoragePoolRequest + */ +class GetIamPolicyStoragePoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Requested IAM Policy version. + * + * Generated from protobuf field optional int32 options_requested_policy_version = 499220029; + */ + private $options_requested_policy_version = null; + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + */ + private $project = ''; + /** + * Name or id of the resource for this request. + * + * Generated from protobuf field string resource = 195806222 [(.google.api.field_behavior) = REQUIRED]; + */ + private $resource = ''; + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + */ + private $zone = ''; + + /** + * @param string $project Project ID for this request. + * @param string $zone The name of the zone for this request. + * @param string $resource Name or id of the resource for this request. + * + * @return \Google\Cloud\Compute\V1\GetIamPolicyStoragePoolRequest + * + * @experimental + */ + public static function build(string $project, string $zone, string $resource): self + { + return (new self()) + ->setProject($project) + ->setZone($zone) + ->setResource($resource); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $options_requested_policy_version + * Requested IAM Policy version. + * @type string $project + * Project ID for this request. + * @type string $resource + * Name or id of the resource for this request. + * @type string $zone + * The name of the zone for this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * Requested IAM Policy version. + * + * Generated from protobuf field optional int32 options_requested_policy_version = 499220029; + * @return int + */ + public function getOptionsRequestedPolicyVersion() + { + return isset($this->options_requested_policy_version) ? $this->options_requested_policy_version : 0; + } + + public function hasOptionsRequestedPolicyVersion() + { + return isset($this->options_requested_policy_version); + } + + public function clearOptionsRequestedPolicyVersion() + { + unset($this->options_requested_policy_version); + } + + /** + * Requested IAM Policy version. + * + * Generated from protobuf field optional int32 options_requested_policy_version = 499220029; + * @param int $var + * @return $this + */ + public function setOptionsRequestedPolicyVersion($var) + { + GPBUtil::checkInt32($var); + $this->options_requested_policy_version = $var; + + return $this; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Name or id of the resource for this request. + * + * Generated from protobuf field string resource = 195806222 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getResource() + { + return $this->resource; + } + + /** + * Name or id of the resource for this request. + * + * Generated from protobuf field string resource = 195806222 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkString($var, True); + $this->resource = $var; + + return $this; + } + + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/GetInstanceGroupManagerResizeRequestRequest.php b/Compute/src/V1/GetInstanceGroupManagerResizeRequestRequest.php new file mode 100644 index 000000000000..402e36907611 --- /dev/null +++ b/Compute/src/V1/GetInstanceGroupManagerResizeRequestRequest.php @@ -0,0 +1,188 @@ +google.cloud.compute.v1.GetInstanceGroupManagerResizeRequestRequest + */ +class GetInstanceGroupManagerResizeRequestRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the managed instance group. Name should conform to RFC1035 or be a resource ID. + * + * Generated from protobuf field string instance_group_manager = 249363395 [(.google.api.field_behavior) = REQUIRED]; + */ + private $instance_group_manager = ''; + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + */ + private $project = ''; + /** + * The name of the resize request. Name should conform to RFC1035 or be a resource ID. + * + * Generated from protobuf field string resize_request = 216941060 [(.google.api.field_behavior) = REQUIRED]; + */ + private $resize_request = ''; + /** + * Name of the href="/compute/docs/regions-zones/#available">zone scoping this request. Name should conform to RFC1035. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + */ + private $zone = ''; + + /** + * @param string $project Project ID for this request. + * @param string $zone Name of the href="/compute/docs/regions-zones/#available">zone scoping this request. Name should conform to RFC1035. + * @param string $instanceGroupManager The name of the managed instance group. Name should conform to RFC1035 or be a resource ID. + * @param string $resizeRequest The name of the resize request. Name should conform to RFC1035 or be a resource ID. + * + * @return \Google\Cloud\Compute\V1\GetInstanceGroupManagerResizeRequestRequest + * + * @experimental + */ + public static function build(string $project, string $zone, string $instanceGroupManager, string $resizeRequest): self + { + return (new self()) + ->setProject($project) + ->setZone($zone) + ->setInstanceGroupManager($instanceGroupManager) + ->setResizeRequest($resizeRequest); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance_group_manager + * The name of the managed instance group. Name should conform to RFC1035 or be a resource ID. + * @type string $project + * Project ID for this request. + * @type string $resize_request + * The name of the resize request. Name should conform to RFC1035 or be a resource ID. + * @type string $zone + * Name of the href="/compute/docs/regions-zones/#available">zone scoping this request. Name should conform to RFC1035. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * The name of the managed instance group. Name should conform to RFC1035 or be a resource ID. + * + * Generated from protobuf field string instance_group_manager = 249363395 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstanceGroupManager() + { + return $this->instance_group_manager; + } + + /** + * The name of the managed instance group. Name should conform to RFC1035 or be a resource ID. + * + * Generated from protobuf field string instance_group_manager = 249363395 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstanceGroupManager($var) + { + GPBUtil::checkString($var, True); + $this->instance_group_manager = $var; + + return $this; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * The name of the resize request. Name should conform to RFC1035 or be a resource ID. + * + * Generated from protobuf field string resize_request = 216941060 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getResizeRequest() + { + return $this->resize_request; + } + + /** + * The name of the resize request. Name should conform to RFC1035 or be a resource ID. + * + * Generated from protobuf field string resize_request = 216941060 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setResizeRequest($var) + { + GPBUtil::checkString($var, True); + $this->resize_request = $var; + + return $this; + } + + /** + * Name of the href="/compute/docs/regions-zones/#available">zone scoping this request. Name should conform to RFC1035. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * Name of the href="/compute/docs/regions-zones/#available">zone scoping this request. Name should conform to RFC1035. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/GetInstanceSettingRequest.php b/Compute/src/V1/GetInstanceSettingRequest.php new file mode 100644 index 000000000000..4f90a4e5317d --- /dev/null +++ b/Compute/src/V1/GetInstanceSettingRequest.php @@ -0,0 +1,116 @@ +google.cloud.compute.v1.GetInstanceSettingRequest + */ +class GetInstanceSettingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + */ + private $project = ''; + /** + * Name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + */ + private $zone = ''; + + /** + * @param string $project Project ID for this request. + * @param string $zone Name of the zone for this request. + * + * @return \Google\Cloud\Compute\V1\GetInstanceSettingRequest + * + * @experimental + */ + public static function build(string $project, string $zone): self + { + return (new self()) + ->setProject($project) + ->setZone($zone); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project + * Project ID for this request. + * @type string $zone + * Name of the zone for this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * Name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/GetStoragePoolRequest.php b/Compute/src/V1/GetStoragePoolRequest.php new file mode 100644 index 000000000000..86e8bb323c43 --- /dev/null +++ b/Compute/src/V1/GetStoragePoolRequest.php @@ -0,0 +1,152 @@ +google.cloud.compute.v1.GetStoragePoolRequest + */ +class GetStoragePoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + */ + private $project = ''; + /** + * Name of the storage pool to return. + * + * Generated from protobuf field string storage_pool = 360473440 [(.google.api.field_behavior) = REQUIRED]; + */ + private $storage_pool = ''; + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + */ + private $zone = ''; + + /** + * @param string $project Project ID for this request. + * @param string $zone The name of the zone for this request. + * @param string $storagePool Name of the storage pool to return. + * + * @return \Google\Cloud\Compute\V1\GetStoragePoolRequest + * + * @experimental + */ + public static function build(string $project, string $zone, string $storagePool): self + { + return (new self()) + ->setProject($project) + ->setZone($zone) + ->setStoragePool($storagePool); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project + * Project ID for this request. + * @type string $storage_pool + * Name of the storage pool to return. + * @type string $zone + * The name of the zone for this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Name of the storage pool to return. + * + * Generated from protobuf field string storage_pool = 360473440 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getStoragePool() + { + return $this->storage_pool; + } + + /** + * Name of the storage pool to return. + * + * Generated from protobuf field string storage_pool = 360473440 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setStoragePool($var) + { + GPBUtil::checkString($var, True); + $this->storage_pool = $var; + + return $this; + } + + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/GetStoragePoolTypeRequest.php b/Compute/src/V1/GetStoragePoolTypeRequest.php new file mode 100644 index 000000000000..a0ff6e358838 --- /dev/null +++ b/Compute/src/V1/GetStoragePoolTypeRequest.php @@ -0,0 +1,152 @@ +google.cloud.compute.v1.GetStoragePoolTypeRequest + */ +class GetStoragePoolTypeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + */ + private $project = ''; + /** + * Name of the storage pool type to return. + * + * Generated from protobuf field string storage_pool_type = 285999289 [(.google.api.field_behavior) = REQUIRED]; + */ + private $storage_pool_type = ''; + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + */ + private $zone = ''; + + /** + * @param string $project Project ID for this request. + * @param string $zone The name of the zone for this request. + * @param string $storagePoolType Name of the storage pool type to return. + * + * @return \Google\Cloud\Compute\V1\GetStoragePoolTypeRequest + * + * @experimental + */ + public static function build(string $project, string $zone, string $storagePoolType): self + { + return (new self()) + ->setProject($project) + ->setZone($zone) + ->setStoragePoolType($storagePoolType); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project + * Project ID for this request. + * @type string $storage_pool_type + * Name of the storage pool type to return. + * @type string $zone + * The name of the zone for this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Name of the storage pool type to return. + * + * Generated from protobuf field string storage_pool_type = 285999289 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getStoragePoolType() + { + return $this->storage_pool_type; + } + + /** + * Name of the storage pool type to return. + * + * Generated from protobuf field string storage_pool_type = 285999289 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setStoragePoolType($var) + { + GPBUtil::checkString($var, True); + $this->storage_pool_type = $var; + + return $this; + } + + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/GuestOsFeature.php b/Compute/src/V1/GuestOsFeature.php index a92ef462296e..24f95cad6d8e 100644 --- a/Compute/src/V1/GuestOsFeature.php +++ b/Compute/src/V1/GuestOsFeature.php @@ -16,7 +16,7 @@ class GuestOsFeature extends \Google\Protobuf\Internal\Message { /** - * The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_LIVE_MIGRATABLE - SEV_SNP_CAPABLE - TDX_CAPABLE - IDPF For more information, see Enabling guest operating system features. + * The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_LIVE_MIGRATABLE_V2 - SEV_SNP_CAPABLE - TDX_CAPABLE - IDPF For more information, see Enabling guest operating system features. * Check the Type enum for the list of possible values. * * Generated from protobuf field optional string type = 3575610; @@ -30,7 +30,7 @@ class GuestOsFeature extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $type - * The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_LIVE_MIGRATABLE - SEV_SNP_CAPABLE - TDX_CAPABLE - IDPF For more information, see Enabling guest operating system features. + * The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_LIVE_MIGRATABLE_V2 - SEV_SNP_CAPABLE - TDX_CAPABLE - IDPF For more information, see Enabling guest operating system features. * Check the Type enum for the list of possible values. * } */ @@ -40,7 +40,7 @@ public function __construct($data = NULL) { } /** - * The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_LIVE_MIGRATABLE - SEV_SNP_CAPABLE - TDX_CAPABLE - IDPF For more information, see Enabling guest operating system features. + * The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_LIVE_MIGRATABLE_V2 - SEV_SNP_CAPABLE - TDX_CAPABLE - IDPF For more information, see Enabling guest operating system features. * Check the Type enum for the list of possible values. * * Generated from protobuf field optional string type = 3575610; @@ -62,7 +62,7 @@ public function clearType() } /** - * The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_LIVE_MIGRATABLE - SEV_SNP_CAPABLE - TDX_CAPABLE - IDPF For more information, see Enabling guest operating system features. + * The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_LIVE_MIGRATABLE_V2 - SEV_SNP_CAPABLE - TDX_CAPABLE - IDPF For more information, see Enabling guest operating system features. * Check the Type enum for the list of possible values. * * Generated from protobuf field optional string type = 3575610; diff --git a/Compute/src/V1/GuestOsFeature/Type.php b/Compute/src/V1/GuestOsFeature/Type.php index c296360526c4..12ee8211e990 100644 --- a/Compute/src/V1/GuestOsFeature/Type.php +++ b/Compute/src/V1/GuestOsFeature/Type.php @@ -7,7 +7,7 @@ use UnexpectedValueException; /** - * The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_LIVE_MIGRATABLE - SEV_SNP_CAPABLE - TDX_CAPABLE - IDPF For more information, see Enabling guest operating system features. + * The ID of a supported feature. To add multiple values, use commas to separate values. Set to one or more of the following values: - VIRTIO_SCSI_MULTIQUEUE - WINDOWS - MULTI_IP_SUBNET - UEFI_COMPATIBLE - GVNIC - SEV_CAPABLE - SUSPEND_RESUME_COMPATIBLE - SEV_LIVE_MIGRATABLE_V2 - SEV_SNP_CAPABLE - TDX_CAPABLE - IDPF For more information, see Enabling guest operating system features. * * Protobuf type google.cloud.compute.v1.GuestOsFeature.Type */ diff --git a/Compute/src/V1/InsertInstanceGroupManagerResizeRequestRequest.php b/Compute/src/V1/InsertInstanceGroupManagerResizeRequestRequest.php new file mode 100644 index 000000000000..8ce01ff91548 --- /dev/null +++ b/Compute/src/V1/InsertInstanceGroupManagerResizeRequestRequest.php @@ -0,0 +1,242 @@ +google.cloud.compute.v1.InsertInstanceGroupManagerResizeRequestRequest + */ +class InsertInstanceGroupManagerResizeRequestRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the managed instance group to which the resize request will be added. Name should conform to RFC1035 or be a resource ID. + * + * Generated from protobuf field string instance_group_manager = 249363395 [(.google.api.field_behavior) = REQUIRED]; + */ + private $instance_group_manager = ''; + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.InstanceGroupManagerResizeRequest instance_group_manager_resize_request_resource = 468541293 [(.google.api.field_behavior) = REQUIRED]; + */ + private $instance_group_manager_resize_request_resource = null; + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + */ + private $project = ''; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field optional string request_id = 37109963; + */ + private $request_id = null; + /** + * The name of the zone where the managed instance group is located and where the resize request will be created. Name should conform to RFC1035. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + */ + private $zone = ''; + + /** + * @param string $project Project ID for this request. + * @param string $zone The name of the zone where the managed instance group is located and where the resize request will be created. Name should conform to RFC1035. + * @param string $instanceGroupManager The name of the managed instance group to which the resize request will be added. Name should conform to RFC1035 or be a resource ID. + * @param \Google\Cloud\Compute\V1\InstanceGroupManagerResizeRequest $instanceGroupManagerResizeRequestResource The body resource for this request + * + * @return \Google\Cloud\Compute\V1\InsertInstanceGroupManagerResizeRequestRequest + * + * @experimental + */ + public static function build(string $project, string $zone, string $instanceGroupManager, \Google\Cloud\Compute\V1\InstanceGroupManagerResizeRequest $instanceGroupManagerResizeRequestResource): self + { + return (new self()) + ->setProject($project) + ->setZone($zone) + ->setInstanceGroupManager($instanceGroupManager) + ->setInstanceGroupManagerResizeRequestResource($instanceGroupManagerResizeRequestResource); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance_group_manager + * The name of the managed instance group to which the resize request will be added. Name should conform to RFC1035 or be a resource ID. + * @type \Google\Cloud\Compute\V1\InstanceGroupManagerResizeRequest $instance_group_manager_resize_request_resource + * The body resource for this request + * @type string $project + * Project ID for this request. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * @type string $zone + * The name of the zone where the managed instance group is located and where the resize request will be created. Name should conform to RFC1035. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * The name of the managed instance group to which the resize request will be added. Name should conform to RFC1035 or be a resource ID. + * + * Generated from protobuf field string instance_group_manager = 249363395 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstanceGroupManager() + { + return $this->instance_group_manager; + } + + /** + * The name of the managed instance group to which the resize request will be added. Name should conform to RFC1035 or be a resource ID. + * + * Generated from protobuf field string instance_group_manager = 249363395 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstanceGroupManager($var) + { + GPBUtil::checkString($var, True); + $this->instance_group_manager = $var; + + return $this; + } + + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.InstanceGroupManagerResizeRequest instance_group_manager_resize_request_resource = 468541293 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Compute\V1\InstanceGroupManagerResizeRequest|null + */ + public function getInstanceGroupManagerResizeRequestResource() + { + return $this->instance_group_manager_resize_request_resource; + } + + public function hasInstanceGroupManagerResizeRequestResource() + { + return isset($this->instance_group_manager_resize_request_resource); + } + + public function clearInstanceGroupManagerResizeRequestResource() + { + unset($this->instance_group_manager_resize_request_resource); + } + + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.InstanceGroupManagerResizeRequest instance_group_manager_resize_request_resource = 468541293 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Compute\V1\InstanceGroupManagerResizeRequest $var + * @return $this + */ + public function setInstanceGroupManagerResizeRequestResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\InstanceGroupManagerResizeRequest::class); + $this->instance_group_manager_resize_request_resource = $var; + + return $this; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field optional string request_id = 37109963; + * @return string + */ + public function getRequestId() + { + return isset($this->request_id) ? $this->request_id : ''; + } + + public function hasRequestId() + { + return isset($this->request_id); + } + + public function clearRequestId() + { + unset($this->request_id); + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field optional string request_id = 37109963; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * The name of the zone where the managed instance group is located and where the resize request will be created. Name should conform to RFC1035. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The name of the zone where the managed instance group is located and where the resize request will be created. Name should conform to RFC1035. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/InsertStoragePoolRequest.php b/Compute/src/V1/InsertStoragePoolRequest.php new file mode 100644 index 000000000000..5c3951e2744a --- /dev/null +++ b/Compute/src/V1/InsertStoragePoolRequest.php @@ -0,0 +1,206 @@ +google.cloud.compute.v1.InsertStoragePoolRequest + */ +class InsertStoragePoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + */ + private $project = ''; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field optional string request_id = 37109963; + */ + private $request_id = null; + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.StoragePool storage_pool_resource = 157179405 [(.google.api.field_behavior) = REQUIRED]; + */ + private $storage_pool_resource = null; + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + */ + private $zone = ''; + + /** + * @param string $project Project ID for this request. + * @param string $zone The name of the zone for this request. + * @param \Google\Cloud\Compute\V1\StoragePool $storagePoolResource The body resource for this request + * + * @return \Google\Cloud\Compute\V1\InsertStoragePoolRequest + * + * @experimental + */ + public static function build(string $project, string $zone, \Google\Cloud\Compute\V1\StoragePool $storagePoolResource): self + { + return (new self()) + ->setProject($project) + ->setZone($zone) + ->setStoragePoolResource($storagePoolResource); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project + * Project ID for this request. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * @type \Google\Cloud\Compute\V1\StoragePool $storage_pool_resource + * The body resource for this request + * @type string $zone + * The name of the zone for this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field optional string request_id = 37109963; + * @return string + */ + public function getRequestId() + { + return isset($this->request_id) ? $this->request_id : ''; + } + + public function hasRequestId() + { + return isset($this->request_id); + } + + public function clearRequestId() + { + unset($this->request_id); + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field optional string request_id = 37109963; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.StoragePool storage_pool_resource = 157179405 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Compute\V1\StoragePool|null + */ + public function getStoragePoolResource() + { + return $this->storage_pool_resource; + } + + public function hasStoragePoolResource() + { + return isset($this->storage_pool_resource); + } + + public function clearStoragePoolResource() + { + unset($this->storage_pool_resource); + } + + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.StoragePool storage_pool_resource = 157179405 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Compute\V1\StoragePool $var + * @return $this + */ + public function setStoragePoolResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\StoragePool::class); + $this->storage_pool_resource = $var; + + return $this; + } + + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/InstanceGroupManagerResizeRequest.php b/Compute/src/V1/InstanceGroupManagerResizeRequest.php new file mode 100644 index 000000000000..6fb64ac43964 --- /dev/null +++ b/Compute/src/V1/InstanceGroupManagerResizeRequest.php @@ -0,0 +1,565 @@ +google.cloud.compute.v1.InstanceGroupManagerResizeRequest + */ +class InstanceGroupManagerResizeRequest extends \Google\Protobuf\Internal\Message +{ + /** + * [Output Only] The creation timestamp for this resize request in RFC3339 text format. + * + * Generated from protobuf field optional string creation_timestamp = 30525366; + */ + private $creation_timestamp = null; + /** + * An optional description of this resource. + * + * Generated from protobuf field optional string description = 422937596; + */ + private $description = null; + /** + * [Output Only] A unique identifier for this resource type. The server generates this identifier. + * + * Generated from protobuf field optional uint64 id = 3355; + */ + private $id = null; + /** + * [Output Only] The resource type, which is always compute#instanceGroupManagerResizeRequest for resize requests. + * + * Generated from protobuf field optional string kind = 3292052; + */ + private $kind = null; + /** + * The name of this resize request. The name must be 1-63 characters long, and comply with RFC1035. + * + * Generated from protobuf field optional string name = 3373707; + */ + private $name = null; + /** + * Requested run duration for instances that will be created by this request. At the end of the run duration instance will be deleted. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Duration requested_run_duration = 232146425; + */ + private $requested_run_duration = null; + /** + * The number of instances to be created by this resize request. The group's target size will be increased by this number. + * + * Generated from protobuf field optional int32 resize_by = 533735362; + */ + private $resize_by = null; + /** + * [Output Only] The URL for this resize request. The server defines this URL. + * + * Generated from protobuf field optional string self_link = 456214797; + */ + private $self_link = null; + /** + * [Output Only] Server-defined URL for this resource with the resource id. + * + * Generated from protobuf field optional string self_link_with_id = 44520962; + */ + private $self_link_with_id = null; + /** + * [Output only] Current state of the request. + * Check the State enum for the list of possible values. + * + * Generated from protobuf field optional string state = 109757585; + */ + private $state = null; + /** + * [Output only] Status of the request. + * + * Generated from protobuf field optional .google.cloud.compute.v1.InstanceGroupManagerResizeRequestStatus status = 181260274; + */ + private $status = null; + /** + * [Output Only] The URL of a zone where the resize request is located. Populated only for zonal resize requests. + * + * Generated from protobuf field optional string zone = 3744684; + */ + private $zone = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $creation_timestamp + * [Output Only] The creation timestamp for this resize request in RFC3339 text format. + * @type string $description + * An optional description of this resource. + * @type int|string $id + * [Output Only] A unique identifier for this resource type. The server generates this identifier. + * @type string $kind + * [Output Only] The resource type, which is always compute#instanceGroupManagerResizeRequest for resize requests. + * @type string $name + * The name of this resize request. The name must be 1-63 characters long, and comply with RFC1035. + * @type \Google\Cloud\Compute\V1\Duration $requested_run_duration + * Requested run duration for instances that will be created by this request. At the end of the run duration instance will be deleted. + * @type int $resize_by + * The number of instances to be created by this resize request. The group's target size will be increased by this number. + * @type string $self_link + * [Output Only] The URL for this resize request. The server defines this URL. + * @type string $self_link_with_id + * [Output Only] Server-defined URL for this resource with the resource id. + * @type string $state + * [Output only] Current state of the request. + * Check the State enum for the list of possible values. + * @type \Google\Cloud\Compute\V1\InstanceGroupManagerResizeRequestStatus $status + * [Output only] Status of the request. + * @type string $zone + * [Output Only] The URL of a zone where the resize request is located. Populated only for zonal resize requests. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * [Output Only] The creation timestamp for this resize request in RFC3339 text format. + * + * Generated from protobuf field optional string creation_timestamp = 30525366; + * @return string + */ + public function getCreationTimestamp() + { + return isset($this->creation_timestamp) ? $this->creation_timestamp : ''; + } + + public function hasCreationTimestamp() + { + return isset($this->creation_timestamp); + } + + public function clearCreationTimestamp() + { + unset($this->creation_timestamp); + } + + /** + * [Output Only] The creation timestamp for this resize request in RFC3339 text format. + * + * Generated from protobuf field optional string creation_timestamp = 30525366; + * @param string $var + * @return $this + */ + public function setCreationTimestamp($var) + { + GPBUtil::checkString($var, True); + $this->creation_timestamp = $var; + + return $this; + } + + /** + * An optional description of this resource. + * + * Generated from protobuf field optional string description = 422937596; + * @return string + */ + public function getDescription() + { + return isset($this->description) ? $this->description : ''; + } + + public function hasDescription() + { + return isset($this->description); + } + + public function clearDescription() + { + unset($this->description); + } + + /** + * An optional description of this resource. + * + * Generated from protobuf field optional string description = 422937596; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * [Output Only] A unique identifier for this resource type. The server generates this identifier. + * + * Generated from protobuf field optional uint64 id = 3355; + * @return int|string + */ + public function getId() + { + return isset($this->id) ? $this->id : 0; + } + + public function hasId() + { + return isset($this->id); + } + + public function clearId() + { + unset($this->id); + } + + /** + * [Output Only] A unique identifier for this resource type. The server generates this identifier. + * + * Generated from protobuf field optional uint64 id = 3355; + * @param int|string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkUint64($var); + $this->id = $var; + + return $this; + } + + /** + * [Output Only] The resource type, which is always compute#instanceGroupManagerResizeRequest for resize requests. + * + * Generated from protobuf field optional string kind = 3292052; + * @return string + */ + public function getKind() + { + return isset($this->kind) ? $this->kind : ''; + } + + public function hasKind() + { + return isset($this->kind); + } + + public function clearKind() + { + unset($this->kind); + } + + /** + * [Output Only] The resource type, which is always compute#instanceGroupManagerResizeRequest for resize requests. + * + * Generated from protobuf field optional string kind = 3292052; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The name of this resize request. The name must be 1-63 characters long, and comply with RFC1035. + * + * Generated from protobuf field optional string name = 3373707; + * @return string + */ + public function getName() + { + return isset($this->name) ? $this->name : ''; + } + + public function hasName() + { + return isset($this->name); + } + + public function clearName() + { + unset($this->name); + } + + /** + * The name of this resize request. The name must be 1-63 characters long, and comply with RFC1035. + * + * Generated from protobuf field optional string name = 3373707; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Requested run duration for instances that will be created by this request. At the end of the run duration instance will be deleted. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Duration requested_run_duration = 232146425; + * @return \Google\Cloud\Compute\V1\Duration|null + */ + public function getRequestedRunDuration() + { + return $this->requested_run_duration; + } + + public function hasRequestedRunDuration() + { + return isset($this->requested_run_duration); + } + + public function clearRequestedRunDuration() + { + unset($this->requested_run_duration); + } + + /** + * Requested run duration for instances that will be created by this request. At the end of the run duration instance will be deleted. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Duration requested_run_duration = 232146425; + * @param \Google\Cloud\Compute\V1\Duration $var + * @return $this + */ + public function setRequestedRunDuration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\Duration::class); + $this->requested_run_duration = $var; + + return $this; + } + + /** + * The number of instances to be created by this resize request. The group's target size will be increased by this number. + * + * Generated from protobuf field optional int32 resize_by = 533735362; + * @return int + */ + public function getResizeBy() + { + return isset($this->resize_by) ? $this->resize_by : 0; + } + + public function hasResizeBy() + { + return isset($this->resize_by); + } + + public function clearResizeBy() + { + unset($this->resize_by); + } + + /** + * The number of instances to be created by this resize request. The group's target size will be increased by this number. + * + * Generated from protobuf field optional int32 resize_by = 533735362; + * @param int $var + * @return $this + */ + public function setResizeBy($var) + { + GPBUtil::checkInt32($var); + $this->resize_by = $var; + + return $this; + } + + /** + * [Output Only] The URL for this resize request. The server defines this URL. + * + * Generated from protobuf field optional string self_link = 456214797; + * @return string + */ + public function getSelfLink() + { + return isset($this->self_link) ? $this->self_link : ''; + } + + public function hasSelfLink() + { + return isset($this->self_link); + } + + public function clearSelfLink() + { + unset($this->self_link); + } + + /** + * [Output Only] The URL for this resize request. The server defines this URL. + * + * Generated from protobuf field optional string self_link = 456214797; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * [Output Only] Server-defined URL for this resource with the resource id. + * + * Generated from protobuf field optional string self_link_with_id = 44520962; + * @return string + */ + public function getSelfLinkWithId() + { + return isset($this->self_link_with_id) ? $this->self_link_with_id : ''; + } + + public function hasSelfLinkWithId() + { + return isset($this->self_link_with_id); + } + + public function clearSelfLinkWithId() + { + unset($this->self_link_with_id); + } + + /** + * [Output Only] Server-defined URL for this resource with the resource id. + * + * Generated from protobuf field optional string self_link_with_id = 44520962; + * @param string $var + * @return $this + */ + public function setSelfLinkWithId($var) + { + GPBUtil::checkString($var, True); + $this->self_link_with_id = $var; + + return $this; + } + + /** + * [Output only] Current state of the request. + * Check the State enum for the list of possible values. + * + * Generated from protobuf field optional string state = 109757585; + * @return string + */ + public function getState() + { + return isset($this->state) ? $this->state : ''; + } + + public function hasState() + { + return isset($this->state); + } + + public function clearState() + { + unset($this->state); + } + + /** + * [Output only] Current state of the request. + * Check the State enum for the list of possible values. + * + * Generated from protobuf field optional string state = 109757585; + * @param string $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkString($var, True); + $this->state = $var; + + return $this; + } + + /** + * [Output only] Status of the request. + * + * Generated from protobuf field optional .google.cloud.compute.v1.InstanceGroupManagerResizeRequestStatus status = 181260274; + * @return \Google\Cloud\Compute\V1\InstanceGroupManagerResizeRequestStatus|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * [Output only] Status of the request. + * + * Generated from protobuf field optional .google.cloud.compute.v1.InstanceGroupManagerResizeRequestStatus status = 181260274; + * @param \Google\Cloud\Compute\V1\InstanceGroupManagerResizeRequestStatus $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\InstanceGroupManagerResizeRequestStatus::class); + $this->status = $var; + + return $this; + } + + /** + * [Output Only] The URL of a zone where the resize request is located. Populated only for zonal resize requests. + * + * Generated from protobuf field optional string zone = 3744684; + * @return string + */ + public function getZone() + { + return isset($this->zone) ? $this->zone : ''; + } + + public function hasZone() + { + return isset($this->zone); + } + + public function clearZone() + { + unset($this->zone); + } + + /** + * [Output Only] The URL of a zone where the resize request is located. Populated only for zonal resize requests. + * + * Generated from protobuf field optional string zone = 3744684; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/InstanceGroupManagerResizeRequest/State.php b/Compute/src/V1/InstanceGroupManagerResizeRequest/State.php new file mode 100644 index 000000000000..8944de56de6c --- /dev/null +++ b/Compute/src/V1/InstanceGroupManagerResizeRequest/State.php @@ -0,0 +1,90 @@ +google.cloud.compute.v1.InstanceGroupManagerResizeRequest.State + */ +class State +{ + /** + * A value indicating that the enum field is not set. + * + * Generated from protobuf enum UNDEFINED_STATE = 0; + */ + const UNDEFINED_STATE = 0; + /** + * The request was created successfully and was accepted for provisioning when the capacity becomes available. + * + * Generated from protobuf enum ACCEPTED = 246714279; + */ + const ACCEPTED = 246714279; + /** + * The request is cancelled. + * + * Generated from protobuf enum CANCELLED = 41957681; + */ + const CANCELLED = 41957681; + /** + * Resize request is being created and may still fail creation. + * + * Generated from protobuf enum CREATING = 455564985; + */ + const CREATING = 455564985; + /** + * The request failed before or during provisioning. If the request fails during provisioning, any VMs that were created during provisioning are rolled back and removed from the MIG. + * + * Generated from protobuf enum FAILED = 455706685; + */ + const FAILED = 455706685; + /** + * Default value. This value should never be returned. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 470755401; + */ + const STATE_UNSPECIFIED = 470755401; + /** + * The request succeeded. + * + * Generated from protobuf enum SUCCEEDED = 511103553; + */ + const SUCCEEDED = 511103553; + + private static $valueToName = [ + self::UNDEFINED_STATE => 'UNDEFINED_STATE', + self::ACCEPTED => 'ACCEPTED', + self::CANCELLED => 'CANCELLED', + self::CREATING => 'CREATING', + self::FAILED => 'FAILED', + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::SUCCEEDED => 'SUCCEEDED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/Compute/src/V1/InstanceGroupManagerResizeRequestStatus.php b/Compute/src/V1/InstanceGroupManagerResizeRequestStatus.php new file mode 100644 index 000000000000..3ae2450312bc --- /dev/null +++ b/Compute/src/V1/InstanceGroupManagerResizeRequestStatus.php @@ -0,0 +1,120 @@ +google.cloud.compute.v1.InstanceGroupManagerResizeRequestStatus + */ +class InstanceGroupManagerResizeRequestStatus extends \Google\Protobuf\Internal\Message +{ + /** + * [Output only] Fatal errors encountered during the queueing or provisioning phases of the ResizeRequest that caused the transition to the FAILED state. Contrary to the last_attempt errors, this field is final and errors are never removed from here, as the ResizeRequest is not going to retry. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Error error = 96784904; + */ + private $error = null; + /** + * [Output only] Information about the last attempt to fulfill the request. The value is temporary since the ResizeRequest can retry, as long as it's still active and the last attempt value can either be cleared or replaced with a different error. Since ResizeRequest retries infrequently, the value may be stale and no longer show an active problem. The value is cleared when ResizeRequest transitions to the final state (becomes inactive). If the final state is FAILED the error describing it will be storred in the "error" field only. + * + * Generated from protobuf field optional .google.cloud.compute.v1.InstanceGroupManagerResizeRequestStatusLastAttempt last_attempt = 434771492; + */ + private $last_attempt = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Compute\V1\Error $error + * [Output only] Fatal errors encountered during the queueing or provisioning phases of the ResizeRequest that caused the transition to the FAILED state. Contrary to the last_attempt errors, this field is final and errors are never removed from here, as the ResizeRequest is not going to retry. + * @type \Google\Cloud\Compute\V1\InstanceGroupManagerResizeRequestStatusLastAttempt $last_attempt + * [Output only] Information about the last attempt to fulfill the request. The value is temporary since the ResizeRequest can retry, as long as it's still active and the last attempt value can either be cleared or replaced with a different error. Since ResizeRequest retries infrequently, the value may be stale and no longer show an active problem. The value is cleared when ResizeRequest transitions to the final state (becomes inactive). If the final state is FAILED the error describing it will be storred in the "error" field only. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * [Output only] Fatal errors encountered during the queueing or provisioning phases of the ResizeRequest that caused the transition to the FAILED state. Contrary to the last_attempt errors, this field is final and errors are never removed from here, as the ResizeRequest is not going to retry. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Error error = 96784904; + * @return \Google\Cloud\Compute\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * [Output only] Fatal errors encountered during the queueing or provisioning phases of the ResizeRequest that caused the transition to the FAILED state. Contrary to the last_attempt errors, this field is final and errors are never removed from here, as the ResizeRequest is not going to retry. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Error error = 96784904; + * @param \Google\Cloud\Compute\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\Error::class); + $this->error = $var; + + return $this; + } + + /** + * [Output only] Information about the last attempt to fulfill the request. The value is temporary since the ResizeRequest can retry, as long as it's still active and the last attempt value can either be cleared or replaced with a different error. Since ResizeRequest retries infrequently, the value may be stale and no longer show an active problem. The value is cleared when ResizeRequest transitions to the final state (becomes inactive). If the final state is FAILED the error describing it will be storred in the "error" field only. + * + * Generated from protobuf field optional .google.cloud.compute.v1.InstanceGroupManagerResizeRequestStatusLastAttempt last_attempt = 434771492; + * @return \Google\Cloud\Compute\V1\InstanceGroupManagerResizeRequestStatusLastAttempt|null + */ + public function getLastAttempt() + { + return $this->last_attempt; + } + + public function hasLastAttempt() + { + return isset($this->last_attempt); + } + + public function clearLastAttempt() + { + unset($this->last_attempt); + } + + /** + * [Output only] Information about the last attempt to fulfill the request. The value is temporary since the ResizeRequest can retry, as long as it's still active and the last attempt value can either be cleared or replaced with a different error. Since ResizeRequest retries infrequently, the value may be stale and no longer show an active problem. The value is cleared when ResizeRequest transitions to the final state (becomes inactive). If the final state is FAILED the error describing it will be storred in the "error" field only. + * + * Generated from protobuf field optional .google.cloud.compute.v1.InstanceGroupManagerResizeRequestStatusLastAttempt last_attempt = 434771492; + * @param \Google\Cloud\Compute\V1\InstanceGroupManagerResizeRequestStatusLastAttempt $var + * @return $this + */ + public function setLastAttempt($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\InstanceGroupManagerResizeRequestStatusLastAttempt::class); + $this->last_attempt = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/InstanceGroupManagerResizeRequestStatusLastAttempt.php b/Compute/src/V1/InstanceGroupManagerResizeRequestStatusLastAttempt.php new file mode 100644 index 000000000000..3e30af1aa0fd --- /dev/null +++ b/Compute/src/V1/InstanceGroupManagerResizeRequestStatusLastAttempt.php @@ -0,0 +1,76 @@ +google.cloud.compute.v1.InstanceGroupManagerResizeRequestStatusLastAttempt + */ +class InstanceGroupManagerResizeRequestStatusLastAttempt extends \Google\Protobuf\Internal\Message +{ + /** + * Errors that prevented the ResizeRequest to be fulfilled. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Error error = 96784904; + */ + private $error = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Compute\V1\Error $error + * Errors that prevented the ResizeRequest to be fulfilled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * Errors that prevented the ResizeRequest to be fulfilled. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Error error = 96784904; + * @return \Google\Cloud\Compute\V1\Error|null + */ + public function getError() + { + return $this->error; + } + + public function hasError() + { + return isset($this->error); + } + + public function clearError() + { + unset($this->error); + } + + /** + * Errors that prevented the ResizeRequest to be fulfilled. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Error error = 96784904; + * @param \Google\Cloud\Compute\V1\Error $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\Error::class); + $this->error = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/InstanceGroupManagerResizeRequestsClient.php b/Compute/src/V1/InstanceGroupManagerResizeRequestsClient.php new file mode 100644 index 000000000000..0cd182c6415f --- /dev/null +++ b/Compute/src/V1/InstanceGroupManagerResizeRequestsClient.php @@ -0,0 +1,34 @@ +google.cloud.compute.v1.InstanceGroupManagerResizeRequestsListResponse + */ +class InstanceGroupManagerResizeRequestsListResponse extends \Google\Protobuf\Internal\Message +{ + /** + * [Output Only] Unique identifier for the resource; defined by the server. + * + * Generated from protobuf field optional string id = 3355; + */ + private $id = null; + /** + * A list of resize request resources. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.InstanceGroupManagerResizeRequest items = 100526016; + */ + private $items; + /** + * [Output Only] Type of the resource. Always compute#instanceGroupManagerResizeRequestList for a list of resize requests. + * + * Generated from protobuf field optional string kind = 3292052; + */ + private $kind = null; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * + * Generated from protobuf field optional string next_page_token = 79797525; + */ + private $next_page_token = null; + /** + * [Output Only] Server-defined URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + */ + private $self_link = null; + /** + * [Output Only] Informational warning message. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + */ + private $warning = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * [Output Only] Unique identifier for the resource; defined by the server. + * @type array<\Google\Cloud\Compute\V1\InstanceGroupManagerResizeRequest>|\Google\Protobuf\Internal\RepeatedField $items + * A list of resize request resources. + * @type string $kind + * [Output Only] Type of the resource. Always compute#instanceGroupManagerResizeRequestList for a list of resize requests. + * @type string $next_page_token + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * @type string $self_link + * [Output Only] Server-defined URL for this resource. + * @type \Google\Cloud\Compute\V1\Warning $warning + * [Output Only] Informational warning message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * [Output Only] Unique identifier for the resource; defined by the server. + * + * Generated from protobuf field optional string id = 3355; + * @return string + */ + public function getId() + { + return isset($this->id) ? $this->id : ''; + } + + public function hasId() + { + return isset($this->id); + } + + public function clearId() + { + unset($this->id); + } + + /** + * [Output Only] Unique identifier for the resource; defined by the server. + * + * Generated from protobuf field optional string id = 3355; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * A list of resize request resources. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.InstanceGroupManagerResizeRequest items = 100526016; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * A list of resize request resources. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.InstanceGroupManagerResizeRequest items = 100526016; + * @param array<\Google\Cloud\Compute\V1\InstanceGroupManagerResizeRequest>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\InstanceGroupManagerResizeRequest::class); + $this->items = $arr; + + return $this; + } + + /** + * [Output Only] Type of the resource. Always compute#instanceGroupManagerResizeRequestList for a list of resize requests. + * + * Generated from protobuf field optional string kind = 3292052; + * @return string + */ + public function getKind() + { + return isset($this->kind) ? $this->kind : ''; + } + + public function hasKind() + { + return isset($this->kind); + } + + public function clearKind() + { + unset($this->kind); + } + + /** + * [Output Only] Type of the resource. Always compute#instanceGroupManagerResizeRequestList for a list of resize requests. + * + * Generated from protobuf field optional string kind = 3292052; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * + * Generated from protobuf field optional string next_page_token = 79797525; + * @return string + */ + public function getNextPageToken() + { + return isset($this->next_page_token) ? $this->next_page_token : ''; + } + + public function hasNextPageToken() + { + return isset($this->next_page_token); + } + + public function clearNextPageToken() + { + unset($this->next_page_token); + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * + * Generated from protobuf field optional string next_page_token = 79797525; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * [Output Only] Server-defined URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + * @return string + */ + public function getSelfLink() + { + return isset($this->self_link) ? $this->self_link : ''; + } + + public function hasSelfLink() + { + return isset($this->self_link); + } + + public function clearSelfLink() + { + unset($this->self_link); + } + + /** + * [Output Only] Server-defined URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * [Output Only] Informational warning message. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + * @return \Google\Cloud\Compute\V1\Warning|null + */ + public function getWarning() + { + return $this->warning; + } + + public function hasWarning() + { + return isset($this->warning); + } + + public function clearWarning() + { + unset($this->warning); + } + + /** + * [Output Only] Informational warning message. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + * @param \Google\Cloud\Compute\V1\Warning $var + * @return $this + */ + public function setWarning($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\Warning::class); + $this->warning = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/InstanceGroupManagerStatusStateful.php b/Compute/src/V1/InstanceGroupManagerStatusStateful.php index 7b82e4fc541c..168b327fcdcb 100644 --- a/Compute/src/V1/InstanceGroupManagerStatusStateful.php +++ b/Compute/src/V1/InstanceGroupManagerStatusStateful.php @@ -21,7 +21,7 @@ class InstanceGroupManagerStatusStateful extends \Google\Protobuf\Internal\Messa */ private $has_stateful_config = null; /** - * [Output Only] Status of per-instance configurations on the instance. + * [Output Only] Status of per-instance configurations on the instances. * * Generated from protobuf field optional .google.cloud.compute.v1.InstanceGroupManagerStatusStatefulPerInstanceConfigs per_instance_configs = 526265001; */ @@ -36,7 +36,7 @@ class InstanceGroupManagerStatusStateful extends \Google\Protobuf\Internal\Messa * @type bool $has_stateful_config * [Output Only] A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful configuration even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions. * @type \Google\Cloud\Compute\V1\InstanceGroupManagerStatusStatefulPerInstanceConfigs $per_instance_configs - * [Output Only] Status of per-instance configurations on the instance. + * [Output Only] Status of per-instance configurations on the instances. * } */ public function __construct($data = NULL) { @@ -81,7 +81,7 @@ public function setHasStatefulConfig($var) } /** - * [Output Only] Status of per-instance configurations on the instance. + * [Output Only] Status of per-instance configurations on the instances. * * Generated from protobuf field optional .google.cloud.compute.v1.InstanceGroupManagerStatusStatefulPerInstanceConfigs per_instance_configs = 526265001; * @return \Google\Cloud\Compute\V1\InstanceGroupManagerStatusStatefulPerInstanceConfigs|null @@ -102,7 +102,7 @@ public function clearPerInstanceConfigs() } /** - * [Output Only] Status of per-instance configurations on the instance. + * [Output Only] Status of per-instance configurations on the instances. * * Generated from protobuf field optional .google.cloud.compute.v1.InstanceGroupManagerStatusStatefulPerInstanceConfigs per_instance_configs = 526265001; * @param \Google\Cloud\Compute\V1\InstanceGroupManagerStatusStatefulPerInstanceConfigs $var diff --git a/Compute/src/V1/InstanceSettings.php b/Compute/src/V1/InstanceSettings.php new file mode 100644 index 000000000000..76de0c50dffc --- /dev/null +++ b/Compute/src/V1/InstanceSettings.php @@ -0,0 +1,209 @@ +google.cloud.compute.v1.InstanceSettings + */ +class InstanceSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies a fingerprint for instance settings, which is essentially a hash of the instance settings resource's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance settings resource. You must always provide an up-to-date fingerprint hash in order to update or change the resource, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the resource. + * + * Generated from protobuf field optional string fingerprint = 234678500; + */ + private $fingerprint = null; + /** + * [Output Only] Type of the resource. Always compute#instance_settings for instance settings. + * + * Generated from protobuf field optional string kind = 3292052; + */ + private $kind = null; + /** + * The metadata key/value pairs assigned to all the instances in the corresponding scope. + * + * Generated from protobuf field optional .google.cloud.compute.v1.InstanceSettingsMetadata metadata = 86866735; + */ + private $metadata = null; + /** + * [Output Only] URL of the zone where the resource resides You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. + * + * Generated from protobuf field optional string zone = 3744684; + */ + private $zone = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $fingerprint + * Specifies a fingerprint for instance settings, which is essentially a hash of the instance settings resource's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance settings resource. You must always provide an up-to-date fingerprint hash in order to update or change the resource, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the resource. + * @type string $kind + * [Output Only] Type of the resource. Always compute#instance_settings for instance settings. + * @type \Google\Cloud\Compute\V1\InstanceSettingsMetadata $metadata + * The metadata key/value pairs assigned to all the instances in the corresponding scope. + * @type string $zone + * [Output Only] URL of the zone where the resource resides You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * Specifies a fingerprint for instance settings, which is essentially a hash of the instance settings resource's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance settings resource. You must always provide an up-to-date fingerprint hash in order to update or change the resource, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the resource. + * + * Generated from protobuf field optional string fingerprint = 234678500; + * @return string + */ + public function getFingerprint() + { + return isset($this->fingerprint) ? $this->fingerprint : ''; + } + + public function hasFingerprint() + { + return isset($this->fingerprint); + } + + public function clearFingerprint() + { + unset($this->fingerprint); + } + + /** + * Specifies a fingerprint for instance settings, which is essentially a hash of the instance settings resource's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance settings resource. You must always provide an up-to-date fingerprint hash in order to update or change the resource, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the resource. + * + * Generated from protobuf field optional string fingerprint = 234678500; + * @param string $var + * @return $this + */ + public function setFingerprint($var) + { + GPBUtil::checkString($var, True); + $this->fingerprint = $var; + + return $this; + } + + /** + * [Output Only] Type of the resource. Always compute#instance_settings for instance settings. + * + * Generated from protobuf field optional string kind = 3292052; + * @return string + */ + public function getKind() + { + return isset($this->kind) ? $this->kind : ''; + } + + public function hasKind() + { + return isset($this->kind); + } + + public function clearKind() + { + unset($this->kind); + } + + /** + * [Output Only] Type of the resource. Always compute#instance_settings for instance settings. + * + * Generated from protobuf field optional string kind = 3292052; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * The metadata key/value pairs assigned to all the instances in the corresponding scope. + * + * Generated from protobuf field optional .google.cloud.compute.v1.InstanceSettingsMetadata metadata = 86866735; + * @return \Google\Cloud\Compute\V1\InstanceSettingsMetadata|null + */ + public function getMetadata() + { + return $this->metadata; + } + + public function hasMetadata() + { + return isset($this->metadata); + } + + public function clearMetadata() + { + unset($this->metadata); + } + + /** + * The metadata key/value pairs assigned to all the instances in the corresponding scope. + * + * Generated from protobuf field optional .google.cloud.compute.v1.InstanceSettingsMetadata metadata = 86866735; + * @param \Google\Cloud\Compute\V1\InstanceSettingsMetadata $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\InstanceSettingsMetadata::class); + $this->metadata = $var; + + return $this; + } + + /** + * [Output Only] URL of the zone where the resource resides You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. + * + * Generated from protobuf field optional string zone = 3744684; + * @return string + */ + public function getZone() + { + return isset($this->zone) ? $this->zone : ''; + } + + public function hasZone() + { + return isset($this->zone); + } + + public function clearZone() + { + unset($this->zone); + } + + /** + * [Output Only] URL of the zone where the resource resides You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. + * + * Generated from protobuf field optional string zone = 3744684; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/InstanceSettingsMetadata.php b/Compute/src/V1/InstanceSettingsMetadata.php new file mode 100644 index 000000000000..cf6a0cf56844 --- /dev/null +++ b/Compute/src/V1/InstanceSettingsMetadata.php @@ -0,0 +1,110 @@ +google.cloud.compute.v1.InstanceSettingsMetadata + */ +class InstanceSettingsMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * A metadata key/value items map. The total size of all keys and values must be less than 512KB. + * + * Generated from protobuf field map items = 100526016; + */ + private $items; + /** + * [Output Only] Type of the resource. Always compute#metadata for metadata. + * + * Generated from protobuf field optional string kind = 3292052; + */ + private $kind = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $items + * A metadata key/value items map. The total size of all keys and values must be less than 512KB. + * @type string $kind + * [Output Only] Type of the resource. Always compute#metadata for metadata. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * A metadata key/value items map. The total size of all keys and values must be less than 512KB. + * + * Generated from protobuf field map items = 100526016; + * @return \Google\Protobuf\Internal\MapField + */ + public function getItems() + { + return $this->items; + } + + /** + * A metadata key/value items map. The total size of all keys and values must be less than 512KB. + * + * Generated from protobuf field map items = 100526016; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->items = $arr; + + return $this; + } + + /** + * [Output Only] Type of the resource. Always compute#metadata for metadata. + * + * Generated from protobuf field optional string kind = 3292052; + * @return string + */ + public function getKind() + { + return isset($this->kind) ? $this->kind : ''; + } + + public function hasKind() + { + return isset($this->kind); + } + + public function clearKind() + { + unset($this->kind); + } + + /** + * [Output Only] Type of the resource. Always compute#metadata for metadata. + * + * Generated from protobuf field optional string kind = 3292052; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/InstanceSettingsServiceClient.php b/Compute/src/V1/InstanceSettingsServiceClient.php new file mode 100644 index 000000000000..d30cb2b798b4 --- /dev/null +++ b/Compute/src/V1/InstanceSettingsServiceClient.php @@ -0,0 +1,34 @@ +optional string type = 3575610; @@ -61,7 +61,7 @@ class InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy extends \Goo * @type string $short_name * [Output Only] The short name of the firewall policy. * @type string $type - * [Output Only] The type of the firewall policy. Can be one of HIERARCHY, NETWORK, NETWORK_REGIONAL. + * [Output Only] The type of the firewall policy. Can be one of HIERARCHY, NETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, SYSTEM_REGIONAL. * Check the Type enum for the list of possible values. * } */ @@ -205,7 +205,7 @@ public function setShortName($var) } /** - * [Output Only] The type of the firewall policy. Can be one of HIERARCHY, NETWORK, NETWORK_REGIONAL. + * [Output Only] The type of the firewall policy. Can be one of HIERARCHY, NETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, SYSTEM_REGIONAL. * Check the Type enum for the list of possible values. * * Generated from protobuf field optional string type = 3575610; @@ -227,7 +227,7 @@ public function clearType() } /** - * [Output Only] The type of the firewall policy. Can be one of HIERARCHY, NETWORK, NETWORK_REGIONAL. + * [Output Only] The type of the firewall policy. Can be one of HIERARCHY, NETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, SYSTEM_REGIONAL. * Check the Type enum for the list of possible values. * * Generated from protobuf field optional string type = 3575610; diff --git a/Compute/src/V1/InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy/Type.php b/Compute/src/V1/InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy/Type.php index 8b5e44e5119d..00d339e66e23 100644 --- a/Compute/src/V1/InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy/Type.php +++ b/Compute/src/V1/InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy/Type.php @@ -7,7 +7,7 @@ use UnexpectedValueException; /** - * [Output Only] The type of the firewall policy. Can be one of HIERARCHY, NETWORK, NETWORK_REGIONAL. + * [Output Only] The type of the firewall policy. Can be one of HIERARCHY, NETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, SYSTEM_REGIONAL. * * Protobuf type google.cloud.compute.v1.InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy.Type */ diff --git a/Compute/src/V1/InstantSnapshot/Status.php b/Compute/src/V1/InstantSnapshot/Status.php index 4955a6433118..5e11b86984af 100644 --- a/Compute/src/V1/InstantSnapshot/Status.php +++ b/Compute/src/V1/InstantSnapshot/Status.php @@ -43,6 +43,12 @@ class Status * Generated from protobuf enum READY = 77848963; */ const READY = 77848963; + /** + * InstantSnapshot is currently unavailable and cannot be used for Disk restoration + * + * Generated from protobuf enum UNAVAILABLE = 413756464; + */ + const UNAVAILABLE = 413756464; private static $valueToName = [ self::UNDEFINED_STATUS => 'UNDEFINED_STATUS', @@ -50,6 +56,7 @@ class Status self::DELETING => 'DELETING', self::FAILED => 'FAILED', self::READY => 'READY', + self::UNAVAILABLE => 'UNAVAILABLE', ]; public static function name($value) diff --git a/Compute/src/V1/InterconnectRemoteLocationConstraints.php b/Compute/src/V1/InterconnectRemoteLocationConstraints.php index dc2ad21ee775..42c3de96fb8a 100644 --- a/Compute/src/V1/InterconnectRemoteLocationConstraints.php +++ b/Compute/src/V1/InterconnectRemoteLocationConstraints.php @@ -15,7 +15,7 @@ class InterconnectRemoteLocationConstraints extends \Google\Protobuf\Internal\Message { /** - * [Output Only] Port pair remote location constraints, which can take one of the following values: PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, PORT_PAIR_MATCHING_REMOTE_LOCATION. GCP's API refers only to individual ports, but the UI uses this field when ordering a pair of ports, to prevent users from accidentally ordering something that is incompatible with their cloud provider. Specifically, when ordering a redundant pair of Cross-Cloud Interconnect ports, and one of them uses a remote location with portPairMatchingRemoteLocation set to matching, the UI requires that both ports use the same remote location. + * [Output Only] Port pair remote location constraints, which can take one of the following values: PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, PORT_PAIR_MATCHING_REMOTE_LOCATION. Google Cloud API refers only to individual ports, but the UI uses this field when ordering a pair of ports, to prevent users from accidentally ordering something that is incompatible with their cloud provider. Specifically, when ordering a redundant pair of Cross-Cloud Interconnect ports, and one of them uses a remote location with portPairMatchingRemoteLocation set to matching, the UI requires that both ports use the same remote location. * Check the PortPairRemoteLocation enum for the list of possible values. * * Generated from protobuf field optional string port_pair_remote_location = 495917351; @@ -42,7 +42,7 @@ class InterconnectRemoteLocationConstraints extends \Google\Protobuf\Internal\Me * Optional. Data for populating the Message object. * * @type string $port_pair_remote_location - * [Output Only] Port pair remote location constraints, which can take one of the following values: PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, PORT_PAIR_MATCHING_REMOTE_LOCATION. GCP's API refers only to individual ports, but the UI uses this field when ordering a pair of ports, to prevent users from accidentally ordering something that is incompatible with their cloud provider. Specifically, when ordering a redundant pair of Cross-Cloud Interconnect ports, and one of them uses a remote location with portPairMatchingRemoteLocation set to matching, the UI requires that both ports use the same remote location. + * [Output Only] Port pair remote location constraints, which can take one of the following values: PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, PORT_PAIR_MATCHING_REMOTE_LOCATION. Google Cloud API refers only to individual ports, but the UI uses this field when ordering a pair of ports, to prevent users from accidentally ordering something that is incompatible with their cloud provider. Specifically, when ordering a redundant pair of Cross-Cloud Interconnect ports, and one of them uses a remote location with portPairMatchingRemoteLocation set to matching, the UI requires that both ports use the same remote location. * Check the PortPairRemoteLocation enum for the list of possible values. * @type string $port_pair_vlan * [Output Only] Port pair VLAN constraints, which can take one of the following values: PORT_PAIR_UNCONSTRAINED_VLAN, PORT_PAIR_MATCHING_VLAN @@ -57,7 +57,7 @@ public function __construct($data = NULL) { } /** - * [Output Only] Port pair remote location constraints, which can take one of the following values: PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, PORT_PAIR_MATCHING_REMOTE_LOCATION. GCP's API refers only to individual ports, but the UI uses this field when ordering a pair of ports, to prevent users from accidentally ordering something that is incompatible with their cloud provider. Specifically, when ordering a redundant pair of Cross-Cloud Interconnect ports, and one of them uses a remote location with portPairMatchingRemoteLocation set to matching, the UI requires that both ports use the same remote location. + * [Output Only] Port pair remote location constraints, which can take one of the following values: PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, PORT_PAIR_MATCHING_REMOTE_LOCATION. Google Cloud API refers only to individual ports, but the UI uses this field when ordering a pair of ports, to prevent users from accidentally ordering something that is incompatible with their cloud provider. Specifically, when ordering a redundant pair of Cross-Cloud Interconnect ports, and one of them uses a remote location with portPairMatchingRemoteLocation set to matching, the UI requires that both ports use the same remote location. * Check the PortPairRemoteLocation enum for the list of possible values. * * Generated from protobuf field optional string port_pair_remote_location = 495917351; @@ -79,7 +79,7 @@ public function clearPortPairRemoteLocation() } /** - * [Output Only] Port pair remote location constraints, which can take one of the following values: PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, PORT_PAIR_MATCHING_REMOTE_LOCATION. GCP's API refers only to individual ports, but the UI uses this field when ordering a pair of ports, to prevent users from accidentally ordering something that is incompatible with their cloud provider. Specifically, when ordering a redundant pair of Cross-Cloud Interconnect ports, and one of them uses a remote location with portPairMatchingRemoteLocation set to matching, the UI requires that both ports use the same remote location. + * [Output Only] Port pair remote location constraints, which can take one of the following values: PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, PORT_PAIR_MATCHING_REMOTE_LOCATION. Google Cloud API refers only to individual ports, but the UI uses this field when ordering a pair of ports, to prevent users from accidentally ordering something that is incompatible with their cloud provider. Specifically, when ordering a redundant pair of Cross-Cloud Interconnect ports, and one of them uses a remote location with portPairMatchingRemoteLocation set to matching, the UI requires that both ports use the same remote location. * Check the PortPairRemoteLocation enum for the list of possible values. * * Generated from protobuf field optional string port_pair_remote_location = 495917351; diff --git a/Compute/src/V1/InterconnectRemoteLocationConstraints/PortPairRemoteLocation.php b/Compute/src/V1/InterconnectRemoteLocationConstraints/PortPairRemoteLocation.php index 8c3b9edd837b..4e1a6aa68828 100644 --- a/Compute/src/V1/InterconnectRemoteLocationConstraints/PortPairRemoteLocation.php +++ b/Compute/src/V1/InterconnectRemoteLocationConstraints/PortPairRemoteLocation.php @@ -7,7 +7,7 @@ use UnexpectedValueException; /** - * [Output Only] Port pair remote location constraints, which can take one of the following values: PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, PORT_PAIR_MATCHING_REMOTE_LOCATION. GCP's API refers only to individual ports, but the UI uses this field when ordering a pair of ports, to prevent users from accidentally ordering something that is incompatible with their cloud provider. Specifically, when ordering a redundant pair of Cross-Cloud Interconnect ports, and one of them uses a remote location with portPairMatchingRemoteLocation set to matching, the UI requires that both ports use the same remote location. + * [Output Only] Port pair remote location constraints, which can take one of the following values: PORT_PAIR_UNCONSTRAINED_REMOTE_LOCATION, PORT_PAIR_MATCHING_REMOTE_LOCATION. Google Cloud API refers only to individual ports, but the UI uses this field when ordering a pair of ports, to prevent users from accidentally ordering something that is incompatible with their cloud provider. Specifically, when ordering a redundant pair of Cross-Cloud Interconnect ports, and one of them uses a remote location with portPairMatchingRemoteLocation set to matching, the UI requires that both ports use the same remote location. * * Protobuf type google.cloud.compute.v1.InterconnectRemoteLocationConstraints.PortPairRemoteLocation */ diff --git a/Compute/src/V1/ListDisksStoragePoolsRequest.php b/Compute/src/V1/ListDisksStoragePoolsRequest.php new file mode 100644 index 000000000000..e446b9a20403 --- /dev/null +++ b/Compute/src/V1/ListDisksStoragePoolsRequest.php @@ -0,0 +1,372 @@ +google.cloud.compute.v1.ListDisksStoragePoolsRequest + */ +class ListDisksStoragePoolsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * + * Generated from protobuf field optional string filter = 336120696; + */ + private $filter = null; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * + * Generated from protobuf field optional uint32 max_results = 54715419; + */ + private $max_results = null; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * + * Generated from protobuf field optional string order_by = 160562920; + */ + private $order_by = null; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * + * Generated from protobuf field optional string page_token = 19994697; + */ + private $page_token = null; + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + */ + private $project = ''; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * + * Generated from protobuf field optional bool return_partial_success = 517198390; + */ + private $return_partial_success = null; + /** + * Name of the storage pool to list disks of. + * + * Generated from protobuf field string storage_pool = 360473440 [(.google.api.field_behavior) = REQUIRED]; + */ + private $storage_pool = ''; + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + */ + private $zone = ''; + + /** + * @param string $project Project ID for this request. + * @param string $zone The name of the zone for this request. + * @param string $storagePool Name of the storage pool to list disks of. + * + * @return \Google\Cloud\Compute\V1\ListDisksStoragePoolsRequest + * + * @experimental + */ + public static function build(string $project, string $zone, string $storagePool): self + { + return (new self()) + ->setProject($project) + ->setZone($zone) + ->setStoragePool($storagePool); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $filter + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * @type int $max_results + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * @type string $order_by + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * @type string $page_token + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * @type string $project + * Project ID for this request. + * @type bool $return_partial_success + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * @type string $storage_pool + * Name of the storage pool to list disks of. + * @type string $zone + * The name of the zone for this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * + * Generated from protobuf field optional string filter = 336120696; + * @return string + */ + public function getFilter() + { + return isset($this->filter) ? $this->filter : ''; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * + * Generated from protobuf field optional string filter = 336120696; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * + * Generated from protobuf field optional uint32 max_results = 54715419; + * @return int + */ + public function getMaxResults() + { + return isset($this->max_results) ? $this->max_results : 0; + } + + public function hasMaxResults() + { + return isset($this->max_results); + } + + public function clearMaxResults() + { + unset($this->max_results); + } + + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * + * Generated from protobuf field optional uint32 max_results = 54715419; + * @param int $var + * @return $this + */ + public function setMaxResults($var) + { + GPBUtil::checkUint32($var); + $this->max_results = $var; + + return $this; + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * + * Generated from protobuf field optional string order_by = 160562920; + * @return string + */ + public function getOrderBy() + { + return isset($this->order_by) ? $this->order_by : ''; + } + + public function hasOrderBy() + { + return isset($this->order_by); + } + + public function clearOrderBy() + { + unset($this->order_by); + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * + * Generated from protobuf field optional string order_by = 160562920; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * + * Generated from protobuf field optional string page_token = 19994697; + * @return string + */ + public function getPageToken() + { + return isset($this->page_token) ? $this->page_token : ''; + } + + public function hasPageToken() + { + return isset($this->page_token); + } + + public function clearPageToken() + { + unset($this->page_token); + } + + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * + * Generated from protobuf field optional string page_token = 19994697; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * + * Generated from protobuf field optional bool return_partial_success = 517198390; + * @return bool + */ + public function getReturnPartialSuccess() + { + return isset($this->return_partial_success) ? $this->return_partial_success : false; + } + + public function hasReturnPartialSuccess() + { + return isset($this->return_partial_success); + } + + public function clearReturnPartialSuccess() + { + unset($this->return_partial_success); + } + + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * + * Generated from protobuf field optional bool return_partial_success = 517198390; + * @param bool $var + * @return $this + */ + public function setReturnPartialSuccess($var) + { + GPBUtil::checkBool($var); + $this->return_partial_success = $var; + + return $this; + } + + /** + * Name of the storage pool to list disks of. + * + * Generated from protobuf field string storage_pool = 360473440 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getStoragePool() + { + return $this->storage_pool; + } + + /** + * Name of the storage pool to list disks of. + * + * Generated from protobuf field string storage_pool = 360473440 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setStoragePool($var) + { + GPBUtil::checkString($var, True); + $this->storage_pool = $var; + + return $this; + } + + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/ListInstanceGroupManagerResizeRequestsRequest.php b/Compute/src/V1/ListInstanceGroupManagerResizeRequestsRequest.php new file mode 100644 index 000000000000..6ff30e73a3dc --- /dev/null +++ b/Compute/src/V1/ListInstanceGroupManagerResizeRequestsRequest.php @@ -0,0 +1,372 @@ +google.cloud.compute.v1.ListInstanceGroupManagerResizeRequestsRequest + */ +class ListInstanceGroupManagerResizeRequestsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * + * Generated from protobuf field optional string filter = 336120696; + */ + private $filter = null; + /** + * The name of the managed instance group. The name should conform to RFC1035. + * + * Generated from protobuf field string instance_group_manager = 249363395 [(.google.api.field_behavior) = REQUIRED]; + */ + private $instance_group_manager = ''; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * + * Generated from protobuf field optional uint32 max_results = 54715419; + */ + private $max_results = null; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * + * Generated from protobuf field optional string order_by = 160562920; + */ + private $order_by = null; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * + * Generated from protobuf field optional string page_token = 19994697; + */ + private $page_token = null; + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + */ + private $project = ''; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * + * Generated from protobuf field optional bool return_partial_success = 517198390; + */ + private $return_partial_success = null; + /** + * The name of the zone where the managed instance group is located. The name should conform to RFC1035. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + */ + private $zone = ''; + + /** + * @param string $project Project ID for this request. + * @param string $zone The name of the zone where the managed instance group is located. The name should conform to RFC1035. + * @param string $instanceGroupManager The name of the managed instance group. The name should conform to RFC1035. + * + * @return \Google\Cloud\Compute\V1\ListInstanceGroupManagerResizeRequestsRequest + * + * @experimental + */ + public static function build(string $project, string $zone, string $instanceGroupManager): self + { + return (new self()) + ->setProject($project) + ->setZone($zone) + ->setInstanceGroupManager($instanceGroupManager); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $filter + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * @type string $instance_group_manager + * The name of the managed instance group. The name should conform to RFC1035. + * @type int $max_results + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * @type string $order_by + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * @type string $page_token + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * @type string $project + * Project ID for this request. + * @type bool $return_partial_success + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * @type string $zone + * The name of the zone where the managed instance group is located. The name should conform to RFC1035. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * + * Generated from protobuf field optional string filter = 336120696; + * @return string + */ + public function getFilter() + { + return isset($this->filter) ? $this->filter : ''; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * + * Generated from protobuf field optional string filter = 336120696; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * The name of the managed instance group. The name should conform to RFC1035. + * + * Generated from protobuf field string instance_group_manager = 249363395 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstanceGroupManager() + { + return $this->instance_group_manager; + } + + /** + * The name of the managed instance group. The name should conform to RFC1035. + * + * Generated from protobuf field string instance_group_manager = 249363395 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstanceGroupManager($var) + { + GPBUtil::checkString($var, True); + $this->instance_group_manager = $var; + + return $this; + } + + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * + * Generated from protobuf field optional uint32 max_results = 54715419; + * @return int + */ + public function getMaxResults() + { + return isset($this->max_results) ? $this->max_results : 0; + } + + public function hasMaxResults() + { + return isset($this->max_results); + } + + public function clearMaxResults() + { + unset($this->max_results); + } + + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * + * Generated from protobuf field optional uint32 max_results = 54715419; + * @param int $var + * @return $this + */ + public function setMaxResults($var) + { + GPBUtil::checkUint32($var); + $this->max_results = $var; + + return $this; + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * + * Generated from protobuf field optional string order_by = 160562920; + * @return string + */ + public function getOrderBy() + { + return isset($this->order_by) ? $this->order_by : ''; + } + + public function hasOrderBy() + { + return isset($this->order_by); + } + + public function clearOrderBy() + { + unset($this->order_by); + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * + * Generated from protobuf field optional string order_by = 160562920; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * + * Generated from protobuf field optional string page_token = 19994697; + * @return string + */ + public function getPageToken() + { + return isset($this->page_token) ? $this->page_token : ''; + } + + public function hasPageToken() + { + return isset($this->page_token); + } + + public function clearPageToken() + { + unset($this->page_token); + } + + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * + * Generated from protobuf field optional string page_token = 19994697; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * + * Generated from protobuf field optional bool return_partial_success = 517198390; + * @return bool + */ + public function getReturnPartialSuccess() + { + return isset($this->return_partial_success) ? $this->return_partial_success : false; + } + + public function hasReturnPartialSuccess() + { + return isset($this->return_partial_success); + } + + public function clearReturnPartialSuccess() + { + unset($this->return_partial_success); + } + + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * + * Generated from protobuf field optional bool return_partial_success = 517198390; + * @param bool $var + * @return $this + */ + public function setReturnPartialSuccess($var) + { + GPBUtil::checkBool($var); + $this->return_partial_success = $var; + + return $this; + } + + /** + * The name of the zone where the managed instance group is located. The name should conform to RFC1035. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The name of the zone where the managed instance group is located. The name should conform to RFC1035. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/ListStoragePoolTypesRequest.php b/Compute/src/V1/ListStoragePoolTypesRequest.php new file mode 100644 index 000000000000..ac7e68627039 --- /dev/null +++ b/Compute/src/V1/ListStoragePoolTypesRequest.php @@ -0,0 +1,336 @@ +google.cloud.compute.v1.ListStoragePoolTypesRequest + */ +class ListStoragePoolTypesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * + * Generated from protobuf field optional string filter = 336120696; + */ + private $filter = null; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * + * Generated from protobuf field optional uint32 max_results = 54715419; + */ + private $max_results = null; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * + * Generated from protobuf field optional string order_by = 160562920; + */ + private $order_by = null; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * + * Generated from protobuf field optional string page_token = 19994697; + */ + private $page_token = null; + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + */ + private $project = ''; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * + * Generated from protobuf field optional bool return_partial_success = 517198390; + */ + private $return_partial_success = null; + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + */ + private $zone = ''; + + /** + * @param string $project Project ID for this request. + * @param string $zone The name of the zone for this request. + * + * @return \Google\Cloud\Compute\V1\ListStoragePoolTypesRequest + * + * @experimental + */ + public static function build(string $project, string $zone): self + { + return (new self()) + ->setProject($project) + ->setZone($zone); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $filter + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * @type int $max_results + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * @type string $order_by + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * @type string $page_token + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * @type string $project + * Project ID for this request. + * @type bool $return_partial_success + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * @type string $zone + * The name of the zone for this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * + * Generated from protobuf field optional string filter = 336120696; + * @return string + */ + public function getFilter() + { + return isset($this->filter) ? $this->filter : ''; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * + * Generated from protobuf field optional string filter = 336120696; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * + * Generated from protobuf field optional uint32 max_results = 54715419; + * @return int + */ + public function getMaxResults() + { + return isset($this->max_results) ? $this->max_results : 0; + } + + public function hasMaxResults() + { + return isset($this->max_results); + } + + public function clearMaxResults() + { + unset($this->max_results); + } + + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * + * Generated from protobuf field optional uint32 max_results = 54715419; + * @param int $var + * @return $this + */ + public function setMaxResults($var) + { + GPBUtil::checkUint32($var); + $this->max_results = $var; + + return $this; + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * + * Generated from protobuf field optional string order_by = 160562920; + * @return string + */ + public function getOrderBy() + { + return isset($this->order_by) ? $this->order_by : ''; + } + + public function hasOrderBy() + { + return isset($this->order_by); + } + + public function clearOrderBy() + { + unset($this->order_by); + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * + * Generated from protobuf field optional string order_by = 160562920; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * + * Generated from protobuf field optional string page_token = 19994697; + * @return string + */ + public function getPageToken() + { + return isset($this->page_token) ? $this->page_token : ''; + } + + public function hasPageToken() + { + return isset($this->page_token); + } + + public function clearPageToken() + { + unset($this->page_token); + } + + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * + * Generated from protobuf field optional string page_token = 19994697; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * + * Generated from protobuf field optional bool return_partial_success = 517198390; + * @return bool + */ + public function getReturnPartialSuccess() + { + return isset($this->return_partial_success) ? $this->return_partial_success : false; + } + + public function hasReturnPartialSuccess() + { + return isset($this->return_partial_success); + } + + public function clearReturnPartialSuccess() + { + unset($this->return_partial_success); + } + + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * + * Generated from protobuf field optional bool return_partial_success = 517198390; + * @param bool $var + * @return $this + */ + public function setReturnPartialSuccess($var) + { + GPBUtil::checkBool($var); + $this->return_partial_success = $var; + + return $this; + } + + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/ListStoragePoolsRequest.php b/Compute/src/V1/ListStoragePoolsRequest.php new file mode 100644 index 000000000000..575842de4f02 --- /dev/null +++ b/Compute/src/V1/ListStoragePoolsRequest.php @@ -0,0 +1,336 @@ +google.cloud.compute.v1.ListStoragePoolsRequest + */ +class ListStoragePoolsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * + * Generated from protobuf field optional string filter = 336120696; + */ + private $filter = null; + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * + * Generated from protobuf field optional uint32 max_results = 54715419; + */ + private $max_results = null; + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * + * Generated from protobuf field optional string order_by = 160562920; + */ + private $order_by = null; + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * + * Generated from protobuf field optional string page_token = 19994697; + */ + private $page_token = null; + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + */ + private $project = ''; + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * + * Generated from protobuf field optional bool return_partial_success = 517198390; + */ + private $return_partial_success = null; + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + */ + private $zone = ''; + + /** + * @param string $project Project ID for this request. + * @param string $zone The name of the zone for this request. + * + * @return \Google\Cloud\Compute\V1\ListStoragePoolsRequest + * + * @experimental + */ + public static function build(string $project, string $zone): self + { + return (new self()) + ->setProject($project) + ->setZone($zone); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $filter + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * @type int $max_results + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * @type string $order_by + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * @type string $page_token + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * @type string $project + * Project ID for this request. + * @type bool $return_partial_success + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * @type string $zone + * The name of the zone for this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * + * Generated from protobuf field optional string filter = 336120696; + * @return string + */ + public function getFilter() + { + return isset($this->filter) ? $this->filter : ''; + } + + public function hasFilter() + { + return isset($this->filter); + } + + public function clearFilter() + { + unset($this->filter); + } + + /** + * A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, `>=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted literal"` `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name "instance", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions. + * + * Generated from protobuf field optional string filter = 336120696; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * + * Generated from protobuf field optional uint32 max_results = 54715419; + * @return int + */ + public function getMaxResults() + { + return isset($this->max_results) ? $this->max_results : 0; + } + + public function hasMaxResults() + { + return isset($this->max_results); + } + + public function clearMaxResults() + { + unset($this->max_results); + } + + /** + * The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`) + * + * Generated from protobuf field optional uint32 max_results = 54715419; + * @param int $var + * @return $this + */ + public function setMaxResults($var) + { + GPBUtil::checkUint32($var); + $this->max_results = $var; + + return $this; + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * + * Generated from protobuf field optional string order_by = 160562920; + * @return string + */ + public function getOrderBy() + { + return isset($this->order_by) ? $this->order_by : ''; + } + + public function hasOrderBy() + { + return isset($this->order_by); + } + + public function clearOrderBy() + { + unset($this->order_by); + } + + /** + * Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported. + * + * Generated from protobuf field optional string order_by = 160562920; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * + * Generated from protobuf field optional string page_token = 19994697; + * @return string + */ + public function getPageToken() + { + return isset($this->page_token) ? $this->page_token : ''; + } + + public function hasPageToken() + { + return isset($this->page_token); + } + + public function clearPageToken() + { + unset($this->page_token); + } + + /** + * Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results. + * + * Generated from protobuf field optional string page_token = 19994697; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * + * Generated from protobuf field optional bool return_partial_success = 517198390; + * @return bool + */ + public function getReturnPartialSuccess() + { + return isset($this->return_partial_success) ? $this->return_partial_success : false; + } + + public function hasReturnPartialSuccess() + { + return isset($this->return_partial_success); + } + + public function clearReturnPartialSuccess() + { + unset($this->return_partial_success); + } + + /** + * Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code. + * + * Generated from protobuf field optional bool return_partial_success = 517198390; + * @param bool $var + * @return $this + */ + public function setReturnPartialSuccess($var) + { + GPBUtil::checkBool($var); + $this->return_partial_success = $var; + + return $this; + } + + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/NetworkEndpointGroup.php b/Compute/src/V1/NetworkEndpointGroup.php index d51ec40d8d03..e5ecb998ead7 100644 --- a/Compute/src/V1/NetworkEndpointGroup.php +++ b/Compute/src/V1/NetworkEndpointGroup.php @@ -82,7 +82,7 @@ class NetworkEndpointGroup extends \Google\Protobuf\Internal\Message */ private $network = null; /** - * Type of network endpoints in this network endpoint group. Can be one of GCE_VM_IP, GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT, INTERNET_IP_PORT, SERVERLESS, PRIVATE_SERVICE_CONNECT. + * Type of network endpoints in this network endpoint group. Can be one of GCE_VM_IP, GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT, INTERNET_IP_PORT, SERVERLESS, PRIVATE_SERVICE_CONNECT, GCE_VM_IP_PORTMAP. * Check the NetworkEndpointType enum for the list of possible values. * * Generated from protobuf field optional string network_endpoint_type = 118301523; @@ -158,7 +158,7 @@ class NetworkEndpointGroup extends \Google\Protobuf\Internal\Message * @type string $network * The URL of the network to which all network endpoints in the NEG belong. Uses default project network if unspecified. * @type string $network_endpoint_type - * Type of network endpoints in this network endpoint group. Can be one of GCE_VM_IP, GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT, INTERNET_IP_PORT, SERVERLESS, PRIVATE_SERVICE_CONNECT. + * Type of network endpoints in this network endpoint group. Can be one of GCE_VM_IP, GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT, INTERNET_IP_PORT, SERVERLESS, PRIVATE_SERVICE_CONNECT, GCE_VM_IP_PORTMAP. * Check the NetworkEndpointType enum for the list of possible values. * @type \Google\Cloud\Compute\V1\NetworkEndpointGroupPscData $psc_data * @type string $psc_target_service @@ -567,7 +567,7 @@ public function setNetwork($var) } /** - * Type of network endpoints in this network endpoint group. Can be one of GCE_VM_IP, GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT, INTERNET_IP_PORT, SERVERLESS, PRIVATE_SERVICE_CONNECT. + * Type of network endpoints in this network endpoint group. Can be one of GCE_VM_IP, GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT, INTERNET_IP_PORT, SERVERLESS, PRIVATE_SERVICE_CONNECT, GCE_VM_IP_PORTMAP. * Check the NetworkEndpointType enum for the list of possible values. * * Generated from protobuf field optional string network_endpoint_type = 118301523; @@ -589,7 +589,7 @@ public function clearNetworkEndpointType() } /** - * Type of network endpoints in this network endpoint group. Can be one of GCE_VM_IP, GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT, INTERNET_IP_PORT, SERVERLESS, PRIVATE_SERVICE_CONNECT. + * Type of network endpoints in this network endpoint group. Can be one of GCE_VM_IP, GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT, INTERNET_IP_PORT, SERVERLESS, PRIVATE_SERVICE_CONNECT, GCE_VM_IP_PORTMAP. * Check the NetworkEndpointType enum for the list of possible values. * * Generated from protobuf field optional string network_endpoint_type = 118301523; diff --git a/Compute/src/V1/NetworkEndpointGroup/NetworkEndpointType.php b/Compute/src/V1/NetworkEndpointGroup/NetworkEndpointType.php index e400b98eebd8..edc0ebde5564 100644 --- a/Compute/src/V1/NetworkEndpointGroup/NetworkEndpointType.php +++ b/Compute/src/V1/NetworkEndpointGroup/NetworkEndpointType.php @@ -7,7 +7,7 @@ use UnexpectedValueException; /** - * Type of network endpoints in this network endpoint group. Can be one of GCE_VM_IP, GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT, INTERNET_IP_PORT, SERVERLESS, PRIVATE_SERVICE_CONNECT. + * Type of network endpoints in this network endpoint group. Can be one of GCE_VM_IP, GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT, INTERNET_IP_PORT, SERVERLESS, PRIVATE_SERVICE_CONNECT, GCE_VM_IP_PORTMAP. * * Protobuf type google.cloud.compute.v1.NetworkEndpointGroup.NetworkEndpointType */ diff --git a/Compute/src/V1/NodeGroup.php b/Compute/src/V1/NodeGroup.php index d923f68676a1..7e5697b21cde 100644 --- a/Compute/src/V1/NodeGroup.php +++ b/Compute/src/V1/NodeGroup.php @@ -55,6 +55,13 @@ class NodeGroup extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional string location_hint = 350519505; */ private $location_hint = null; + /** + * Specifies the frequency of planned maintenance events. The accepted values are: `AS_NEEDED` and `RECURRENT`. + * Check the MaintenanceInterval enum for the list of possible values. + * + * Generated from protobuf field optional string maintenance_interval = 403368049; + */ + private $maintenance_interval = null; /** * Specifies how to handle instances when a node in the group undergoes maintenance. Set to one of: DEFAULT, RESTART_IN_PLACE, or MIGRATE_WITHIN_NODE_GROUP. The default value is DEFAULT. For more information, see Maintenance policies. * Check the MaintenancePolicy enum for the list of possible values. @@ -129,6 +136,9 @@ class NodeGroup extends \Google\Protobuf\Internal\Message * [Output Only] The type of the resource. Always compute#nodeGroup for node group. * @type string $location_hint * An opaque location hint used to place the Node close to other resources. This field is for use by internal tools that use the public API. The location hint here on the NodeGroup overrides any location_hint present in the NodeTemplate. + * @type string $maintenance_interval + * Specifies the frequency of planned maintenance events. The accepted values are: `AS_NEEDED` and `RECURRENT`. + * Check the MaintenanceInterval enum for the list of possible values. * @type string $maintenance_policy * Specifies how to handle instances when a node in the group undergoes maintenance. Set to one of: DEFAULT, RESTART_IN_PLACE, or MIGRATE_WITHIN_NODE_GROUP. The default value is DEFAULT. For more information, see Maintenance policies. * Check the MaintenancePolicy enum for the list of possible values. @@ -403,6 +413,44 @@ public function setLocationHint($var) return $this; } + /** + * Specifies the frequency of planned maintenance events. The accepted values are: `AS_NEEDED` and `RECURRENT`. + * Check the MaintenanceInterval enum for the list of possible values. + * + * Generated from protobuf field optional string maintenance_interval = 403368049; + * @return string + */ + public function getMaintenanceInterval() + { + return isset($this->maintenance_interval) ? $this->maintenance_interval : ''; + } + + public function hasMaintenanceInterval() + { + return isset($this->maintenance_interval); + } + + public function clearMaintenanceInterval() + { + unset($this->maintenance_interval); + } + + /** + * Specifies the frequency of planned maintenance events. The accepted values are: `AS_NEEDED` and `RECURRENT`. + * Check the MaintenanceInterval enum for the list of possible values. + * + * Generated from protobuf field optional string maintenance_interval = 403368049; + * @param string $var + * @return $this + */ + public function setMaintenanceInterval($var) + { + GPBUtil::checkString($var, True); + $this->maintenance_interval = $var; + + return $this; + } + /** * Specifies how to handle instances when a node in the group undergoes maintenance. Set to one of: DEFAULT, RESTART_IN_PLACE, or MIGRATE_WITHIN_NODE_GROUP. The default value is DEFAULT. For more information, see Maintenance policies. * Check the MaintenancePolicy enum for the list of possible values. diff --git a/Compute/src/V1/NodeGroup/MaintenanceInterval.php b/Compute/src/V1/NodeGroup/MaintenanceInterval.php new file mode 100644 index 000000000000..e87940fcf164 --- /dev/null +++ b/Compute/src/V1/NodeGroup/MaintenanceInterval.php @@ -0,0 +1,62 @@ +google.cloud.compute.v1.NodeGroup.MaintenanceInterval + */ +class MaintenanceInterval +{ + /** + * A value indicating that the enum field is not set. + * + * Generated from protobuf enum UNDEFINED_MAINTENANCE_INTERVAL = 0; + */ + const UNDEFINED_MAINTENANCE_INTERVAL = 0; + /** + * VMs are eligible to receive infrastructure and hypervisor updates as they become available. This may result in more maintenance operations (live migrations or terminations) for the VM than the PERIODIC and RECURRENT options. + * + * Generated from protobuf enum AS_NEEDED = 500724834; + */ + const AS_NEEDED = 500724834; + /** + * VMs receive infrastructure and hypervisor updates on a periodic basis, minimizing the number of maintenance operations (live migrations or terminations) on an individual VM. This may mean a VM will take longer to receive an update than if it was configured for AS_NEEDED. Security updates will still be applied as soon as they are available. RECURRENT is used for GEN3 and Slice of Hardware VMs. + * + * Generated from protobuf enum RECURRENT = 194244550; + */ + const RECURRENT = 194244550; + + private static $valueToName = [ + self::UNDEFINED_MAINTENANCE_INTERVAL => 'UNDEFINED_MAINTENANCE_INTERVAL', + self::AS_NEEDED => 'AS_NEEDED', + self::RECURRENT => 'RECURRENT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/Compute/src/V1/NodeGroupNode.php b/Compute/src/V1/NodeGroupNode.php index 05b20c470fee..9072c985fdaf 100644 --- a/Compute/src/V1/NodeGroupNode.php +++ b/Compute/src/V1/NodeGroupNode.php @@ -94,6 +94,12 @@ class NodeGroupNode extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional .google.cloud.compute.v1.InstanceConsumptionInfo total_resources = 97406698; */ private $total_resources = null; + /** + * [Output Only] The information about an upcoming maintenance event. + * + * Generated from protobuf field optional .google.cloud.compute.v1.UpcomingMaintenance upcoming_maintenance = 227348592; + */ + private $upcoming_maintenance = null; /** * Constructor. @@ -129,6 +135,8 @@ class NodeGroupNode extends \Google\Protobuf\Internal\Message * Check the Status enum for the list of possible values. * @type \Google\Cloud\Compute\V1\InstanceConsumptionInfo $total_resources * Total amount of available resources on the node. + * @type \Google\Cloud\Compute\V1\UpcomingMaintenance $upcoming_maintenance + * [Output Only] The information about an upcoming maintenance event. * } */ public function __construct($data = NULL) { @@ -568,5 +576,41 @@ public function setTotalResources($var) return $this; } + /** + * [Output Only] The information about an upcoming maintenance event. + * + * Generated from protobuf field optional .google.cloud.compute.v1.UpcomingMaintenance upcoming_maintenance = 227348592; + * @return \Google\Cloud\Compute\V1\UpcomingMaintenance|null + */ + public function getUpcomingMaintenance() + { + return $this->upcoming_maintenance; + } + + public function hasUpcomingMaintenance() + { + return isset($this->upcoming_maintenance); + } + + public function clearUpcomingMaintenance() + { + unset($this->upcoming_maintenance); + } + + /** + * [Output Only] The information about an upcoming maintenance event. + * + * Generated from protobuf field optional .google.cloud.compute.v1.UpcomingMaintenance upcoming_maintenance = 227348592; + * @param \Google\Cloud\Compute\V1\UpcomingMaintenance $var + * @return $this + */ + public function setUpcomingMaintenance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\UpcomingMaintenance::class); + $this->upcoming_maintenance = $var; + + return $this; + } + } diff --git a/Compute/src/V1/NodeGroupsPerformMaintenanceRequest.php b/Compute/src/V1/NodeGroupsPerformMaintenanceRequest.php new file mode 100644 index 000000000000..0e92cd0a2978 --- /dev/null +++ b/Compute/src/V1/NodeGroupsPerformMaintenanceRequest.php @@ -0,0 +1,110 @@ +google.cloud.compute.v1.NodeGroupsPerformMaintenanceRequest + */ +class NodeGroupsPerformMaintenanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * [Required] List of nodes affected by the call. + * + * Generated from protobuf field repeated string nodes = 104993457; + */ + private $nodes; + /** + * The start time of the schedule. The timestamp is an RFC3339 string. + * + * Generated from protobuf field optional string start_time = 37467274; + */ + private $start_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $nodes + * [Required] List of nodes affected by the call. + * @type string $start_time + * The start time of the schedule. The timestamp is an RFC3339 string. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * [Required] List of nodes affected by the call. + * + * Generated from protobuf field repeated string nodes = 104993457; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNodes() + { + return $this->nodes; + } + + /** + * [Required] List of nodes affected by the call. + * + * Generated from protobuf field repeated string nodes = 104993457; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setNodes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->nodes = $arr; + + return $this; + } + + /** + * The start time of the schedule. The timestamp is an RFC3339 string. + * + * Generated from protobuf field optional string start_time = 37467274; + * @return string + */ + public function getStartTime() + { + return isset($this->start_time) ? $this->start_time : ''; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The start time of the schedule. The timestamp is an RFC3339 string. + * + * Generated from protobuf field optional string start_time = 37467274; + * @param string $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkString($var, True); + $this->start_time = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/PacketMirroring.php b/Compute/src/V1/PacketMirroring.php index 3e449c08064c..6aefbcfd6662 100644 --- a/Compute/src/V1/PacketMirroring.php +++ b/Compute/src/V1/PacketMirroring.php @@ -41,7 +41,7 @@ class PacketMirroring extends \Google\Protobuf\Internal\Message */ private $enable = null; /** - * Filter for mirrored traffic. If unspecified, all traffic is mirrored. + * Filter for mirrored traffic. If unspecified, all IPv4 traffic is mirrored. * * Generated from protobuf field optional .google.cloud.compute.v1.PacketMirroringFilter filter = 336120696; */ @@ -111,7 +111,7 @@ class PacketMirroring extends \Google\Protobuf\Internal\Message * Indicates whether or not this packet mirroring takes effect. If set to FALSE, this packet mirroring policy will not be enforced on the network. The default is TRUE. * Check the Enable enum for the list of possible values. * @type \Google\Cloud\Compute\V1\PacketMirroringFilter $filter - * Filter for mirrored traffic. If unspecified, all traffic is mirrored. + * Filter for mirrored traffic. If unspecified, all IPv4 traffic is mirrored. * @type int|string $id * [Output Only] The unique identifier for the resource. This identifier is defined by the server. * @type string $kind @@ -282,7 +282,7 @@ public function setEnable($var) } /** - * Filter for mirrored traffic. If unspecified, all traffic is mirrored. + * Filter for mirrored traffic. If unspecified, all IPv4 traffic is mirrored. * * Generated from protobuf field optional .google.cloud.compute.v1.PacketMirroringFilter filter = 336120696; * @return \Google\Cloud\Compute\V1\PacketMirroringFilter|null @@ -303,7 +303,7 @@ public function clearFilter() } /** - * Filter for mirrored traffic. If unspecified, all traffic is mirrored. + * Filter for mirrored traffic. If unspecified, all IPv4 traffic is mirrored. * * Generated from protobuf field optional .google.cloud.compute.v1.PacketMirroringFilter filter = 336120696; * @param \Google\Cloud\Compute\V1\PacketMirroringFilter $var diff --git a/Compute/src/V1/PacketMirroringFilter.php b/Compute/src/V1/PacketMirroringFilter.php index c2a1fac10b6c..8b46a5d69094 100644 --- a/Compute/src/V1/PacketMirroringFilter.php +++ b/Compute/src/V1/PacketMirroringFilter.php @@ -21,7 +21,7 @@ class PacketMirroringFilter extends \Google\Protobuf\Internal\Message */ private $I_p_protocols; /** - * One or more IPv4 or IPv6 CIDR ranges that apply as filter on the source (ingress) or destination (egress) IP in the IP header. If no ranges are specified, all IPv4 traffic that matches the specified IPProtocols is mirrored. If neither cidrRanges nor IPProtocols is specified, all IPv4 traffic is mirrored. To mirror all IPv4 and IPv6 traffic, use "0.0.0.0/0,::/0". Note: Support for IPv6 traffic is in preview. + * One or more IPv4 or IPv6 CIDR ranges that apply as filters on the source (ingress) or destination (egress) IP in the IP header. If no ranges are specified, all IPv4 traffic that matches the specified IPProtocols is mirrored. If neither cidrRanges nor IPProtocols is specified, all IPv4 traffic is mirrored. To mirror all IPv4 and IPv6 traffic, use "0.0.0.0/0,::/0". * * Generated from protobuf field repeated string cidr_ranges = 487901697; */ @@ -43,7 +43,7 @@ class PacketMirroringFilter extends \Google\Protobuf\Internal\Message * @type array|\Google\Protobuf\Internal\RepeatedField $I_p_protocols * Protocols that apply as filter on mirrored traffic. If no protocols are specified, all traffic that matches the specified CIDR ranges is mirrored. If neither cidrRanges nor IPProtocols is specified, all IPv4 traffic is mirrored. * @type array|\Google\Protobuf\Internal\RepeatedField $cidr_ranges - * One or more IPv4 or IPv6 CIDR ranges that apply as filter on the source (ingress) or destination (egress) IP in the IP header. If no ranges are specified, all IPv4 traffic that matches the specified IPProtocols is mirrored. If neither cidrRanges nor IPProtocols is specified, all IPv4 traffic is mirrored. To mirror all IPv4 and IPv6 traffic, use "0.0.0.0/0,::/0". Note: Support for IPv6 traffic is in preview. + * One or more IPv4 or IPv6 CIDR ranges that apply as filters on the source (ingress) or destination (egress) IP in the IP header. If no ranges are specified, all IPv4 traffic that matches the specified IPProtocols is mirrored. If neither cidrRanges nor IPProtocols is specified, all IPv4 traffic is mirrored. To mirror all IPv4 and IPv6 traffic, use "0.0.0.0/0,::/0". * @type string $direction * Direction of traffic to mirror, either INGRESS, EGRESS, or BOTH. The default is BOTH. * Check the Direction enum for the list of possible values. @@ -81,7 +81,7 @@ public function setIPProtocols($var) } /** - * One or more IPv4 or IPv6 CIDR ranges that apply as filter on the source (ingress) or destination (egress) IP in the IP header. If no ranges are specified, all IPv4 traffic that matches the specified IPProtocols is mirrored. If neither cidrRanges nor IPProtocols is specified, all IPv4 traffic is mirrored. To mirror all IPv4 and IPv6 traffic, use "0.0.0.0/0,::/0". Note: Support for IPv6 traffic is in preview. + * One or more IPv4 or IPv6 CIDR ranges that apply as filters on the source (ingress) or destination (egress) IP in the IP header. If no ranges are specified, all IPv4 traffic that matches the specified IPProtocols is mirrored. If neither cidrRanges nor IPProtocols is specified, all IPv4 traffic is mirrored. To mirror all IPv4 and IPv6 traffic, use "0.0.0.0/0,::/0". * * Generated from protobuf field repeated string cidr_ranges = 487901697; * @return \Google\Protobuf\Internal\RepeatedField @@ -92,7 +92,7 @@ public function getCidrRanges() } /** - * One or more IPv4 or IPv6 CIDR ranges that apply as filter on the source (ingress) or destination (egress) IP in the IP header. If no ranges are specified, all IPv4 traffic that matches the specified IPProtocols is mirrored. If neither cidrRanges nor IPProtocols is specified, all IPv4 traffic is mirrored. To mirror all IPv4 and IPv6 traffic, use "0.0.0.0/0,::/0". Note: Support for IPv6 traffic is in preview. + * One or more IPv4 or IPv6 CIDR ranges that apply as filters on the source (ingress) or destination (egress) IP in the IP header. If no ranges are specified, all IPv4 traffic that matches the specified IPProtocols is mirrored. If neither cidrRanges nor IPProtocols is specified, all IPv4 traffic is mirrored. To mirror all IPv4 and IPv6 traffic, use "0.0.0.0/0,::/0". * * Generated from protobuf field repeated string cidr_ranges = 487901697; * @param array|\Google\Protobuf\Internal\RepeatedField $var diff --git a/Compute/src/V1/PatchInstanceSettingRequest.php b/Compute/src/V1/PatchInstanceSettingRequest.php new file mode 100644 index 000000000000..1dc176d632ca --- /dev/null +++ b/Compute/src/V1/PatchInstanceSettingRequest.php @@ -0,0 +1,250 @@ +google.cloud.compute.v1.PatchInstanceSettingRequest + */ +class PatchInstanceSettingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.InstanceSettings instance_settings_resource = 290689920 [(.google.api.field_behavior) = REQUIRED]; + */ + private $instance_settings_resource = null; + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + */ + private $project = ''; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field optional string request_id = 37109963; + */ + private $request_id = null; + /** + * update_mask indicates fields to be updated as part of this request. + * + * Generated from protobuf field optional string update_mask = 500079778; + */ + private $update_mask = null; + /** + * The zone scoping this request. It should conform to RFC1035. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + */ + private $zone = ''; + + /** + * @param string $project Project ID for this request. + * @param string $zone The zone scoping this request. It should conform to RFC1035. + * @param \Google\Cloud\Compute\V1\InstanceSettings $instanceSettingsResource The body resource for this request + * + * @return \Google\Cloud\Compute\V1\PatchInstanceSettingRequest + * + * @experimental + */ + public static function build(string $project, string $zone, \Google\Cloud\Compute\V1\InstanceSettings $instanceSettingsResource): self + { + return (new self()) + ->setProject($project) + ->setZone($zone) + ->setInstanceSettingsResource($instanceSettingsResource); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Compute\V1\InstanceSettings $instance_settings_resource + * The body resource for this request + * @type string $project + * Project ID for this request. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * @type string $update_mask + * update_mask indicates fields to be updated as part of this request. + * @type string $zone + * The zone scoping this request. It should conform to RFC1035. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.InstanceSettings instance_settings_resource = 290689920 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Compute\V1\InstanceSettings|null + */ + public function getInstanceSettingsResource() + { + return $this->instance_settings_resource; + } + + public function hasInstanceSettingsResource() + { + return isset($this->instance_settings_resource); + } + + public function clearInstanceSettingsResource() + { + unset($this->instance_settings_resource); + } + + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.InstanceSettings instance_settings_resource = 290689920 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Compute\V1\InstanceSettings $var + * @return $this + */ + public function setInstanceSettingsResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\InstanceSettings::class); + $this->instance_settings_resource = $var; + + return $this; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field optional string request_id = 37109963; + * @return string + */ + public function getRequestId() + { + return isset($this->request_id) ? $this->request_id : ''; + } + + public function hasRequestId() + { + return isset($this->request_id); + } + + public function clearRequestId() + { + unset($this->request_id); + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field optional string request_id = 37109963; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * update_mask indicates fields to be updated as part of this request. + * + * Generated from protobuf field optional string update_mask = 500079778; + * @return string + */ + public function getUpdateMask() + { + return isset($this->update_mask) ? $this->update_mask : ''; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * update_mask indicates fields to be updated as part of this request. + * + * Generated from protobuf field optional string update_mask = 500079778; + * @param string $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkString($var, True); + $this->update_mask = $var; + + return $this; + } + + /** + * The zone scoping this request. It should conform to RFC1035. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The zone scoping this request. It should conform to RFC1035. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/PathMatcher.php b/Compute/src/V1/PathMatcher.php index b633b4624eb4..e5e8540f96e3 100644 --- a/Compute/src/V1/PathMatcher.php +++ b/Compute/src/V1/PathMatcher.php @@ -16,19 +16,19 @@ class PathMatcher extends \Google\Protobuf\Internal\Message { /** - * defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a path matcher's defaultRouteAction. + * defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. If defaultRouteAction is specified, don't set defaultUrlRedirect. If defaultRouteAction.weightedBackendServices is specified, don't set defaultService. URL maps for classic Application Load Balancers only support the urlRewrite action within a path matcher's defaultRouteAction. * * Generated from protobuf field optional .google.cloud.compute.v1.HttpRouteAction default_route_action = 378919466; */ private $default_route_action = null; /** - * The full or partial URL to the BackendService resource. This URL is used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project /global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. Only one of defaultService, defaultUrlRedirect , or defaultRouteAction.weightedBackendService must be set. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use + * The full or partial URL to the BackendService resource. This URL is used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project /global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. If defaultService is specified, then set either defaultUrlRedirect or defaultRouteAction.weightedBackendService. Don't set both. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use * * Generated from protobuf field optional string default_service = 370242231; */ private $default_service = null; /** - * When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. Not supported when the URL map is bound to a target gRPC proxy. + * When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, then set either defaultService or defaultRouteAction. Don't set both. Not supported when the URL map is bound to a target gRPC proxy. * * Generated from protobuf field optional .google.cloud.compute.v1.HttpRedirectAction default_url_redirect = 359503338; */ @@ -71,11 +71,11 @@ class PathMatcher extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Cloud\Compute\V1\HttpRouteAction $default_route_action - * defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a path matcher's defaultRouteAction. + * defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. If defaultRouteAction is specified, don't set defaultUrlRedirect. If defaultRouteAction.weightedBackendServices is specified, don't set defaultService. URL maps for classic Application Load Balancers only support the urlRewrite action within a path matcher's defaultRouteAction. * @type string $default_service - * The full or partial URL to the BackendService resource. This URL is used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project /global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. Only one of defaultService, defaultUrlRedirect , or defaultRouteAction.weightedBackendService must be set. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use + * The full or partial URL to the BackendService resource. This URL is used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project /global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. If defaultService is specified, then set either defaultUrlRedirect or defaultRouteAction.weightedBackendService. Don't set both. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use * @type \Google\Cloud\Compute\V1\HttpRedirectAction $default_url_redirect - * When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. Not supported when the URL map is bound to a target gRPC proxy. + * When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, then set either defaultService or defaultRouteAction. Don't set both. Not supported when the URL map is bound to a target gRPC proxy. * @type string $description * An optional description of this resource. Provide this property when you create the resource. * @type \Google\Cloud\Compute\V1\HttpHeaderAction $header_action @@ -94,7 +94,7 @@ public function __construct($data = NULL) { } /** - * defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a path matcher's defaultRouteAction. + * defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. If defaultRouteAction is specified, don't set defaultUrlRedirect. If defaultRouteAction.weightedBackendServices is specified, don't set defaultService. URL maps for classic Application Load Balancers only support the urlRewrite action within a path matcher's defaultRouteAction. * * Generated from protobuf field optional .google.cloud.compute.v1.HttpRouteAction default_route_action = 378919466; * @return \Google\Cloud\Compute\V1\HttpRouteAction|null @@ -115,7 +115,7 @@ public function clearDefaultRouteAction() } /** - * defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a path matcher's defaultRouteAction. + * defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. If defaultRouteAction is specified, don't set defaultUrlRedirect. If defaultRouteAction.weightedBackendServices is specified, don't set defaultService. URL maps for classic Application Load Balancers only support the urlRewrite action within a path matcher's defaultRouteAction. * * Generated from protobuf field optional .google.cloud.compute.v1.HttpRouteAction default_route_action = 378919466; * @param \Google\Cloud\Compute\V1\HttpRouteAction $var @@ -130,7 +130,7 @@ public function setDefaultRouteAction($var) } /** - * The full or partial URL to the BackendService resource. This URL is used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project /global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. Only one of defaultService, defaultUrlRedirect , or defaultRouteAction.weightedBackendService must be set. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use + * The full or partial URL to the BackendService resource. This URL is used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project /global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. If defaultService is specified, then set either defaultUrlRedirect or defaultRouteAction.weightedBackendService. Don't set both. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use * * Generated from protobuf field optional string default_service = 370242231; * @return string @@ -151,7 +151,7 @@ public function clearDefaultService() } /** - * The full or partial URL to the BackendService resource. This URL is used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project /global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. Only one of defaultService, defaultUrlRedirect , or defaultRouteAction.weightedBackendService must be set. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use + * The full or partial URL to the BackendService resource. This URL is used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project /global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. If defaultService is specified, then set either defaultUrlRedirect or defaultRouteAction.weightedBackendService. Don't set both. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use * * Generated from protobuf field optional string default_service = 370242231; * @param string $var @@ -166,7 +166,7 @@ public function setDefaultService($var) } /** - * When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. Not supported when the URL map is bound to a target gRPC proxy. + * When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, then set either defaultService or defaultRouteAction. Don't set both. Not supported when the URL map is bound to a target gRPC proxy. * * Generated from protobuf field optional .google.cloud.compute.v1.HttpRedirectAction default_url_redirect = 359503338; * @return \Google\Cloud\Compute\V1\HttpRedirectAction|null @@ -187,7 +187,7 @@ public function clearDefaultUrlRedirect() } /** - * When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. Not supported when the URL map is bound to a target gRPC proxy. + * When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, then set either defaultService or defaultRouteAction. Don't set both. Not supported when the URL map is bound to a target gRPC proxy. * * Generated from protobuf field optional .google.cloud.compute.v1.HttpRedirectAction default_url_redirect = 359503338; * @param \Google\Cloud\Compute\V1\HttpRedirectAction $var diff --git a/Compute/src/V1/PerformMaintenanceNodeGroupRequest.php b/Compute/src/V1/PerformMaintenanceNodeGroupRequest.php new file mode 100644 index 000000000000..70610b12be51 --- /dev/null +++ b/Compute/src/V1/PerformMaintenanceNodeGroupRequest.php @@ -0,0 +1,242 @@ +google.cloud.compute.v1.PerformMaintenanceNodeGroupRequest + */ +class PerformMaintenanceNodeGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the node group scoping this request. + * + * Generated from protobuf field string node_group = 469958146 [(.google.api.field_behavior) = REQUIRED]; + */ + private $node_group = ''; + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.NodeGroupsPerformMaintenanceRequest node_groups_perform_maintenance_request_resource = 185310294 [(.google.api.field_behavior) = REQUIRED]; + */ + private $node_groups_perform_maintenance_request_resource = null; + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + */ + private $project = ''; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field optional string request_id = 37109963; + */ + private $request_id = null; + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + */ + private $zone = ''; + + /** + * @param string $project Project ID for this request. + * @param string $zone The name of the zone for this request. + * @param string $nodeGroup Name of the node group scoping this request. + * @param \Google\Cloud\Compute\V1\NodeGroupsPerformMaintenanceRequest $nodeGroupsPerformMaintenanceRequestResource The body resource for this request + * + * @return \Google\Cloud\Compute\V1\PerformMaintenanceNodeGroupRequest + * + * @experimental + */ + public static function build(string $project, string $zone, string $nodeGroup, \Google\Cloud\Compute\V1\NodeGroupsPerformMaintenanceRequest $nodeGroupsPerformMaintenanceRequestResource): self + { + return (new self()) + ->setProject($project) + ->setZone($zone) + ->setNodeGroup($nodeGroup) + ->setNodeGroupsPerformMaintenanceRequestResource($nodeGroupsPerformMaintenanceRequestResource); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $node_group + * Name of the node group scoping this request. + * @type \Google\Cloud\Compute\V1\NodeGroupsPerformMaintenanceRequest $node_groups_perform_maintenance_request_resource + * The body resource for this request + * @type string $project + * Project ID for this request. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * @type string $zone + * The name of the zone for this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * Name of the node group scoping this request. + * + * Generated from protobuf field string node_group = 469958146 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNodeGroup() + { + return $this->node_group; + } + + /** + * Name of the node group scoping this request. + * + * Generated from protobuf field string node_group = 469958146 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNodeGroup($var) + { + GPBUtil::checkString($var, True); + $this->node_group = $var; + + return $this; + } + + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.NodeGroupsPerformMaintenanceRequest node_groups_perform_maintenance_request_resource = 185310294 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Compute\V1\NodeGroupsPerformMaintenanceRequest|null + */ + public function getNodeGroupsPerformMaintenanceRequestResource() + { + return $this->node_groups_perform_maintenance_request_resource; + } + + public function hasNodeGroupsPerformMaintenanceRequestResource() + { + return isset($this->node_groups_perform_maintenance_request_resource); + } + + public function clearNodeGroupsPerformMaintenanceRequestResource() + { + unset($this->node_groups_perform_maintenance_request_resource); + } + + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.NodeGroupsPerformMaintenanceRequest node_groups_perform_maintenance_request_resource = 185310294 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Compute\V1\NodeGroupsPerformMaintenanceRequest $var + * @return $this + */ + public function setNodeGroupsPerformMaintenanceRequestResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\NodeGroupsPerformMaintenanceRequest::class); + $this->node_groups_perform_maintenance_request_resource = $var; + + return $this; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field optional string request_id = 37109963; + * @return string + */ + public function getRequestId() + { + return isset($this->request_id) ? $this->request_id : ''; + } + + public function hasRequestId() + { + return isset($this->request_id); + } + + public function clearRequestId() + { + unset($this->request_id); + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field optional string request_id = 37109963; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/PublicDelegatedPrefix.php b/Compute/src/V1/PublicDelegatedPrefix.php index c73167c1c318..6aaef4f58384 100644 --- a/Compute/src/V1/PublicDelegatedPrefix.php +++ b/Compute/src/V1/PublicDelegatedPrefix.php @@ -15,6 +15,12 @@ */ class PublicDelegatedPrefix extends \Google\Protobuf\Internal\Message { + /** + * The allocatable prefix length supported by this public delegated prefix. This field is optional and cannot be set for prefixes in DELEGATION mode. It cannot be set for IPv4 prefixes either, and it always defaults to 32. + * + * Generated from protobuf field optional int32 allocatable_prefix_length = 38427446; + */ + private $allocatable_prefix_length = null; /** * [Output Only] The version of BYOIP API. * Check the ByoipApiVersion enum for the list of possible values. @@ -64,6 +70,13 @@ class PublicDelegatedPrefix extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional string kind = 3292052; */ private $kind = null; + /** + * The public delegated prefix mode for IPv6 only. + * Check the Mode enum for the list of possible values. + * + * Generated from protobuf field optional string mode = 3357091; + */ + private $mode = null; /** * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * @@ -108,6 +121,8 @@ class PublicDelegatedPrefix extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * + * @type int $allocatable_prefix_length + * The allocatable prefix length supported by this public delegated prefix. This field is optional and cannot be set for prefixes in DELEGATION mode. It cannot be set for IPv4 prefixes either, and it always defaults to 32. * @type string $byoip_api_version * [Output Only] The version of BYOIP API. * Check the ByoipApiVersion enum for the list of possible values. @@ -125,6 +140,9 @@ class PublicDelegatedPrefix extends \Google\Protobuf\Internal\Message * If true, the prefix will be live migrated. * @type string $kind * [Output Only] Type of the resource. Always compute#publicDelegatedPrefix for public delegated prefixes. + * @type string $mode + * The public delegated prefix mode for IPv6 only. + * Check the Mode enum for the list of possible values. * @type string $name * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * @type string $parent_prefix @@ -145,6 +163,42 @@ public function __construct($data = NULL) { parent::__construct($data); } + /** + * The allocatable prefix length supported by this public delegated prefix. This field is optional and cannot be set for prefixes in DELEGATION mode. It cannot be set for IPv4 prefixes either, and it always defaults to 32. + * + * Generated from protobuf field optional int32 allocatable_prefix_length = 38427446; + * @return int + */ + public function getAllocatablePrefixLength() + { + return isset($this->allocatable_prefix_length) ? $this->allocatable_prefix_length : 0; + } + + public function hasAllocatablePrefixLength() + { + return isset($this->allocatable_prefix_length); + } + + public function clearAllocatablePrefixLength() + { + unset($this->allocatable_prefix_length); + } + + /** + * The allocatable prefix length supported by this public delegated prefix. This field is optional and cannot be set for prefixes in DELEGATION mode. It cannot be set for IPv4 prefixes either, and it always defaults to 32. + * + * Generated from protobuf field optional int32 allocatable_prefix_length = 38427446; + * @param int $var + * @return $this + */ + public function setAllocatablePrefixLength($var) + { + GPBUtil::checkInt32($var); + $this->allocatable_prefix_length = $var; + + return $this; + } + /** * [Output Only] The version of BYOIP API. * Check the ByoipApiVersion enum for the list of possible values. @@ -435,6 +489,44 @@ public function setKind($var) return $this; } + /** + * The public delegated prefix mode for IPv6 only. + * Check the Mode enum for the list of possible values. + * + * Generated from protobuf field optional string mode = 3357091; + * @return string + */ + public function getMode() + { + return isset($this->mode) ? $this->mode : ''; + } + + public function hasMode() + { + return isset($this->mode); + } + + public function clearMode() + { + unset($this->mode); + } + + /** + * The public delegated prefix mode for IPv6 only. + * Check the Mode enum for the list of possible values. + * + * Generated from protobuf field optional string mode = 3357091; + * @param string $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkString($var, True); + $this->mode = $var; + + return $this; + } + /** * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * diff --git a/Compute/src/V1/PublicDelegatedPrefix/Mode.php b/Compute/src/V1/PublicDelegatedPrefix/Mode.php new file mode 100644 index 000000000000..959af10187ee --- /dev/null +++ b/Compute/src/V1/PublicDelegatedPrefix/Mode.php @@ -0,0 +1,62 @@ +google.cloud.compute.v1.PublicDelegatedPrefix.Mode + */ +class Mode +{ + /** + * A value indicating that the enum field is not set. + * + * Generated from protobuf enum UNDEFINED_MODE = 0; + */ + const UNDEFINED_MODE = 0; + /** + * The public delegated prefix is used for further sub-delegation only. Such prefixes cannot set allocatablePrefixLength. + * + * Generated from protobuf enum DELEGATION = 264149288; + */ + const DELEGATION = 264149288; + /** + * The public delegated prefix is used for creating forwarding rules only. Such prefixes cannot set publicDelegatedSubPrefixes. + * + * Generated from protobuf enum EXTERNAL_IPV6_FORWARDING_RULE_CREATION = 398684356; + */ + const EXTERNAL_IPV6_FORWARDING_RULE_CREATION = 398684356; + + private static $valueToName = [ + self::UNDEFINED_MODE => 'UNDEFINED_MODE', + self::DELEGATION => 'DELEGATION', + self::EXTERNAL_IPV6_FORWARDING_RULE_CREATION => 'EXTERNAL_IPV6_FORWARDING_RULE_CREATION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/Compute/src/V1/PublicDelegatedPrefixPublicDelegatedSubPrefix.php b/Compute/src/V1/PublicDelegatedPrefixPublicDelegatedSubPrefix.php index a7790efb6820..1bbb59ce47c5 100644 --- a/Compute/src/V1/PublicDelegatedPrefixPublicDelegatedSubPrefix.php +++ b/Compute/src/V1/PublicDelegatedPrefixPublicDelegatedSubPrefix.php @@ -15,6 +15,12 @@ */ class PublicDelegatedPrefixPublicDelegatedSubPrefix extends \Google\Protobuf\Internal\Message { + /** + * The allocatable prefix length supported by this PublicDelegatedSubPrefix. + * + * Generated from protobuf field optional int32 allocatable_prefix_length = 38427446; + */ + private $allocatable_prefix_length = null; /** * Name of the project scoping this PublicDelegatedSubPrefix. * @@ -39,6 +45,13 @@ class PublicDelegatedPrefixPublicDelegatedSubPrefix extends \Google\Protobuf\Int * Generated from protobuf field optional bool is_address = 352617951; */ private $is_address = null; + /** + * The PublicDelegatedSubPrefix mode for IPv6 only. + * Check the Mode enum for the list of possible values. + * + * Generated from protobuf field optional string mode = 3357091; + */ + private $mode = null; /** * The name of the sub public delegated prefix. * @@ -65,6 +78,8 @@ class PublicDelegatedPrefixPublicDelegatedSubPrefix extends \Google\Protobuf\Int * @param array $data { * Optional. Data for populating the Message object. * + * @type int $allocatable_prefix_length + * The allocatable prefix length supported by this PublicDelegatedSubPrefix. * @type string $delegatee_project * Name of the project scoping this PublicDelegatedSubPrefix. * @type string $description @@ -73,6 +88,9 @@ class PublicDelegatedPrefixPublicDelegatedSubPrefix extends \Google\Protobuf\Int * The IP address range, in CIDR format, represented by this sub public delegated prefix. * @type bool $is_address * Whether the sub prefix is delegated to create Address resources in the delegatee project. + * @type string $mode + * The PublicDelegatedSubPrefix mode for IPv6 only. + * Check the Mode enum for the list of possible values. * @type string $name * The name of the sub public delegated prefix. * @type string $region @@ -87,6 +105,42 @@ public function __construct($data = NULL) { parent::__construct($data); } + /** + * The allocatable prefix length supported by this PublicDelegatedSubPrefix. + * + * Generated from protobuf field optional int32 allocatable_prefix_length = 38427446; + * @return int + */ + public function getAllocatablePrefixLength() + { + return isset($this->allocatable_prefix_length) ? $this->allocatable_prefix_length : 0; + } + + public function hasAllocatablePrefixLength() + { + return isset($this->allocatable_prefix_length); + } + + public function clearAllocatablePrefixLength() + { + unset($this->allocatable_prefix_length); + } + + /** + * The allocatable prefix length supported by this PublicDelegatedSubPrefix. + * + * Generated from protobuf field optional int32 allocatable_prefix_length = 38427446; + * @param int $var + * @return $this + */ + public function setAllocatablePrefixLength($var) + { + GPBUtil::checkInt32($var); + $this->allocatable_prefix_length = $var; + + return $this; + } + /** * Name of the project scoping this PublicDelegatedSubPrefix. * @@ -231,6 +285,44 @@ public function setIsAddress($var) return $this; } + /** + * The PublicDelegatedSubPrefix mode for IPv6 only. + * Check the Mode enum for the list of possible values. + * + * Generated from protobuf field optional string mode = 3357091; + * @return string + */ + public function getMode() + { + return isset($this->mode) ? $this->mode : ''; + } + + public function hasMode() + { + return isset($this->mode); + } + + public function clearMode() + { + unset($this->mode); + } + + /** + * The PublicDelegatedSubPrefix mode for IPv6 only. + * Check the Mode enum for the list of possible values. + * + * Generated from protobuf field optional string mode = 3357091; + * @param string $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkString($var, True); + $this->mode = $var; + + return $this; + } + /** * The name of the sub public delegated prefix. * diff --git a/Compute/src/V1/PublicDelegatedPrefixPublicDelegatedSubPrefix/Mode.php b/Compute/src/V1/PublicDelegatedPrefixPublicDelegatedSubPrefix/Mode.php new file mode 100644 index 000000000000..ff8ad1a8dfbc --- /dev/null +++ b/Compute/src/V1/PublicDelegatedPrefixPublicDelegatedSubPrefix/Mode.php @@ -0,0 +1,62 @@ +google.cloud.compute.v1.PublicDelegatedPrefixPublicDelegatedSubPrefix.Mode + */ +class Mode +{ + /** + * A value indicating that the enum field is not set. + * + * Generated from protobuf enum UNDEFINED_MODE = 0; + */ + const UNDEFINED_MODE = 0; + /** + * The public delegated prefix is used for further sub-delegation only. Such prefixes cannot set allocatablePrefixLength. + * + * Generated from protobuf enum DELEGATION = 264149288; + */ + const DELEGATION = 264149288; + /** + * The public delegated prefix is used for creating forwarding rules only. Such prefixes cannot set publicDelegatedSubPrefixes. + * + * Generated from protobuf enum EXTERNAL_IPV6_FORWARDING_RULE_CREATION = 398684356; + */ + const EXTERNAL_IPV6_FORWARDING_RULE_CREATION = 398684356; + + private static $valueToName = [ + self::UNDEFINED_MODE => 'UNDEFINED_MODE', + self::DELEGATION => 'DELEGATION', + self::EXTERNAL_IPV6_FORWARDING_RULE_CREATION => 'EXTERNAL_IPV6_FORWARDING_RULE_CREATION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/Compute/src/V1/Quota/Metric.php b/Compute/src/V1/Quota/Metric.php index 02da70531af7..d69373cdc67c 100644 --- a/Compute/src/V1/Quota/Metric.php +++ b/Compute/src/V1/Quota/Metric.php @@ -225,6 +225,18 @@ class Metric * Generated from protobuf enum GPUS_ALL_REGIONS = 39387177; */ const GPUS_ALL_REGIONS = 39387177; + /** + * Generated from protobuf enum HDB_TOTAL_GB = 319316271; + */ + const HDB_TOTAL_GB = 319316271; + /** + * Generated from protobuf enum HDB_TOTAL_IOPS = 309720317; + */ + const HDB_TOTAL_IOPS = 309720317; + /** + * Generated from protobuf enum HDB_TOTAL_THROUGHPUT = 20981374; + */ + const HDB_TOTAL_THROUGHPUT = 20981374; /** * Generated from protobuf enum HEALTH_CHECKS = 289347502; */ @@ -517,6 +529,10 @@ class Metric * Generated from protobuf enum REGIONAL_INTERNAL_MANAGED_BACKEND_SERVICES = 96282539; */ const REGIONAL_INTERNAL_MANAGED_BACKEND_SERVICES = 96282539; + /** + * Generated from protobuf enum REGIONAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES = 483162968; + */ + const REGIONAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES = 483162968; /** * Generated from protobuf enum RESERVATIONS = 32644647; */ @@ -575,6 +591,10 @@ class Metric * Generated from protobuf enum SSL_CERTIFICATES = 378372399; */ const SSL_CERTIFICATES = 378372399; + /** + * Generated from protobuf enum SSL_POLICIES = 523254339; + */ + const SSL_POLICIES = 523254339; /** * Generated from protobuf enum STATIC_ADDRESSES = 93624049; */ @@ -709,6 +729,9 @@ class Metric self::GLOBAL_INTERNAL_MANAGED_BACKEND_SERVICES => 'GLOBAL_INTERNAL_MANAGED_BACKEND_SERVICES', self::GLOBAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES => 'GLOBAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES', self::GPUS_ALL_REGIONS => 'GPUS_ALL_REGIONS', + self::HDB_TOTAL_GB => 'HDB_TOTAL_GB', + self::HDB_TOTAL_IOPS => 'HDB_TOTAL_IOPS', + self::HDB_TOTAL_THROUGHPUT => 'HDB_TOTAL_THROUGHPUT', self::HEALTH_CHECKS => 'HEALTH_CHECKS', self::IMAGES => 'IMAGES', self::INSTANCES => 'INSTANCES', @@ -782,6 +805,7 @@ class Metric self::REGIONAL_INSTANCE_GROUP_MANAGERS => 'REGIONAL_INSTANCE_GROUP_MANAGERS', self::REGIONAL_INTERNAL_LB_BACKEND_SERVICES => 'REGIONAL_INTERNAL_LB_BACKEND_SERVICES', self::REGIONAL_INTERNAL_MANAGED_BACKEND_SERVICES => 'REGIONAL_INTERNAL_MANAGED_BACKEND_SERVICES', + self::REGIONAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES => 'REGIONAL_INTERNAL_TRAFFIC_DIRECTOR_BACKEND_SERVICES', self::RESERVATIONS => 'RESERVATIONS', self::RESOURCE_POLICIES => 'RESOURCE_POLICIES', self::ROUTERS => 'ROUTERS', @@ -796,6 +820,7 @@ class Metric self::SNAPSHOTS => 'SNAPSHOTS', self::SSD_TOTAL_GB => 'SSD_TOTAL_GB', self::SSL_CERTIFICATES => 'SSL_CERTIFICATES', + self::SSL_POLICIES => 'SSL_POLICIES', self::STATIC_ADDRESSES => 'STATIC_ADDRESSES', self::STATIC_BYOIP_ADDRESSES => 'STATIC_BYOIP_ADDRESSES', self::STATIC_EXTERNAL_IPV6_ADDRESS_RANGES => 'STATIC_EXTERNAL_IPV6_ADDRESS_RANGES', diff --git a/Compute/src/V1/QuotaStatusWarning.php b/Compute/src/V1/QuotaStatusWarning.php new file mode 100644 index 000000000000..c20f97ac0c26 --- /dev/null +++ b/Compute/src/V1/QuotaStatusWarning.php @@ -0,0 +1,159 @@ +google.cloud.compute.v1.QuotaStatusWarning + */ +class QuotaStatusWarning extends \Google\Protobuf\Internal\Message +{ + /** + * [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. + * Check the Code enum for the list of possible values. + * + * Generated from protobuf field optional string code = 3059181; + */ + private $code = null; + /** + * [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } + * + * Generated from protobuf field repeated .google.cloud.compute.v1.Data data = 3076010; + */ + private $data; + /** + * [Output Only] A human-readable description of the warning code. + * + * Generated from protobuf field optional string message = 418054151; + */ + private $message = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $code + * [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. + * Check the Code enum for the list of possible values. + * @type array<\Google\Cloud\Compute\V1\Data>|\Google\Protobuf\Internal\RepeatedField $data + * [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } + * @type string $message + * [Output Only] A human-readable description of the warning code. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. + * Check the Code enum for the list of possible values. + * + * Generated from protobuf field optional string code = 3059181; + * @return string + */ + public function getCode() + { + return isset($this->code) ? $this->code : ''; + } + + public function hasCode() + { + return isset($this->code); + } + + public function clearCode() + { + unset($this->code); + } + + /** + * [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. + * Check the Code enum for the list of possible values. + * + * Generated from protobuf field optional string code = 3059181; + * @param string $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkString($var, True); + $this->code = $var; + + return $this; + } + + /** + * [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } + * + * Generated from protobuf field repeated .google.cloud.compute.v1.Data data = 3076010; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getData() + { + return $this->data; + } + + /** + * [Output Only] Metadata about this warning in key: value format. For example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } + * + * Generated from protobuf field repeated .google.cloud.compute.v1.Data data = 3076010; + * @param array<\Google\Cloud\Compute\V1\Data>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setData($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\Data::class); + $this->data = $arr; + + return $this; + } + + /** + * [Output Only] A human-readable description of the warning code. + * + * Generated from protobuf field optional string message = 418054151; + * @return string + */ + public function getMessage() + { + return isset($this->message) ? $this->message : ''; + } + + public function hasMessage() + { + return isset($this->message); + } + + public function clearMessage() + { + unset($this->message); + } + + /** + * [Output Only] A human-readable description of the warning code. + * + * Generated from protobuf field optional string message = 418054151; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/QuotaStatusWarning/Code.php b/Compute/src/V1/QuotaStatusWarning/Code.php new file mode 100644 index 000000000000..f5d6a81359bb --- /dev/null +++ b/Compute/src/V1/QuotaStatusWarning/Code.php @@ -0,0 +1,244 @@ +google.cloud.compute.v1.QuotaStatusWarning.Code + */ +class Code +{ + /** + * A value indicating that the enum field is not set. + * + * Generated from protobuf enum UNDEFINED_CODE = 0; + */ + const UNDEFINED_CODE = 0; + /** + * Warning about failed cleanup of transient changes made by a failed operation. + * + * Generated from protobuf enum CLEANUP_FAILED = 150308440; + */ + const CLEANUP_FAILED = 150308440; + /** + * A link to a deprecated resource was created. + * + * Generated from protobuf enum DEPRECATED_RESOURCE_USED = 391835586; + */ + const DEPRECATED_RESOURCE_USED = 391835586; + /** + * When deploying and at least one of the resources has a type marked as deprecated + * + * Generated from protobuf enum DEPRECATED_TYPE_USED = 346526230; + */ + const DEPRECATED_TYPE_USED = 346526230; + /** + * The user created a boot disk that is larger than image size. + * + * Generated from protobuf enum DISK_SIZE_LARGER_THAN_IMAGE_SIZE = 369442967; + */ + const DISK_SIZE_LARGER_THAN_IMAGE_SIZE = 369442967; + /** + * When deploying and at least one of the resources has a type marked as experimental + * + * Generated from protobuf enum EXPERIMENTAL_TYPE_USED = 451954443; + */ + const EXPERIMENTAL_TYPE_USED = 451954443; + /** + * Warning that is present in an external api call + * + * Generated from protobuf enum EXTERNAL_API_WARNING = 175546307; + */ + const EXTERNAL_API_WARNING = 175546307; + /** + * Warning that value of a field has been overridden. Deprecated unused field. + * + * Generated from protobuf enum FIELD_VALUE_OVERRIDEN = 329669423; + */ + const FIELD_VALUE_OVERRIDEN = 329669423; + /** + * The operation involved use of an injected kernel, which is deprecated. + * + * Generated from protobuf enum INJECTED_KERNELS_DEPRECATED = 417377419; + */ + const INJECTED_KERNELS_DEPRECATED = 417377419; + /** + * A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2. + * + * Generated from protobuf enum INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB = 401542606; + */ + const INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB = 401542606; + /** + * When deploying a deployment with a exceedingly large number of resources + * + * Generated from protobuf enum LARGE_DEPLOYMENT_WARNING = 481440678; + */ + const LARGE_DEPLOYMENT_WARNING = 481440678; + /** + * Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter. + * + * Generated from protobuf enum LIST_OVERHEAD_QUOTA_EXCEED = 47618117; + */ + const LIST_OVERHEAD_QUOTA_EXCEED = 47618117; + /** + * A resource depends on a missing type + * + * Generated from protobuf enum MISSING_TYPE_DEPENDENCY = 344505463; + */ + const MISSING_TYPE_DEPENDENCY = 344505463; + /** + * The route's nextHopIp address is not assigned to an instance on the network. + * + * Generated from protobuf enum NEXT_HOP_ADDRESS_NOT_ASSIGNED = 324964999; + */ + const NEXT_HOP_ADDRESS_NOT_ASSIGNED = 324964999; + /** + * The route's next hop instance cannot ip forward. + * + * Generated from protobuf enum NEXT_HOP_CANNOT_IP_FORWARD = 383382887; + */ + const NEXT_HOP_CANNOT_IP_FORWARD = 383382887; + /** + * The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route. + * + * Generated from protobuf enum NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE = 146748434; + */ + const NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE = 146748434; + /** + * The route's nextHopInstance URL refers to an instance that does not exist. + * + * Generated from protobuf enum NEXT_HOP_INSTANCE_NOT_FOUND = 464250446; + */ + const NEXT_HOP_INSTANCE_NOT_FOUND = 464250446; + /** + * The route's nextHopInstance URL refers to an instance that is not on the same network as the route. + * + * Generated from protobuf enum NEXT_HOP_INSTANCE_NOT_ON_NETWORK = 243758146; + */ + const NEXT_HOP_INSTANCE_NOT_ON_NETWORK = 243758146; + /** + * The route's next hop instance does not have a status of RUNNING. + * + * Generated from protobuf enum NEXT_HOP_NOT_RUNNING = 417081265; + */ + const NEXT_HOP_NOT_RUNNING = 417081265; + /** + * Error which is not critical. We decided to continue the process despite the mentioned error. + * + * Generated from protobuf enum NOT_CRITICAL_ERROR = 105763924; + */ + const NOT_CRITICAL_ERROR = 105763924; + /** + * No results are present on a particular list page. + * + * Generated from protobuf enum NO_RESULTS_ON_PAGE = 30036744; + */ + const NO_RESULTS_ON_PAGE = 30036744; + /** + * Success is reported, but some results may be missing due to errors + * + * Generated from protobuf enum PARTIAL_SUCCESS = 39966469; + */ + const PARTIAL_SUCCESS = 39966469; + /** + * The user attempted to use a resource that requires a TOS they have not accepted. + * + * Generated from protobuf enum REQUIRED_TOS_AGREEMENT = 3745539; + */ + const REQUIRED_TOS_AGREEMENT = 3745539; + /** + * Warning that a resource is in use. + * + * Generated from protobuf enum RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING = 496728641; + */ + const RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING = 496728641; + /** + * One or more of the resources set to auto-delete could not be deleted because they were in use. + * + * Generated from protobuf enum RESOURCE_NOT_DELETED = 168598460; + */ + const RESOURCE_NOT_DELETED = 168598460; + /** + * When a resource schema validation is ignored. + * + * Generated from protobuf enum SCHEMA_VALIDATION_IGNORED = 275245642; + */ + const SCHEMA_VALIDATION_IGNORED = 275245642; + /** + * Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group. + * + * Generated from protobuf enum SINGLE_INSTANCE_PROPERTY_TEMPLATE = 268305617; + */ + const SINGLE_INSTANCE_PROPERTY_TEMPLATE = 268305617; + /** + * When undeclared properties in the schema are present + * + * Generated from protobuf enum UNDECLARED_PROPERTIES = 390513439; + */ + const UNDECLARED_PROPERTIES = 390513439; + /** + * A given scope cannot be reached. + * + * Generated from protobuf enum UNREACHABLE = 13328052; + */ + const UNREACHABLE = 13328052; + + private static $valueToName = [ + self::UNDEFINED_CODE => 'UNDEFINED_CODE', + self::CLEANUP_FAILED => 'CLEANUP_FAILED', + self::DEPRECATED_RESOURCE_USED => 'DEPRECATED_RESOURCE_USED', + self::DEPRECATED_TYPE_USED => 'DEPRECATED_TYPE_USED', + self::DISK_SIZE_LARGER_THAN_IMAGE_SIZE => 'DISK_SIZE_LARGER_THAN_IMAGE_SIZE', + self::EXPERIMENTAL_TYPE_USED => 'EXPERIMENTAL_TYPE_USED', + self::EXTERNAL_API_WARNING => 'EXTERNAL_API_WARNING', + self::FIELD_VALUE_OVERRIDEN => 'FIELD_VALUE_OVERRIDEN', + self::INJECTED_KERNELS_DEPRECATED => 'INJECTED_KERNELS_DEPRECATED', + self::INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB => 'INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB', + self::LARGE_DEPLOYMENT_WARNING => 'LARGE_DEPLOYMENT_WARNING', + self::LIST_OVERHEAD_QUOTA_EXCEED => 'LIST_OVERHEAD_QUOTA_EXCEED', + self::MISSING_TYPE_DEPENDENCY => 'MISSING_TYPE_DEPENDENCY', + self::NEXT_HOP_ADDRESS_NOT_ASSIGNED => 'NEXT_HOP_ADDRESS_NOT_ASSIGNED', + self::NEXT_HOP_CANNOT_IP_FORWARD => 'NEXT_HOP_CANNOT_IP_FORWARD', + self::NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE => 'NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE', + self::NEXT_HOP_INSTANCE_NOT_FOUND => 'NEXT_HOP_INSTANCE_NOT_FOUND', + self::NEXT_HOP_INSTANCE_NOT_ON_NETWORK => 'NEXT_HOP_INSTANCE_NOT_ON_NETWORK', + self::NEXT_HOP_NOT_RUNNING => 'NEXT_HOP_NOT_RUNNING', + self::NOT_CRITICAL_ERROR => 'NOT_CRITICAL_ERROR', + self::NO_RESULTS_ON_PAGE => 'NO_RESULTS_ON_PAGE', + self::PARTIAL_SUCCESS => 'PARTIAL_SUCCESS', + self::REQUIRED_TOS_AGREEMENT => 'REQUIRED_TOS_AGREEMENT', + self::RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING => 'RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING', + self::RESOURCE_NOT_DELETED => 'RESOURCE_NOT_DELETED', + self::SCHEMA_VALIDATION_IGNORED => 'SCHEMA_VALIDATION_IGNORED', + self::SINGLE_INSTANCE_PROPERTY_TEMPLATE => 'SINGLE_INSTANCE_PROPERTY_TEMPLATE', + self::UNDECLARED_PROPERTIES => 'UNDECLARED_PROPERTIES', + self::UNREACHABLE => 'UNREACHABLE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/Compute/src/V1/Region.php b/Compute/src/V1/Region.php index d4aef5c2b4c3..7549761c7c6f 100644 --- a/Compute/src/V1/Region.php +++ b/Compute/src/V1/Region.php @@ -51,6 +51,12 @@ class Region extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional string name = 3373707; */ private $name = null; + /** + * [Output Only] Warning of fetching the `quotas` field for this region. This field is populated only if fetching of the `quotas` field fails. + * + * Generated from protobuf field optional .google.cloud.compute.v1.QuotaStatusWarning quota_status_warning = 302941430; + */ + private $quota_status_warning = null; /** * [Output Only] Quotas assigned to this region. * @@ -101,6 +107,8 @@ class Region extends \Google\Protobuf\Internal\Message * [Output Only] Type of the resource. Always compute#region for regions. * @type string $name * [Output Only] Name of the resource. + * @type \Google\Cloud\Compute\V1\QuotaStatusWarning $quota_status_warning + * [Output Only] Warning of fetching the `quotas` field for this region. This field is populated only if fetching of the `quotas` field fails. * @type array<\Google\Cloud\Compute\V1\Quota>|\Google\Protobuf\Internal\RepeatedField $quotas * [Output Only] Quotas assigned to this region. * @type string $self_link @@ -335,6 +343,42 @@ public function setName($var) return $this; } + /** + * [Output Only] Warning of fetching the `quotas` field for this region. This field is populated only if fetching of the `quotas` field fails. + * + * Generated from protobuf field optional .google.cloud.compute.v1.QuotaStatusWarning quota_status_warning = 302941430; + * @return \Google\Cloud\Compute\V1\QuotaStatusWarning|null + */ + public function getQuotaStatusWarning() + { + return $this->quota_status_warning; + } + + public function hasQuotaStatusWarning() + { + return isset($this->quota_status_warning); + } + + public function clearQuotaStatusWarning() + { + unset($this->quota_status_warning); + } + + /** + * [Output Only] Warning of fetching the `quotas` field for this region. This field is populated only if fetching of the `quotas` field fails. + * + * Generated from protobuf field optional .google.cloud.compute.v1.QuotaStatusWarning quota_status_warning = 302941430; + * @param \Google\Cloud\Compute\V1\QuotaStatusWarning $var + * @return $this + */ + public function setQuotaStatusWarning($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\QuotaStatusWarning::class); + $this->quota_status_warning = $var; + + return $this; + } + /** * [Output Only] Quotas assigned to this region. * diff --git a/Compute/src/V1/RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy.php b/Compute/src/V1/RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy.php index 7c739c69a609..835f497de2b2 100644 --- a/Compute/src/V1/RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy.php +++ b/Compute/src/V1/RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy.php @@ -33,7 +33,7 @@ class RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewal */ private $rules; /** - * [Output Only] The type of the firewall policy. Can be one of HIERARCHY, NETWORK, NETWORK_REGIONAL. + * [Output Only] The type of the firewall policy. Can be one of HIERARCHY, NETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, SYSTEM_REGIONAL. * Check the Type enum for the list of possible values. * * Generated from protobuf field optional string type = 3575610; @@ -53,7 +53,7 @@ class RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewal * @type array<\Google\Cloud\Compute\V1\FirewallPolicyRule>|\Google\Protobuf\Internal\RepeatedField $rules * The rules that apply to the network. * @type string $type - * [Output Only] The type of the firewall policy. Can be one of HIERARCHY, NETWORK, NETWORK_REGIONAL. + * [Output Only] The type of the firewall policy. Can be one of HIERARCHY, NETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, SYSTEM_REGIONAL. * Check the Type enum for the list of possible values. * } */ @@ -161,7 +161,7 @@ public function setRules($var) } /** - * [Output Only] The type of the firewall policy. Can be one of HIERARCHY, NETWORK, NETWORK_REGIONAL. + * [Output Only] The type of the firewall policy. Can be one of HIERARCHY, NETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, SYSTEM_REGIONAL. * Check the Type enum for the list of possible values. * * Generated from protobuf field optional string type = 3575610; @@ -183,7 +183,7 @@ public function clearType() } /** - * [Output Only] The type of the firewall policy. Can be one of HIERARCHY, NETWORK, NETWORK_REGIONAL. + * [Output Only] The type of the firewall policy. Can be one of HIERARCHY, NETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, SYSTEM_REGIONAL. * Check the Type enum for the list of possible values. * * Generated from protobuf field optional string type = 3575610; diff --git a/Compute/src/V1/RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy/Type.php b/Compute/src/V1/RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy/Type.php index 5f9a512646c8..333068e1500d 100644 --- a/Compute/src/V1/RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy/Type.php +++ b/Compute/src/V1/RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy/Type.php @@ -7,7 +7,7 @@ use UnexpectedValueException; /** - * [Output Only] The type of the firewall policy. Can be one of HIERARCHY, NETWORK, NETWORK_REGIONAL. + * [Output Only] The type of the firewall policy. Can be one of HIERARCHY, NETWORK, NETWORK_REGIONAL, SYSTEM_GLOBAL, SYSTEM_REGIONAL. * * Protobuf type google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy.Type */ diff --git a/Compute/src/V1/ResourcePolicyGroupPlacementPolicy.php b/Compute/src/V1/ResourcePolicyGroupPlacementPolicy.php index f4983c191de2..e11933478997 100644 --- a/Compute/src/V1/ResourcePolicyGroupPlacementPolicy.php +++ b/Compute/src/V1/ResourcePolicyGroupPlacementPolicy.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * A GroupPlacementPolicy specifies resource placement configuration. It specifies the failure bucket separation as well as network locality + * A GroupPlacementPolicy specifies resource placement configuration. It specifies the failure bucket separation * * Generated from protobuf message google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy */ diff --git a/Compute/src/V1/RouterBgp.php b/Compute/src/V1/RouterBgp.php index 2a230a527095..881d315a601c 100644 --- a/Compute/src/V1/RouterBgp.php +++ b/Compute/src/V1/RouterBgp.php @@ -40,6 +40,12 @@ class RouterBgp extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional uint32 asn = 96892; */ private $asn = null; + /** + * Explicitly specifies a range of valid BGP Identifiers for this Router. It is provided as a link-local IPv4 range (from 169.254.0.0/16), of size at least /30, even if the BGP sessions are over IPv6. It must not overlap with any IPv4 BGP session ranges. Other vendors commonly call this "router ID". + * + * Generated from protobuf field optional string identifier_range = 501573159; + */ + private $identifier_range = null; /** * The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 20 and 60. The default is 20. * @@ -63,6 +69,8 @@ class RouterBgp extends \Google\Protobuf\Internal\Message * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. * @type int $asn * Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN. + * @type string $identifier_range + * Explicitly specifies a range of valid BGP Identifiers for this Router. It is provided as a link-local IPv4 range (from 169.254.0.0/16), of size at least /30, even if the BGP sessions are over IPv6. It must not overlap with any IPv4 BGP session ranges. Other vendors commonly call this "router ID". * @type int $keepalive_interval * The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 20 and 60. The default is 20. * } @@ -200,6 +208,42 @@ public function setAsn($var) return $this; } + /** + * Explicitly specifies a range of valid BGP Identifiers for this Router. It is provided as a link-local IPv4 range (from 169.254.0.0/16), of size at least /30, even if the BGP sessions are over IPv6. It must not overlap with any IPv4 BGP session ranges. Other vendors commonly call this "router ID". + * + * Generated from protobuf field optional string identifier_range = 501573159; + * @return string + */ + public function getIdentifierRange() + { + return isset($this->identifier_range) ? $this->identifier_range : ''; + } + + public function hasIdentifierRange() + { + return isset($this->identifier_range); + } + + public function clearIdentifierRange() + { + unset($this->identifier_range); + } + + /** + * Explicitly specifies a range of valid BGP Identifiers for this Router. It is provided as a link-local IPv4 range (from 169.254.0.0/16), of size at least /30, even if the BGP sessions are over IPv6. It must not overlap with any IPv4 BGP session ranges. Other vendors commonly call this "router ID". + * + * Generated from protobuf field optional string identifier_range = 501573159; + * @param string $var + * @return $this + */ + public function setIdentifierRange($var) + { + GPBUtil::checkString($var, True); + $this->identifier_range = $var; + + return $this; + } + /** * The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 20 and 60. The default is 20. * diff --git a/Compute/src/V1/RouterBgpPeer.php b/Compute/src/V1/RouterBgpPeer.php index 3fbdd0a850e8..df7262eb8915 100644 --- a/Compute/src/V1/RouterBgpPeer.php +++ b/Compute/src/V1/RouterBgpPeer.php @@ -66,11 +66,29 @@ class RouterBgpPeer extends \Google\Protobuf\Internal\Message */ private $enable = null; /** - * Enable IPv6 traffic over BGP Peer. If not specified, it is disabled by default. + * Enable IPv4 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 4. + * + * Generated from protobuf field optional bool enable_ipv4 = 181467937; + */ + private $enable_ipv4 = null; + /** + * Enable IPv6 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 6. * * Generated from protobuf field optional bool enable_ipv6 = 181467939; */ private $enable_ipv6 = null; + /** + * List of export policies applied to this peer, in the order they must be evaluated. The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_EXPORT type. Note that Route Policies are currently available in preview. Please use Beta API to use Route Policies. + * + * Generated from protobuf field repeated string export_policies = 134084987; + */ + private $export_policies; + /** + * List of import policies applied to this peer, in the order they must be evaluated. The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_IMPORT type. Note that Route Policies are currently available in preview. Please use Beta API to use Route Policies. + * + * Generated from protobuf field repeated string import_policies = 451147946; + */ + private $import_policies; /** * Name of the interface the BGP peer is associated with. * @@ -78,11 +96,17 @@ class RouterBgpPeer extends \Google\Protobuf\Internal\Message */ private $interface_name = null; /** - * IP address of the interface inside Google Cloud Platform. Only IPv4 is supported. + * IP address of the interface inside Google Cloud Platform. * * Generated from protobuf field optional string ip_address = 406272220; */ private $ip_address = null; + /** + * IPv4 address of the interface inside Google Cloud Platform. + * + * Generated from protobuf field optional string ipv4_nexthop_address = 5703377; + */ + private $ipv4_nexthop_address = null; /** * IPv6 address of the interface inside Google Cloud Platform. * @@ -115,11 +139,17 @@ class RouterBgpPeer extends \Google\Protobuf\Internal\Message */ private $peer_asn = null; /** - * IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported. + * IP address of the BGP interface outside Google Cloud Platform. * * Generated from protobuf field optional string peer_ip_address = 207735769; */ private $peer_ip_address = null; + /** + * IPv4 address of the BGP interface outside Google Cloud Platform. + * + * Generated from protobuf field optional string peer_ipv4_nexthop_address = 469221774; + */ + private $peer_ipv4_nexthop_address = null; /** * IPv6 address of the BGP interface outside Google Cloud Platform. * @@ -158,12 +188,20 @@ class RouterBgpPeer extends \Google\Protobuf\Internal\Message * @type string $enable * The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE. * Check the Enable enum for the list of possible values. + * @type bool $enable_ipv4 + * Enable IPv4 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 4. * @type bool $enable_ipv6 - * Enable IPv6 traffic over BGP Peer. If not specified, it is disabled by default. + * Enable IPv6 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 6. + * @type array|\Google\Protobuf\Internal\RepeatedField $export_policies + * List of export policies applied to this peer, in the order they must be evaluated. The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_EXPORT type. Note that Route Policies are currently available in preview. Please use Beta API to use Route Policies. + * @type array|\Google\Protobuf\Internal\RepeatedField $import_policies + * List of import policies applied to this peer, in the order they must be evaluated. The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_IMPORT type. Note that Route Policies are currently available in preview. Please use Beta API to use Route Policies. * @type string $interface_name * Name of the interface the BGP peer is associated with. * @type string $ip_address - * IP address of the interface inside Google Cloud Platform. Only IPv4 is supported. + * IP address of the interface inside Google Cloud Platform. + * @type string $ipv4_nexthop_address + * IPv4 address of the interface inside Google Cloud Platform. * @type string $ipv6_nexthop_address * IPv6 address of the interface inside Google Cloud Platform. * @type string $management_type @@ -176,7 +214,9 @@ class RouterBgpPeer extends \Google\Protobuf\Internal\Message * @type int $peer_asn * Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value. * @type string $peer_ip_address - * IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported. + * IP address of the BGP interface outside Google Cloud Platform. + * @type string $peer_ipv4_nexthop_address + * IPv4 address of the BGP interface outside Google Cloud Platform. * @type string $peer_ipv6_nexthop_address * IPv6 address of the BGP interface outside Google Cloud Platform. * @type string $router_appliance_instance @@ -453,7 +493,43 @@ public function setEnable($var) } /** - * Enable IPv6 traffic over BGP Peer. If not specified, it is disabled by default. + * Enable IPv4 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 4. + * + * Generated from protobuf field optional bool enable_ipv4 = 181467937; + * @return bool + */ + public function getEnableIpv4() + { + return isset($this->enable_ipv4) ? $this->enable_ipv4 : false; + } + + public function hasEnableIpv4() + { + return isset($this->enable_ipv4); + } + + public function clearEnableIpv4() + { + unset($this->enable_ipv4); + } + + /** + * Enable IPv4 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 4. + * + * Generated from protobuf field optional bool enable_ipv4 = 181467937; + * @param bool $var + * @return $this + */ + public function setEnableIpv4($var) + { + GPBUtil::checkBool($var); + $this->enable_ipv4 = $var; + + return $this; + } + + /** + * Enable IPv6 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 6. * * Generated from protobuf field optional bool enable_ipv6 = 181467939; * @return bool @@ -474,7 +550,7 @@ public function clearEnableIpv6() } /** - * Enable IPv6 traffic over BGP Peer. If not specified, it is disabled by default. + * Enable IPv6 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 6. * * Generated from protobuf field optional bool enable_ipv6 = 181467939; * @param bool $var @@ -488,6 +564,58 @@ public function setEnableIpv6($var) return $this; } + /** + * List of export policies applied to this peer, in the order they must be evaluated. The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_EXPORT type. Note that Route Policies are currently available in preview. Please use Beta API to use Route Policies. + * + * Generated from protobuf field repeated string export_policies = 134084987; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getExportPolicies() + { + return $this->export_policies; + } + + /** + * List of export policies applied to this peer, in the order they must be evaluated. The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_EXPORT type. Note that Route Policies are currently available in preview. Please use Beta API to use Route Policies. + * + * Generated from protobuf field repeated string export_policies = 134084987; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setExportPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->export_policies = $arr; + + return $this; + } + + /** + * List of import policies applied to this peer, in the order they must be evaluated. The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_IMPORT type. Note that Route Policies are currently available in preview. Please use Beta API to use Route Policies. + * + * Generated from protobuf field repeated string import_policies = 451147946; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getImportPolicies() + { + return $this->import_policies; + } + + /** + * List of import policies applied to this peer, in the order they must be evaluated. The name must correspond to an existing policy that has ROUTE_POLICY_TYPE_IMPORT type. Note that Route Policies are currently available in preview. Please use Beta API to use Route Policies. + * + * Generated from protobuf field repeated string import_policies = 451147946; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setImportPolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->import_policies = $arr; + + return $this; + } + /** * Name of the interface the BGP peer is associated with. * @@ -525,7 +653,7 @@ public function setInterfaceName($var) } /** - * IP address of the interface inside Google Cloud Platform. Only IPv4 is supported. + * IP address of the interface inside Google Cloud Platform. * * Generated from protobuf field optional string ip_address = 406272220; * @return string @@ -546,7 +674,7 @@ public function clearIpAddress() } /** - * IP address of the interface inside Google Cloud Platform. Only IPv4 is supported. + * IP address of the interface inside Google Cloud Platform. * * Generated from protobuf field optional string ip_address = 406272220; * @param string $var @@ -560,6 +688,42 @@ public function setIpAddress($var) return $this; } + /** + * IPv4 address of the interface inside Google Cloud Platform. + * + * Generated from protobuf field optional string ipv4_nexthop_address = 5703377; + * @return string + */ + public function getIpv4NexthopAddress() + { + return isset($this->ipv4_nexthop_address) ? $this->ipv4_nexthop_address : ''; + } + + public function hasIpv4NexthopAddress() + { + return isset($this->ipv4_nexthop_address); + } + + public function clearIpv4NexthopAddress() + { + unset($this->ipv4_nexthop_address); + } + + /** + * IPv4 address of the interface inside Google Cloud Platform. + * + * Generated from protobuf field optional string ipv4_nexthop_address = 5703377; + * @param string $var + * @return $this + */ + public function setIpv4NexthopAddress($var) + { + GPBUtil::checkString($var, True); + $this->ipv4_nexthop_address = $var; + + return $this; + } + /** * IPv6 address of the interface inside Google Cloud Platform. * @@ -743,7 +907,7 @@ public function setPeerAsn($var) } /** - * IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported. + * IP address of the BGP interface outside Google Cloud Platform. * * Generated from protobuf field optional string peer_ip_address = 207735769; * @return string @@ -764,7 +928,7 @@ public function clearPeerIpAddress() } /** - * IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported. + * IP address of the BGP interface outside Google Cloud Platform. * * Generated from protobuf field optional string peer_ip_address = 207735769; * @param string $var @@ -778,6 +942,42 @@ public function setPeerIpAddress($var) return $this; } + /** + * IPv4 address of the BGP interface outside Google Cloud Platform. + * + * Generated from protobuf field optional string peer_ipv4_nexthop_address = 469221774; + * @return string + */ + public function getPeerIpv4NexthopAddress() + { + return isset($this->peer_ipv4_nexthop_address) ? $this->peer_ipv4_nexthop_address : ''; + } + + public function hasPeerIpv4NexthopAddress() + { + return isset($this->peer_ipv4_nexthop_address); + } + + public function clearPeerIpv4NexthopAddress() + { + unset($this->peer_ipv4_nexthop_address); + } + + /** + * IPv4 address of the BGP interface outside Google Cloud Platform. + * + * Generated from protobuf field optional string peer_ipv4_nexthop_address = 469221774; + * @param string $var + * @return $this + */ + public function setPeerIpv4NexthopAddress($var) + { + GPBUtil::checkString($var, True); + $this->peer_ipv4_nexthop_address = $var; + + return $this; + } + /** * IPv6 address of the BGP interface outside Google Cloud Platform. * diff --git a/Compute/src/V1/RouterInterface.php b/Compute/src/V1/RouterInterface.php index 139309beb9d4..0ede56e32793 100644 --- a/Compute/src/V1/RouterInterface.php +++ b/Compute/src/V1/RouterInterface.php @@ -15,11 +15,18 @@ class RouterInterface extends \Google\Protobuf\Internal\Message { /** - * IP address and range of the interface. The IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface. + * IP address and range of the interface. - For Internet Protocol version 4 (IPv4), the IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example, 169.254.0.1/30. Note: Do not truncate the IP address, as it represents the IP address of the interface. - For Internet Protocol version 6 (IPv6), the value must be a unique local address (ULA) range from fdff:1::/64 with a mask length of 126 or less. This value should be a CIDR-formatted string, for example, fc00:0:1:1::1/112. Within the router's VPC, this IPv6 prefix will be reserved exclusively for this connection and cannot be used for any other purpose. * * Generated from protobuf field optional string ip_range = 145092645; */ private $ip_range = null; + /** + * IP version of this interface. + * Check the IpVersion enum for the list of possible values. + * + * Generated from protobuf field optional string ip_version = 294959552; + */ + private $ip_version = null; /** * URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a subnetwork. * @@ -71,7 +78,10 @@ class RouterInterface extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $ip_range - * IP address and range of the interface. The IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface. + * IP address and range of the interface. - For Internet Protocol version 4 (IPv4), the IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example, 169.254.0.1/30. Note: Do not truncate the IP address, as it represents the IP address of the interface. - For Internet Protocol version 6 (IPv6), the value must be a unique local address (ULA) range from fdff:1::/64 with a mask length of 126 or less. This value should be a CIDR-formatted string, for example, fc00:0:1:1::1/112. Within the router's VPC, this IPv6 prefix will be reserved exclusively for this connection and cannot be used for any other purpose. + * @type string $ip_version + * IP version of this interface. + * Check the IpVersion enum for the list of possible values. * @type string $linked_interconnect_attachment * URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a subnetwork. * @type string $linked_vpn_tunnel @@ -95,7 +105,7 @@ public function __construct($data = NULL) { } /** - * IP address and range of the interface. The IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface. + * IP address and range of the interface. - For Internet Protocol version 4 (IPv4), the IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example, 169.254.0.1/30. Note: Do not truncate the IP address, as it represents the IP address of the interface. - For Internet Protocol version 6 (IPv6), the value must be a unique local address (ULA) range from fdff:1::/64 with a mask length of 126 or less. This value should be a CIDR-formatted string, for example, fc00:0:1:1::1/112. Within the router's VPC, this IPv6 prefix will be reserved exclusively for this connection and cannot be used for any other purpose. * * Generated from protobuf field optional string ip_range = 145092645; * @return string @@ -116,7 +126,7 @@ public function clearIpRange() } /** - * IP address and range of the interface. The IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example: 169.254.0.1/30. NOTE: Do not truncate the address as it represents the IP address of the interface. + * IP address and range of the interface. - For Internet Protocol version 4 (IPv4), the IP range must be in the RFC3927 link-local IP address space. The value must be a CIDR-formatted string, for example, 169.254.0.1/30. Note: Do not truncate the IP address, as it represents the IP address of the interface. - For Internet Protocol version 6 (IPv6), the value must be a unique local address (ULA) range from fdff:1::/64 with a mask length of 126 or less. This value should be a CIDR-formatted string, for example, fc00:0:1:1::1/112. Within the router's VPC, this IPv6 prefix will be reserved exclusively for this connection and cannot be used for any other purpose. * * Generated from protobuf field optional string ip_range = 145092645; * @param string $var @@ -130,6 +140,44 @@ public function setIpRange($var) return $this; } + /** + * IP version of this interface. + * Check the IpVersion enum for the list of possible values. + * + * Generated from protobuf field optional string ip_version = 294959552; + * @return string + */ + public function getIpVersion() + { + return isset($this->ip_version) ? $this->ip_version : ''; + } + + public function hasIpVersion() + { + return isset($this->ip_version); + } + + public function clearIpVersion() + { + unset($this->ip_version); + } + + /** + * IP version of this interface. + * Check the IpVersion enum for the list of possible values. + * + * Generated from protobuf field optional string ip_version = 294959552; + * @param string $var + * @return $this + */ + public function setIpVersion($var) + { + GPBUtil::checkString($var, True); + $this->ip_version = $var; + + return $this; + } + /** * URI of the linked Interconnect attachment. It must be in the same region as the router. Each interface can have one linked resource, which can be a VPN tunnel, an Interconnect attachment, or a subnetwork. * diff --git a/Compute/src/V1/RouterInterface/IpVersion.php b/Compute/src/V1/RouterInterface/IpVersion.php new file mode 100644 index 000000000000..317732832ea2 --- /dev/null +++ b/Compute/src/V1/RouterInterface/IpVersion.php @@ -0,0 +1,58 @@ +google.cloud.compute.v1.RouterInterface.IpVersion + */ +class IpVersion +{ + /** + * A value indicating that the enum field is not set. + * + * Generated from protobuf enum UNDEFINED_IP_VERSION = 0; + */ + const UNDEFINED_IP_VERSION = 0; + /** + * Generated from protobuf enum IPV4 = 2254341; + */ + const IPV4 = 2254341; + /** + * Generated from protobuf enum IPV6 = 2254343; + */ + const IPV6 = 2254343; + + private static $valueToName = [ + self::UNDEFINED_IP_VERSION => 'UNDEFINED_IP_VERSION', + self::IPV4 => 'IPV4', + self::IPV6 => 'IPV6', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/Compute/src/V1/RouterStatusBgpPeerStatus.php b/Compute/src/V1/RouterStatusBgpPeerStatus.php index de27617155f9..fd921bb21893 100644 --- a/Compute/src/V1/RouterStatusBgpPeerStatus.php +++ b/Compute/src/V1/RouterStatusBgpPeerStatus.php @@ -25,7 +25,13 @@ class RouterStatusBgpPeerStatus extends \Google\Protobuf\Internal\Message */ private $bfd_status = null; /** - * Enable IPv6 traffic over BGP Peer. If not specified, it is disabled by default. + * Enable IPv4 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 4. + * + * Generated from protobuf field optional bool enable_ipv4 = 181467937; + */ + private $enable_ipv4 = null; + /** + * Enable IPv6 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 6. * * Generated from protobuf field optional bool enable_ipv6 = 181467939; */ @@ -36,6 +42,12 @@ class RouterStatusBgpPeerStatus extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional string ip_address = 406272220; */ private $ip_address = null; + /** + * IPv4 address of the local BGP interface. + * + * Generated from protobuf field optional string ipv4_nexthop_address = 5703377; + */ + private $ipv4_nexthop_address = null; /** * IPv6 address of the local BGP interface. * @@ -72,6 +84,12 @@ class RouterStatusBgpPeerStatus extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional string peer_ip_address = 207735769; */ private $peer_ip_address = null; + /** + * IPv4 address of the remote BGP interface. + * + * Generated from protobuf field optional string peer_ipv4_nexthop_address = 469221774; + */ + private $peer_ipv4_nexthop_address = null; /** * IPv6 address of the remote BGP interface. * @@ -126,10 +144,14 @@ class RouterStatusBgpPeerStatus extends \Google\Protobuf\Internal\Message * @type array<\Google\Cloud\Compute\V1\Route>|\Google\Protobuf\Internal\RepeatedField $advertised_routes * Routes that were advertised to the remote BGP peer * @type \Google\Cloud\Compute\V1\BfdStatus $bfd_status + * @type bool $enable_ipv4 + * Enable IPv4 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 4. * @type bool $enable_ipv6 - * Enable IPv6 traffic over BGP Peer. If not specified, it is disabled by default. + * Enable IPv6 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 6. * @type string $ip_address * IP address of the local BGP interface. + * @type string $ipv4_nexthop_address + * IPv4 address of the local BGP interface. * @type string $ipv6_nexthop_address * IPv6 address of the local BGP interface. * @type string $linked_vpn_tunnel @@ -142,6 +164,8 @@ class RouterStatusBgpPeerStatus extends \Google\Protobuf\Internal\Message * Number of routes learned from the remote BGP Peer. * @type string $peer_ip_address * IP address of the remote BGP interface. + * @type string $peer_ipv4_nexthop_address + * IPv4 address of the remote BGP interface. * @type string $peer_ipv6_nexthop_address * IPv6 address of the remote BGP interface. * @type string $router_appliance_instance @@ -224,7 +248,43 @@ public function setBfdStatus($var) } /** - * Enable IPv6 traffic over BGP Peer. If not specified, it is disabled by default. + * Enable IPv4 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 4. + * + * Generated from protobuf field optional bool enable_ipv4 = 181467937; + * @return bool + */ + public function getEnableIpv4() + { + return isset($this->enable_ipv4) ? $this->enable_ipv4 : false; + } + + public function hasEnableIpv4() + { + return isset($this->enable_ipv4); + } + + public function clearEnableIpv4() + { + unset($this->enable_ipv4); + } + + /** + * Enable IPv4 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 4. + * + * Generated from protobuf field optional bool enable_ipv4 = 181467937; + * @param bool $var + * @return $this + */ + public function setEnableIpv4($var) + { + GPBUtil::checkBool($var); + $this->enable_ipv4 = $var; + + return $this; + } + + /** + * Enable IPv6 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 6. * * Generated from protobuf field optional bool enable_ipv6 = 181467939; * @return bool @@ -245,7 +305,7 @@ public function clearEnableIpv6() } /** - * Enable IPv6 traffic over BGP Peer. If not specified, it is disabled by default. + * Enable IPv6 traffic over BGP Peer. It is enabled by default if the peerIpAddress is version 6. * * Generated from protobuf field optional bool enable_ipv6 = 181467939; * @param bool $var @@ -295,6 +355,42 @@ public function setIpAddress($var) return $this; } + /** + * IPv4 address of the local BGP interface. + * + * Generated from protobuf field optional string ipv4_nexthop_address = 5703377; + * @return string + */ + public function getIpv4NexthopAddress() + { + return isset($this->ipv4_nexthop_address) ? $this->ipv4_nexthop_address : ''; + } + + public function hasIpv4NexthopAddress() + { + return isset($this->ipv4_nexthop_address); + } + + public function clearIpv4NexthopAddress() + { + unset($this->ipv4_nexthop_address); + } + + /** + * IPv4 address of the local BGP interface. + * + * Generated from protobuf field optional string ipv4_nexthop_address = 5703377; + * @param string $var + * @return $this + */ + public function setIpv4NexthopAddress($var) + { + GPBUtil::checkString($var, True); + $this->ipv4_nexthop_address = $var; + + return $this; + } + /** * IPv6 address of the local BGP interface. * @@ -511,6 +607,42 @@ public function setPeerIpAddress($var) return $this; } + /** + * IPv4 address of the remote BGP interface. + * + * Generated from protobuf field optional string peer_ipv4_nexthop_address = 469221774; + * @return string + */ + public function getPeerIpv4NexthopAddress() + { + return isset($this->peer_ipv4_nexthop_address) ? $this->peer_ipv4_nexthop_address : ''; + } + + public function hasPeerIpv4NexthopAddress() + { + return isset($this->peer_ipv4_nexthop_address); + } + + public function clearPeerIpv4NexthopAddress() + { + unset($this->peer_ipv4_nexthop_address); + } + + /** + * IPv4 address of the remote BGP interface. + * + * Generated from protobuf field optional string peer_ipv4_nexthop_address = 469221774; + * @param string $var + * @return $this + */ + public function setPeerIpv4NexthopAddress($var) + { + GPBUtil::checkString($var, True); + $this->peer_ipv4_nexthop_address = $var; + + return $this; + } + /** * IPv6 address of the remote BGP interface. * diff --git a/Compute/src/V1/RouterStatusBgpPeerStatus/StatusReason.php b/Compute/src/V1/RouterStatusBgpPeerStatus/StatusReason.php index 828d1ef7a3b8..8f737973a25b 100644 --- a/Compute/src/V1/RouterStatusBgpPeerStatus/StatusReason.php +++ b/Compute/src/V1/RouterStatusBgpPeerStatus/StatusReason.php @@ -19,6 +19,18 @@ class StatusReason * Generated from protobuf enum UNDEFINED_STATUS_REASON = 0; */ const UNDEFINED_STATUS_REASON = 0; + /** + * BGP peer disabled because it requires IPv4 but the underlying connection is IPv6-only. + * + * Generated from protobuf enum IPV4_PEER_ON_IPV6_ONLY_CONNECTION = 435936662; + */ + const IPV4_PEER_ON_IPV6_ONLY_CONNECTION = 435936662; + /** + * BGP peer disabled because it requires IPv6 but the underlying connection is IPv4-only. + * + * Generated from protobuf enum IPV6_PEER_ON_IPV4_ONLY_CONNECTION = 436304082; + */ + const IPV6_PEER_ON_IPV4_ONLY_CONNECTION = 436304082; /** * Indicates internal problems with configuration of MD5 authentication. This particular reason can only be returned when md5AuthEnabled is true and status is DOWN. * @@ -32,6 +44,8 @@ class StatusReason private static $valueToName = [ self::UNDEFINED_STATUS_REASON => 'UNDEFINED_STATUS_REASON', + self::IPV4_PEER_ON_IPV6_ONLY_CONNECTION => 'IPV4_PEER_ON_IPV6_ONLY_CONNECTION', + self::IPV6_PEER_ON_IPV4_ONLY_CONNECTION => 'IPV6_PEER_ON_IPV4_ONLY_CONNECTION', self::MD5_AUTH_INTERNAL_PROBLEM => 'MD5_AUTH_INTERNAL_PROBLEM', self::STATUS_REASON_UNSPECIFIED => 'STATUS_REASON_UNSPECIFIED', ]; diff --git a/Compute/src/V1/ServiceAttachment.php b/Compute/src/V1/ServiceAttachment.php index 779330a031d5..edcf19a0917c 100644 --- a/Compute/src/V1/ServiceAttachment.php +++ b/Compute/src/V1/ServiceAttachment.php @@ -29,13 +29,13 @@ class ServiceAttachment extends \Google\Protobuf\Internal\Message */ private $connection_preference = null; /** - * Projects that are allowed to connect to this service attachment. + * Specifies which consumer projects or networks are allowed to connect to the service attachment. Each project or network has a connection limit. A given service attachment can manage connections at either the project or network level. Therefore, both the accept and reject lists for a given service attachment must contain either only projects or only networks. * * Generated from protobuf field repeated .google.cloud.compute.v1.ServiceAttachmentConsumerProjectLimit consumer_accept_lists = 402725703; */ private $consumer_accept_lists; /** - * Projects that are not allowed to connect to this service attachment. The project can be specified using its id or number. + * Specifies a list of projects or networks that are not allowed to connect to this service attachment. The project can be specified using its project ID or project number and the network can be specified using its URL. A given service attachment can manage connections at either the project or network level. Therefore, both the reject and accept lists for a given service attachment must contain either only projects or only networks. * * Generated from protobuf field repeated string consumer_reject_lists = 204033182; */ @@ -143,9 +143,9 @@ class ServiceAttachment extends \Google\Protobuf\Internal\Message * The connection preference of service attachment. The value can be set to ACCEPT_AUTOMATIC. An ACCEPT_AUTOMATIC service attachment is one that always accepts the connection from consumer forwarding rules. * Check the ConnectionPreference enum for the list of possible values. * @type array<\Google\Cloud\Compute\V1\ServiceAttachmentConsumerProjectLimit>|\Google\Protobuf\Internal\RepeatedField $consumer_accept_lists - * Projects that are allowed to connect to this service attachment. + * Specifies which consumer projects or networks are allowed to connect to the service attachment. Each project or network has a connection limit. A given service attachment can manage connections at either the project or network level. Therefore, both the accept and reject lists for a given service attachment must contain either only projects or only networks. * @type array|\Google\Protobuf\Internal\RepeatedField $consumer_reject_lists - * Projects that are not allowed to connect to this service attachment. The project can be specified using its id or number. + * Specifies a list of projects or networks that are not allowed to connect to this service attachment. The project can be specified using its project ID or project number and the network can be specified using its URL. A given service attachment can manage connections at either the project or network level. Therefore, both the reject and accept lists for a given service attachment must contain either only projects or only networks. * @type string $creation_timestamp * [Output Only] Creation timestamp in RFC3339 text format. * @type string $description @@ -248,7 +248,7 @@ public function setConnectionPreference($var) } /** - * Projects that are allowed to connect to this service attachment. + * Specifies which consumer projects or networks are allowed to connect to the service attachment. Each project or network has a connection limit. A given service attachment can manage connections at either the project or network level. Therefore, both the accept and reject lists for a given service attachment must contain either only projects or only networks. * * Generated from protobuf field repeated .google.cloud.compute.v1.ServiceAttachmentConsumerProjectLimit consumer_accept_lists = 402725703; * @return \Google\Protobuf\Internal\RepeatedField @@ -259,7 +259,7 @@ public function getConsumerAcceptLists() } /** - * Projects that are allowed to connect to this service attachment. + * Specifies which consumer projects or networks are allowed to connect to the service attachment. Each project or network has a connection limit. A given service attachment can manage connections at either the project or network level. Therefore, both the accept and reject lists for a given service attachment must contain either only projects or only networks. * * Generated from protobuf field repeated .google.cloud.compute.v1.ServiceAttachmentConsumerProjectLimit consumer_accept_lists = 402725703; * @param array<\Google\Cloud\Compute\V1\ServiceAttachmentConsumerProjectLimit>|\Google\Protobuf\Internal\RepeatedField $var @@ -274,7 +274,7 @@ public function setConsumerAcceptLists($var) } /** - * Projects that are not allowed to connect to this service attachment. The project can be specified using its id or number. + * Specifies a list of projects or networks that are not allowed to connect to this service attachment. The project can be specified using its project ID or project number and the network can be specified using its URL. A given service attachment can manage connections at either the project or network level. Therefore, both the reject and accept lists for a given service attachment must contain either only projects or only networks. * * Generated from protobuf field repeated string consumer_reject_lists = 204033182; * @return \Google\Protobuf\Internal\RepeatedField @@ -285,7 +285,7 @@ public function getConsumerRejectLists() } /** - * Projects that are not allowed to connect to this service attachment. The project can be specified using its id or number. + * Specifies a list of projects or networks that are not allowed to connect to this service attachment. The project can be specified using its project ID or project number and the network can be specified using its URL. A given service attachment can manage connections at either the project or network level. Therefore, both the reject and accept lists for a given service attachment must contain either only projects or only networks. * * Generated from protobuf field repeated string consumer_reject_lists = 204033182; * @param array|\Google\Protobuf\Internal\RepeatedField $var diff --git a/Compute/src/V1/SetIamPolicyStoragePoolRequest.php b/Compute/src/V1/SetIamPolicyStoragePoolRequest.php new file mode 100644 index 000000000000..248cfd7f7df8 --- /dev/null +++ b/Compute/src/V1/SetIamPolicyStoragePoolRequest.php @@ -0,0 +1,198 @@ +google.cloud.compute.v1.SetIamPolicyStoragePoolRequest + */ +class SetIamPolicyStoragePoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + */ + private $project = ''; + /** + * Name or id of the resource for this request. + * + * Generated from protobuf field string resource = 195806222 [(.google.api.field_behavior) = REQUIRED]; + */ + private $resource = ''; + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + */ + private $zone = ''; + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.ZoneSetPolicyRequest zone_set_policy_request_resource = 382082107 [(.google.api.field_behavior) = REQUIRED]; + */ + private $zone_set_policy_request_resource = null; + + /** + * @param string $project Project ID for this request. + * @param string $zone The name of the zone for this request. + * @param string $resource Name or id of the resource for this request. + * @param \Google\Cloud\Compute\V1\ZoneSetPolicyRequest $zoneSetPolicyRequestResource The body resource for this request + * + * @return \Google\Cloud\Compute\V1\SetIamPolicyStoragePoolRequest + * + * @experimental + */ + public static function build(string $project, string $zone, string $resource, \Google\Cloud\Compute\V1\ZoneSetPolicyRequest $zoneSetPolicyRequestResource): self + { + return (new self()) + ->setProject($project) + ->setZone($zone) + ->setResource($resource) + ->setZoneSetPolicyRequestResource($zoneSetPolicyRequestResource); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project + * Project ID for this request. + * @type string $resource + * Name or id of the resource for this request. + * @type string $zone + * The name of the zone for this request. + * @type \Google\Cloud\Compute\V1\ZoneSetPolicyRequest $zone_set_policy_request_resource + * The body resource for this request + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Name or id of the resource for this request. + * + * Generated from protobuf field string resource = 195806222 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getResource() + { + return $this->resource; + } + + /** + * Name or id of the resource for this request. + * + * Generated from protobuf field string resource = 195806222 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkString($var, True); + $this->resource = $var; + + return $this; + } + + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.ZoneSetPolicyRequest zone_set_policy_request_resource = 382082107 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Compute\V1\ZoneSetPolicyRequest|null + */ + public function getZoneSetPolicyRequestResource() + { + return $this->zone_set_policy_request_resource; + } + + public function hasZoneSetPolicyRequestResource() + { + return isset($this->zone_set_policy_request_resource); + } + + public function clearZoneSetPolicyRequestResource() + { + unset($this->zone_set_policy_request_resource); + } + + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.ZoneSetPolicyRequest zone_set_policy_request_resource = 382082107 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Compute\V1\ZoneSetPolicyRequest $var + * @return $this + */ + public function setZoneSetPolicyRequestResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\ZoneSetPolicyRequest::class); + $this->zone_set_policy_request_resource = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/StoragePool.php b/Compute/src/V1/StoragePool.php new file mode 100644 index 000000000000..69212b2834bb --- /dev/null +++ b/Compute/src/V1/StoragePool.php @@ -0,0 +1,871 @@ +google.cloud.compute.v1.StoragePool + */ +class StoragePool extends \Google\Protobuf\Internal\Message +{ + /** + * Provisioning type of the byte capacity of the pool. + * Check the CapacityProvisioningType enum for the list of possible values. + * + * Generated from protobuf field optional string capacity_provisioning_type = 251610375; + */ + private $capacity_provisioning_type = null; + /** + * [Output Only] Creation timestamp in RFC3339 text format. + * + * Generated from protobuf field optional string creation_timestamp = 30525366; + */ + private $creation_timestamp = null; + /** + * An optional description of this resource. Provide this property when you create the resource. + * + * Generated from protobuf field optional string description = 422937596; + */ + private $description = null; + /** + * [Output Only] The unique identifier for the resource. This identifier is defined by the server. + * + * Generated from protobuf field optional uint64 id = 3355; + */ + private $id = null; + /** + * [Output Only] Type of the resource. Always compute#storagePool for storage pools. + * + * Generated from protobuf field optional string kind = 3292052; + */ + private $kind = null; + /** + * A fingerprint for the labels being applied to this storage pool, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a storage pool. + * + * Generated from protobuf field optional string label_fingerprint = 178124825; + */ + private $label_fingerprint = null; + /** + * Labels to apply to this storage pool. These can be later modified by the setLabels method. + * + * Generated from protobuf field map labels = 500195327; + */ + private $labels; + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + * + * Generated from protobuf field optional string name = 3373707; + */ + private $name = null; + /** + * Provisioning type of the performance-related parameters of the pool, such as throughput and IOPS. + * Check the PerformanceProvisioningType enum for the list of possible values. + * + * Generated from protobuf field optional string performance_provisioning_type = 468553469; + */ + private $performance_provisioning_type = null; + /** + * Size, in GiB, of the storage pool. + * + * Generated from protobuf field optional int64 pool_provisioned_capacity_gb = 478537682; + */ + private $pool_provisioned_capacity_gb = null; + /** + * Provisioned IOPS of the storage pool. Only relevant if the storage pool type is hyperdisk-balanced. + * + * Generated from protobuf field optional int64 pool_provisioned_iops = 112092311; + */ + private $pool_provisioned_iops = null; + /** + * Provisioned throughput of the storage pool. Only relevant if the storage pool type is hyperdisk-balanced or hyperdisk-throughput. + * + * Generated from protobuf field optional int64 pool_provisioned_throughput = 169215640; + */ + private $pool_provisioned_throughput = null; + /** + * [Output Only] Status information for the storage pool resource. + * + * Generated from protobuf field optional .google.cloud.compute.v1.StoragePoolResourceStatus resource_status = 249429315; + */ + private $resource_status = null; + /** + * [Output Only] Server-defined fully-qualified URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + */ + private $self_link = null; + /** + * [Output Only] Server-defined URL for this resource's resource id. + * + * Generated from protobuf field optional string self_link_with_id = 44520962; + */ + private $self_link_with_id = null; + /** + * [Output Only] The status of storage pool creation. - CREATING: Storage pool is provisioning. storagePool. - FAILED: Storage pool creation failed. - READY: Storage pool is ready for use. - DELETING: Storage pool is deleting. + * Check the State enum for the list of possible values. + * + * Generated from protobuf field optional string state = 109757585; + */ + private $state = null; + /** + * [Output Only] Status information for the storage pool resource. + * + * Generated from protobuf field optional .google.cloud.compute.v1.StoragePoolResourceStatus status = 181260274; + */ + private $status = null; + /** + * Type of the storage pool. + * + * Generated from protobuf field optional string storage_pool_type = 285999289; + */ + private $storage_pool_type = null; + /** + * [Output Only] URL of the zone where the storage pool resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. + * + * Generated from protobuf field optional string zone = 3744684; + */ + private $zone = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $capacity_provisioning_type + * Provisioning type of the byte capacity of the pool. + * Check the CapacityProvisioningType enum for the list of possible values. + * @type string $creation_timestamp + * [Output Only] Creation timestamp in RFC3339 text format. + * @type string $description + * An optional description of this resource. Provide this property when you create the resource. + * @type int|string $id + * [Output Only] The unique identifier for the resource. This identifier is defined by the server. + * @type string $kind + * [Output Only] Type of the resource. Always compute#storagePool for storage pools. + * @type string $label_fingerprint + * A fingerprint for the labels being applied to this storage pool, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a storage pool. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels to apply to this storage pool. These can be later modified by the setLabels method. + * @type string $name + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + * @type string $performance_provisioning_type + * Provisioning type of the performance-related parameters of the pool, such as throughput and IOPS. + * Check the PerformanceProvisioningType enum for the list of possible values. + * @type int|string $pool_provisioned_capacity_gb + * Size, in GiB, of the storage pool. + * @type int|string $pool_provisioned_iops + * Provisioned IOPS of the storage pool. Only relevant if the storage pool type is hyperdisk-balanced. + * @type int|string $pool_provisioned_throughput + * Provisioned throughput of the storage pool. Only relevant if the storage pool type is hyperdisk-balanced or hyperdisk-throughput. + * @type \Google\Cloud\Compute\V1\StoragePoolResourceStatus $resource_status + * [Output Only] Status information for the storage pool resource. + * @type string $self_link + * [Output Only] Server-defined fully-qualified URL for this resource. + * @type string $self_link_with_id + * [Output Only] Server-defined URL for this resource's resource id. + * @type string $state + * [Output Only] The status of storage pool creation. - CREATING: Storage pool is provisioning. storagePool. - FAILED: Storage pool creation failed. - READY: Storage pool is ready for use. - DELETING: Storage pool is deleting. + * Check the State enum for the list of possible values. + * @type \Google\Cloud\Compute\V1\StoragePoolResourceStatus $status + * [Output Only] Status information for the storage pool resource. + * @type string $storage_pool_type + * Type of the storage pool. + * @type string $zone + * [Output Only] URL of the zone where the storage pool resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * Provisioning type of the byte capacity of the pool. + * Check the CapacityProvisioningType enum for the list of possible values. + * + * Generated from protobuf field optional string capacity_provisioning_type = 251610375; + * @return string + */ + public function getCapacityProvisioningType() + { + return isset($this->capacity_provisioning_type) ? $this->capacity_provisioning_type : ''; + } + + public function hasCapacityProvisioningType() + { + return isset($this->capacity_provisioning_type); + } + + public function clearCapacityProvisioningType() + { + unset($this->capacity_provisioning_type); + } + + /** + * Provisioning type of the byte capacity of the pool. + * Check the CapacityProvisioningType enum for the list of possible values. + * + * Generated from protobuf field optional string capacity_provisioning_type = 251610375; + * @param string $var + * @return $this + */ + public function setCapacityProvisioningType($var) + { + GPBUtil::checkString($var, True); + $this->capacity_provisioning_type = $var; + + return $this; + } + + /** + * [Output Only] Creation timestamp in RFC3339 text format. + * + * Generated from protobuf field optional string creation_timestamp = 30525366; + * @return string + */ + public function getCreationTimestamp() + { + return isset($this->creation_timestamp) ? $this->creation_timestamp : ''; + } + + public function hasCreationTimestamp() + { + return isset($this->creation_timestamp); + } + + public function clearCreationTimestamp() + { + unset($this->creation_timestamp); + } + + /** + * [Output Only] Creation timestamp in RFC3339 text format. + * + * Generated from protobuf field optional string creation_timestamp = 30525366; + * @param string $var + * @return $this + */ + public function setCreationTimestamp($var) + { + GPBUtil::checkString($var, True); + $this->creation_timestamp = $var; + + return $this; + } + + /** + * An optional description of this resource. Provide this property when you create the resource. + * + * Generated from protobuf field optional string description = 422937596; + * @return string + */ + public function getDescription() + { + return isset($this->description) ? $this->description : ''; + } + + public function hasDescription() + { + return isset($this->description); + } + + public function clearDescription() + { + unset($this->description); + } + + /** + * An optional description of this resource. Provide this property when you create the resource. + * + * Generated from protobuf field optional string description = 422937596; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * [Output Only] The unique identifier for the resource. This identifier is defined by the server. + * + * Generated from protobuf field optional uint64 id = 3355; + * @return int|string + */ + public function getId() + { + return isset($this->id) ? $this->id : 0; + } + + public function hasId() + { + return isset($this->id); + } + + public function clearId() + { + unset($this->id); + } + + /** + * [Output Only] The unique identifier for the resource. This identifier is defined by the server. + * + * Generated from protobuf field optional uint64 id = 3355; + * @param int|string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkUint64($var); + $this->id = $var; + + return $this; + } + + /** + * [Output Only] Type of the resource. Always compute#storagePool for storage pools. + * + * Generated from protobuf field optional string kind = 3292052; + * @return string + */ + public function getKind() + { + return isset($this->kind) ? $this->kind : ''; + } + + public function hasKind() + { + return isset($this->kind); + } + + public function clearKind() + { + unset($this->kind); + } + + /** + * [Output Only] Type of the resource. Always compute#storagePool for storage pools. + * + * Generated from protobuf field optional string kind = 3292052; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * A fingerprint for the labels being applied to this storage pool, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a storage pool. + * + * Generated from protobuf field optional string label_fingerprint = 178124825; + * @return string + */ + public function getLabelFingerprint() + { + return isset($this->label_fingerprint) ? $this->label_fingerprint : ''; + } + + public function hasLabelFingerprint() + { + return isset($this->label_fingerprint); + } + + public function clearLabelFingerprint() + { + unset($this->label_fingerprint); + } + + /** + * A fingerprint for the labels being applied to this storage pool, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a storage pool. + * + * Generated from protobuf field optional string label_fingerprint = 178124825; + * @param string $var + * @return $this + */ + public function setLabelFingerprint($var) + { + GPBUtil::checkString($var, True); + $this->label_fingerprint = $var; + + return $this; + } + + /** + * Labels to apply to this storage pool. These can be later modified by the setLabels method. + * + * Generated from protobuf field map labels = 500195327; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels to apply to this storage pool. These can be later modified by the setLabels method. + * + * Generated from protobuf field map labels = 500195327; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + * + * Generated from protobuf field optional string name = 3373707; + * @return string + */ + public function getName() + { + return isset($this->name) ? $this->name : ''; + } + + public function hasName() + { + return isset($this->name); + } + + public function clearName() + { + unset($this->name); + } + + /** + * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. + * + * Generated from protobuf field optional string name = 3373707; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Provisioning type of the performance-related parameters of the pool, such as throughput and IOPS. + * Check the PerformanceProvisioningType enum for the list of possible values. + * + * Generated from protobuf field optional string performance_provisioning_type = 468553469; + * @return string + */ + public function getPerformanceProvisioningType() + { + return isset($this->performance_provisioning_type) ? $this->performance_provisioning_type : ''; + } + + public function hasPerformanceProvisioningType() + { + return isset($this->performance_provisioning_type); + } + + public function clearPerformanceProvisioningType() + { + unset($this->performance_provisioning_type); + } + + /** + * Provisioning type of the performance-related parameters of the pool, such as throughput and IOPS. + * Check the PerformanceProvisioningType enum for the list of possible values. + * + * Generated from protobuf field optional string performance_provisioning_type = 468553469; + * @param string $var + * @return $this + */ + public function setPerformanceProvisioningType($var) + { + GPBUtil::checkString($var, True); + $this->performance_provisioning_type = $var; + + return $this; + } + + /** + * Size, in GiB, of the storage pool. + * + * Generated from protobuf field optional int64 pool_provisioned_capacity_gb = 478537682; + * @return int|string + */ + public function getPoolProvisionedCapacityGb() + { + return isset($this->pool_provisioned_capacity_gb) ? $this->pool_provisioned_capacity_gb : 0; + } + + public function hasPoolProvisionedCapacityGb() + { + return isset($this->pool_provisioned_capacity_gb); + } + + public function clearPoolProvisionedCapacityGb() + { + unset($this->pool_provisioned_capacity_gb); + } + + /** + * Size, in GiB, of the storage pool. + * + * Generated from protobuf field optional int64 pool_provisioned_capacity_gb = 478537682; + * @param int|string $var + * @return $this + */ + public function setPoolProvisionedCapacityGb($var) + { + GPBUtil::checkInt64($var); + $this->pool_provisioned_capacity_gb = $var; + + return $this; + } + + /** + * Provisioned IOPS of the storage pool. Only relevant if the storage pool type is hyperdisk-balanced. + * + * Generated from protobuf field optional int64 pool_provisioned_iops = 112092311; + * @return int|string + */ + public function getPoolProvisionedIops() + { + return isset($this->pool_provisioned_iops) ? $this->pool_provisioned_iops : 0; + } + + public function hasPoolProvisionedIops() + { + return isset($this->pool_provisioned_iops); + } + + public function clearPoolProvisionedIops() + { + unset($this->pool_provisioned_iops); + } + + /** + * Provisioned IOPS of the storage pool. Only relevant if the storage pool type is hyperdisk-balanced. + * + * Generated from protobuf field optional int64 pool_provisioned_iops = 112092311; + * @param int|string $var + * @return $this + */ + public function setPoolProvisionedIops($var) + { + GPBUtil::checkInt64($var); + $this->pool_provisioned_iops = $var; + + return $this; + } + + /** + * Provisioned throughput of the storage pool. Only relevant if the storage pool type is hyperdisk-balanced or hyperdisk-throughput. + * + * Generated from protobuf field optional int64 pool_provisioned_throughput = 169215640; + * @return int|string + */ + public function getPoolProvisionedThroughput() + { + return isset($this->pool_provisioned_throughput) ? $this->pool_provisioned_throughput : 0; + } + + public function hasPoolProvisionedThroughput() + { + return isset($this->pool_provisioned_throughput); + } + + public function clearPoolProvisionedThroughput() + { + unset($this->pool_provisioned_throughput); + } + + /** + * Provisioned throughput of the storage pool. Only relevant if the storage pool type is hyperdisk-balanced or hyperdisk-throughput. + * + * Generated from protobuf field optional int64 pool_provisioned_throughput = 169215640; + * @param int|string $var + * @return $this + */ + public function setPoolProvisionedThroughput($var) + { + GPBUtil::checkInt64($var); + $this->pool_provisioned_throughput = $var; + + return $this; + } + + /** + * [Output Only] Status information for the storage pool resource. + * + * Generated from protobuf field optional .google.cloud.compute.v1.StoragePoolResourceStatus resource_status = 249429315; + * @return \Google\Cloud\Compute\V1\StoragePoolResourceStatus|null + */ + public function getResourceStatus() + { + return $this->resource_status; + } + + public function hasResourceStatus() + { + return isset($this->resource_status); + } + + public function clearResourceStatus() + { + unset($this->resource_status); + } + + /** + * [Output Only] Status information for the storage pool resource. + * + * Generated from protobuf field optional .google.cloud.compute.v1.StoragePoolResourceStatus resource_status = 249429315; + * @param \Google\Cloud\Compute\V1\StoragePoolResourceStatus $var + * @return $this + */ + public function setResourceStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\StoragePoolResourceStatus::class); + $this->resource_status = $var; + + return $this; + } + + /** + * [Output Only] Server-defined fully-qualified URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + * @return string + */ + public function getSelfLink() + { + return isset($this->self_link) ? $this->self_link : ''; + } + + public function hasSelfLink() + { + return isset($this->self_link); + } + + public function clearSelfLink() + { + unset($this->self_link); + } + + /** + * [Output Only] Server-defined fully-qualified URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * [Output Only] Server-defined URL for this resource's resource id. + * + * Generated from protobuf field optional string self_link_with_id = 44520962; + * @return string + */ + public function getSelfLinkWithId() + { + return isset($this->self_link_with_id) ? $this->self_link_with_id : ''; + } + + public function hasSelfLinkWithId() + { + return isset($this->self_link_with_id); + } + + public function clearSelfLinkWithId() + { + unset($this->self_link_with_id); + } + + /** + * [Output Only] Server-defined URL for this resource's resource id. + * + * Generated from protobuf field optional string self_link_with_id = 44520962; + * @param string $var + * @return $this + */ + public function setSelfLinkWithId($var) + { + GPBUtil::checkString($var, True); + $this->self_link_with_id = $var; + + return $this; + } + + /** + * [Output Only] The status of storage pool creation. - CREATING: Storage pool is provisioning. storagePool. - FAILED: Storage pool creation failed. - READY: Storage pool is ready for use. - DELETING: Storage pool is deleting. + * Check the State enum for the list of possible values. + * + * Generated from protobuf field optional string state = 109757585; + * @return string + */ + public function getState() + { + return isset($this->state) ? $this->state : ''; + } + + public function hasState() + { + return isset($this->state); + } + + public function clearState() + { + unset($this->state); + } + + /** + * [Output Only] The status of storage pool creation. - CREATING: Storage pool is provisioning. storagePool. - FAILED: Storage pool creation failed. - READY: Storage pool is ready for use. - DELETING: Storage pool is deleting. + * Check the State enum for the list of possible values. + * + * Generated from protobuf field optional string state = 109757585; + * @param string $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkString($var, True); + $this->state = $var; + + return $this; + } + + /** + * [Output Only] Status information for the storage pool resource. + * + * Generated from protobuf field optional .google.cloud.compute.v1.StoragePoolResourceStatus status = 181260274; + * @return \Google\Cloud\Compute\V1\StoragePoolResourceStatus|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * [Output Only] Status information for the storage pool resource. + * + * Generated from protobuf field optional .google.cloud.compute.v1.StoragePoolResourceStatus status = 181260274; + * @param \Google\Cloud\Compute\V1\StoragePoolResourceStatus $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\StoragePoolResourceStatus::class); + $this->status = $var; + + return $this; + } + + /** + * Type of the storage pool. + * + * Generated from protobuf field optional string storage_pool_type = 285999289; + * @return string + */ + public function getStoragePoolType() + { + return isset($this->storage_pool_type) ? $this->storage_pool_type : ''; + } + + public function hasStoragePoolType() + { + return isset($this->storage_pool_type); + } + + public function clearStoragePoolType() + { + unset($this->storage_pool_type); + } + + /** + * Type of the storage pool. + * + * Generated from protobuf field optional string storage_pool_type = 285999289; + * @param string $var + * @return $this + */ + public function setStoragePoolType($var) + { + GPBUtil::checkString($var, True); + $this->storage_pool_type = $var; + + return $this; + } + + /** + * [Output Only] URL of the zone where the storage pool resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. + * + * Generated from protobuf field optional string zone = 3744684; + * @return string + */ + public function getZone() + { + return isset($this->zone) ? $this->zone : ''; + } + + public function hasZone() + { + return isset($this->zone); + } + + public function clearZone() + { + unset($this->zone); + } + + /** + * [Output Only] URL of the zone where the storage pool resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. + * + * Generated from protobuf field optional string zone = 3744684; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/StoragePool/CapacityProvisioningType.php b/Compute/src/V1/StoragePool/CapacityProvisioningType.php new file mode 100644 index 000000000000..0559dc9ba549 --- /dev/null +++ b/Compute/src/V1/StoragePool/CapacityProvisioningType.php @@ -0,0 +1,52 @@ +google.cloud.compute.v1.StoragePool.CapacityProvisioningType + */ +class CapacityProvisioningType +{ + /** + * A value indicating that the enum field is not set. + * + * Generated from protobuf enum UNDEFINED_CAPACITY_PROVISIONING_TYPE = 0; + */ + const UNDEFINED_CAPACITY_PROVISIONING_TYPE = 0; + + private static $valueToName = [ + self::UNDEFINED_CAPACITY_PROVISIONING_TYPE => 'UNDEFINED_CAPACITY_PROVISIONING_TYPE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/Compute/src/V1/StoragePool/PerformanceProvisioningType.php b/Compute/src/V1/StoragePool/PerformanceProvisioningType.php new file mode 100644 index 000000000000..25d184734752 --- /dev/null +++ b/Compute/src/V1/StoragePool/PerformanceProvisioningType.php @@ -0,0 +1,52 @@ +google.cloud.compute.v1.StoragePool.PerformanceProvisioningType + */ +class PerformanceProvisioningType +{ + /** + * A value indicating that the enum field is not set. + * + * Generated from protobuf enum UNDEFINED_PERFORMANCE_PROVISIONING_TYPE = 0; + */ + const UNDEFINED_PERFORMANCE_PROVISIONING_TYPE = 0; + + private static $valueToName = [ + self::UNDEFINED_PERFORMANCE_PROVISIONING_TYPE => 'UNDEFINED_PERFORMANCE_PROVISIONING_TYPE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/Compute/src/V1/StoragePool/State.php b/Compute/src/V1/StoragePool/State.php new file mode 100644 index 000000000000..50971ff2163c --- /dev/null +++ b/Compute/src/V1/StoragePool/State.php @@ -0,0 +1,76 @@ +google.cloud.compute.v1.StoragePool.State + */ +class State +{ + /** + * A value indicating that the enum field is not set. + * + * Generated from protobuf enum UNDEFINED_STATE = 0; + */ + const UNDEFINED_STATE = 0; + /** + * StoragePool is provisioning + * + * Generated from protobuf enum CREATING = 455564985; + */ + const CREATING = 455564985; + /** + * StoragePool is deleting. + * + * Generated from protobuf enum DELETING = 528602024; + */ + const DELETING = 528602024; + /** + * StoragePool creation failed. + * + * Generated from protobuf enum FAILED = 455706685; + */ + const FAILED = 455706685; + /** + * StoragePool is ready for use. + * + * Generated from protobuf enum READY = 77848963; + */ + const READY = 77848963; + + private static $valueToName = [ + self::UNDEFINED_STATE => 'UNDEFINED_STATE', + self::CREATING => 'CREATING', + self::DELETING => 'DELETING', + self::FAILED => 'FAILED', + self::READY => 'READY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/Compute/src/V1/StoragePoolAggregatedList.php b/Compute/src/V1/StoragePoolAggregatedList.php new file mode 100644 index 000000000000..af1ba9b1a8f8 --- /dev/null +++ b/Compute/src/V1/StoragePoolAggregatedList.php @@ -0,0 +1,357 @@ +google.cloud.compute.v1.StoragePoolAggregatedList + */ +class StoragePoolAggregatedList extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field optional string etag = 3123477; + */ + private $etag = null; + /** + * [Output Only] Unique identifier for the resource; defined by the server. + * + * Generated from protobuf field optional string id = 3355; + */ + private $id = null; + /** + * A list of StoragePoolsScopedList resources. + * + * Generated from protobuf field map items = 100526016; + */ + private $items; + /** + * [Output Only] Type of resource. Always compute#storagePoolAggregatedList for aggregated lists of storage pools. + * + * Generated from protobuf field optional string kind = 3292052; + */ + private $kind = null; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * + * Generated from protobuf field optional string next_page_token = 79797525; + */ + private $next_page_token = null; + /** + * [Output Only] Server-defined URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + */ + private $self_link = null; + /** + * [Output Only] Unreachable resources. + * + * Generated from protobuf field repeated string unreachables = 243372063; + */ + private $unreachables; + /** + * [Output Only] Informational warning message. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + */ + private $warning = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $etag + * @type string $id + * [Output Only] Unique identifier for the resource; defined by the server. + * @type array|\Google\Protobuf\Internal\MapField $items + * A list of StoragePoolsScopedList resources. + * @type string $kind + * [Output Only] Type of resource. Always compute#storagePoolAggregatedList for aggregated lists of storage pools. + * @type string $next_page_token + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * @type string $self_link + * [Output Only] Server-defined URL for this resource. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachables + * [Output Only] Unreachable resources. + * @type \Google\Cloud\Compute\V1\Warning $warning + * [Output Only] Informational warning message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field optional string etag = 3123477; + * @return string + */ + public function getEtag() + { + return isset($this->etag) ? $this->etag : ''; + } + + public function hasEtag() + { + return isset($this->etag); + } + + public function clearEtag() + { + unset($this->etag); + } + + /** + * Generated from protobuf field optional string etag = 3123477; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * [Output Only] Unique identifier for the resource; defined by the server. + * + * Generated from protobuf field optional string id = 3355; + * @return string + */ + public function getId() + { + return isset($this->id) ? $this->id : ''; + } + + public function hasId() + { + return isset($this->id); + } + + public function clearId() + { + unset($this->id); + } + + /** + * [Output Only] Unique identifier for the resource; defined by the server. + * + * Generated from protobuf field optional string id = 3355; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * A list of StoragePoolsScopedList resources. + * + * Generated from protobuf field map items = 100526016; + * @return \Google\Protobuf\Internal\MapField + */ + public function getItems() + { + return $this->items; + } + + /** + * A list of StoragePoolsScopedList resources. + * + * Generated from protobuf field map items = 100526016; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\StoragePoolsScopedList::class); + $this->items = $arr; + + return $this; + } + + /** + * [Output Only] Type of resource. Always compute#storagePoolAggregatedList for aggregated lists of storage pools. + * + * Generated from protobuf field optional string kind = 3292052; + * @return string + */ + public function getKind() + { + return isset($this->kind) ? $this->kind : ''; + } + + public function hasKind() + { + return isset($this->kind); + } + + public function clearKind() + { + unset($this->kind); + } + + /** + * [Output Only] Type of resource. Always compute#storagePoolAggregatedList for aggregated lists of storage pools. + * + * Generated from protobuf field optional string kind = 3292052; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * + * Generated from protobuf field optional string next_page_token = 79797525; + * @return string + */ + public function getNextPageToken() + { + return isset($this->next_page_token) ? $this->next_page_token : ''; + } + + public function hasNextPageToken() + { + return isset($this->next_page_token); + } + + public function clearNextPageToken() + { + unset($this->next_page_token); + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * + * Generated from protobuf field optional string next_page_token = 79797525; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * [Output Only] Server-defined URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + * @return string + */ + public function getSelfLink() + { + return isset($this->self_link) ? $this->self_link : ''; + } + + public function hasSelfLink() + { + return isset($this->self_link); + } + + public function clearSelfLink() + { + unset($this->self_link); + } + + /** + * [Output Only] Server-defined URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * [Output Only] Unreachable resources. + * + * Generated from protobuf field repeated string unreachables = 243372063; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachables() + { + return $this->unreachables; + } + + /** + * [Output Only] Unreachable resources. + * + * Generated from protobuf field repeated string unreachables = 243372063; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachables = $arr; + + return $this; + } + + /** + * [Output Only] Informational warning message. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + * @return \Google\Cloud\Compute\V1\Warning|null + */ + public function getWarning() + { + return $this->warning; + } + + public function hasWarning() + { + return isset($this->warning); + } + + public function clearWarning() + { + unset($this->warning); + } + + /** + * [Output Only] Informational warning message. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + * @param \Google\Cloud\Compute\V1\Warning $var + * @return $this + */ + public function setWarning($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\Warning::class); + $this->warning = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/StoragePoolDisk.php b/Compute/src/V1/StoragePoolDisk.php new file mode 100644 index 000000000000..ca8ba0b83378 --- /dev/null +++ b/Compute/src/V1/StoragePoolDisk.php @@ -0,0 +1,500 @@ +google.cloud.compute.v1.StoragePoolDisk + */ +class StoragePoolDisk extends \Google\Protobuf\Internal\Message +{ + /** + * [Output Only] Instances this disk is attached to. + * + * Generated from protobuf field repeated string attached_instances = 65255843; + */ + private $attached_instances; + /** + * [Output Only] Creation timestamp in RFC3339 text format. + * + * Generated from protobuf field optional string creation_timestamp = 30525366; + */ + private $creation_timestamp = null; + /** + * [Output Only] The URL of the disk. + * + * Generated from protobuf field optional string disk = 3083677; + */ + private $disk = null; + /** + * [Output Only] The name of the disk. + * + * Generated from protobuf field optional string name = 3373707; + */ + private $name = null; + /** + * [Output Only] The number of IOPS provisioned for the disk. + * + * Generated from protobuf field optional int64 provisioned_iops = 186769108; + */ + private $provisioned_iops = null; + /** + * [Output Only] The throughput provisioned for the disk. + * + * Generated from protobuf field optional int64 provisioned_throughput = 526524181; + */ + private $provisioned_throughput = null; + /** + * [Output Only] Resource policies applied to disk for automatic snapshot creations. + * + * Generated from protobuf field repeated string resource_policies = 22220385; + */ + private $resource_policies; + /** + * [Output Only] The disk size, in GB. + * + * Generated from protobuf field optional int64 size_gb = 494929369; + */ + private $size_gb = null; + /** + * [Output Only] The disk status. + * Check the Status enum for the list of possible values. + * + * Generated from protobuf field optional string status = 181260274; + */ + private $status = null; + /** + * [Output Only] The disk type. + * + * Generated from protobuf field optional string type = 3575610; + */ + private $type = null; + /** + * [Output Only] Amount of disk space used. + * + * Generated from protobuf field optional int64 used_bytes = 231640425; + */ + private $used_bytes = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $attached_instances + * [Output Only] Instances this disk is attached to. + * @type string $creation_timestamp + * [Output Only] Creation timestamp in RFC3339 text format. + * @type string $disk + * [Output Only] The URL of the disk. + * @type string $name + * [Output Only] The name of the disk. + * @type int|string $provisioned_iops + * [Output Only] The number of IOPS provisioned for the disk. + * @type int|string $provisioned_throughput + * [Output Only] The throughput provisioned for the disk. + * @type array|\Google\Protobuf\Internal\RepeatedField $resource_policies + * [Output Only] Resource policies applied to disk for automatic snapshot creations. + * @type int|string $size_gb + * [Output Only] The disk size, in GB. + * @type string $status + * [Output Only] The disk status. + * Check the Status enum for the list of possible values. + * @type string $type + * [Output Only] The disk type. + * @type int|string $used_bytes + * [Output Only] Amount of disk space used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * [Output Only] Instances this disk is attached to. + * + * Generated from protobuf field repeated string attached_instances = 65255843; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAttachedInstances() + { + return $this->attached_instances; + } + + /** + * [Output Only] Instances this disk is attached to. + * + * Generated from protobuf field repeated string attached_instances = 65255843; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAttachedInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->attached_instances = $arr; + + return $this; + } + + /** + * [Output Only] Creation timestamp in RFC3339 text format. + * + * Generated from protobuf field optional string creation_timestamp = 30525366; + * @return string + */ + public function getCreationTimestamp() + { + return isset($this->creation_timestamp) ? $this->creation_timestamp : ''; + } + + public function hasCreationTimestamp() + { + return isset($this->creation_timestamp); + } + + public function clearCreationTimestamp() + { + unset($this->creation_timestamp); + } + + /** + * [Output Only] Creation timestamp in RFC3339 text format. + * + * Generated from protobuf field optional string creation_timestamp = 30525366; + * @param string $var + * @return $this + */ + public function setCreationTimestamp($var) + { + GPBUtil::checkString($var, True); + $this->creation_timestamp = $var; + + return $this; + } + + /** + * [Output Only] The URL of the disk. + * + * Generated from protobuf field optional string disk = 3083677; + * @return string + */ + public function getDisk() + { + return isset($this->disk) ? $this->disk : ''; + } + + public function hasDisk() + { + return isset($this->disk); + } + + public function clearDisk() + { + unset($this->disk); + } + + /** + * [Output Only] The URL of the disk. + * + * Generated from protobuf field optional string disk = 3083677; + * @param string $var + * @return $this + */ + public function setDisk($var) + { + GPBUtil::checkString($var, True); + $this->disk = $var; + + return $this; + } + + /** + * [Output Only] The name of the disk. + * + * Generated from protobuf field optional string name = 3373707; + * @return string + */ + public function getName() + { + return isset($this->name) ? $this->name : ''; + } + + public function hasName() + { + return isset($this->name); + } + + public function clearName() + { + unset($this->name); + } + + /** + * [Output Only] The name of the disk. + * + * Generated from protobuf field optional string name = 3373707; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * [Output Only] The number of IOPS provisioned for the disk. + * + * Generated from protobuf field optional int64 provisioned_iops = 186769108; + * @return int|string + */ + public function getProvisionedIops() + { + return isset($this->provisioned_iops) ? $this->provisioned_iops : 0; + } + + public function hasProvisionedIops() + { + return isset($this->provisioned_iops); + } + + public function clearProvisionedIops() + { + unset($this->provisioned_iops); + } + + /** + * [Output Only] The number of IOPS provisioned for the disk. + * + * Generated from protobuf field optional int64 provisioned_iops = 186769108; + * @param int|string $var + * @return $this + */ + public function setProvisionedIops($var) + { + GPBUtil::checkInt64($var); + $this->provisioned_iops = $var; + + return $this; + } + + /** + * [Output Only] The throughput provisioned for the disk. + * + * Generated from protobuf field optional int64 provisioned_throughput = 526524181; + * @return int|string + */ + public function getProvisionedThroughput() + { + return isset($this->provisioned_throughput) ? $this->provisioned_throughput : 0; + } + + public function hasProvisionedThroughput() + { + return isset($this->provisioned_throughput); + } + + public function clearProvisionedThroughput() + { + unset($this->provisioned_throughput); + } + + /** + * [Output Only] The throughput provisioned for the disk. + * + * Generated from protobuf field optional int64 provisioned_throughput = 526524181; + * @param int|string $var + * @return $this + */ + public function setProvisionedThroughput($var) + { + GPBUtil::checkInt64($var); + $this->provisioned_throughput = $var; + + return $this; + } + + /** + * [Output Only] Resource policies applied to disk for automatic snapshot creations. + * + * Generated from protobuf field repeated string resource_policies = 22220385; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResourcePolicies() + { + return $this->resource_policies; + } + + /** + * [Output Only] Resource policies applied to disk for automatic snapshot creations. + * + * Generated from protobuf field repeated string resource_policies = 22220385; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResourcePolicies($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->resource_policies = $arr; + + return $this; + } + + /** + * [Output Only] The disk size, in GB. + * + * Generated from protobuf field optional int64 size_gb = 494929369; + * @return int|string + */ + public function getSizeGb() + { + return isset($this->size_gb) ? $this->size_gb : 0; + } + + public function hasSizeGb() + { + return isset($this->size_gb); + } + + public function clearSizeGb() + { + unset($this->size_gb); + } + + /** + * [Output Only] The disk size, in GB. + * + * Generated from protobuf field optional int64 size_gb = 494929369; + * @param int|string $var + * @return $this + */ + public function setSizeGb($var) + { + GPBUtil::checkInt64($var); + $this->size_gb = $var; + + return $this; + } + + /** + * [Output Only] The disk status. + * Check the Status enum for the list of possible values. + * + * Generated from protobuf field optional string status = 181260274; + * @return string + */ + public function getStatus() + { + return isset($this->status) ? $this->status : ''; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * [Output Only] The disk status. + * Check the Status enum for the list of possible values. + * + * Generated from protobuf field optional string status = 181260274; + * @param string $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkString($var, True); + $this->status = $var; + + return $this; + } + + /** + * [Output Only] The disk type. + * + * Generated from protobuf field optional string type = 3575610; + * @return string + */ + public function getType() + { + return isset($this->type) ? $this->type : ''; + } + + public function hasType() + { + return isset($this->type); + } + + public function clearType() + { + unset($this->type); + } + + /** + * [Output Only] The disk type. + * + * Generated from protobuf field optional string type = 3575610; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * [Output Only] Amount of disk space used. + * + * Generated from protobuf field optional int64 used_bytes = 231640425; + * @return int|string + */ + public function getUsedBytes() + { + return isset($this->used_bytes) ? $this->used_bytes : 0; + } + + public function hasUsedBytes() + { + return isset($this->used_bytes); + } + + public function clearUsedBytes() + { + unset($this->used_bytes); + } + + /** + * [Output Only] Amount of disk space used. + * + * Generated from protobuf field optional int64 used_bytes = 231640425; + * @param int|string $var + * @return $this + */ + public function setUsedBytes($var) + { + GPBUtil::checkInt64($var); + $this->used_bytes = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/StoragePoolDisk/Status.php b/Compute/src/V1/StoragePoolDisk/Status.php new file mode 100644 index 000000000000..01444db41896 --- /dev/null +++ b/Compute/src/V1/StoragePoolDisk/Status.php @@ -0,0 +1,90 @@ +google.cloud.compute.v1.StoragePoolDisk.Status + */ +class Status +{ + /** + * A value indicating that the enum field is not set. + * + * Generated from protobuf enum UNDEFINED_STATUS = 0; + */ + const UNDEFINED_STATUS = 0; + /** + * Disk is provisioning + * + * Generated from protobuf enum CREATING = 455564985; + */ + const CREATING = 455564985; + /** + * Disk is deleting. + * + * Generated from protobuf enum DELETING = 528602024; + */ + const DELETING = 528602024; + /** + * Disk creation failed. + * + * Generated from protobuf enum FAILED = 455706685; + */ + const FAILED = 455706685; + /** + * Disk is ready for use. + * + * Generated from protobuf enum READY = 77848963; + */ + const READY = 77848963; + /** + * Source data is being copied into the disk. + * + * Generated from protobuf enum RESTORING = 404263851; + */ + const RESTORING = 404263851; + /** + * Disk is currently unavailable and cannot be accessed, attached or detached. + * + * Generated from protobuf enum UNAVAILABLE = 413756464; + */ + const UNAVAILABLE = 413756464; + + private static $valueToName = [ + self::UNDEFINED_STATUS => 'UNDEFINED_STATUS', + self::CREATING => 'CREATING', + self::DELETING => 'DELETING', + self::FAILED => 'FAILED', + self::READY => 'READY', + self::RESTORING => 'RESTORING', + self::UNAVAILABLE => 'UNAVAILABLE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/Compute/src/V1/StoragePoolList.php b/Compute/src/V1/StoragePoolList.php new file mode 100644 index 000000000000..4f67b5f50a3e --- /dev/null +++ b/Compute/src/V1/StoragePoolList.php @@ -0,0 +1,358 @@ +google.cloud.compute.v1.StoragePoolList + */ +class StoragePoolList extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field optional string etag = 3123477; + */ + private $etag = null; + /** + * [Output Only] Unique identifier for the resource; defined by the server. + * + * Generated from protobuf field optional string id = 3355; + */ + private $id = null; + /** + * A list of StoragePool resources. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.StoragePool items = 100526016; + */ + private $items; + /** + * [Output Only] Type of resource. Always compute#storagePoolList for lists of storagePools. + * + * Generated from protobuf field optional string kind = 3292052; + */ + private $kind = null; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * + * Generated from protobuf field optional string next_page_token = 79797525; + */ + private $next_page_token = null; + /** + * [Output Only] Server-defined URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + */ + private $self_link = null; + /** + * [Output Only] Unreachable resources. end_interface: MixerListResponseWithEtagBuilder + * + * Generated from protobuf field repeated string unreachables = 243372063; + */ + private $unreachables; + /** + * [Output Only] Informational warning message. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + */ + private $warning = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $etag + * @type string $id + * [Output Only] Unique identifier for the resource; defined by the server. + * @type array<\Google\Cloud\Compute\V1\StoragePool>|\Google\Protobuf\Internal\RepeatedField $items + * A list of StoragePool resources. + * @type string $kind + * [Output Only] Type of resource. Always compute#storagePoolList for lists of storagePools. + * @type string $next_page_token + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * @type string $self_link + * [Output Only] Server-defined URL for this resource. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachables + * [Output Only] Unreachable resources. end_interface: MixerListResponseWithEtagBuilder + * @type \Google\Cloud\Compute\V1\Warning $warning + * [Output Only] Informational warning message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field optional string etag = 3123477; + * @return string + */ + public function getEtag() + { + return isset($this->etag) ? $this->etag : ''; + } + + public function hasEtag() + { + return isset($this->etag); + } + + public function clearEtag() + { + unset($this->etag); + } + + /** + * Generated from protobuf field optional string etag = 3123477; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * [Output Only] Unique identifier for the resource; defined by the server. + * + * Generated from protobuf field optional string id = 3355; + * @return string + */ + public function getId() + { + return isset($this->id) ? $this->id : ''; + } + + public function hasId() + { + return isset($this->id); + } + + public function clearId() + { + unset($this->id); + } + + /** + * [Output Only] Unique identifier for the resource; defined by the server. + * + * Generated from protobuf field optional string id = 3355; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * A list of StoragePool resources. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.StoragePool items = 100526016; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * A list of StoragePool resources. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.StoragePool items = 100526016; + * @param array<\Google\Cloud\Compute\V1\StoragePool>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\StoragePool::class); + $this->items = $arr; + + return $this; + } + + /** + * [Output Only] Type of resource. Always compute#storagePoolList for lists of storagePools. + * + * Generated from protobuf field optional string kind = 3292052; + * @return string + */ + public function getKind() + { + return isset($this->kind) ? $this->kind : ''; + } + + public function hasKind() + { + return isset($this->kind); + } + + public function clearKind() + { + unset($this->kind); + } + + /** + * [Output Only] Type of resource. Always compute#storagePoolList for lists of storagePools. + * + * Generated from protobuf field optional string kind = 3292052; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * + * Generated from protobuf field optional string next_page_token = 79797525; + * @return string + */ + public function getNextPageToken() + { + return isset($this->next_page_token) ? $this->next_page_token : ''; + } + + public function hasNextPageToken() + { + return isset($this->next_page_token); + } + + public function clearNextPageToken() + { + unset($this->next_page_token); + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * + * Generated from protobuf field optional string next_page_token = 79797525; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * [Output Only] Server-defined URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + * @return string + */ + public function getSelfLink() + { + return isset($this->self_link) ? $this->self_link : ''; + } + + public function hasSelfLink() + { + return isset($this->self_link); + } + + public function clearSelfLink() + { + unset($this->self_link); + } + + /** + * [Output Only] Server-defined URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * [Output Only] Unreachable resources. end_interface: MixerListResponseWithEtagBuilder + * + * Generated from protobuf field repeated string unreachables = 243372063; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachables() + { + return $this->unreachables; + } + + /** + * [Output Only] Unreachable resources. end_interface: MixerListResponseWithEtagBuilder + * + * Generated from protobuf field repeated string unreachables = 243372063; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachables = $arr; + + return $this; + } + + /** + * [Output Only] Informational warning message. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + * @return \Google\Cloud\Compute\V1\Warning|null + */ + public function getWarning() + { + return $this->warning; + } + + public function hasWarning() + { + return isset($this->warning); + } + + public function clearWarning() + { + unset($this->warning); + } + + /** + * [Output Only] Informational warning message. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + * @param \Google\Cloud\Compute\V1\Warning $var + * @return $this + */ + public function setWarning($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\Warning::class); + $this->warning = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/StoragePoolListDisks.php b/Compute/src/V1/StoragePoolListDisks.php new file mode 100644 index 000000000000..7052767368a1 --- /dev/null +++ b/Compute/src/V1/StoragePoolListDisks.php @@ -0,0 +1,357 @@ +google.cloud.compute.v1.StoragePoolListDisks + */ +class StoragePoolListDisks extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field optional string etag = 3123477; + */ + private $etag = null; + /** + * [Output Only] Unique identifier for the resource; defined by the server. + * + * Generated from protobuf field optional string id = 3355; + */ + private $id = null; + /** + * A list of StoragePoolDisk resources. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.StoragePoolDisk items = 100526016; + */ + private $items; + /** + * [Output Only] Type of resource. Always compute#storagePoolListDisks for lists of disks in a storagePool. + * + * Generated from protobuf field optional string kind = 3292052; + */ + private $kind = null; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * + * Generated from protobuf field optional string next_page_token = 79797525; + */ + private $next_page_token = null; + /** + * [Output Only] Server-defined URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + */ + private $self_link = null; + /** + * [Output Only] Unreachable resources. end_interface: MixerListResponseWithEtagBuilder + * + * Generated from protobuf field repeated string unreachables = 243372063; + */ + private $unreachables; + /** + * [Output Only] Informational warning message. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + */ + private $warning = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $etag + * @type string $id + * [Output Only] Unique identifier for the resource; defined by the server. + * @type array<\Google\Cloud\Compute\V1\StoragePoolDisk>|\Google\Protobuf\Internal\RepeatedField $items + * A list of StoragePoolDisk resources. + * @type string $kind + * [Output Only] Type of resource. Always compute#storagePoolListDisks for lists of disks in a storagePool. + * @type string $next_page_token + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * @type string $self_link + * [Output Only] Server-defined URL for this resource. + * @type array|\Google\Protobuf\Internal\RepeatedField $unreachables + * [Output Only] Unreachable resources. end_interface: MixerListResponseWithEtagBuilder + * @type \Google\Cloud\Compute\V1\Warning $warning + * [Output Only] Informational warning message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field optional string etag = 3123477; + * @return string + */ + public function getEtag() + { + return isset($this->etag) ? $this->etag : ''; + } + + public function hasEtag() + { + return isset($this->etag); + } + + public function clearEtag() + { + unset($this->etag); + } + + /** + * Generated from protobuf field optional string etag = 3123477; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * [Output Only] Unique identifier for the resource; defined by the server. + * + * Generated from protobuf field optional string id = 3355; + * @return string + */ + public function getId() + { + return isset($this->id) ? $this->id : ''; + } + + public function hasId() + { + return isset($this->id); + } + + public function clearId() + { + unset($this->id); + } + + /** + * [Output Only] Unique identifier for the resource; defined by the server. + * + * Generated from protobuf field optional string id = 3355; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * A list of StoragePoolDisk resources. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.StoragePoolDisk items = 100526016; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * A list of StoragePoolDisk resources. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.StoragePoolDisk items = 100526016; + * @param array<\Google\Cloud\Compute\V1\StoragePoolDisk>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\StoragePoolDisk::class); + $this->items = $arr; + + return $this; + } + + /** + * [Output Only] Type of resource. Always compute#storagePoolListDisks for lists of disks in a storagePool. + * + * Generated from protobuf field optional string kind = 3292052; + * @return string + */ + public function getKind() + { + return isset($this->kind) ? $this->kind : ''; + } + + public function hasKind() + { + return isset($this->kind); + } + + public function clearKind() + { + unset($this->kind); + } + + /** + * [Output Only] Type of resource. Always compute#storagePoolListDisks for lists of disks in a storagePool. + * + * Generated from protobuf field optional string kind = 3292052; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * + * Generated from protobuf field optional string next_page_token = 79797525; + * @return string + */ + public function getNextPageToken() + { + return isset($this->next_page_token) ? $this->next_page_token : ''; + } + + public function hasNextPageToken() + { + return isset($this->next_page_token); + } + + public function clearNextPageToken() + { + unset($this->next_page_token); + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * + * Generated from protobuf field optional string next_page_token = 79797525; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * [Output Only] Server-defined URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + * @return string + */ + public function getSelfLink() + { + return isset($this->self_link) ? $this->self_link : ''; + } + + public function hasSelfLink() + { + return isset($this->self_link); + } + + public function clearSelfLink() + { + unset($this->self_link); + } + + /** + * [Output Only] Server-defined URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * [Output Only] Unreachable resources. end_interface: MixerListResponseWithEtagBuilder + * + * Generated from protobuf field repeated string unreachables = 243372063; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getUnreachables() + { + return $this->unreachables; + } + + /** + * [Output Only] Unreachable resources. end_interface: MixerListResponseWithEtagBuilder + * + * Generated from protobuf field repeated string unreachables = 243372063; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setUnreachables($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachables = $arr; + + return $this; + } + + /** + * [Output Only] Informational warning message. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + * @return \Google\Cloud\Compute\V1\Warning|null + */ + public function getWarning() + { + return $this->warning; + } + + public function hasWarning() + { + return isset($this->warning); + } + + public function clearWarning() + { + unset($this->warning); + } + + /** + * [Output Only] Informational warning message. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + * @param \Google\Cloud\Compute\V1\Warning $var + * @return $this + */ + public function setWarning($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\Warning::class); + $this->warning = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/StoragePoolResourceStatus.php b/Compute/src/V1/StoragePoolResourceStatus.php new file mode 100644 index 000000000000..8dfb231b130a --- /dev/null +++ b/Compute/src/V1/StoragePoolResourceStatus.php @@ -0,0 +1,473 @@ +google.cloud.compute.v1.StoragePoolResourceStatus + */ +class StoragePoolResourceStatus extends \Google\Protobuf\Internal\Message +{ + /** + * [Output Only] Number of disks used. + * + * Generated from protobuf field optional int64 disk_count = 182933485; + */ + private $disk_count = null; + /** + * [Output Only] Timestamp of the last successful resize in RFC3339 text format. + * + * Generated from protobuf field optional string last_resize_timestamp = 500825556; + */ + private $last_resize_timestamp = null; + /** + * [Output Only] Maximum allowed aggregate disk size in gigabytes. + * + * Generated from protobuf field optional int64 max_total_provisioned_disk_capacity_gb = 165818207; + */ + private $max_total_provisioned_disk_capacity_gb = null; + /** + * [Output Only] Space used by data stored in disks within the storage pool (in bytes). This will reflect the total number of bytes written to the disks in the pool, in contrast to the capacity of those disks. + * + * Generated from protobuf field optional int64 pool_used_capacity_bytes = 510407877; + */ + private $pool_used_capacity_bytes = null; + /** + * Sum of all the disks' provisioned IOPS, minus some amount that is allowed per disk that is not counted towards pool's IOPS capacity. + * + * Generated from protobuf field optional int64 pool_used_iops = 99558536; + */ + private $pool_used_iops = null; + /** + * [Output Only] Sum of all the disks' provisioned throughput in MB/s. + * + * Generated from protobuf field optional int64 pool_used_throughput = 206130633; + */ + private $pool_used_throughput = null; + /** + * [Output Only] Amount of data written into the pool, before it is compacted. + * + * Generated from protobuf field optional int64 pool_user_written_bytes = 228964050; + */ + private $pool_user_written_bytes = null; + /** + * [Output Only] Sum of all the capacity provisioned in disks in this storage pool. A disk's provisioned capacity is the same as its total capacity. + * + * Generated from protobuf field optional int64 total_provisioned_disk_capacity_gb = 520930980; + */ + private $total_provisioned_disk_capacity_gb = null; + /** + * [Output Only] Sum of all the disks' provisioned IOPS. + * + * Generated from protobuf field optional int64 total_provisioned_disk_iops = 32812549; + */ + private $total_provisioned_disk_iops = null; + /** + * [Output Only] Sum of all the disks' provisioned throughput in MB/s, minus some amount that is allowed per disk that is not counted towards pool's throughput capacity. + * + * Generated from protobuf field optional int64 total_provisioned_disk_throughput = 447677830; + */ + private $total_provisioned_disk_throughput = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $disk_count + * [Output Only] Number of disks used. + * @type string $last_resize_timestamp + * [Output Only] Timestamp of the last successful resize in RFC3339 text format. + * @type int|string $max_total_provisioned_disk_capacity_gb + * [Output Only] Maximum allowed aggregate disk size in gigabytes. + * @type int|string $pool_used_capacity_bytes + * [Output Only] Space used by data stored in disks within the storage pool (in bytes). This will reflect the total number of bytes written to the disks in the pool, in contrast to the capacity of those disks. + * @type int|string $pool_used_iops + * Sum of all the disks' provisioned IOPS, minus some amount that is allowed per disk that is not counted towards pool's IOPS capacity. + * @type int|string $pool_used_throughput + * [Output Only] Sum of all the disks' provisioned throughput in MB/s. + * @type int|string $pool_user_written_bytes + * [Output Only] Amount of data written into the pool, before it is compacted. + * @type int|string $total_provisioned_disk_capacity_gb + * [Output Only] Sum of all the capacity provisioned in disks in this storage pool. A disk's provisioned capacity is the same as its total capacity. + * @type int|string $total_provisioned_disk_iops + * [Output Only] Sum of all the disks' provisioned IOPS. + * @type int|string $total_provisioned_disk_throughput + * [Output Only] Sum of all the disks' provisioned throughput in MB/s, minus some amount that is allowed per disk that is not counted towards pool's throughput capacity. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * [Output Only] Number of disks used. + * + * Generated from protobuf field optional int64 disk_count = 182933485; + * @return int|string + */ + public function getDiskCount() + { + return isset($this->disk_count) ? $this->disk_count : 0; + } + + public function hasDiskCount() + { + return isset($this->disk_count); + } + + public function clearDiskCount() + { + unset($this->disk_count); + } + + /** + * [Output Only] Number of disks used. + * + * Generated from protobuf field optional int64 disk_count = 182933485; + * @param int|string $var + * @return $this + */ + public function setDiskCount($var) + { + GPBUtil::checkInt64($var); + $this->disk_count = $var; + + return $this; + } + + /** + * [Output Only] Timestamp of the last successful resize in RFC3339 text format. + * + * Generated from protobuf field optional string last_resize_timestamp = 500825556; + * @return string + */ + public function getLastResizeTimestamp() + { + return isset($this->last_resize_timestamp) ? $this->last_resize_timestamp : ''; + } + + public function hasLastResizeTimestamp() + { + return isset($this->last_resize_timestamp); + } + + public function clearLastResizeTimestamp() + { + unset($this->last_resize_timestamp); + } + + /** + * [Output Only] Timestamp of the last successful resize in RFC3339 text format. + * + * Generated from protobuf field optional string last_resize_timestamp = 500825556; + * @param string $var + * @return $this + */ + public function setLastResizeTimestamp($var) + { + GPBUtil::checkString($var, True); + $this->last_resize_timestamp = $var; + + return $this; + } + + /** + * [Output Only] Maximum allowed aggregate disk size in gigabytes. + * + * Generated from protobuf field optional int64 max_total_provisioned_disk_capacity_gb = 165818207; + * @return int|string + */ + public function getMaxTotalProvisionedDiskCapacityGb() + { + return isset($this->max_total_provisioned_disk_capacity_gb) ? $this->max_total_provisioned_disk_capacity_gb : 0; + } + + public function hasMaxTotalProvisionedDiskCapacityGb() + { + return isset($this->max_total_provisioned_disk_capacity_gb); + } + + public function clearMaxTotalProvisionedDiskCapacityGb() + { + unset($this->max_total_provisioned_disk_capacity_gb); + } + + /** + * [Output Only] Maximum allowed aggregate disk size in gigabytes. + * + * Generated from protobuf field optional int64 max_total_provisioned_disk_capacity_gb = 165818207; + * @param int|string $var + * @return $this + */ + public function setMaxTotalProvisionedDiskCapacityGb($var) + { + GPBUtil::checkInt64($var); + $this->max_total_provisioned_disk_capacity_gb = $var; + + return $this; + } + + /** + * [Output Only] Space used by data stored in disks within the storage pool (in bytes). This will reflect the total number of bytes written to the disks in the pool, in contrast to the capacity of those disks. + * + * Generated from protobuf field optional int64 pool_used_capacity_bytes = 510407877; + * @return int|string + */ + public function getPoolUsedCapacityBytes() + { + return isset($this->pool_used_capacity_bytes) ? $this->pool_used_capacity_bytes : 0; + } + + public function hasPoolUsedCapacityBytes() + { + return isset($this->pool_used_capacity_bytes); + } + + public function clearPoolUsedCapacityBytes() + { + unset($this->pool_used_capacity_bytes); + } + + /** + * [Output Only] Space used by data stored in disks within the storage pool (in bytes). This will reflect the total number of bytes written to the disks in the pool, in contrast to the capacity of those disks. + * + * Generated from protobuf field optional int64 pool_used_capacity_bytes = 510407877; + * @param int|string $var + * @return $this + */ + public function setPoolUsedCapacityBytes($var) + { + GPBUtil::checkInt64($var); + $this->pool_used_capacity_bytes = $var; + + return $this; + } + + /** + * Sum of all the disks' provisioned IOPS, minus some amount that is allowed per disk that is not counted towards pool's IOPS capacity. + * + * Generated from protobuf field optional int64 pool_used_iops = 99558536; + * @return int|string + */ + public function getPoolUsedIops() + { + return isset($this->pool_used_iops) ? $this->pool_used_iops : 0; + } + + public function hasPoolUsedIops() + { + return isset($this->pool_used_iops); + } + + public function clearPoolUsedIops() + { + unset($this->pool_used_iops); + } + + /** + * Sum of all the disks' provisioned IOPS, minus some amount that is allowed per disk that is not counted towards pool's IOPS capacity. + * + * Generated from protobuf field optional int64 pool_used_iops = 99558536; + * @param int|string $var + * @return $this + */ + public function setPoolUsedIops($var) + { + GPBUtil::checkInt64($var); + $this->pool_used_iops = $var; + + return $this; + } + + /** + * [Output Only] Sum of all the disks' provisioned throughput in MB/s. + * + * Generated from protobuf field optional int64 pool_used_throughput = 206130633; + * @return int|string + */ + public function getPoolUsedThroughput() + { + return isset($this->pool_used_throughput) ? $this->pool_used_throughput : 0; + } + + public function hasPoolUsedThroughput() + { + return isset($this->pool_used_throughput); + } + + public function clearPoolUsedThroughput() + { + unset($this->pool_used_throughput); + } + + /** + * [Output Only] Sum of all the disks' provisioned throughput in MB/s. + * + * Generated from protobuf field optional int64 pool_used_throughput = 206130633; + * @param int|string $var + * @return $this + */ + public function setPoolUsedThroughput($var) + { + GPBUtil::checkInt64($var); + $this->pool_used_throughput = $var; + + return $this; + } + + /** + * [Output Only] Amount of data written into the pool, before it is compacted. + * + * Generated from protobuf field optional int64 pool_user_written_bytes = 228964050; + * @return int|string + */ + public function getPoolUserWrittenBytes() + { + return isset($this->pool_user_written_bytes) ? $this->pool_user_written_bytes : 0; + } + + public function hasPoolUserWrittenBytes() + { + return isset($this->pool_user_written_bytes); + } + + public function clearPoolUserWrittenBytes() + { + unset($this->pool_user_written_bytes); + } + + /** + * [Output Only] Amount of data written into the pool, before it is compacted. + * + * Generated from protobuf field optional int64 pool_user_written_bytes = 228964050; + * @param int|string $var + * @return $this + */ + public function setPoolUserWrittenBytes($var) + { + GPBUtil::checkInt64($var); + $this->pool_user_written_bytes = $var; + + return $this; + } + + /** + * [Output Only] Sum of all the capacity provisioned in disks in this storage pool. A disk's provisioned capacity is the same as its total capacity. + * + * Generated from protobuf field optional int64 total_provisioned_disk_capacity_gb = 520930980; + * @return int|string + */ + public function getTotalProvisionedDiskCapacityGb() + { + return isset($this->total_provisioned_disk_capacity_gb) ? $this->total_provisioned_disk_capacity_gb : 0; + } + + public function hasTotalProvisionedDiskCapacityGb() + { + return isset($this->total_provisioned_disk_capacity_gb); + } + + public function clearTotalProvisionedDiskCapacityGb() + { + unset($this->total_provisioned_disk_capacity_gb); + } + + /** + * [Output Only] Sum of all the capacity provisioned in disks in this storage pool. A disk's provisioned capacity is the same as its total capacity. + * + * Generated from protobuf field optional int64 total_provisioned_disk_capacity_gb = 520930980; + * @param int|string $var + * @return $this + */ + public function setTotalProvisionedDiskCapacityGb($var) + { + GPBUtil::checkInt64($var); + $this->total_provisioned_disk_capacity_gb = $var; + + return $this; + } + + /** + * [Output Only] Sum of all the disks' provisioned IOPS. + * + * Generated from protobuf field optional int64 total_provisioned_disk_iops = 32812549; + * @return int|string + */ + public function getTotalProvisionedDiskIops() + { + return isset($this->total_provisioned_disk_iops) ? $this->total_provisioned_disk_iops : 0; + } + + public function hasTotalProvisionedDiskIops() + { + return isset($this->total_provisioned_disk_iops); + } + + public function clearTotalProvisionedDiskIops() + { + unset($this->total_provisioned_disk_iops); + } + + /** + * [Output Only] Sum of all the disks' provisioned IOPS. + * + * Generated from protobuf field optional int64 total_provisioned_disk_iops = 32812549; + * @param int|string $var + * @return $this + */ + public function setTotalProvisionedDiskIops($var) + { + GPBUtil::checkInt64($var); + $this->total_provisioned_disk_iops = $var; + + return $this; + } + + /** + * [Output Only] Sum of all the disks' provisioned throughput in MB/s, minus some amount that is allowed per disk that is not counted towards pool's throughput capacity. + * + * Generated from protobuf field optional int64 total_provisioned_disk_throughput = 447677830; + * @return int|string + */ + public function getTotalProvisionedDiskThroughput() + { + return isset($this->total_provisioned_disk_throughput) ? $this->total_provisioned_disk_throughput : 0; + } + + public function hasTotalProvisionedDiskThroughput() + { + return isset($this->total_provisioned_disk_throughput); + } + + public function clearTotalProvisionedDiskThroughput() + { + unset($this->total_provisioned_disk_throughput); + } + + /** + * [Output Only] Sum of all the disks' provisioned throughput in MB/s, minus some amount that is allowed per disk that is not counted towards pool's throughput capacity. + * + * Generated from protobuf field optional int64 total_provisioned_disk_throughput = 447677830; + * @param int|string $var + * @return $this + */ + public function setTotalProvisionedDiskThroughput($var) + { + GPBUtil::checkInt64($var); + $this->total_provisioned_disk_throughput = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/StoragePoolType.php b/Compute/src/V1/StoragePoolType.php new file mode 100644 index 000000000000..08d103c5f6e7 --- /dev/null +++ b/Compute/src/V1/StoragePoolType.php @@ -0,0 +1,770 @@ +google.cloud.compute.v1.StoragePoolType + */ +class StoragePoolType extends \Google\Protobuf\Internal\Message +{ + /** + * [Output Only] Creation timestamp in RFC3339 text format. + * + * Generated from protobuf field optional string creation_timestamp = 30525366; + */ + private $creation_timestamp = null; + /** + * [Output Only] The deprecation status associated with this storage pool type. + * + * Generated from protobuf field optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995; + */ + private $deprecated = null; + /** + * [Output Only] An optional description of this resource. + * + * Generated from protobuf field optional string description = 422937596; + */ + private $description = null; + /** + * [Output Only] The unique identifier for the resource. This identifier is defined by the server. + * + * Generated from protobuf field optional uint64 id = 3355; + */ + private $id = null; + /** + * [Output Only] Type of the resource. Always compute#storagePoolType for storage pool types. + * + * Generated from protobuf field optional string kind = 3292052; + */ + private $kind = null; + /** + * [Output Only] Maximum storage pool size in GB. + * + * Generated from protobuf field optional int64 max_pool_provisioned_capacity_gb = 182139085; + */ + private $max_pool_provisioned_capacity_gb = null; + /** + * [Output Only] Maximum provisioned IOPS. + * + * Generated from protobuf field optional int64 max_pool_provisioned_iops = 515270652; + */ + private $max_pool_provisioned_iops = null; + /** + * [Output Only] Maximum provisioned throughput. + * + * Generated from protobuf field optional int64 max_pool_provisioned_throughput = 228928061; + */ + private $max_pool_provisioned_throughput = null; + /** + * [Output Only] Minimum storage pool size in GB. + * + * Generated from protobuf field optional int64 min_pool_provisioned_capacity_gb = 191022751; + */ + private $min_pool_provisioned_capacity_gb = null; + /** + * [Output Only] Minimum provisioned IOPS. + * + * Generated from protobuf field optional int64 min_pool_provisioned_iops = 416473706; + */ + private $min_pool_provisioned_iops = null; + /** + * [Output Only] Minimum provisioned throughput. + * + * Generated from protobuf field optional int64 min_pool_provisioned_throughput = 367761963; + */ + private $min_pool_provisioned_throughput = null; + /** + * [Deprecated] This field is deprecated. Use minPoolProvisionedCapacityGb instead. + * + * Generated from protobuf field optional int64 min_size_gb = 385278188; + */ + private $min_size_gb = null; + /** + * [Output Only] Name of the resource. + * + * Generated from protobuf field optional string name = 3373707; + */ + private $name = null; + /** + * [Output Only] Server-defined URL for the resource. + * + * Generated from protobuf field optional string self_link = 456214797; + */ + private $self_link = null; + /** + * [Output Only] Server-defined URL for this resource with the resource id. + * + * Generated from protobuf field optional string self_link_with_id = 44520962; + */ + private $self_link_with_id = null; + /** + * [Output Only] The list of disk types supported in this storage pool type. + * + * Generated from protobuf field repeated string supported_disk_types = 150587272; + */ + private $supported_disk_types; + /** + * [Output Only] URL of the zone where the storage pool type resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. + * + * Generated from protobuf field optional string zone = 3744684; + */ + private $zone = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $creation_timestamp + * [Output Only] Creation timestamp in RFC3339 text format. + * @type \Google\Cloud\Compute\V1\DeprecationStatus $deprecated + * [Output Only] The deprecation status associated with this storage pool type. + * @type string $description + * [Output Only] An optional description of this resource. + * @type int|string $id + * [Output Only] The unique identifier for the resource. This identifier is defined by the server. + * @type string $kind + * [Output Only] Type of the resource. Always compute#storagePoolType for storage pool types. + * @type int|string $max_pool_provisioned_capacity_gb + * [Output Only] Maximum storage pool size in GB. + * @type int|string $max_pool_provisioned_iops + * [Output Only] Maximum provisioned IOPS. + * @type int|string $max_pool_provisioned_throughput + * [Output Only] Maximum provisioned throughput. + * @type int|string $min_pool_provisioned_capacity_gb + * [Output Only] Minimum storage pool size in GB. + * @type int|string $min_pool_provisioned_iops + * [Output Only] Minimum provisioned IOPS. + * @type int|string $min_pool_provisioned_throughput + * [Output Only] Minimum provisioned throughput. + * @type int|string $min_size_gb + * [Deprecated] This field is deprecated. Use minPoolProvisionedCapacityGb instead. + * @type string $name + * [Output Only] Name of the resource. + * @type string $self_link + * [Output Only] Server-defined URL for the resource. + * @type string $self_link_with_id + * [Output Only] Server-defined URL for this resource with the resource id. + * @type array|\Google\Protobuf\Internal\RepeatedField $supported_disk_types + * [Output Only] The list of disk types supported in this storage pool type. + * @type string $zone + * [Output Only] URL of the zone where the storage pool type resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * [Output Only] Creation timestamp in RFC3339 text format. + * + * Generated from protobuf field optional string creation_timestamp = 30525366; + * @return string + */ + public function getCreationTimestamp() + { + return isset($this->creation_timestamp) ? $this->creation_timestamp : ''; + } + + public function hasCreationTimestamp() + { + return isset($this->creation_timestamp); + } + + public function clearCreationTimestamp() + { + unset($this->creation_timestamp); + } + + /** + * [Output Only] Creation timestamp in RFC3339 text format. + * + * Generated from protobuf field optional string creation_timestamp = 30525366; + * @param string $var + * @return $this + */ + public function setCreationTimestamp($var) + { + GPBUtil::checkString($var, True); + $this->creation_timestamp = $var; + + return $this; + } + + /** + * [Output Only] The deprecation status associated with this storage pool type. + * + * Generated from protobuf field optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995; + * @return \Google\Cloud\Compute\V1\DeprecationStatus|null + */ + public function getDeprecated() + { + return $this->deprecated; + } + + public function hasDeprecated() + { + return isset($this->deprecated); + } + + public function clearDeprecated() + { + unset($this->deprecated); + } + + /** + * [Output Only] The deprecation status associated with this storage pool type. + * + * Generated from protobuf field optional .google.cloud.compute.v1.DeprecationStatus deprecated = 515138995; + * @param \Google\Cloud\Compute\V1\DeprecationStatus $var + * @return $this + */ + public function setDeprecated($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\DeprecationStatus::class); + $this->deprecated = $var; + + return $this; + } + + /** + * [Output Only] An optional description of this resource. + * + * Generated from protobuf field optional string description = 422937596; + * @return string + */ + public function getDescription() + { + return isset($this->description) ? $this->description : ''; + } + + public function hasDescription() + { + return isset($this->description); + } + + public function clearDescription() + { + unset($this->description); + } + + /** + * [Output Only] An optional description of this resource. + * + * Generated from protobuf field optional string description = 422937596; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * [Output Only] The unique identifier for the resource. This identifier is defined by the server. + * + * Generated from protobuf field optional uint64 id = 3355; + * @return int|string + */ + public function getId() + { + return isset($this->id) ? $this->id : 0; + } + + public function hasId() + { + return isset($this->id); + } + + public function clearId() + { + unset($this->id); + } + + /** + * [Output Only] The unique identifier for the resource. This identifier is defined by the server. + * + * Generated from protobuf field optional uint64 id = 3355; + * @param int|string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkUint64($var); + $this->id = $var; + + return $this; + } + + /** + * [Output Only] Type of the resource. Always compute#storagePoolType for storage pool types. + * + * Generated from protobuf field optional string kind = 3292052; + * @return string + */ + public function getKind() + { + return isset($this->kind) ? $this->kind : ''; + } + + public function hasKind() + { + return isset($this->kind); + } + + public function clearKind() + { + unset($this->kind); + } + + /** + * [Output Only] Type of the resource. Always compute#storagePoolType for storage pool types. + * + * Generated from protobuf field optional string kind = 3292052; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * [Output Only] Maximum storage pool size in GB. + * + * Generated from protobuf field optional int64 max_pool_provisioned_capacity_gb = 182139085; + * @return int|string + */ + public function getMaxPoolProvisionedCapacityGb() + { + return isset($this->max_pool_provisioned_capacity_gb) ? $this->max_pool_provisioned_capacity_gb : 0; + } + + public function hasMaxPoolProvisionedCapacityGb() + { + return isset($this->max_pool_provisioned_capacity_gb); + } + + public function clearMaxPoolProvisionedCapacityGb() + { + unset($this->max_pool_provisioned_capacity_gb); + } + + /** + * [Output Only] Maximum storage pool size in GB. + * + * Generated from protobuf field optional int64 max_pool_provisioned_capacity_gb = 182139085; + * @param int|string $var + * @return $this + */ + public function setMaxPoolProvisionedCapacityGb($var) + { + GPBUtil::checkInt64($var); + $this->max_pool_provisioned_capacity_gb = $var; + + return $this; + } + + /** + * [Output Only] Maximum provisioned IOPS. + * + * Generated from protobuf field optional int64 max_pool_provisioned_iops = 515270652; + * @return int|string + */ + public function getMaxPoolProvisionedIops() + { + return isset($this->max_pool_provisioned_iops) ? $this->max_pool_provisioned_iops : 0; + } + + public function hasMaxPoolProvisionedIops() + { + return isset($this->max_pool_provisioned_iops); + } + + public function clearMaxPoolProvisionedIops() + { + unset($this->max_pool_provisioned_iops); + } + + /** + * [Output Only] Maximum provisioned IOPS. + * + * Generated from protobuf field optional int64 max_pool_provisioned_iops = 515270652; + * @param int|string $var + * @return $this + */ + public function setMaxPoolProvisionedIops($var) + { + GPBUtil::checkInt64($var); + $this->max_pool_provisioned_iops = $var; + + return $this; + } + + /** + * [Output Only] Maximum provisioned throughput. + * + * Generated from protobuf field optional int64 max_pool_provisioned_throughput = 228928061; + * @return int|string + */ + public function getMaxPoolProvisionedThroughput() + { + return isset($this->max_pool_provisioned_throughput) ? $this->max_pool_provisioned_throughput : 0; + } + + public function hasMaxPoolProvisionedThroughput() + { + return isset($this->max_pool_provisioned_throughput); + } + + public function clearMaxPoolProvisionedThroughput() + { + unset($this->max_pool_provisioned_throughput); + } + + /** + * [Output Only] Maximum provisioned throughput. + * + * Generated from protobuf field optional int64 max_pool_provisioned_throughput = 228928061; + * @param int|string $var + * @return $this + */ + public function setMaxPoolProvisionedThroughput($var) + { + GPBUtil::checkInt64($var); + $this->max_pool_provisioned_throughput = $var; + + return $this; + } + + /** + * [Output Only] Minimum storage pool size in GB. + * + * Generated from protobuf field optional int64 min_pool_provisioned_capacity_gb = 191022751; + * @return int|string + */ + public function getMinPoolProvisionedCapacityGb() + { + return isset($this->min_pool_provisioned_capacity_gb) ? $this->min_pool_provisioned_capacity_gb : 0; + } + + public function hasMinPoolProvisionedCapacityGb() + { + return isset($this->min_pool_provisioned_capacity_gb); + } + + public function clearMinPoolProvisionedCapacityGb() + { + unset($this->min_pool_provisioned_capacity_gb); + } + + /** + * [Output Only] Minimum storage pool size in GB. + * + * Generated from protobuf field optional int64 min_pool_provisioned_capacity_gb = 191022751; + * @param int|string $var + * @return $this + */ + public function setMinPoolProvisionedCapacityGb($var) + { + GPBUtil::checkInt64($var); + $this->min_pool_provisioned_capacity_gb = $var; + + return $this; + } + + /** + * [Output Only] Minimum provisioned IOPS. + * + * Generated from protobuf field optional int64 min_pool_provisioned_iops = 416473706; + * @return int|string + */ + public function getMinPoolProvisionedIops() + { + return isset($this->min_pool_provisioned_iops) ? $this->min_pool_provisioned_iops : 0; + } + + public function hasMinPoolProvisionedIops() + { + return isset($this->min_pool_provisioned_iops); + } + + public function clearMinPoolProvisionedIops() + { + unset($this->min_pool_provisioned_iops); + } + + /** + * [Output Only] Minimum provisioned IOPS. + * + * Generated from protobuf field optional int64 min_pool_provisioned_iops = 416473706; + * @param int|string $var + * @return $this + */ + public function setMinPoolProvisionedIops($var) + { + GPBUtil::checkInt64($var); + $this->min_pool_provisioned_iops = $var; + + return $this; + } + + /** + * [Output Only] Minimum provisioned throughput. + * + * Generated from protobuf field optional int64 min_pool_provisioned_throughput = 367761963; + * @return int|string + */ + public function getMinPoolProvisionedThroughput() + { + return isset($this->min_pool_provisioned_throughput) ? $this->min_pool_provisioned_throughput : 0; + } + + public function hasMinPoolProvisionedThroughput() + { + return isset($this->min_pool_provisioned_throughput); + } + + public function clearMinPoolProvisionedThroughput() + { + unset($this->min_pool_provisioned_throughput); + } + + /** + * [Output Only] Minimum provisioned throughput. + * + * Generated from protobuf field optional int64 min_pool_provisioned_throughput = 367761963; + * @param int|string $var + * @return $this + */ + public function setMinPoolProvisionedThroughput($var) + { + GPBUtil::checkInt64($var); + $this->min_pool_provisioned_throughput = $var; + + return $this; + } + + /** + * [Deprecated] This field is deprecated. Use minPoolProvisionedCapacityGb instead. + * + * Generated from protobuf field optional int64 min_size_gb = 385278188; + * @return int|string + */ + public function getMinSizeGb() + { + return isset($this->min_size_gb) ? $this->min_size_gb : 0; + } + + public function hasMinSizeGb() + { + return isset($this->min_size_gb); + } + + public function clearMinSizeGb() + { + unset($this->min_size_gb); + } + + /** + * [Deprecated] This field is deprecated. Use minPoolProvisionedCapacityGb instead. + * + * Generated from protobuf field optional int64 min_size_gb = 385278188; + * @param int|string $var + * @return $this + */ + public function setMinSizeGb($var) + { + GPBUtil::checkInt64($var); + $this->min_size_gb = $var; + + return $this; + } + + /** + * [Output Only] Name of the resource. + * + * Generated from protobuf field optional string name = 3373707; + * @return string + */ + public function getName() + { + return isset($this->name) ? $this->name : ''; + } + + public function hasName() + { + return isset($this->name); + } + + public function clearName() + { + unset($this->name); + } + + /** + * [Output Only] Name of the resource. + * + * Generated from protobuf field optional string name = 3373707; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * [Output Only] Server-defined URL for the resource. + * + * Generated from protobuf field optional string self_link = 456214797; + * @return string + */ + public function getSelfLink() + { + return isset($this->self_link) ? $this->self_link : ''; + } + + public function hasSelfLink() + { + return isset($this->self_link); + } + + public function clearSelfLink() + { + unset($this->self_link); + } + + /** + * [Output Only] Server-defined URL for the resource. + * + * Generated from protobuf field optional string self_link = 456214797; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * [Output Only] Server-defined URL for this resource with the resource id. + * + * Generated from protobuf field optional string self_link_with_id = 44520962; + * @return string + */ + public function getSelfLinkWithId() + { + return isset($this->self_link_with_id) ? $this->self_link_with_id : ''; + } + + public function hasSelfLinkWithId() + { + return isset($this->self_link_with_id); + } + + public function clearSelfLinkWithId() + { + unset($this->self_link_with_id); + } + + /** + * [Output Only] Server-defined URL for this resource with the resource id. + * + * Generated from protobuf field optional string self_link_with_id = 44520962; + * @param string $var + * @return $this + */ + public function setSelfLinkWithId($var) + { + GPBUtil::checkString($var, True); + $this->self_link_with_id = $var; + + return $this; + } + + /** + * [Output Only] The list of disk types supported in this storage pool type. + * + * Generated from protobuf field repeated string supported_disk_types = 150587272; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSupportedDiskTypes() + { + return $this->supported_disk_types; + } + + /** + * [Output Only] The list of disk types supported in this storage pool type. + * + * Generated from protobuf field repeated string supported_disk_types = 150587272; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSupportedDiskTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->supported_disk_types = $arr; + + return $this; + } + + /** + * [Output Only] URL of the zone where the storage pool type resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. + * + * Generated from protobuf field optional string zone = 3744684; + * @return string + */ + public function getZone() + { + return isset($this->zone) ? $this->zone : ''; + } + + public function hasZone() + { + return isset($this->zone); + } + + public function clearZone() + { + unset($this->zone); + } + + /** + * [Output Only] URL of the zone where the storage pool type resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. + * + * Generated from protobuf field optional string zone = 3744684; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/StoragePoolTypeAggregatedList.php b/Compute/src/V1/StoragePoolTypeAggregatedList.php new file mode 100644 index 000000000000..0a67fc9f8b17 --- /dev/null +++ b/Compute/src/V1/StoragePoolTypeAggregatedList.php @@ -0,0 +1,286 @@ +google.cloud.compute.v1.StoragePoolTypeAggregatedList + */ +class StoragePoolTypeAggregatedList extends \Google\Protobuf\Internal\Message +{ + /** + * [Output Only] Unique identifier for the resource; defined by the server. + * + * Generated from protobuf field optional string id = 3355; + */ + private $id = null; + /** + * A list of StoragePoolTypesScopedList resources. + * + * Generated from protobuf field map items = 100526016; + */ + private $items; + /** + * [Output Only] Type of resource. Always compute#storagePoolTypeAggregatedList . + * + * Generated from protobuf field optional string kind = 3292052; + */ + private $kind = null; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * + * Generated from protobuf field optional string next_page_token = 79797525; + */ + private $next_page_token = null; + /** + * [Output Only] Server-defined URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + */ + private $self_link = null; + /** + * [Output Only] Informational warning message. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + */ + private $warning = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * [Output Only] Unique identifier for the resource; defined by the server. + * @type array|\Google\Protobuf\Internal\MapField $items + * A list of StoragePoolTypesScopedList resources. + * @type string $kind + * [Output Only] Type of resource. Always compute#storagePoolTypeAggregatedList . + * @type string $next_page_token + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * @type string $self_link + * [Output Only] Server-defined URL for this resource. + * @type \Google\Cloud\Compute\V1\Warning $warning + * [Output Only] Informational warning message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * [Output Only] Unique identifier for the resource; defined by the server. + * + * Generated from protobuf field optional string id = 3355; + * @return string + */ + public function getId() + { + return isset($this->id) ? $this->id : ''; + } + + public function hasId() + { + return isset($this->id); + } + + public function clearId() + { + unset($this->id); + } + + /** + * [Output Only] Unique identifier for the resource; defined by the server. + * + * Generated from protobuf field optional string id = 3355; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * A list of StoragePoolTypesScopedList resources. + * + * Generated from protobuf field map items = 100526016; + * @return \Google\Protobuf\Internal\MapField + */ + public function getItems() + { + return $this->items; + } + + /** + * A list of StoragePoolTypesScopedList resources. + * + * Generated from protobuf field map items = 100526016; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\StoragePoolTypesScopedList::class); + $this->items = $arr; + + return $this; + } + + /** + * [Output Only] Type of resource. Always compute#storagePoolTypeAggregatedList . + * + * Generated from protobuf field optional string kind = 3292052; + * @return string + */ + public function getKind() + { + return isset($this->kind) ? $this->kind : ''; + } + + public function hasKind() + { + return isset($this->kind); + } + + public function clearKind() + { + unset($this->kind); + } + + /** + * [Output Only] Type of resource. Always compute#storagePoolTypeAggregatedList . + * + * Generated from protobuf field optional string kind = 3292052; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * + * Generated from protobuf field optional string next_page_token = 79797525; + * @return string + */ + public function getNextPageToken() + { + return isset($this->next_page_token) ? $this->next_page_token : ''; + } + + public function hasNextPageToken() + { + return isset($this->next_page_token); + } + + public function clearNextPageToken() + { + unset($this->next_page_token); + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * + * Generated from protobuf field optional string next_page_token = 79797525; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * [Output Only] Server-defined URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + * @return string + */ + public function getSelfLink() + { + return isset($this->self_link) ? $this->self_link : ''; + } + + public function hasSelfLink() + { + return isset($this->self_link); + } + + public function clearSelfLink() + { + unset($this->self_link); + } + + /** + * [Output Only] Server-defined URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * [Output Only] Informational warning message. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + * @return \Google\Cloud\Compute\V1\Warning|null + */ + public function getWarning() + { + return $this->warning; + } + + public function hasWarning() + { + return isset($this->warning); + } + + public function clearWarning() + { + unset($this->warning); + } + + /** + * [Output Only] Informational warning message. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + * @param \Google\Cloud\Compute\V1\Warning $var + * @return $this + */ + public function setWarning($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\Warning::class); + $this->warning = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/StoragePoolTypeList.php b/Compute/src/V1/StoragePoolTypeList.php new file mode 100644 index 000000000000..853ab50156d8 --- /dev/null +++ b/Compute/src/V1/StoragePoolTypeList.php @@ -0,0 +1,287 @@ +google.cloud.compute.v1.StoragePoolTypeList + */ +class StoragePoolTypeList extends \Google\Protobuf\Internal\Message +{ + /** + * [Output Only] Unique identifier for the resource; defined by the server. + * + * Generated from protobuf field optional string id = 3355; + */ + private $id = null; + /** + * A list of StoragePoolType resources. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.StoragePoolType items = 100526016; + */ + private $items; + /** + * [Output Only] Type of resource. Always compute#storagePoolTypeList for storage pool types. + * + * Generated from protobuf field optional string kind = 3292052; + */ + private $kind = null; + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * + * Generated from protobuf field optional string next_page_token = 79797525; + */ + private $next_page_token = null; + /** + * [Output Only] Server-defined URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + */ + private $self_link = null; + /** + * [Output Only] Informational warning message. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + */ + private $warning = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * [Output Only] Unique identifier for the resource; defined by the server. + * @type array<\Google\Cloud\Compute\V1\StoragePoolType>|\Google\Protobuf\Internal\RepeatedField $items + * A list of StoragePoolType resources. + * @type string $kind + * [Output Only] Type of resource. Always compute#storagePoolTypeList for storage pool types. + * @type string $next_page_token + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * @type string $self_link + * [Output Only] Server-defined URL for this resource. + * @type \Google\Cloud\Compute\V1\Warning $warning + * [Output Only] Informational warning message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * [Output Only] Unique identifier for the resource; defined by the server. + * + * Generated from protobuf field optional string id = 3355; + * @return string + */ + public function getId() + { + return isset($this->id) ? $this->id : ''; + } + + public function hasId() + { + return isset($this->id); + } + + public function clearId() + { + unset($this->id); + } + + /** + * [Output Only] Unique identifier for the resource; defined by the server. + * + * Generated from protobuf field optional string id = 3355; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * A list of StoragePoolType resources. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.StoragePoolType items = 100526016; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * A list of StoragePoolType resources. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.StoragePoolType items = 100526016; + * @param array<\Google\Cloud\Compute\V1\StoragePoolType>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\StoragePoolType::class); + $this->items = $arr; + + return $this; + } + + /** + * [Output Only] Type of resource. Always compute#storagePoolTypeList for storage pool types. + * + * Generated from protobuf field optional string kind = 3292052; + * @return string + */ + public function getKind() + { + return isset($this->kind) ? $this->kind : ''; + } + + public function hasKind() + { + return isset($this->kind); + } + + public function clearKind() + { + unset($this->kind); + } + + /** + * [Output Only] Type of resource. Always compute#storagePoolTypeList for storage pool types. + * + * Generated from protobuf field optional string kind = 3292052; + * @param string $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkString($var, True); + $this->kind = $var; + + return $this; + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * + * Generated from protobuf field optional string next_page_token = 79797525; + * @return string + */ + public function getNextPageToken() + { + return isset($this->next_page_token) ? $this->next_page_token : ''; + } + + public function hasNextPageToken() + { + return isset($this->next_page_token); + } + + public function clearNextPageToken() + { + unset($this->next_page_token); + } + + /** + * [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. + * + * Generated from protobuf field optional string next_page_token = 79797525; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * [Output Only] Server-defined URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + * @return string + */ + public function getSelfLink() + { + return isset($this->self_link) ? $this->self_link : ''; + } + + public function hasSelfLink() + { + return isset($this->self_link); + } + + public function clearSelfLink() + { + unset($this->self_link); + } + + /** + * [Output Only] Server-defined URL for this resource. + * + * Generated from protobuf field optional string self_link = 456214797; + * @param string $var + * @return $this + */ + public function setSelfLink($var) + { + GPBUtil::checkString($var, True); + $this->self_link = $var; + + return $this; + } + + /** + * [Output Only] Informational warning message. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + * @return \Google\Cloud\Compute\V1\Warning|null + */ + public function getWarning() + { + return $this->warning; + } + + public function hasWarning() + { + return isset($this->warning); + } + + public function clearWarning() + { + unset($this->warning); + } + + /** + * [Output Only] Informational warning message. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + * @param \Google\Cloud\Compute\V1\Warning $var + * @return $this + */ + public function setWarning($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\Warning::class); + $this->warning = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/StoragePoolTypesClient.php b/Compute/src/V1/StoragePoolTypesClient.php new file mode 100644 index 000000000000..623ce8d81c8b --- /dev/null +++ b/Compute/src/V1/StoragePoolTypesClient.php @@ -0,0 +1,34 @@ +google.cloud.compute.v1.StoragePoolTypesScopedList + */ +class StoragePoolTypesScopedList extends \Google\Protobuf\Internal\Message +{ + /** + * [Output Only] A list of storage pool types contained in this scope. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.StoragePoolType storage_pool_types = 276043482; + */ + private $storage_pool_types; + /** + * [Output Only] Informational warning which replaces the list of storage pool types when the list is empty. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + */ + private $warning = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Compute\V1\StoragePoolType>|\Google\Protobuf\Internal\RepeatedField $storage_pool_types + * [Output Only] A list of storage pool types contained in this scope. + * @type \Google\Cloud\Compute\V1\Warning $warning + * [Output Only] Informational warning which replaces the list of storage pool types when the list is empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * [Output Only] A list of storage pool types contained in this scope. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.StoragePoolType storage_pool_types = 276043482; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStoragePoolTypes() + { + return $this->storage_pool_types; + } + + /** + * [Output Only] A list of storage pool types contained in this scope. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.StoragePoolType storage_pool_types = 276043482; + * @param array<\Google\Cloud\Compute\V1\StoragePoolType>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStoragePoolTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\StoragePoolType::class); + $this->storage_pool_types = $arr; + + return $this; + } + + /** + * [Output Only] Informational warning which replaces the list of storage pool types when the list is empty. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + * @return \Google\Cloud\Compute\V1\Warning|null + */ + public function getWarning() + { + return $this->warning; + } + + public function hasWarning() + { + return isset($this->warning); + } + + public function clearWarning() + { + unset($this->warning); + } + + /** + * [Output Only] Informational warning which replaces the list of storage pool types when the list is empty. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + * @param \Google\Cloud\Compute\V1\Warning $var + * @return $this + */ + public function setWarning($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\Warning::class); + $this->warning = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/StoragePoolsClient.php b/Compute/src/V1/StoragePoolsClient.php new file mode 100644 index 000000000000..5a86aed8e750 --- /dev/null +++ b/Compute/src/V1/StoragePoolsClient.php @@ -0,0 +1,34 @@ +google.cloud.compute.v1.StoragePoolsScopedList + */ +class StoragePoolsScopedList extends \Google\Protobuf\Internal\Message +{ + /** + * [Output Only] A list of storage pool contained in this scope. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.StoragePool storage_pools = 437258515; + */ + private $storage_pools; + /** + * [Output Only] Informational warning which replaces the list of storage pool when the list is empty. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + */ + private $warning = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\Compute\V1\StoragePool>|\Google\Protobuf\Internal\RepeatedField $storage_pools + * [Output Only] A list of storage pool contained in this scope. + * @type \Google\Cloud\Compute\V1\Warning $warning + * [Output Only] Informational warning which replaces the list of storage pool when the list is empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * [Output Only] A list of storage pool contained in this scope. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.StoragePool storage_pools = 437258515; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getStoragePools() + { + return $this->storage_pools; + } + + /** + * [Output Only] A list of storage pool contained in this scope. + * + * Generated from protobuf field repeated .google.cloud.compute.v1.StoragePool storage_pools = 437258515; + * @param array<\Google\Cloud\Compute\V1\StoragePool>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setStoragePools($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\StoragePool::class); + $this->storage_pools = $arr; + + return $this; + } + + /** + * [Output Only] Informational warning which replaces the list of storage pool when the list is empty. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + * @return \Google\Cloud\Compute\V1\Warning|null + */ + public function getWarning() + { + return $this->warning; + } + + public function hasWarning() + { + return isset($this->warning); + } + + public function clearWarning() + { + unset($this->warning); + } + + /** + * [Output Only] Informational warning which replaces the list of storage pool when the list is empty. + * + * Generated from protobuf field optional .google.cloud.compute.v1.Warning warning = 50704284; + * @param \Google\Cloud\Compute\V1\Warning $var + * @return $this + */ + public function setWarning($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\Warning::class); + $this->warning = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/TestIamPermissionsStoragePoolRequest.php b/Compute/src/V1/TestIamPermissionsStoragePoolRequest.php new file mode 100644 index 000000000000..79f84de1e0c7 --- /dev/null +++ b/Compute/src/V1/TestIamPermissionsStoragePoolRequest.php @@ -0,0 +1,198 @@ +google.cloud.compute.v1.TestIamPermissionsStoragePoolRequest + */ +class TestIamPermissionsStoragePoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + */ + private $project = ''; + /** + * Name or id of the resource for this request. + * + * Generated from protobuf field string resource = 195806222 [(.google.api.field_behavior) = REQUIRED]; + */ + private $resource = ''; + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.TestPermissionsRequest test_permissions_request_resource = 439214758 [(.google.api.field_behavior) = REQUIRED]; + */ + private $test_permissions_request_resource = null; + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + */ + private $zone = ''; + + /** + * @param string $project Project ID for this request. + * @param string $zone The name of the zone for this request. + * @param string $resource Name or id of the resource for this request. + * @param \Google\Cloud\Compute\V1\TestPermissionsRequest $testPermissionsRequestResource The body resource for this request + * + * @return \Google\Cloud\Compute\V1\TestIamPermissionsStoragePoolRequest + * + * @experimental + */ + public static function build(string $project, string $zone, string $resource, \Google\Cloud\Compute\V1\TestPermissionsRequest $testPermissionsRequestResource): self + { + return (new self()) + ->setProject($project) + ->setZone($zone) + ->setResource($resource) + ->setTestPermissionsRequestResource($testPermissionsRequestResource); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project + * Project ID for this request. + * @type string $resource + * Name or id of the resource for this request. + * @type \Google\Cloud\Compute\V1\TestPermissionsRequest $test_permissions_request_resource + * The body resource for this request + * @type string $zone + * The name of the zone for this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Name or id of the resource for this request. + * + * Generated from protobuf field string resource = 195806222 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getResource() + { + return $this->resource; + } + + /** + * Name or id of the resource for this request. + * + * Generated from protobuf field string resource = 195806222 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkString($var, True); + $this->resource = $var; + + return $this; + } + + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.TestPermissionsRequest test_permissions_request_resource = 439214758 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Compute\V1\TestPermissionsRequest|null + */ + public function getTestPermissionsRequestResource() + { + return $this->test_permissions_request_resource; + } + + public function hasTestPermissionsRequestResource() + { + return isset($this->test_permissions_request_resource); + } + + public function clearTestPermissionsRequestResource() + { + unset($this->test_permissions_request_resource); + } + + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.TestPermissionsRequest test_permissions_request_resource = 439214758 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Compute\V1\TestPermissionsRequest $var + * @return $this + */ + public function setTestPermissionsRequestResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\TestPermissionsRequest::class); + $this->test_permissions_request_resource = $var; + + return $this; + } + + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/UpdateStoragePoolRequest.php b/Compute/src/V1/UpdateStoragePoolRequest.php new file mode 100644 index 000000000000..4344b8699d73 --- /dev/null +++ b/Compute/src/V1/UpdateStoragePoolRequest.php @@ -0,0 +1,286 @@ +google.cloud.compute.v1.UpdateStoragePoolRequest + */ +class UpdateStoragePoolRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + */ + private $project = ''; + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field optional string request_id = 37109963; + */ + private $request_id = null; + /** + * The storagePool name for this request. + * + * Generated from protobuf field string storage_pool = 360473440 [(.google.api.field_behavior) = REQUIRED]; + */ + private $storage_pool = ''; + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.StoragePool storage_pool_resource = 157179405 [(.google.api.field_behavior) = REQUIRED]; + */ + private $storage_pool_resource = null; + /** + * update_mask indicates fields to be updated as part of this request. + * + * Generated from protobuf field optional string update_mask = 500079778; + */ + private $update_mask = null; + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + */ + private $zone = ''; + + /** + * @param string $project Project ID for this request. + * @param string $zone The name of the zone for this request. + * @param string $storagePool The storagePool name for this request. + * @param \Google\Cloud\Compute\V1\StoragePool $storagePoolResource The body resource for this request + * + * @return \Google\Cloud\Compute\V1\UpdateStoragePoolRequest + * + * @experimental + */ + public static function build(string $project, string $zone, string $storagePool, \Google\Cloud\Compute\V1\StoragePool $storagePoolResource): self + { + return (new self()) + ->setProject($project) + ->setZone($zone) + ->setStoragePool($storagePool) + ->setStoragePoolResource($storagePoolResource); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project + * Project ID for this request. + * @type string $request_id + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * @type string $storage_pool + * The storagePool name for this request. + * @type \Google\Cloud\Compute\V1\StoragePool $storage_pool_resource + * The body resource for this request + * @type string $update_mask + * update_mask indicates fields to be updated as part of this request. + * @type string $zone + * The name of the zone for this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce(); + parent::__construct($data); + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Project ID for this request. + * + * Generated from protobuf field string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field optional string request_id = 37109963; + * @return string + */ + public function getRequestId() + { + return isset($this->request_id) ? $this->request_id : ''; + } + + public function hasRequestId() + { + return isset($this->request_id); + } + + public function clearRequestId() + { + unset($this->request_id); + } + + /** + * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field optional string request_id = 37109963; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * The storagePool name for this request. + * + * Generated from protobuf field string storage_pool = 360473440 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getStoragePool() + { + return $this->storage_pool; + } + + /** + * The storagePool name for this request. + * + * Generated from protobuf field string storage_pool = 360473440 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setStoragePool($var) + { + GPBUtil::checkString($var, True); + $this->storage_pool = $var; + + return $this; + } + + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.StoragePool storage_pool_resource = 157179405 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Compute\V1\StoragePool|null + */ + public function getStoragePoolResource() + { + return $this->storage_pool_resource; + } + + public function hasStoragePoolResource() + { + return isset($this->storage_pool_resource); + } + + public function clearStoragePoolResource() + { + unset($this->storage_pool_resource); + } + + /** + * The body resource for this request + * + * Generated from protobuf field .google.cloud.compute.v1.StoragePool storage_pool_resource = 157179405 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Compute\V1\StoragePool $var + * @return $this + */ + public function setStoragePoolResource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Compute\V1\StoragePool::class); + $this->storage_pool_resource = $var; + + return $this; + } + + /** + * update_mask indicates fields to be updated as part of this request. + * + * Generated from protobuf field optional string update_mask = 500079778; + * @return string + */ + public function getUpdateMask() + { + return isset($this->update_mask) ? $this->update_mask : ''; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * update_mask indicates fields to be updated as part of this request. + * + * Generated from protobuf field optional string update_mask = 500079778; + * @param string $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkString($var, True); + $this->update_mask = $var; + + return $this; + } + + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * The name of the zone for this request. + * + * Generated from protobuf field string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/Compute/src/V1/UrlMap.php b/Compute/src/V1/UrlMap.php index 9abf48dc72b7..8d9315562a90 100644 --- a/Compute/src/V1/UrlMap.php +++ b/Compute/src/V1/UrlMap.php @@ -28,7 +28,7 @@ class UrlMap extends \Google\Protobuf\Internal\Message */ private $default_route_action = null; /** - * The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of defaultService, defaultUrlRedirect , or defaultRouteAction.weightedBackendService must be set. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true. + * The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. If defaultService is specified, then set either defaultUrlRedirect , or defaultRouteAction.weightedBackendService Don't set both. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true. * * Generated from protobuf field optional string default_service = 370242231; */ @@ -117,7 +117,7 @@ class UrlMap extends \Google\Protobuf\Internal\Message * @type \Google\Cloud\Compute\V1\HttpRouteAction $default_route_action * defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within defaultRouteAction. defaultRouteAction has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true. * @type string $default_service - * The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of defaultService, defaultUrlRedirect , or defaultRouteAction.weightedBackendService must be set. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true. + * The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. If defaultService is specified, then set either defaultUrlRedirect , or defaultRouteAction.weightedBackendService Don't set both. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true. * @type \Google\Cloud\Compute\V1\HttpRedirectAction $default_url_redirect * When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. Not supported when the URL map is bound to a target gRPC proxy. * @type string $description @@ -222,7 +222,7 @@ public function setDefaultRouteAction($var) } /** - * The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of defaultService, defaultUrlRedirect , or defaultRouteAction.weightedBackendService must be set. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true. + * The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. If defaultService is specified, then set either defaultUrlRedirect , or defaultRouteAction.weightedBackendService Don't set both. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true. * * Generated from protobuf field optional string default_service = 370242231; * @return string @@ -243,7 +243,7 @@ public function clearDefaultService() } /** - * The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of defaultService, defaultUrlRedirect , or defaultRouteAction.weightedBackendService must be set. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true. + * The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. If defaultService is specified, then set either defaultUrlRedirect , or defaultRouteAction.weightedBackendService Don't set both. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true. * * Generated from protobuf field optional string default_service = 370242231; * @param string $var diff --git a/Compute/src/V1/gapic_metadata.json b/Compute/src/V1/gapic_metadata.json index e2bce8da49e3..f4703861e542 100644 --- a/Compute/src/V1/gapic_metadata.json +++ b/Compute/src/V1/gapic_metadata.json @@ -965,6 +965,40 @@ } } }, + "InstanceGroupManagerResizeRequests": { + "clients": { + "grpc": { + "libraryClient": "InstanceGroupManagerResizeRequestsGapicClient", + "rpcs": { + "Cancel": { + "methods": [ + "cancel" + ] + }, + "Delete": { + "methods": [ + "delete" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "Insert": { + "methods": [ + "insert" + ] + }, + "List": { + "methods": [ + "list" + ] + } + } + } + } + }, "InstanceGroupManagers": { "clients": { "grpc": { @@ -1128,6 +1162,25 @@ } } }, + "InstanceSettingsService": { + "clients": { + "grpc": { + "libraryClient": "InstanceSettingsServiceGapicClient", + "rpcs": { + "Get": { + "methods": [ + "get" + ] + }, + "Patch": { + "methods": [ + "patch" + ] + } + } + } + } + }, "InstanceTemplates": { "clients": { "grpc": { @@ -2092,6 +2145,11 @@ "patch" ] }, + "PerformMaintenance": { + "methods": [ + "performMaintenance" + ] + }, "SetIamPolicy": { "methods": [ "setIamPolicy" @@ -3935,6 +3993,89 @@ } } }, + "StoragePoolTypes": { + "clients": { + "grpc": { + "libraryClient": "StoragePoolTypesGapicClient", + "rpcs": { + "AggregatedList": { + "methods": [ + "aggregatedList" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "List": { + "methods": [ + "list" + ] + } + } + } + } + }, + "StoragePools": { + "clients": { + "grpc": { + "libraryClient": "StoragePoolsGapicClient", + "rpcs": { + "AggregatedList": { + "methods": [ + "aggregatedList" + ] + }, + "Delete": { + "methods": [ + "delete" + ] + }, + "Get": { + "methods": [ + "get" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "Insert": { + "methods": [ + "insert" + ] + }, + "List": { + "methods": [ + "list" + ] + }, + "ListDisks": { + "methods": [ + "listDisks" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "Update": { + "methods": [ + "update" + ] + } + } + } + } + }, "Subnetworks": { "clients": { "grpc": { diff --git a/Compute/src/V1/resources/instance_group_manager_resize_requests_client_config.json b/Compute/src/V1/resources/instance_group_manager_resize_requests_client_config.json new file mode 100644 index 000000000000..443021549925 --- /dev/null +++ b/Compute/src/V1/resources/instance_group_manager_resize_requests_client_config.json @@ -0,0 +1,70 @@ +{ + "interfaces": { + "google.cloud.compute.v1.InstanceGroupManagerResizeRequests": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "Cancel": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Delete": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Get": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "Insert": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "List": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/Compute/src/V1/resources/instance_group_manager_resize_requests_descriptor_config.php b/Compute/src/V1/resources/instance_group_manager_resize_requests_descriptor_config.php new file mode 100644 index 000000000000..9ce287748ff4 --- /dev/null +++ b/Compute/src/V1/resources/instance_group_manager_resize_requests_descriptor_config.php @@ -0,0 +1,216 @@ + [ + 'google.cloud.compute.v1.InstanceGroupManagerResizeRequests' => [ + 'Cancel' => [ + 'longRunning' => [ + 'additionalArgumentMethods' => [ + 'getProject', + 'getZone', + ], + 'getOperationMethod' => 'get', + 'cancelOperationMethod' => null, + 'deleteOperationMethod' => 'delete', + 'operationErrorCodeMethod' => 'getHttpErrorStatusCode', + 'operationErrorMessageMethod' => 'getHttpErrorMessage', + 'operationNameMethod' => 'getName', + 'operationStatusMethod' => 'getStatus', + 'operationStatusDoneValue' => \Google\Cloud\Compute\V1\Operation\Status::DONE, + ], + 'responseType' => 'Google\Cloud\Compute\V1\Operation', + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'zone', + 'fieldAccessors' => [ + 'getZone', + ], + ], + [ + 'keyName' => 'instance_group_manager', + 'fieldAccessors' => [ + 'getInstanceGroupManager', + ], + ], + [ + 'keyName' => 'resize_request', + 'fieldAccessors' => [ + 'getResizeRequest', + ], + ], + ], + ], + 'Delete' => [ + 'longRunning' => [ + 'additionalArgumentMethods' => [ + 'getProject', + 'getZone', + ], + 'getOperationMethod' => 'get', + 'cancelOperationMethod' => null, + 'deleteOperationMethod' => 'delete', + 'operationErrorCodeMethod' => 'getHttpErrorStatusCode', + 'operationErrorMessageMethod' => 'getHttpErrorMessage', + 'operationNameMethod' => 'getName', + 'operationStatusMethod' => 'getStatus', + 'operationStatusDoneValue' => \Google\Cloud\Compute\V1\Operation\Status::DONE, + ], + 'responseType' => 'Google\Cloud\Compute\V1\Operation', + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'zone', + 'fieldAccessors' => [ + 'getZone', + ], + ], + [ + 'keyName' => 'instance_group_manager', + 'fieldAccessors' => [ + 'getInstanceGroupManager', + ], + ], + [ + 'keyName' => 'resize_request', + 'fieldAccessors' => [ + 'getResizeRequest', + ], + ], + ], + ], + 'Insert' => [ + 'longRunning' => [ + 'additionalArgumentMethods' => [ + 'getProject', + 'getZone', + ], + 'getOperationMethod' => 'get', + 'cancelOperationMethod' => null, + 'deleteOperationMethod' => 'delete', + 'operationErrorCodeMethod' => 'getHttpErrorStatusCode', + 'operationErrorMessageMethod' => 'getHttpErrorMessage', + 'operationNameMethod' => 'getName', + 'operationStatusMethod' => 'getStatus', + 'operationStatusDoneValue' => \Google\Cloud\Compute\V1\Operation\Status::DONE, + ], + 'responseType' => 'Google\Cloud\Compute\V1\Operation', + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'zone', + 'fieldAccessors' => [ + 'getZone', + ], + ], + [ + 'keyName' => 'instance_group_manager', + 'fieldAccessors' => [ + 'getInstanceGroupManager', + ], + ], + ], + ], + 'Get' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Compute\V1\InstanceGroupManagerResizeRequest', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'zone', + 'fieldAccessors' => [ + 'getZone', + ], + ], + [ + 'keyName' => 'instance_group_manager', + 'fieldAccessors' => [ + 'getInstanceGroupManager', + ], + ], + [ + 'keyName' => 'resize_request', + 'fieldAccessors' => [ + 'getResizeRequest', + ], + ], + ], + ], + 'List' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getMaxResults', + 'requestPageSizeSetMethod' => 'setMaxResults', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getItems', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Compute\V1\InstanceGroupManagerResizeRequestsListResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'zone', + 'fieldAccessors' => [ + 'getZone', + ], + ], + [ + 'keyName' => 'instance_group_manager', + 'fieldAccessors' => [ + 'getInstanceGroupManager', + ], + ], + ], + ], + ], + ], +]; diff --git a/Compute/src/V1/resources/instance_group_manager_resize_requests_rest_client_config.php b/Compute/src/V1/resources/instance_group_manager_resize_requests_rest_client_config.php new file mode 100644 index 000000000000..816ae19884f1 --- /dev/null +++ b/Compute/src/V1/resources/instance_group_manager_resize_requests_rest_client_config.php @@ -0,0 +1,230 @@ + [ + 'google.cloud.compute.v1.InstanceGroupManagerResizeRequests' => [ + 'Cancel' => [ + 'method' => 'post', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/resizeRequests/{resize_request}/cancel', + 'placeholders' => [ + 'instance_group_manager' => [ + 'getters' => [ + 'getInstanceGroupManager', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'resize_request' => [ + 'getters' => [ + 'getResizeRequest', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + 'Delete' => [ + 'method' => 'delete', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/resizeRequests/{resize_request}', + 'placeholders' => [ + 'instance_group_manager' => [ + 'getters' => [ + 'getInstanceGroupManager', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'resize_request' => [ + 'getters' => [ + 'getResizeRequest', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/resizeRequests/{resize_request}', + 'placeholders' => [ + 'instance_group_manager' => [ + 'getters' => [ + 'getInstanceGroupManager', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'resize_request' => [ + 'getters' => [ + 'getResizeRequest', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + 'Insert' => [ + 'method' => 'post', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/resizeRequests', + 'body' => 'instance_group_manager_resize_request_resource', + 'placeholders' => [ + 'instance_group_manager' => [ + 'getters' => [ + 'getInstanceGroupManager', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/instanceGroupManagers/{instance_group_manager}/resizeRequests', + 'placeholders' => [ + 'instance_group_manager' => [ + 'getters' => [ + 'getInstanceGroupManager', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + ], + 'google.cloud.compute.v1.ZoneOperations' => [ + 'Delete' => [ + 'method' => 'delete', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/operations/{operation}', + 'placeholders' => [ + 'operation' => [ + 'getters' => [ + 'getOperation', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/operations/{operation}', + 'placeholders' => [ + 'operation' => [ + 'getters' => [ + 'getOperation', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/operations', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + 'Wait' => [ + 'method' => 'post', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/operations/{operation}/wait', + 'placeholders' => [ + 'operation' => [ + 'getters' => [ + 'getOperation', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + ], + ], +]; diff --git a/Compute/src/V1/resources/instance_settings_service_client_config.json b/Compute/src/V1/resources/instance_settings_service_client_config.json new file mode 100644 index 000000000000..20514ac4d0d5 --- /dev/null +++ b/Compute/src/V1/resources/instance_settings_service_client_config.json @@ -0,0 +1,55 @@ +{ + "interfaces": { + "google.cloud.compute.v1.InstanceSettingsService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "Get": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "Patch": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/Compute/src/V1/resources/instance_settings_service_descriptor_config.php b/Compute/src/V1/resources/instance_settings_service_descriptor_config.php new file mode 100644 index 000000000000..cae400c3f45a --- /dev/null +++ b/Compute/src/V1/resources/instance_settings_service_descriptor_config.php @@ -0,0 +1,78 @@ + [ + 'google.cloud.compute.v1.InstanceSettingsService' => [ + 'Patch' => [ + 'longRunning' => [ + 'additionalArgumentMethods' => [ + 'getProject', + 'getZone', + ], + 'getOperationMethod' => 'get', + 'cancelOperationMethod' => null, + 'deleteOperationMethod' => 'delete', + 'operationErrorCodeMethod' => 'getHttpErrorStatusCode', + 'operationErrorMessageMethod' => 'getHttpErrorMessage', + 'operationNameMethod' => 'getName', + 'operationStatusMethod' => 'getStatus', + 'operationStatusDoneValue' => \Google\Cloud\Compute\V1\Operation\Status::DONE, + ], + 'responseType' => 'Google\Cloud\Compute\V1\Operation', + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'zone', + 'fieldAccessors' => [ + 'getZone', + ], + ], + ], + ], + 'Get' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Compute\V1\InstanceSettings', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'zone', + 'fieldAccessors' => [ + 'getZone', + ], + ], + ], + ], + ], + ], +]; diff --git a/Compute/src/V1/resources/instance_settings_service_rest_client_config.php b/Compute/src/V1/resources/instance_settings_service_rest_client_config.php new file mode 100644 index 000000000000..c63d09b4efa9 --- /dev/null +++ b/Compute/src/V1/resources/instance_settings_service_rest_client_config.php @@ -0,0 +1,142 @@ + [ + 'google.cloud.compute.v1.InstanceSettingsService' => [ + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/instanceSettings', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + 'Patch' => [ + 'method' => 'patch', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/instanceSettings', + 'body' => 'instance_settings_resource', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + ], + 'google.cloud.compute.v1.ZoneOperations' => [ + 'Delete' => [ + 'method' => 'delete', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/operations/{operation}', + 'placeholders' => [ + 'operation' => [ + 'getters' => [ + 'getOperation', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/operations/{operation}', + 'placeholders' => [ + 'operation' => [ + 'getters' => [ + 'getOperation', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/operations', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + 'Wait' => [ + 'method' => 'post', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/operations/{operation}/wait', + 'placeholders' => [ + 'operation' => [ + 'getters' => [ + 'getOperation', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + ], + ], +]; diff --git a/Compute/src/V1/resources/node_groups_client_config.json b/Compute/src/V1/resources/node_groups_client_config.json index b8e6d16032f2..e1153e1150bc 100644 --- a/Compute/src/V1/resources/node_groups_client_config.json +++ b/Compute/src/V1/resources/node_groups_client_config.json @@ -89,6 +89,11 @@ "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "PerformMaintenance": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, "SetIamPolicy": { "timeout_millis": 600000, "retry_codes_name": "no_retry_1_codes", diff --git a/Compute/src/V1/resources/node_groups_descriptor_config.php b/Compute/src/V1/resources/node_groups_descriptor_config.php index c84f328e6778..67f298062854 100644 --- a/Compute/src/V1/resources/node_groups_descriptor_config.php +++ b/Compute/src/V1/resources/node_groups_descriptor_config.php @@ -207,6 +207,44 @@ ], ], ], + 'PerformMaintenance' => [ + 'longRunning' => [ + 'additionalArgumentMethods' => [ + 'getProject', + 'getZone', + ], + 'getOperationMethod' => 'get', + 'cancelOperationMethod' => null, + 'deleteOperationMethod' => 'delete', + 'operationErrorCodeMethod' => 'getHttpErrorStatusCode', + 'operationErrorMessageMethod' => 'getHttpErrorMessage', + 'operationNameMethod' => 'getName', + 'operationStatusMethod' => 'getStatus', + 'operationStatusDoneValue' => \Google\Cloud\Compute\V1\Operation\Status::DONE, + ], + 'responseType' => 'Google\Cloud\Compute\V1\Operation', + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'zone', + 'fieldAccessors' => [ + 'getZone', + ], + ], + [ + 'keyName' => 'node_group', + 'fieldAccessors' => [ + 'getNodeGroup', + ], + ], + ], + ], 'SetNodeTemplate' => [ 'longRunning' => [ 'additionalArgumentMethods' => [ diff --git a/Compute/src/V1/resources/node_groups_rest_client_config.php b/Compute/src/V1/resources/node_groups_rest_client_config.php index f0700690fc7f..595b2e2b59dd 100644 --- a/Compute/src/V1/resources/node_groups_rest_client_config.php +++ b/Compute/src/V1/resources/node_groups_rest_client_config.php @@ -220,6 +220,28 @@ ], ], ], + 'PerformMaintenance' => [ + 'method' => 'post', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{node_group}/performMaintenance', + 'body' => 'node_groups_perform_maintenance_request_resource', + 'placeholders' => [ + 'node_group' => [ + 'getters' => [ + 'getNodeGroup', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], 'SetIamPolicy' => [ 'method' => 'post', 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/nodeGroups/{resource}/setIamPolicy', diff --git a/Compute/src/V1/resources/storage_pool_types_client_config.json b/Compute/src/V1/resources/storage_pool_types_client_config.json new file mode 100644 index 000000000000..fc4db2d72d1c --- /dev/null +++ b/Compute/src/V1/resources/storage_pool_types_client_config.json @@ -0,0 +1,50 @@ +{ + "interfaces": { + "google.cloud.compute.v1.StoragePoolTypes": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "AggregatedList": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "Get": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "List": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/Compute/src/V1/resources/storage_pool_types_descriptor_config.php b/Compute/src/V1/resources/storage_pool_types_descriptor_config.php new file mode 100644 index 000000000000..f258748b3b67 --- /dev/null +++ b/Compute/src/V1/resources/storage_pool_types_descriptor_config.php @@ -0,0 +1,98 @@ + [ + 'google.cloud.compute.v1.StoragePoolTypes' => [ + 'AggregatedList' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getMaxResults', + 'requestPageSizeSetMethod' => 'setMaxResults', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getItems', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Compute\V1\StoragePoolTypeAggregatedList', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + ], + ], + 'Get' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Compute\V1\StoragePoolType', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'zone', + 'fieldAccessors' => [ + 'getZone', + ], + ], + [ + 'keyName' => 'storage_pool_type', + 'fieldAccessors' => [ + 'getStoragePoolType', + ], + ], + ], + ], + 'List' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getMaxResults', + 'requestPageSizeSetMethod' => 'setMaxResults', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getItems', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Compute\V1\StoragePoolTypeList', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'zone', + 'fieldAccessors' => [ + 'getZone', + ], + ], + ], + ], + ], + ], +]; diff --git a/Compute/src/V1/resources/storage_pool_types_rest_client_config.php b/Compute/src/V1/resources/storage_pool_types_rest_client_config.php new file mode 100644 index 000000000000..fc809ac7d12e --- /dev/null +++ b/Compute/src/V1/resources/storage_pool_types_rest_client_config.php @@ -0,0 +1,76 @@ + [ + 'google.cloud.compute.v1.StoragePoolTypes' => [ + 'AggregatedList' => [ + 'method' => 'get', + 'uriTemplate' => '/compute/v1/projects/{project}/aggregated/storagePoolTypes', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/storagePoolTypes/{storage_pool_type}', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'storage_pool_type' => [ + 'getters' => [ + 'getStoragePoolType', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/storagePoolTypes', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + ], + ], +]; diff --git a/Compute/src/V1/resources/storage_pools_client_config.json b/Compute/src/V1/resources/storage_pools_client_config.json new file mode 100644 index 000000000000..5c164d0bc468 --- /dev/null +++ b/Compute/src/V1/resources/storage_pools_client_config.json @@ -0,0 +1,95 @@ +{ + "interfaces": { + "google.cloud.compute.v1.StoragePools": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "AggregatedList": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "Delete": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Get": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIamPolicy": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "Insert": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "List": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListDisks": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SetIamPolicy": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "TestIamPermissions": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "Update": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/Compute/src/V1/resources/storage_pools_descriptor_config.php b/Compute/src/V1/resources/storage_pools_descriptor_config.php new file mode 100644 index 000000000000..b7262f08f7d9 --- /dev/null +++ b/Compute/src/V1/resources/storage_pools_descriptor_config.php @@ -0,0 +1,294 @@ + [ + 'google.cloud.compute.v1.StoragePools' => [ + 'Delete' => [ + 'longRunning' => [ + 'additionalArgumentMethods' => [ + 'getProject', + 'getZone', + ], + 'getOperationMethod' => 'get', + 'cancelOperationMethod' => null, + 'deleteOperationMethod' => 'delete', + 'operationErrorCodeMethod' => 'getHttpErrorStatusCode', + 'operationErrorMessageMethod' => 'getHttpErrorMessage', + 'operationNameMethod' => 'getName', + 'operationStatusMethod' => 'getStatus', + 'operationStatusDoneValue' => \Google\Cloud\Compute\V1\Operation\Status::DONE, + ], + 'responseType' => 'Google\Cloud\Compute\V1\Operation', + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'zone', + 'fieldAccessors' => [ + 'getZone', + ], + ], + [ + 'keyName' => 'storage_pool', + 'fieldAccessors' => [ + 'getStoragePool', + ], + ], + ], + ], + 'Insert' => [ + 'longRunning' => [ + 'additionalArgumentMethods' => [ + 'getProject', + 'getZone', + ], + 'getOperationMethod' => 'get', + 'cancelOperationMethod' => null, + 'deleteOperationMethod' => 'delete', + 'operationErrorCodeMethod' => 'getHttpErrorStatusCode', + 'operationErrorMessageMethod' => 'getHttpErrorMessage', + 'operationNameMethod' => 'getName', + 'operationStatusMethod' => 'getStatus', + 'operationStatusDoneValue' => \Google\Cloud\Compute\V1\Operation\Status::DONE, + ], + 'responseType' => 'Google\Cloud\Compute\V1\Operation', + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'zone', + 'fieldAccessors' => [ + 'getZone', + ], + ], + ], + ], + 'Update' => [ + 'longRunning' => [ + 'additionalArgumentMethods' => [ + 'getProject', + 'getZone', + ], + 'getOperationMethod' => 'get', + 'cancelOperationMethod' => null, + 'deleteOperationMethod' => 'delete', + 'operationErrorCodeMethod' => 'getHttpErrorStatusCode', + 'operationErrorMessageMethod' => 'getHttpErrorMessage', + 'operationNameMethod' => 'getName', + 'operationStatusMethod' => 'getStatus', + 'operationStatusDoneValue' => \Google\Cloud\Compute\V1\Operation\Status::DONE, + ], + 'responseType' => 'Google\Cloud\Compute\V1\Operation', + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'zone', + 'fieldAccessors' => [ + 'getZone', + ], + ], + [ + 'keyName' => 'storage_pool', + 'fieldAccessors' => [ + 'getStoragePool', + ], + ], + ], + ], + 'AggregatedList' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getMaxResults', + 'requestPageSizeSetMethod' => 'setMaxResults', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getItems', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Compute\V1\StoragePoolAggregatedList', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + ], + ], + 'Get' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Compute\V1\StoragePool', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'zone', + 'fieldAccessors' => [ + 'getZone', + ], + ], + [ + 'keyName' => 'storage_pool', + 'fieldAccessors' => [ + 'getStoragePool', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Compute\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'zone', + 'fieldAccessors' => [ + 'getZone', + ], + ], + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'List' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Compute\V1\StoragePoolList', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'zone', + 'fieldAccessors' => [ + 'getZone', + ], + ], + ], + ], + 'ListDisks' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Compute\V1\StoragePoolListDisks', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'zone', + 'fieldAccessors' => [ + 'getZone', + ], + ], + [ + 'keyName' => 'storage_pool', + 'fieldAccessors' => [ + 'getStoragePool', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Compute\V1\Policy', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'zone', + 'fieldAccessors' => [ + 'getZone', + ], + ], + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Compute\V1\TestPermissionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'zone', + 'fieldAccessors' => [ + 'getZone', + ], + ], + [ + 'keyName' => 'resource', + 'fieldAccessors' => [ + 'getResource', + ], + ], + ], + ], + ], + ], +]; diff --git a/Compute/src/V1/resources/storage_pools_rest_client_config.php b/Compute/src/V1/resources/storage_pools_rest_client_config.php new file mode 100644 index 000000000000..401317cd5af4 --- /dev/null +++ b/Compute/src/V1/resources/storage_pools_rest_client_config.php @@ -0,0 +1,303 @@ + [ + 'google.cloud.compute.v1.StoragePools' => [ + 'AggregatedList' => [ + 'method' => 'get', + 'uriTemplate' => '/compute/v1/projects/{project}/aggregated/storagePools', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], + 'Delete' => [ + 'method' => 'delete', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/storagePools/{storage_pool}', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'storage_pool' => [ + 'getters' => [ + 'getStoragePool', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/storagePools/{storage_pool}', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'storage_pool' => [ + 'getters' => [ + 'getStoragePool', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + 'GetIamPolicy' => [ + 'method' => 'get', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/storagePools/{resource}/getIamPolicy', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + 'Insert' => [ + 'method' => 'post', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/storagePools', + 'body' => 'storage_pool_resource', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/storagePools', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + 'ListDisks' => [ + 'method' => 'get', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/storagePools/{storage_pool}/listDisks', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'storage_pool' => [ + 'getters' => [ + 'getStoragePool', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + 'SetIamPolicy' => [ + 'method' => 'post', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/storagePools/{resource}/setIamPolicy', + 'body' => 'zone_set_policy_request_resource', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + 'TestIamPermissions' => [ + 'method' => 'post', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/storagePools/{resource}/testIamPermissions', + 'body' => 'test_permissions_request_resource', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'resource' => [ + 'getters' => [ + 'getResource', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + 'Update' => [ + 'method' => 'patch', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/storagePools/{storage_pool}', + 'body' => 'storage_pool_resource', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'storage_pool' => [ + 'getters' => [ + 'getStoragePool', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + ], + 'google.cloud.compute.v1.ZoneOperations' => [ + 'Delete' => [ + 'method' => 'delete', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/operations/{operation}', + 'placeholders' => [ + 'operation' => [ + 'getters' => [ + 'getOperation', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + 'Get' => [ + 'method' => 'get', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/operations/{operation}', + 'placeholders' => [ + 'operation' => [ + 'getters' => [ + 'getOperation', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + 'List' => [ + 'method' => 'get', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/operations', + 'placeholders' => [ + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + 'Wait' => [ + 'method' => 'post', + 'uriTemplate' => '/compute/v1/projects/{project}/zones/{zone}/operations/{operation}/wait', + 'placeholders' => [ + 'operation' => [ + 'getters' => [ + 'getOperation', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + 'zone' => [ + 'getters' => [ + 'getZone', + ], + ], + ], + ], + ], + ], +]; diff --git a/Compute/tests/Unit/V1/Client/DisksClientTest.php b/Compute/tests/Unit/V1/Client/DisksClientTest.php index fee7fcf8a438..2fdef39b91a9 100644 --- a/Compute/tests/Unit/V1/Client/DisksClientTest.php +++ b/Compute/tests/Unit/V1/Client/DisksClientTest.php @@ -736,6 +736,7 @@ public function getTest() $sourceSnapshotId = 'sourceSnapshotId-1511650478'; $sourceStorageObject = 'sourceStorageObject-303818201'; $status = 'status-892481550'; + $storagePool = 'storagePool897344352'; $type = 'type3575610'; $zone2 = 'zone2-696322977'; $expectedResponse = new Disk(); @@ -771,6 +772,7 @@ public function getTest() $expectedResponse->setSourceSnapshotId($sourceSnapshotId); $expectedResponse->setSourceStorageObject($sourceStorageObject); $expectedResponse->setStatus($status); + $expectedResponse->setStoragePool($storagePool); $expectedResponse->setType($type); $expectedResponse->setZone($zone2); $transport->addResponse($expectedResponse); diff --git a/Compute/tests/Unit/V1/Client/ForwardingRulesClientTest.php b/Compute/tests/Unit/V1/Client/ForwardingRulesClientTest.php index 4e6a8dc98777..033bf6f5fadb 100644 --- a/Compute/tests/Unit/V1/Client/ForwardingRulesClientTest.php +++ b/Compute/tests/Unit/V1/Client/ForwardingRulesClientTest.php @@ -302,6 +302,7 @@ public function getTest() $description = 'description-1724546052'; $fingerprint = 'fingerprint-1375934236'; $id = 3355; + $ipCollection = 'ipCollection176818358'; $ipVersion = 'ipVersion-1315653184'; $isMirroringCollector = true; $kind = 'kind3292052'; @@ -332,6 +333,7 @@ public function getTest() $expectedResponse->setDescription($description); $expectedResponse->setFingerprint($fingerprint); $expectedResponse->setId($id); + $expectedResponse->setIpCollection($ipCollection); $expectedResponse->setIpVersion($ipVersion); $expectedResponse->setIsMirroringCollector($isMirroringCollector); $expectedResponse->setKind($kind); diff --git a/Compute/tests/Unit/V1/Client/GlobalForwardingRulesClientTest.php b/Compute/tests/Unit/V1/Client/GlobalForwardingRulesClientTest.php index 7034b31cead5..31ae7b4d5018 100644 --- a/Compute/tests/Unit/V1/Client/GlobalForwardingRulesClientTest.php +++ b/Compute/tests/Unit/V1/Client/GlobalForwardingRulesClientTest.php @@ -213,6 +213,7 @@ public function getTest() $description = 'description-1724546052'; $fingerprint = 'fingerprint-1375934236'; $id = 3355; + $ipCollection = 'ipCollection176818358'; $ipVersion = 'ipVersion-1315653184'; $isMirroringCollector = true; $kind = 'kind3292052'; @@ -243,6 +244,7 @@ public function getTest() $expectedResponse->setDescription($description); $expectedResponse->setFingerprint($fingerprint); $expectedResponse->setId($id); + $expectedResponse->setIpCollection($ipCollection); $expectedResponse->setIpVersion($ipVersion); $expectedResponse->setIsMirroringCollector($isMirroringCollector); $expectedResponse->setKind($kind); diff --git a/Compute/tests/Unit/V1/Client/GlobalPublicDelegatedPrefixesClientTest.php b/Compute/tests/Unit/V1/Client/GlobalPublicDelegatedPrefixesClientTest.php index 77b260ce8d20..dcd3306f1afe 100644 --- a/Compute/tests/Unit/V1/Client/GlobalPublicDelegatedPrefixesClientTest.php +++ b/Compute/tests/Unit/V1/Client/GlobalPublicDelegatedPrefixesClientTest.php @@ -198,6 +198,7 @@ public function getTest() ]); $this->assertTrue($transport->isExhausted()); // Mock response + $allocatablePrefixLength = 1649040182; $byoipApiVersion = 'byoipApiVersion162683283'; $creationTimestamp = 'creationTimestamp567396278'; $description = 'description-1724546052'; @@ -206,12 +207,14 @@ public function getTest() $ipCidrRange = 'ipCidrRange-2049366326'; $isLiveMigration = true; $kind = 'kind3292052'; + $mode = 'mode3357091'; $name = 'name3373707'; $parentPrefix = 'parentPrefix552104903'; $region = 'region-934795532'; $selfLink = 'selfLink-1691268851'; $status = 'status-892481550'; $expectedResponse = new PublicDelegatedPrefix(); + $expectedResponse->setAllocatablePrefixLength($allocatablePrefixLength); $expectedResponse->setByoipApiVersion($byoipApiVersion); $expectedResponse->setCreationTimestamp($creationTimestamp); $expectedResponse->setDescription($description); @@ -220,6 +223,7 @@ public function getTest() $expectedResponse->setIpCidrRange($ipCidrRange); $expectedResponse->setIsLiveMigration($isLiveMigration); $expectedResponse->setKind($kind); + $expectedResponse->setMode($mode); $expectedResponse->setName($name); $expectedResponse->setParentPrefix($parentPrefix); $expectedResponse->setRegion($region); diff --git a/Compute/tests/Unit/V1/Client/InstanceGroupManagerResizeRequestsClientTest.php b/Compute/tests/Unit/V1/Client/InstanceGroupManagerResizeRequestsClientTest.php new file mode 100644 index 000000000000..d7e8aee967e7 --- /dev/null +++ b/Compute/tests/Unit/V1/Client/InstanceGroupManagerResizeRequestsClientTest.php @@ -0,0 +1,732 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return InstanceGroupManagerResizeRequestsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new InstanceGroupManagerResizeRequestsClient($options); + } + + /** @test */ + public function cancelTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/cancelTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $completeOperation = new Operation(); + $completeOperation->setName('customOperations/cancelTest'); + $completeOperation->setStatus(Status::DONE); + $operationsTransport->addResponse($completeOperation); + // Mock request + $instanceGroupManager = 'instanceGroupManager-1361249341'; + $project = 'project-309310695'; + $resizeRequest = 'resizeRequest-319929852'; + $zone = 'zone3744684'; + $request = (new CancelInstanceGroupManagerResizeRequestRequest()) + ->setInstanceGroupManager($instanceGroupManager) + ->setProject($project) + ->setResizeRequest($resizeRequest) + ->setZone($zone); + $response = $gapicClient->cancel($request); + $this->assertFalse($response->isDone()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.InstanceGroupManagerResizeRequests/Cancel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInstanceGroupManager(); + $this->assertProtobufEquals($instanceGroupManager, $actualValue); + $actualValue = $actualApiRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualApiRequestObject->getResizeRequest(); + $this->assertProtobufEquals($resizeRequest, $actualValue); + $actualValue = $actualApiRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $expectedOperationsRequestObject = new GetZoneOperationRequest(); + $expectedOperationsRequestObject->setOperation($completeOperation->getName()); + $expectedOperationsRequestObject->setProject($project); + $expectedOperationsRequestObject->setZone($zone); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.ZoneOperations/Get', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function cancelExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/cancelExceptionTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $instanceGroupManager = 'instanceGroupManager-1361249341'; + $project = 'project-309310695'; + $resizeRequest = 'resizeRequest-319929852'; + $zone = 'zone3744684'; + $request = (new CancelInstanceGroupManagerResizeRequestRequest()) + ->setInstanceGroupManager($instanceGroupManager) + ->setProject($project) + ->setResizeRequest($resizeRequest) + ->setZone($zone); + $response = $gapicClient->cancel($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/deleteTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $completeOperation = new Operation(); + $completeOperation->setName('customOperations/deleteTest'); + $completeOperation->setStatus(Status::DONE); + $operationsTransport->addResponse($completeOperation); + // Mock request + $instanceGroupManager = 'instanceGroupManager-1361249341'; + $project = 'project-309310695'; + $resizeRequest = 'resizeRequest-319929852'; + $zone = 'zone3744684'; + $request = (new DeleteInstanceGroupManagerResizeRequestRequest()) + ->setInstanceGroupManager($instanceGroupManager) + ->setProject($project) + ->setResizeRequest($resizeRequest) + ->setZone($zone); + $response = $gapicClient->delete($request); + $this->assertFalse($response->isDone()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.InstanceGroupManagerResizeRequests/Delete', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInstanceGroupManager(); + $this->assertProtobufEquals($instanceGroupManager, $actualValue); + $actualValue = $actualApiRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualApiRequestObject->getResizeRequest(); + $this->assertProtobufEquals($resizeRequest, $actualValue); + $actualValue = $actualApiRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $expectedOperationsRequestObject = new GetZoneOperationRequest(); + $expectedOperationsRequestObject->setOperation($completeOperation->getName()); + $expectedOperationsRequestObject->setProject($project); + $expectedOperationsRequestObject->setZone($zone); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.ZoneOperations/Get', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/deleteExceptionTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $instanceGroupManager = 'instanceGroupManager-1361249341'; + $project = 'project-309310695'; + $resizeRequest = 'resizeRequest-319929852'; + $zone = 'zone3744684'; + $request = (new DeleteInstanceGroupManagerResizeRequestRequest()) + ->setInstanceGroupManager($instanceGroupManager) + ->setProject($project) + ->setResizeRequest($resizeRequest) + ->setZone($zone); + $response = $gapicClient->delete($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $creationTimestamp = 'creationTimestamp567396278'; + $description = 'description-1724546052'; + $id = 3355; + $kind = 'kind3292052'; + $name = 'name3373707'; + $resizeBy = 2144348098; + $selfLink = 'selfLink-1691268851'; + $selfLinkWithId = 'selfLinkWithId-1029220862'; + $state = 'state109757585'; + $zone2 = 'zone2-696322977'; + $expectedResponse = new InstanceGroupManagerResizeRequest(); + $expectedResponse->setCreationTimestamp($creationTimestamp); + $expectedResponse->setDescription($description); + $expectedResponse->setId($id); + $expectedResponse->setKind($kind); + $expectedResponse->setName($name); + $expectedResponse->setResizeBy($resizeBy); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setSelfLinkWithId($selfLinkWithId); + $expectedResponse->setState($state); + $expectedResponse->setZone($zone2); + $transport->addResponse($expectedResponse); + // Mock request + $instanceGroupManager = 'instanceGroupManager-1361249341'; + $project = 'project-309310695'; + $resizeRequest = 'resizeRequest-319929852'; + $zone = 'zone3744684'; + $request = (new GetInstanceGroupManagerResizeRequestRequest()) + ->setInstanceGroupManager($instanceGroupManager) + ->setProject($project) + ->setResizeRequest($resizeRequest) + ->setZone($zone); + $response = $gapicClient->get($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.InstanceGroupManagerResizeRequests/Get', $actualFuncCall); + $actualValue = $actualRequestObject->getInstanceGroupManager(); + $this->assertProtobufEquals($instanceGroupManager, $actualValue); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getResizeRequest(); + $this->assertProtobufEquals($resizeRequest, $actualValue); + $actualValue = $actualRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $instanceGroupManager = 'instanceGroupManager-1361249341'; + $project = 'project-309310695'; + $resizeRequest = 'resizeRequest-319929852'; + $zone = 'zone3744684'; + $request = (new GetInstanceGroupManagerResizeRequestRequest()) + ->setInstanceGroupManager($instanceGroupManager) + ->setProject($project) + ->setResizeRequest($resizeRequest) + ->setZone($zone); + try { + $gapicClient->get($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function insertTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/insertTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $completeOperation = new Operation(); + $completeOperation->setName('customOperations/insertTest'); + $completeOperation->setStatus(Status::DONE); + $operationsTransport->addResponse($completeOperation); + // Mock request + $instanceGroupManager = 'instanceGroupManager-1361249341'; + $instanceGroupManagerResizeRequestResource = new InstanceGroupManagerResizeRequest(); + $project = 'project-309310695'; + $zone = 'zone3744684'; + $request = (new InsertInstanceGroupManagerResizeRequestRequest()) + ->setInstanceGroupManager($instanceGroupManager) + ->setInstanceGroupManagerResizeRequestResource($instanceGroupManagerResizeRequestResource) + ->setProject($project) + ->setZone($zone); + $response = $gapicClient->insert($request); + $this->assertFalse($response->isDone()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.InstanceGroupManagerResizeRequests/Insert', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInstanceGroupManager(); + $this->assertProtobufEquals($instanceGroupManager, $actualValue); + $actualValue = $actualApiRequestObject->getInstanceGroupManagerResizeRequestResource(); + $this->assertProtobufEquals($instanceGroupManagerResizeRequestResource, $actualValue); + $actualValue = $actualApiRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualApiRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $expectedOperationsRequestObject = new GetZoneOperationRequest(); + $expectedOperationsRequestObject->setOperation($completeOperation->getName()); + $expectedOperationsRequestObject->setProject($project); + $expectedOperationsRequestObject->setZone($zone); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.ZoneOperations/Get', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function insertExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/insertExceptionTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $instanceGroupManager = 'instanceGroupManager-1361249341'; + $instanceGroupManagerResizeRequestResource = new InstanceGroupManagerResizeRequest(); + $project = 'project-309310695'; + $zone = 'zone3744684'; + $request = (new InsertInstanceGroupManagerResizeRequestRequest()) + ->setInstanceGroupManager($instanceGroupManager) + ->setInstanceGroupManagerResizeRequestResource($instanceGroupManagerResizeRequestResource) + ->setProject($project) + ->setZone($zone); + $response = $gapicClient->insert($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $id = 'id3355'; + $kind = 'kind3292052'; + $nextPageToken = ''; + $selfLink = 'selfLink-1691268851'; + $itemsElement = new InstanceGroupManagerResizeRequest(); + $items = [ + $itemsElement, + ]; + $expectedResponse = new InstanceGroupManagerResizeRequestsListResponse(); + $expectedResponse->setId($id); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setItems($items); + $transport->addResponse($expectedResponse); + // Mock request + $instanceGroupManager = 'instanceGroupManager-1361249341'; + $project = 'project-309310695'; + $zone = 'zone3744684'; + $request = (new ListInstanceGroupManagerResizeRequestsRequest()) + ->setInstanceGroupManager($instanceGroupManager) + ->setProject($project) + ->setZone($zone); + $response = $gapicClient->list($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getItems()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.InstanceGroupManagerResizeRequests/List', $actualFuncCall); + $actualValue = $actualRequestObject->getInstanceGroupManager(); + $this->assertProtobufEquals($instanceGroupManager, $actualValue); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $instanceGroupManager = 'instanceGroupManager-1361249341'; + $project = 'project-309310695'; + $zone = 'zone3744684'; + $request = (new ListInstanceGroupManagerResizeRequestsRequest()) + ->setInstanceGroupManager($instanceGroupManager) + ->setProject($project) + ->setZone($zone); + try { + $gapicClient->list($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function cancelAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/cancelAsyncTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $completeOperation = new Operation(); + $completeOperation->setName('customOperations/cancelAsyncTest'); + $completeOperation->setStatus(Status::DONE); + $operationsTransport->addResponse($completeOperation); + // Mock request + $instanceGroupManager = 'instanceGroupManager-1361249341'; + $project = 'project-309310695'; + $resizeRequest = 'resizeRequest-319929852'; + $zone = 'zone3744684'; + $request = (new CancelInstanceGroupManagerResizeRequestRequest()) + ->setInstanceGroupManager($instanceGroupManager) + ->setProject($project) + ->setResizeRequest($resizeRequest) + ->setZone($zone); + $response = $gapicClient->cancel($request); + $this->assertFalse($response->isDone()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.InstanceGroupManagerResizeRequests/Cancel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInstanceGroupManager(); + $this->assertProtobufEquals($instanceGroupManager, $actualValue); + $actualValue = $actualApiRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualApiRequestObject->getResizeRequest(); + $this->assertProtobufEquals($resizeRequest, $actualValue); + $actualValue = $actualApiRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $expectedOperationsRequestObject = new GetZoneOperationRequest(); + $expectedOperationsRequestObject->setOperation($completeOperation->getName()); + $expectedOperationsRequestObject->setProject($project); + $expectedOperationsRequestObject->setZone($zone); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.ZoneOperations/Get', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/Compute/tests/Unit/V1/Client/InstanceSettingsServiceClientTest.php b/Compute/tests/Unit/V1/Client/InstanceSettingsServiceClientTest.php new file mode 100644 index 000000000000..5ecd5e5c3125 --- /dev/null +++ b/Compute/tests/Unit/V1/Client/InstanceSettingsServiceClientTest.php @@ -0,0 +1,305 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return InstanceSettingsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new InstanceSettingsServiceClient($options); + } + + /** @test */ + public function getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $fingerprint = 'fingerprint-1375934236'; + $kind = 'kind3292052'; + $zone2 = 'zone2-696322977'; + $expectedResponse = new InstanceSettings(); + $expectedResponse->setFingerprint($fingerprint); + $expectedResponse->setKind($kind); + $expectedResponse->setZone($zone2); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $zone = 'zone3744684'; + $request = (new GetInstanceSettingRequest()) + ->setProject($project) + ->setZone($zone); + $response = $gapicClient->get($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.InstanceSettingsService/Get', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + $zone = 'zone3744684'; + $request = (new GetInstanceSettingRequest()) + ->setProject($project) + ->setZone($zone); + try { + $gapicClient->get($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function patchTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/patchTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $completeOperation = new Operation(); + $completeOperation->setName('customOperations/patchTest'); + $completeOperation->setStatus(Status::DONE); + $operationsTransport->addResponse($completeOperation); + // Mock request + $instanceSettingsResource = new InstanceSettings(); + $project = 'project-309310695'; + $zone = 'zone3744684'; + $request = (new PatchInstanceSettingRequest()) + ->setInstanceSettingsResource($instanceSettingsResource) + ->setProject($project) + ->setZone($zone); + $response = $gapicClient->patch($request); + $this->assertFalse($response->isDone()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.InstanceSettingsService/Patch', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInstanceSettingsResource(); + $this->assertProtobufEquals($instanceSettingsResource, $actualValue); + $actualValue = $actualApiRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualApiRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $expectedOperationsRequestObject = new GetZoneOperationRequest(); + $expectedOperationsRequestObject->setOperation($completeOperation->getName()); + $expectedOperationsRequestObject->setProject($project); + $expectedOperationsRequestObject->setZone($zone); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.ZoneOperations/Get', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function patchExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/patchExceptionTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $instanceSettingsResource = new InstanceSettings(); + $project = 'project-309310695'; + $zone = 'zone3744684'; + $request = (new PatchInstanceSettingRequest()) + ->setInstanceSettingsResource($instanceSettingsResource) + ->setProject($project) + ->setZone($zone); + $response = $gapicClient->patch($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $fingerprint = 'fingerprint-1375934236'; + $kind = 'kind3292052'; + $zone2 = 'zone2-696322977'; + $expectedResponse = new InstanceSettings(); + $expectedResponse->setFingerprint($fingerprint); + $expectedResponse->setKind($kind); + $expectedResponse->setZone($zone2); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $zone = 'zone3744684'; + $request = (new GetInstanceSettingRequest()) + ->setProject($project) + ->setZone($zone); + $response = $gapicClient->getAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.InstanceSettingsService/Get', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/Compute/tests/Unit/V1/Client/NodeGroupsClientTest.php b/Compute/tests/Unit/V1/Client/NodeGroupsClientTest.php index 13781a005e10..bbca426460de 100644 --- a/Compute/tests/Unit/V1/Client/NodeGroupsClientTest.php +++ b/Compute/tests/Unit/V1/Client/NodeGroupsClientTest.php @@ -44,12 +44,14 @@ use Google\Cloud\Compute\V1\NodeGroupsAddNodesRequest; use Google\Cloud\Compute\V1\NodeGroupsDeleteNodesRequest; use Google\Cloud\Compute\V1\NodeGroupsListNodes; +use Google\Cloud\Compute\V1\NodeGroupsPerformMaintenanceRequest; use Google\Cloud\Compute\V1\NodeGroupsScopedList; use Google\Cloud\Compute\V1\NodeGroupsSetNodeTemplateRequest; use Google\Cloud\Compute\V1\NodeGroupsSimulateMaintenanceEventRequest; use Google\Cloud\Compute\V1\Operation; use Google\Cloud\Compute\V1\Operation\Status; use Google\Cloud\Compute\V1\PatchNodeGroupRequest; +use Google\Cloud\Compute\V1\PerformMaintenanceNodeGroupRequest; use Google\Cloud\Compute\V1\Policy; use Google\Cloud\Compute\V1\SetIamPolicyNodeGroupRequest; use Google\Cloud\Compute\V1\SetNodeTemplateNodeGroupRequest; @@ -577,6 +579,7 @@ public function getTest() $id = 3355; $kind = 'kind3292052'; $locationHint = 'locationHint-1796964143'; + $maintenanceInterval = 'maintenanceInterval1477109873'; $maintenancePolicy = 'maintenancePolicy1065198558'; $name = 'name3373707'; $nodeTemplate = 'nodeTemplate323154455'; @@ -591,6 +594,7 @@ public function getTest() $expectedResponse->setId($id); $expectedResponse->setKind($kind); $expectedResponse->setLocationHint($locationHint); + $expectedResponse->setMaintenanceInterval($maintenanceInterval); $expectedResponse->setMaintenancePolicy($maintenancePolicy); $expectedResponse->setName($name); $expectedResponse->setNodeTemplate($nodeTemplate); @@ -1182,6 +1186,139 @@ public function patchExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } + /** @test */ + public function performMaintenanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/performMaintenanceTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $completeOperation = new Operation(); + $completeOperation->setName('customOperations/performMaintenanceTest'); + $completeOperation->setStatus(Status::DONE); + $operationsTransport->addResponse($completeOperation); + // Mock request + $nodeGroup = 'nodeGroup1543699970'; + $nodeGroupsPerformMaintenanceRequestResource = new NodeGroupsPerformMaintenanceRequest(); + $project = 'project-309310695'; + $zone = 'zone3744684'; + $request = (new PerformMaintenanceNodeGroupRequest()) + ->setNodeGroup($nodeGroup) + ->setNodeGroupsPerformMaintenanceRequestResource($nodeGroupsPerformMaintenanceRequestResource) + ->setProject($project) + ->setZone($zone); + $response = $gapicClient->performMaintenance($request); + $this->assertFalse($response->isDone()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.NodeGroups/PerformMaintenance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getNodeGroup(); + $this->assertProtobufEquals($nodeGroup, $actualValue); + $actualValue = $actualApiRequestObject->getNodeGroupsPerformMaintenanceRequestResource(); + $this->assertProtobufEquals($nodeGroupsPerformMaintenanceRequestResource, $actualValue); + $actualValue = $actualApiRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualApiRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $expectedOperationsRequestObject = new GetZoneOperationRequest(); + $expectedOperationsRequestObject->setOperation($completeOperation->getName()); + $expectedOperationsRequestObject->setProject($project); + $expectedOperationsRequestObject->setZone($zone); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.ZoneOperations/Get', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function performMaintenanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/performMaintenanceExceptionTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $nodeGroup = 'nodeGroup1543699970'; + $nodeGroupsPerformMaintenanceRequestResource = new NodeGroupsPerformMaintenanceRequest(); + $project = 'project-309310695'; + $zone = 'zone3744684'; + $request = (new PerformMaintenanceNodeGroupRequest()) + ->setNodeGroup($nodeGroup) + ->setNodeGroupsPerformMaintenanceRequestResource($nodeGroupsPerformMaintenanceRequestResource) + ->setProject($project) + ->setZone($zone); + $response = $gapicClient->performMaintenance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + /** @test */ public function setIamPolicyTest() { diff --git a/Compute/tests/Unit/V1/Client/PublicDelegatedPrefixesClientTest.php b/Compute/tests/Unit/V1/Client/PublicDelegatedPrefixesClientTest.php index f332236dd3d4..a0f8b9a77be7 100644 --- a/Compute/tests/Unit/V1/Client/PublicDelegatedPrefixesClientTest.php +++ b/Compute/tests/Unit/V1/Client/PublicDelegatedPrefixesClientTest.php @@ -416,6 +416,7 @@ public function getTest() ]); $this->assertTrue($transport->isExhausted()); // Mock response + $allocatablePrefixLength = 1649040182; $byoipApiVersion = 'byoipApiVersion162683283'; $creationTimestamp = 'creationTimestamp567396278'; $description = 'description-1724546052'; @@ -424,12 +425,14 @@ public function getTest() $ipCidrRange = 'ipCidrRange-2049366326'; $isLiveMigration = true; $kind = 'kind3292052'; + $mode = 'mode3357091'; $name = 'name3373707'; $parentPrefix = 'parentPrefix552104903'; $region2 = 'region2-690338393'; $selfLink = 'selfLink-1691268851'; $status = 'status-892481550'; $expectedResponse = new PublicDelegatedPrefix(); + $expectedResponse->setAllocatablePrefixLength($allocatablePrefixLength); $expectedResponse->setByoipApiVersion($byoipApiVersion); $expectedResponse->setCreationTimestamp($creationTimestamp); $expectedResponse->setDescription($description); @@ -438,6 +441,7 @@ public function getTest() $expectedResponse->setIpCidrRange($ipCidrRange); $expectedResponse->setIsLiveMigration($isLiveMigration); $expectedResponse->setKind($kind); + $expectedResponse->setMode($mode); $expectedResponse->setName($name); $expectedResponse->setParentPrefix($parentPrefix); $expectedResponse->setRegion($region2); diff --git a/Compute/tests/Unit/V1/Client/RegionDisksClientTest.php b/Compute/tests/Unit/V1/Client/RegionDisksClientTest.php index dbe74fc63dd4..944e3b410b7f 100644 --- a/Compute/tests/Unit/V1/Client/RegionDisksClientTest.php +++ b/Compute/tests/Unit/V1/Client/RegionDisksClientTest.php @@ -654,6 +654,7 @@ public function getTest() $sourceSnapshotId = 'sourceSnapshotId-1511650478'; $sourceStorageObject = 'sourceStorageObject-303818201'; $status = 'status-892481550'; + $storagePool = 'storagePool897344352'; $type = 'type3575610'; $zone = 'zone3744684'; $expectedResponse = new Disk(); @@ -689,6 +690,7 @@ public function getTest() $expectedResponse->setSourceSnapshotId($sourceSnapshotId); $expectedResponse->setSourceStorageObject($sourceStorageObject); $expectedResponse->setStatus($status); + $expectedResponse->setStoragePool($storagePool); $expectedResponse->setType($type); $expectedResponse->setZone($zone); $transport->addResponse($expectedResponse); diff --git a/Compute/tests/Unit/V1/Client/StoragePoolTypesClientTest.php b/Compute/tests/Unit/V1/Client/StoragePoolTypesClientTest.php new file mode 100644 index 000000000000..e7cbf948e063 --- /dev/null +++ b/Compute/tests/Unit/V1/Client/StoragePoolTypesClientTest.php @@ -0,0 +1,378 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return StoragePoolTypesClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new StoragePoolTypesClient($options); + } + + /** @test */ + public function aggregatedListTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $id = 'id3355'; + $kind = 'kind3292052'; + $nextPageToken = ''; + $selfLink = 'selfLink-1691268851'; + $items = [ + 'itemsKey' => new StoragePoolTypesScopedList(), + ]; + $expectedResponse = new StoragePoolTypeAggregatedList(); + $expectedResponse->setId($id); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setItems($items); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $request = (new AggregatedListStoragePoolTypesRequest()) + ->setProject($project); + $response = $gapicClient->aggregatedList($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertArrayHasKey('itemsKey', $expectedResponse->getItems()); + $this->assertArrayHasKey('itemsKey', $resources); + $this->assertEquals($expectedResponse->getItems()['itemsKey'], $resources['itemsKey']); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.StoragePoolTypes/AggregatedList', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function aggregatedListExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + $request = (new AggregatedListStoragePoolTypesRequest()) + ->setProject($project); + try { + $gapicClient->aggregatedList($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $creationTimestamp = 'creationTimestamp567396278'; + $description = 'description-1724546052'; + $id = 3355; + $kind = 'kind3292052'; + $maxPoolProvisionedCapacityGb = 1255880909; + $maxPoolProvisionedIops = 1095342084; + $maxPoolProvisionedThroughput = 1302669885; + $minPoolProvisionedCapacityGb = 345848161; + $minPoolProvisionedIops = 1194139030; + $minPoolProvisionedThroughput = 1242850773; + $minSizeGb = 1459020012; + $name = 'name3373707'; + $selfLink = 'selfLink-1691268851'; + $selfLinkWithId = 'selfLinkWithId-1029220862'; + $zone2 = 'zone2-696322977'; + $expectedResponse = new StoragePoolType(); + $expectedResponse->setCreationTimestamp($creationTimestamp); + $expectedResponse->setDescription($description); + $expectedResponse->setId($id); + $expectedResponse->setKind($kind); + $expectedResponse->setMaxPoolProvisionedCapacityGb($maxPoolProvisionedCapacityGb); + $expectedResponse->setMaxPoolProvisionedIops($maxPoolProvisionedIops); + $expectedResponse->setMaxPoolProvisionedThroughput($maxPoolProvisionedThroughput); + $expectedResponse->setMinPoolProvisionedCapacityGb($minPoolProvisionedCapacityGb); + $expectedResponse->setMinPoolProvisionedIops($minPoolProvisionedIops); + $expectedResponse->setMinPoolProvisionedThroughput($minPoolProvisionedThroughput); + $expectedResponse->setMinSizeGb($minSizeGb); + $expectedResponse->setName($name); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setSelfLinkWithId($selfLinkWithId); + $expectedResponse->setZone($zone2); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $storagePoolType = 'storagePoolType1896612025'; + $zone = 'zone3744684'; + $request = (new GetStoragePoolTypeRequest()) + ->setProject($project) + ->setStoragePoolType($storagePoolType) + ->setZone($zone); + $response = $gapicClient->get($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.StoragePoolTypes/Get', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getStoragePoolType(); + $this->assertProtobufEquals($storagePoolType, $actualValue); + $actualValue = $actualRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + $storagePoolType = 'storagePoolType1896612025'; + $zone = 'zone3744684'; + $request = (new GetStoragePoolTypeRequest()) + ->setProject($project) + ->setStoragePoolType($storagePoolType) + ->setZone($zone); + try { + $gapicClient->get($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $id = 'id3355'; + $kind = 'kind3292052'; + $nextPageToken = ''; + $selfLink = 'selfLink-1691268851'; + $itemsElement = new StoragePoolType(); + $items = [ + $itemsElement, + ]; + $expectedResponse = new StoragePoolTypeList(); + $expectedResponse->setId($id); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setItems($items); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $zone = 'zone3744684'; + $request = (new ListStoragePoolTypesRequest()) + ->setProject($project) + ->setZone($zone); + $response = $gapicClient->list($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getItems()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.StoragePoolTypes/List', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + $zone = 'zone3744684'; + $request = (new ListStoragePoolTypesRequest()) + ->setProject($project) + ->setZone($zone); + try { + $gapicClient->list($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function aggregatedListAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $id = 'id3355'; + $kind = 'kind3292052'; + $nextPageToken = ''; + $selfLink = 'selfLink-1691268851'; + $items = [ + 'itemsKey' => new StoragePoolTypesScopedList(), + ]; + $expectedResponse = new StoragePoolTypeAggregatedList(); + $expectedResponse->setId($id); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setItems($items); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $request = (new AggregatedListStoragePoolTypesRequest()) + ->setProject($project); + $response = $gapicClient->aggregatedListAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertArrayHasKey('itemsKey', $expectedResponse->getItems()); + $this->assertArrayHasKey('itemsKey', $resources); + $this->assertEquals($expectedResponse->getItems()['itemsKey'], $resources['itemsKey']); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.StoragePoolTypes/AggregatedList', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/Compute/tests/Unit/V1/Client/StoragePoolsClientTest.php b/Compute/tests/Unit/V1/Client/StoragePoolsClientTest.php new file mode 100644 index 000000000000..dab8524a3603 --- /dev/null +++ b/Compute/tests/Unit/V1/Client/StoragePoolsClientTest.php @@ -0,0 +1,1111 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return StoragePoolsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new StoragePoolsClient($options); + } + + /** @test */ + public function aggregatedListTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $etag = 'etag3123477'; + $id = 'id3355'; + $kind = 'kind3292052'; + $nextPageToken = ''; + $selfLink = 'selfLink-1691268851'; + $items = [ + 'itemsKey' => new StoragePoolsScopedList(), + ]; + $expectedResponse = new StoragePoolAggregatedList(); + $expectedResponse->setEtag($etag); + $expectedResponse->setId($id); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setItems($items); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $request = (new AggregatedListStoragePoolsRequest()) + ->setProject($project); + $response = $gapicClient->aggregatedList($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertArrayHasKey('itemsKey', $expectedResponse->getItems()); + $this->assertArrayHasKey('itemsKey', $resources); + $this->assertEquals($expectedResponse->getItems()['itemsKey'], $resources['itemsKey']); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.StoragePools/AggregatedList', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function aggregatedListExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + $request = (new AggregatedListStoragePoolsRequest()) + ->setProject($project); + try { + $gapicClient->aggregatedList($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/deleteTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $completeOperation = new Operation(); + $completeOperation->setName('customOperations/deleteTest'); + $completeOperation->setStatus(Status::DONE); + $operationsTransport->addResponse($completeOperation); + // Mock request + $project = 'project-309310695'; + $storagePool = 'storagePool897344352'; + $zone = 'zone3744684'; + $request = (new DeleteStoragePoolRequest()) + ->setProject($project) + ->setStoragePool($storagePool) + ->setZone($zone); + $response = $gapicClient->delete($request); + $this->assertFalse($response->isDone()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.StoragePools/Delete', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualApiRequestObject->getStoragePool(); + $this->assertProtobufEquals($storagePool, $actualValue); + $actualValue = $actualApiRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $expectedOperationsRequestObject = new GetZoneOperationRequest(); + $expectedOperationsRequestObject->setOperation($completeOperation->getName()); + $expectedOperationsRequestObject->setProject($project); + $expectedOperationsRequestObject->setZone($zone); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.ZoneOperations/Get', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/deleteExceptionTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + $storagePool = 'storagePool897344352'; + $zone = 'zone3744684'; + $request = (new DeleteStoragePoolRequest()) + ->setProject($project) + ->setStoragePool($storagePool) + ->setZone($zone); + $response = $gapicClient->delete($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $capacityProvisioningType = 'capacityProvisioningType1325352199'; + $creationTimestamp = 'creationTimestamp567396278'; + $description = 'description-1724546052'; + $id = 3355; + $kind = 'kind3292052'; + $labelFingerprint = 'labelFingerprint714995737'; + $name = 'name3373707'; + $performanceProvisioningType = 'performanceProvisioningType1542295293'; + $poolProvisionedCapacityGb = 1132075054; + $poolProvisionedIops = 1185834135; + $poolProvisionedThroughput = 1779828376; + $selfLink = 'selfLink-1691268851'; + $selfLinkWithId = 'selfLinkWithId-1029220862'; + $state = 'state109757585'; + $storagePoolType = 'storagePoolType1896612025'; + $zone2 = 'zone2-696322977'; + $expectedResponse = new StoragePool(); + $expectedResponse->setCapacityProvisioningType($capacityProvisioningType); + $expectedResponse->setCreationTimestamp($creationTimestamp); + $expectedResponse->setDescription($description); + $expectedResponse->setId($id); + $expectedResponse->setKind($kind); + $expectedResponse->setLabelFingerprint($labelFingerprint); + $expectedResponse->setName($name); + $expectedResponse->setPerformanceProvisioningType($performanceProvisioningType); + $expectedResponse->setPoolProvisionedCapacityGb($poolProvisionedCapacityGb); + $expectedResponse->setPoolProvisionedIops($poolProvisionedIops); + $expectedResponse->setPoolProvisionedThroughput($poolProvisionedThroughput); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setSelfLinkWithId($selfLinkWithId); + $expectedResponse->setState($state); + $expectedResponse->setStoragePoolType($storagePoolType); + $expectedResponse->setZone($zone2); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $storagePool = 'storagePool897344352'; + $zone = 'zone3744684'; + $request = (new GetStoragePoolRequest()) + ->setProject($project) + ->setStoragePool($storagePool) + ->setZone($zone); + $response = $gapicClient->get($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.StoragePools/Get', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getStoragePool(); + $this->assertProtobufEquals($storagePool, $actualValue); + $actualValue = $actualRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + $storagePool = 'storagePool897344352'; + $zone = 'zone3744684'; + $request = (new GetStoragePoolRequest()) + ->setProject($project) + ->setStoragePool($storagePool) + ->setZone($zone); + try { + $gapicClient->get($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 + $etag = 'etag3123477'; + $iamOwned = false; + $version = 351608024; + $expectedResponse = new Policy(); + $expectedResponse->setEtag($etag); + $expectedResponse->setIamOwned($iamOwned); + $expectedResponse->setVersion($version); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $resource = 'resource-341064690'; + $zone = 'zone3744684'; + $request = (new GetIamPolicyStoragePoolRequest()) + ->setProject($project) + ->setResource($resource) + ->setZone($zone); + $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.cloud.compute.v1.StoragePools/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getZone(); + $this->assertProtobufEquals($zone, $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 + $project = 'project-309310695'; + $resource = 'resource-341064690'; + $zone = 'zone3744684'; + $request = (new GetIamPolicyStoragePoolRequest()) + ->setProject($project) + ->setResource($resource) + ->setZone($zone); + 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 insertTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/insertTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $completeOperation = new Operation(); + $completeOperation->setName('customOperations/insertTest'); + $completeOperation->setStatus(Status::DONE); + $operationsTransport->addResponse($completeOperation); + // Mock request + $project = 'project-309310695'; + $storagePoolResource = new StoragePool(); + $zone = 'zone3744684'; + $request = (new InsertStoragePoolRequest()) + ->setProject($project) + ->setStoragePoolResource($storagePoolResource) + ->setZone($zone); + $response = $gapicClient->insert($request); + $this->assertFalse($response->isDone()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.StoragePools/Insert', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualApiRequestObject->getStoragePoolResource(); + $this->assertProtobufEquals($storagePoolResource, $actualValue); + $actualValue = $actualApiRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $expectedOperationsRequestObject = new GetZoneOperationRequest(); + $expectedOperationsRequestObject->setOperation($completeOperation->getName()); + $expectedOperationsRequestObject->setProject($project); + $expectedOperationsRequestObject->setZone($zone); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.ZoneOperations/Get', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function insertExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/insertExceptionTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + $storagePoolResource = new StoragePool(); + $zone = 'zone3744684'; + $request = (new InsertStoragePoolRequest()) + ->setProject($project) + ->setStoragePoolResource($storagePoolResource) + ->setZone($zone); + $response = $gapicClient->insert($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $etag = 'etag3123477'; + $id = 'id3355'; + $kind = 'kind3292052'; + $nextPageToken = 'nextPageToken-1530815211'; + $selfLink = 'selfLink-1691268851'; + $expectedResponse = new StoragePoolList(); + $expectedResponse->setEtag($etag); + $expectedResponse->setId($id); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSelfLink($selfLink); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $zone = 'zone3744684'; + $request = (new ListStoragePoolsRequest()) + ->setProject($project) + ->setZone($zone); + $response = $gapicClient->list($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.StoragePools/List', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + $zone = 'zone3744684'; + $request = (new ListStoragePoolsRequest()) + ->setProject($project) + ->setZone($zone); + try { + $gapicClient->list($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDisksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $etag = 'etag3123477'; + $id = 'id3355'; + $kind = 'kind3292052'; + $nextPageToken = 'nextPageToken-1530815211'; + $selfLink = 'selfLink-1691268851'; + $expectedResponse = new StoragePoolListDisks(); + $expectedResponse->setEtag($etag); + $expectedResponse->setId($id); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSelfLink($selfLink); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $storagePool = 'storagePool897344352'; + $zone = 'zone3744684'; + $request = (new ListDisksStoragePoolsRequest()) + ->setProject($project) + ->setStoragePool($storagePool) + ->setZone($zone); + $response = $gapicClient->listDisks($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.StoragePools/ListDisks', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getStoragePool(); + $this->assertProtobufEquals($storagePool, $actualValue); + $actualValue = $actualRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDisksExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + $storagePool = 'storagePool897344352'; + $zone = 'zone3744684'; + $request = (new ListDisksStoragePoolsRequest()) + ->setProject($project) + ->setStoragePool($storagePool) + ->setZone($zone); + try { + $gapicClient->listDisks($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 + $etag = 'etag3123477'; + $iamOwned = false; + $version = 351608024; + $expectedResponse = new Policy(); + $expectedResponse->setEtag($etag); + $expectedResponse->setIamOwned($iamOwned); + $expectedResponse->setVersion($version); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $resource = 'resource-341064690'; + $zone = 'zone3744684'; + $zoneSetPolicyRequestResource = new ZoneSetPolicyRequest(); + $request = (new SetIamPolicyStoragePoolRequest()) + ->setProject($project) + ->setResource($resource) + ->setZone($zone) + ->setZoneSetPolicyRequestResource($zoneSetPolicyRequestResource); + $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.cloud.compute.v1.StoragePools/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $actualValue = $actualRequestObject->getZoneSetPolicyRequestResource(); + $this->assertProtobufEquals($zoneSetPolicyRequestResource, $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 + $project = 'project-309310695'; + $resource = 'resource-341064690'; + $zone = 'zone3744684'; + $zoneSetPolicyRequestResource = new ZoneSetPolicyRequest(); + $request = (new SetIamPolicyStoragePoolRequest()) + ->setProject($project) + ->setResource($resource) + ->setZone($zone) + ->setZoneSetPolicyRequestResource($zoneSetPolicyRequestResource); + 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 TestPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $resource = 'resource-341064690'; + $testPermissionsRequestResource = new TestPermissionsRequest(); + $zone = 'zone3744684'; + $request = (new TestIamPermissionsStoragePoolRequest()) + ->setProject($project) + ->setResource($resource) + ->setTestPermissionsRequestResource($testPermissionsRequestResource) + ->setZone($zone); + $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.cloud.compute.v1.StoragePools/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getTestPermissionsRequestResource(); + $this->assertProtobufEquals($testPermissionsRequestResource, $actualValue); + $actualValue = $actualRequestObject->getZone(); + $this->assertProtobufEquals($zone, $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 + $project = 'project-309310695'; + $resource = 'resource-341064690'; + $testPermissionsRequestResource = new TestPermissionsRequest(); + $zone = 'zone3744684'; + $request = (new TestIamPermissionsStoragePoolRequest()) + ->setProject($project) + ->setResource($resource) + ->setTestPermissionsRequestResource($testPermissionsRequestResource) + ->setZone($zone); + 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 updateTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/updateTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $completeOperation = new Operation(); + $completeOperation->setName('customOperations/updateTest'); + $completeOperation->setStatus(Status::DONE); + $operationsTransport->addResponse($completeOperation); + // Mock request + $project = 'project-309310695'; + $storagePool = 'storagePool897344352'; + $storagePoolResource = new StoragePool(); + $zone = 'zone3744684'; + $request = (new UpdateStoragePoolRequest()) + ->setProject($project) + ->setStoragePool($storagePool) + ->setStoragePoolResource($storagePoolResource) + ->setZone($zone); + $response = $gapicClient->update($request); + $this->assertFalse($response->isDone()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.StoragePools/Update', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualApiRequestObject->getStoragePool(); + $this->assertProtobufEquals($storagePool, $actualValue); + $actualValue = $actualApiRequestObject->getStoragePoolResource(); + $this->assertProtobufEquals($storagePoolResource, $actualValue); + $actualValue = $actualApiRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $expectedOperationsRequestObject = new GetZoneOperationRequest(); + $expectedOperationsRequestObject->setOperation($completeOperation->getName()); + $expectedOperationsRequestObject->setProject($project); + $expectedOperationsRequestObject->setZone($zone); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.ZoneOperations/Get', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/updateExceptionTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + $storagePool = 'storagePool897344352'; + $storagePoolResource = new StoragePool(); + $zone = 'zone3744684'; + $request = (new UpdateStoragePoolRequest()) + ->setProject($project) + ->setStoragePool($storagePool) + ->setStoragePoolResource($storagePoolResource) + ->setZone($zone); + $response = $gapicClient->update($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function aggregatedListAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $etag = 'etag3123477'; + $id = 'id3355'; + $kind = 'kind3292052'; + $nextPageToken = ''; + $selfLink = 'selfLink-1691268851'; + $items = [ + 'itemsKey' => new StoragePoolsScopedList(), + ]; + $expectedResponse = new StoragePoolAggregatedList(); + $expectedResponse->setEtag($etag); + $expectedResponse->setId($id); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setItems($items); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $request = (new AggregatedListStoragePoolsRequest()) + ->setProject($project); + $response = $gapicClient->aggregatedListAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertArrayHasKey('itemsKey', $expectedResponse->getItems()); + $this->assertArrayHasKey('itemsKey', $resources); + $this->assertEquals($expectedResponse->getItems()['itemsKey'], $resources['itemsKey']); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.StoragePools/AggregatedList', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/Compute/tests/Unit/V1/DisksClientTest.php b/Compute/tests/Unit/V1/DisksClientTest.php index bacddd011e15..135dae766799 100644 --- a/Compute/tests/Unit/V1/DisksClientTest.php +++ b/Compute/tests/Unit/V1/DisksClientTest.php @@ -678,6 +678,7 @@ public function getTest() $sourceSnapshotId = 'sourceSnapshotId-1511650478'; $sourceStorageObject = 'sourceStorageObject-303818201'; $status = 'status-892481550'; + $storagePool = 'storagePool897344352'; $type = 'type3575610'; $zone2 = 'zone2-696322977'; $expectedResponse = new Disk(); @@ -713,6 +714,7 @@ public function getTest() $expectedResponse->setSourceSnapshotId($sourceSnapshotId); $expectedResponse->setSourceStorageObject($sourceStorageObject); $expectedResponse->setStatus($status); + $expectedResponse->setStoragePool($storagePool); $expectedResponse->setType($type); $expectedResponse->setZone($zone2); $transport->addResponse($expectedResponse); diff --git a/Compute/tests/Unit/V1/ForwardingRulesClientTest.php b/Compute/tests/Unit/V1/ForwardingRulesClientTest.php index 2dd57d06a7b0..0512fd162c3d 100644 --- a/Compute/tests/Unit/V1/ForwardingRulesClientTest.php +++ b/Compute/tests/Unit/V1/ForwardingRulesClientTest.php @@ -282,6 +282,7 @@ public function getTest() $description = 'description-1724546052'; $fingerprint = 'fingerprint-1375934236'; $id = 3355; + $ipCollection = 'ipCollection176818358'; $ipVersion = 'ipVersion-1315653184'; $isMirroringCollector = true; $kind = 'kind3292052'; @@ -312,6 +313,7 @@ public function getTest() $expectedResponse->setDescription($description); $expectedResponse->setFingerprint($fingerprint); $expectedResponse->setId($id); + $expectedResponse->setIpCollection($ipCollection); $expectedResponse->setIpVersion($ipVersion); $expectedResponse->setIsMirroringCollector($isMirroringCollector); $expectedResponse->setKind($kind); diff --git a/Compute/tests/Unit/V1/GlobalForwardingRulesClientTest.php b/Compute/tests/Unit/V1/GlobalForwardingRulesClientTest.php index 0a2d442f4650..45133402a159 100644 --- a/Compute/tests/Unit/V1/GlobalForwardingRulesClientTest.php +++ b/Compute/tests/Unit/V1/GlobalForwardingRulesClientTest.php @@ -200,6 +200,7 @@ public function getTest() $description = 'description-1724546052'; $fingerprint = 'fingerprint-1375934236'; $id = 3355; + $ipCollection = 'ipCollection176818358'; $ipVersion = 'ipVersion-1315653184'; $isMirroringCollector = true; $kind = 'kind3292052'; @@ -230,6 +231,7 @@ public function getTest() $expectedResponse->setDescription($description); $expectedResponse->setFingerprint($fingerprint); $expectedResponse->setId($id); + $expectedResponse->setIpCollection($ipCollection); $expectedResponse->setIpVersion($ipVersion); $expectedResponse->setIsMirroringCollector($isMirroringCollector); $expectedResponse->setKind($kind); diff --git a/Compute/tests/Unit/V1/GlobalPublicDelegatedPrefixesClientTest.php b/Compute/tests/Unit/V1/GlobalPublicDelegatedPrefixesClientTest.php index 0d5ac1269e92..94ab1c2b4ba4 100644 --- a/Compute/tests/Unit/V1/GlobalPublicDelegatedPrefixesClientTest.php +++ b/Compute/tests/Unit/V1/GlobalPublicDelegatedPrefixesClientTest.php @@ -187,6 +187,7 @@ public function getTest() ]); $this->assertTrue($transport->isExhausted()); // Mock response + $allocatablePrefixLength = 1649040182; $byoipApiVersion = 'byoipApiVersion162683283'; $creationTimestamp = 'creationTimestamp567396278'; $description = 'description-1724546052'; @@ -195,12 +196,14 @@ public function getTest() $ipCidrRange = 'ipCidrRange-2049366326'; $isLiveMigration = true; $kind = 'kind3292052'; + $mode = 'mode3357091'; $name = 'name3373707'; $parentPrefix = 'parentPrefix552104903'; $region = 'region-934795532'; $selfLink = 'selfLink-1691268851'; $status = 'status-892481550'; $expectedResponse = new PublicDelegatedPrefix(); + $expectedResponse->setAllocatablePrefixLength($allocatablePrefixLength); $expectedResponse->setByoipApiVersion($byoipApiVersion); $expectedResponse->setCreationTimestamp($creationTimestamp); $expectedResponse->setDescription($description); @@ -209,6 +212,7 @@ public function getTest() $expectedResponse->setIpCidrRange($ipCidrRange); $expectedResponse->setIsLiveMigration($isLiveMigration); $expectedResponse->setKind($kind); + $expectedResponse->setMode($mode); $expectedResponse->setName($name); $expectedResponse->setParentPrefix($parentPrefix); $expectedResponse->setRegion($region); diff --git a/Compute/tests/Unit/V1/InstanceGroupManagerResizeRequestsClientTest.php b/Compute/tests/Unit/V1/InstanceGroupManagerResizeRequestsClientTest.php new file mode 100644 index 000000000000..11f09c45f2be --- /dev/null +++ b/Compute/tests/Unit/V1/InstanceGroupManagerResizeRequestsClientTest.php @@ -0,0 +1,607 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return InstanceGroupManagerResizeRequestsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new InstanceGroupManagerResizeRequestsClient($options); + } + + /** @test */ + public function cancelTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/cancelTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $completeOperation = new Operation(); + $completeOperation->setName('customOperations/cancelTest'); + $completeOperation->setStatus(Status::DONE); + $operationsTransport->addResponse($completeOperation); + // Mock request + $instanceGroupManager = 'instanceGroupManager-1361249341'; + $project = 'project-309310695'; + $resizeRequest = 'resizeRequest-319929852'; + $zone = 'zone3744684'; + $response = $gapicClient->cancel($instanceGroupManager, $project, $resizeRequest, $zone); + $this->assertFalse($response->isDone()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.InstanceGroupManagerResizeRequests/Cancel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInstanceGroupManager(); + $this->assertProtobufEquals($instanceGroupManager, $actualValue); + $actualValue = $actualApiRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualApiRequestObject->getResizeRequest(); + $this->assertProtobufEquals($resizeRequest, $actualValue); + $actualValue = $actualApiRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $expectedOperationsRequestObject = new GetZoneOperationRequest(); + $expectedOperationsRequestObject->setOperation($completeOperation->getName()); + $expectedOperationsRequestObject->setProject($project); + $expectedOperationsRequestObject->setZone($zone); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.ZoneOperations/Get', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function cancelExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/cancelExceptionTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $instanceGroupManager = 'instanceGroupManager-1361249341'; + $project = 'project-309310695'; + $resizeRequest = 'resizeRequest-319929852'; + $zone = 'zone3744684'; + $response = $gapicClient->cancel($instanceGroupManager, $project, $resizeRequest, $zone); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/deleteTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $completeOperation = new Operation(); + $completeOperation->setName('customOperations/deleteTest'); + $completeOperation->setStatus(Status::DONE); + $operationsTransport->addResponse($completeOperation); + // Mock request + $instanceGroupManager = 'instanceGroupManager-1361249341'; + $project = 'project-309310695'; + $resizeRequest = 'resizeRequest-319929852'; + $zone = 'zone3744684'; + $response = $gapicClient->delete($instanceGroupManager, $project, $resizeRequest, $zone); + $this->assertFalse($response->isDone()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.InstanceGroupManagerResizeRequests/Delete', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInstanceGroupManager(); + $this->assertProtobufEquals($instanceGroupManager, $actualValue); + $actualValue = $actualApiRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualApiRequestObject->getResizeRequest(); + $this->assertProtobufEquals($resizeRequest, $actualValue); + $actualValue = $actualApiRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $expectedOperationsRequestObject = new GetZoneOperationRequest(); + $expectedOperationsRequestObject->setOperation($completeOperation->getName()); + $expectedOperationsRequestObject->setProject($project); + $expectedOperationsRequestObject->setZone($zone); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.ZoneOperations/Get', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/deleteExceptionTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $instanceGroupManager = 'instanceGroupManager-1361249341'; + $project = 'project-309310695'; + $resizeRequest = 'resizeRequest-319929852'; + $zone = 'zone3744684'; + $response = $gapicClient->delete($instanceGroupManager, $project, $resizeRequest, $zone); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $creationTimestamp = 'creationTimestamp567396278'; + $description = 'description-1724546052'; + $id = 3355; + $kind = 'kind3292052'; + $name = 'name3373707'; + $resizeBy = 2144348098; + $selfLink = 'selfLink-1691268851'; + $selfLinkWithId = 'selfLinkWithId-1029220862'; + $state = 'state109757585'; + $zone2 = 'zone2-696322977'; + $expectedResponse = new InstanceGroupManagerResizeRequest(); + $expectedResponse->setCreationTimestamp($creationTimestamp); + $expectedResponse->setDescription($description); + $expectedResponse->setId($id); + $expectedResponse->setKind($kind); + $expectedResponse->setName($name); + $expectedResponse->setResizeBy($resizeBy); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setSelfLinkWithId($selfLinkWithId); + $expectedResponse->setState($state); + $expectedResponse->setZone($zone2); + $transport->addResponse($expectedResponse); + // Mock request + $instanceGroupManager = 'instanceGroupManager-1361249341'; + $project = 'project-309310695'; + $resizeRequest = 'resizeRequest-319929852'; + $zone = 'zone3744684'; + $response = $gapicClient->get($instanceGroupManager, $project, $resizeRequest, $zone); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.InstanceGroupManagerResizeRequests/Get', $actualFuncCall); + $actualValue = $actualRequestObject->getInstanceGroupManager(); + $this->assertProtobufEquals($instanceGroupManager, $actualValue); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getResizeRequest(); + $this->assertProtobufEquals($resizeRequest, $actualValue); + $actualValue = $actualRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $instanceGroupManager = 'instanceGroupManager-1361249341'; + $project = 'project-309310695'; + $resizeRequest = 'resizeRequest-319929852'; + $zone = 'zone3744684'; + try { + $gapicClient->get($instanceGroupManager, $project, $resizeRequest, $zone); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function insertTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/insertTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $completeOperation = new Operation(); + $completeOperation->setName('customOperations/insertTest'); + $completeOperation->setStatus(Status::DONE); + $operationsTransport->addResponse($completeOperation); + // Mock request + $instanceGroupManager = 'instanceGroupManager-1361249341'; + $instanceGroupManagerResizeRequestResource = new InstanceGroupManagerResizeRequest(); + $project = 'project-309310695'; + $zone = 'zone3744684'; + $response = $gapicClient->insert($instanceGroupManager, $instanceGroupManagerResizeRequestResource, $project, $zone); + $this->assertFalse($response->isDone()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.InstanceGroupManagerResizeRequests/Insert', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInstanceGroupManager(); + $this->assertProtobufEquals($instanceGroupManager, $actualValue); + $actualValue = $actualApiRequestObject->getInstanceGroupManagerResizeRequestResource(); + $this->assertProtobufEquals($instanceGroupManagerResizeRequestResource, $actualValue); + $actualValue = $actualApiRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualApiRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $expectedOperationsRequestObject = new GetZoneOperationRequest(); + $expectedOperationsRequestObject->setOperation($completeOperation->getName()); + $expectedOperationsRequestObject->setProject($project); + $expectedOperationsRequestObject->setZone($zone); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.ZoneOperations/Get', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function insertExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/insertExceptionTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $instanceGroupManager = 'instanceGroupManager-1361249341'; + $instanceGroupManagerResizeRequestResource = new InstanceGroupManagerResizeRequest(); + $project = 'project-309310695'; + $zone = 'zone3744684'; + $response = $gapicClient->insert($instanceGroupManager, $instanceGroupManagerResizeRequestResource, $project, $zone); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $id = 'id3355'; + $kind = 'kind3292052'; + $nextPageToken = ''; + $selfLink = 'selfLink-1691268851'; + $itemsElement = new InstanceGroupManagerResizeRequest(); + $items = [ + $itemsElement, + ]; + $expectedResponse = new InstanceGroupManagerResizeRequestsListResponse(); + $expectedResponse->setId($id); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setItems($items); + $transport->addResponse($expectedResponse); + // Mock request + $instanceGroupManager = 'instanceGroupManager-1361249341'; + $project = 'project-309310695'; + $zone = 'zone3744684'; + $response = $gapicClient->list($instanceGroupManager, $project, $zone); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getItems()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.InstanceGroupManagerResizeRequests/List', $actualFuncCall); + $actualValue = $actualRequestObject->getInstanceGroupManager(); + $this->assertProtobufEquals($instanceGroupManager, $actualValue); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $instanceGroupManager = 'instanceGroupManager-1361249341'; + $project = 'project-309310695'; + $zone = 'zone3744684'; + try { + $gapicClient->list($instanceGroupManager, $project, $zone); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/Compute/tests/Unit/V1/InstanceSettingsServiceClientTest.php b/Compute/tests/Unit/V1/InstanceSettingsServiceClientTest.php new file mode 100644 index 000000000000..d2c5797f9008 --- /dev/null +++ b/Compute/tests/Unit/V1/InstanceSettingsServiceClientTest.php @@ -0,0 +1,252 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return InstanceSettingsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new InstanceSettingsServiceClient($options); + } + + /** @test */ + public function getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $fingerprint = 'fingerprint-1375934236'; + $kind = 'kind3292052'; + $zone2 = 'zone2-696322977'; + $expectedResponse = new InstanceSettings(); + $expectedResponse->setFingerprint($fingerprint); + $expectedResponse->setKind($kind); + $expectedResponse->setZone($zone2); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $zone = 'zone3744684'; + $response = $gapicClient->get($project, $zone); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.InstanceSettingsService/Get', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + $zone = 'zone3744684'; + try { + $gapicClient->get($project, $zone); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function patchTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/patchTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $completeOperation = new Operation(); + $completeOperation->setName('customOperations/patchTest'); + $completeOperation->setStatus(Status::DONE); + $operationsTransport->addResponse($completeOperation); + // Mock request + $instanceSettingsResource = new InstanceSettings(); + $project = 'project-309310695'; + $zone = 'zone3744684'; + $response = $gapicClient->patch($instanceSettingsResource, $project, $zone); + $this->assertFalse($response->isDone()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.InstanceSettingsService/Patch', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInstanceSettingsResource(); + $this->assertProtobufEquals($instanceSettingsResource, $actualValue); + $actualValue = $actualApiRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualApiRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $expectedOperationsRequestObject = new GetZoneOperationRequest(); + $expectedOperationsRequestObject->setOperation($completeOperation->getName()); + $expectedOperationsRequestObject->setProject($project); + $expectedOperationsRequestObject->setZone($zone); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.ZoneOperations/Get', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function patchExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/patchExceptionTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $instanceSettingsResource = new InstanceSettings(); + $project = 'project-309310695'; + $zone = 'zone3744684'; + $response = $gapicClient->patch($instanceSettingsResource, $project, $zone); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/Compute/tests/Unit/V1/NodeGroupsClientTest.php b/Compute/tests/Unit/V1/NodeGroupsClientTest.php index cd63178ab029..dc57bd54c692 100644 --- a/Compute/tests/Unit/V1/NodeGroupsClientTest.php +++ b/Compute/tests/Unit/V1/NodeGroupsClientTest.php @@ -35,6 +35,7 @@ use Google\Cloud\Compute\V1\NodeGroupsClient; use Google\Cloud\Compute\V1\NodeGroupsDeleteNodesRequest; use Google\Cloud\Compute\V1\NodeGroupsListNodes; +use Google\Cloud\Compute\V1\NodeGroupsPerformMaintenanceRequest; use Google\Cloud\Compute\V1\NodeGroupsScopedList; use Google\Cloud\Compute\V1\NodeGroupsSetNodeTemplateRequest; use Google\Cloud\Compute\V1\NodeGroupsSimulateMaintenanceEventRequest; @@ -531,6 +532,7 @@ public function getTest() $id = 3355; $kind = 'kind3292052'; $locationHint = 'locationHint-1796964143'; + $maintenanceInterval = 'maintenanceInterval1477109873'; $maintenancePolicy = 'maintenancePolicy1065198558'; $name = 'name3373707'; $nodeTemplate = 'nodeTemplate323154455'; @@ -545,6 +547,7 @@ public function getTest() $expectedResponse->setId($id); $expectedResponse->setKind($kind); $expectedResponse->setLocationHint($locationHint); + $expectedResponse->setMaintenanceInterval($maintenanceInterval); $expectedResponse->setMaintenancePolicy($maintenancePolicy); $expectedResponse->setName($name); $expectedResponse->setNodeTemplate($nodeTemplate); @@ -1086,6 +1089,129 @@ public function patchExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } + /** @test */ + public function performMaintenanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/performMaintenanceTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $completeOperation = new Operation(); + $completeOperation->setName('customOperations/performMaintenanceTest'); + $completeOperation->setStatus(Status::DONE); + $operationsTransport->addResponse($completeOperation); + // Mock request + $nodeGroup = 'nodeGroup1543699970'; + $nodeGroupsPerformMaintenanceRequestResource = new NodeGroupsPerformMaintenanceRequest(); + $project = 'project-309310695'; + $zone = 'zone3744684'; + $response = $gapicClient->performMaintenance($nodeGroup, $nodeGroupsPerformMaintenanceRequestResource, $project, $zone); + $this->assertFalse($response->isDone()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.NodeGroups/PerformMaintenance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getNodeGroup(); + $this->assertProtobufEquals($nodeGroup, $actualValue); + $actualValue = $actualApiRequestObject->getNodeGroupsPerformMaintenanceRequestResource(); + $this->assertProtobufEquals($nodeGroupsPerformMaintenanceRequestResource, $actualValue); + $actualValue = $actualApiRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualApiRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $expectedOperationsRequestObject = new GetZoneOperationRequest(); + $expectedOperationsRequestObject->setOperation($completeOperation->getName()); + $expectedOperationsRequestObject->setProject($project); + $expectedOperationsRequestObject->setZone($zone); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.ZoneOperations/Get', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function performMaintenanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/performMaintenanceExceptionTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $nodeGroup = 'nodeGroup1543699970'; + $nodeGroupsPerformMaintenanceRequestResource = new NodeGroupsPerformMaintenanceRequest(); + $project = 'project-309310695'; + $zone = 'zone3744684'; + $response = $gapicClient->performMaintenance($nodeGroup, $nodeGroupsPerformMaintenanceRequestResource, $project, $zone); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + /** @test */ public function setIamPolicyTest() { diff --git a/Compute/tests/Unit/V1/PublicDelegatedPrefixesClientTest.php b/Compute/tests/Unit/V1/PublicDelegatedPrefixesClientTest.php index 0c0a5b79a1dc..4e8de23d26a6 100644 --- a/Compute/tests/Unit/V1/PublicDelegatedPrefixesClientTest.php +++ b/Compute/tests/Unit/V1/PublicDelegatedPrefixesClientTest.php @@ -388,6 +388,7 @@ public function getTest() ]); $this->assertTrue($transport->isExhausted()); // Mock response + $allocatablePrefixLength = 1649040182; $byoipApiVersion = 'byoipApiVersion162683283'; $creationTimestamp = 'creationTimestamp567396278'; $description = 'description-1724546052'; @@ -396,12 +397,14 @@ public function getTest() $ipCidrRange = 'ipCidrRange-2049366326'; $isLiveMigration = true; $kind = 'kind3292052'; + $mode = 'mode3357091'; $name = 'name3373707'; $parentPrefix = 'parentPrefix552104903'; $region2 = 'region2-690338393'; $selfLink = 'selfLink-1691268851'; $status = 'status-892481550'; $expectedResponse = new PublicDelegatedPrefix(); + $expectedResponse->setAllocatablePrefixLength($allocatablePrefixLength); $expectedResponse->setByoipApiVersion($byoipApiVersion); $expectedResponse->setCreationTimestamp($creationTimestamp); $expectedResponse->setDescription($description); @@ -410,6 +413,7 @@ public function getTest() $expectedResponse->setIpCidrRange($ipCidrRange); $expectedResponse->setIsLiveMigration($isLiveMigration); $expectedResponse->setKind($kind); + $expectedResponse->setMode($mode); $expectedResponse->setName($name); $expectedResponse->setParentPrefix($parentPrefix); $expectedResponse->setRegion($region2); diff --git a/Compute/tests/Unit/V1/RegionDisksClientTest.php b/Compute/tests/Unit/V1/RegionDisksClientTest.php index 8339dc8c4b88..45f266e1bfff 100644 --- a/Compute/tests/Unit/V1/RegionDisksClientTest.php +++ b/Compute/tests/Unit/V1/RegionDisksClientTest.php @@ -601,6 +601,7 @@ public function getTest() $sourceSnapshotId = 'sourceSnapshotId-1511650478'; $sourceStorageObject = 'sourceStorageObject-303818201'; $status = 'status-892481550'; + $storagePool = 'storagePool897344352'; $type = 'type3575610'; $zone = 'zone3744684'; $expectedResponse = new Disk(); @@ -636,6 +637,7 @@ public function getTest() $expectedResponse->setSourceSnapshotId($sourceSnapshotId); $expectedResponse->setSourceStorageObject($sourceStorageObject); $expectedResponse->setStatus($status); + $expectedResponse->setStoragePool($storagePool); $expectedResponse->setType($type); $expectedResponse->setZone($zone); $transport->addResponse($expectedResponse); diff --git a/Compute/tests/Unit/V1/StoragePoolTypesClientTest.php b/Compute/tests/Unit/V1/StoragePoolTypesClientTest.php new file mode 100644 index 000000000000..5e37e604118c --- /dev/null +++ b/Compute/tests/Unit/V1/StoragePoolTypesClientTest.php @@ -0,0 +1,313 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return StoragePoolTypesClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new StoragePoolTypesClient($options); + } + + /** @test */ + public function aggregatedListTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $id = 'id3355'; + $kind = 'kind3292052'; + $nextPageToken = ''; + $selfLink = 'selfLink-1691268851'; + $items = [ + 'itemsKey' => new StoragePoolTypesScopedList(), + ]; + $expectedResponse = new StoragePoolTypeAggregatedList(); + $expectedResponse->setId($id); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setItems($items); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $response = $gapicClient->aggregatedList($project); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertArrayHasKey('itemsKey', $expectedResponse->getItems()); + $this->assertArrayHasKey('itemsKey', $resources); + $this->assertEquals($expectedResponse->getItems()['itemsKey'], $resources['itemsKey']); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.StoragePoolTypes/AggregatedList', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function aggregatedListExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + try { + $gapicClient->aggregatedList($project); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $creationTimestamp = 'creationTimestamp567396278'; + $description = 'description-1724546052'; + $id = 3355; + $kind = 'kind3292052'; + $maxPoolProvisionedCapacityGb = 1255880909; + $maxPoolProvisionedIops = 1095342084; + $maxPoolProvisionedThroughput = 1302669885; + $minPoolProvisionedCapacityGb = 345848161; + $minPoolProvisionedIops = 1194139030; + $minPoolProvisionedThroughput = 1242850773; + $minSizeGb = 1459020012; + $name = 'name3373707'; + $selfLink = 'selfLink-1691268851'; + $selfLinkWithId = 'selfLinkWithId-1029220862'; + $zone2 = 'zone2-696322977'; + $expectedResponse = new StoragePoolType(); + $expectedResponse->setCreationTimestamp($creationTimestamp); + $expectedResponse->setDescription($description); + $expectedResponse->setId($id); + $expectedResponse->setKind($kind); + $expectedResponse->setMaxPoolProvisionedCapacityGb($maxPoolProvisionedCapacityGb); + $expectedResponse->setMaxPoolProvisionedIops($maxPoolProvisionedIops); + $expectedResponse->setMaxPoolProvisionedThroughput($maxPoolProvisionedThroughput); + $expectedResponse->setMinPoolProvisionedCapacityGb($minPoolProvisionedCapacityGb); + $expectedResponse->setMinPoolProvisionedIops($minPoolProvisionedIops); + $expectedResponse->setMinPoolProvisionedThroughput($minPoolProvisionedThroughput); + $expectedResponse->setMinSizeGb($minSizeGb); + $expectedResponse->setName($name); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setSelfLinkWithId($selfLinkWithId); + $expectedResponse->setZone($zone2); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $storagePoolType = 'storagePoolType1896612025'; + $zone = 'zone3744684'; + $response = $gapicClient->get($project, $storagePoolType, $zone); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.StoragePoolTypes/Get', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getStoragePoolType(); + $this->assertProtobufEquals($storagePoolType, $actualValue); + $actualValue = $actualRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + $storagePoolType = 'storagePoolType1896612025'; + $zone = 'zone3744684'; + try { + $gapicClient->get($project, $storagePoolType, $zone); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $id = 'id3355'; + $kind = 'kind3292052'; + $nextPageToken = ''; + $selfLink = 'selfLink-1691268851'; + $itemsElement = new StoragePoolType(); + $items = [ + $itemsElement, + ]; + $expectedResponse = new StoragePoolTypeList(); + $expectedResponse->setId($id); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setItems($items); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $zone = 'zone3744684'; + $response = $gapicClient->list($project, $zone); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getItems()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.StoragePoolTypes/List', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + $zone = 'zone3744684'; + try { + $gapicClient->list($project, $zone); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/Compute/tests/Unit/V1/StoragePoolsClientTest.php b/Compute/tests/Unit/V1/StoragePoolsClientTest.php new file mode 100644 index 000000000000..29711d1cdee2 --- /dev/null +++ b/Compute/tests/Unit/V1/StoragePoolsClientTest.php @@ -0,0 +1,975 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return StoragePoolsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new StoragePoolsClient($options); + } + + /** @test */ + public function aggregatedListTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $etag = 'etag3123477'; + $id = 'id3355'; + $kind = 'kind3292052'; + $nextPageToken = ''; + $selfLink = 'selfLink-1691268851'; + $items = [ + 'itemsKey' => new StoragePoolsScopedList(), + ]; + $expectedResponse = new StoragePoolAggregatedList(); + $expectedResponse->setEtag($etag); + $expectedResponse->setId($id); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setItems($items); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $response = $gapicClient->aggregatedList($project); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertArrayHasKey('itemsKey', $expectedResponse->getItems()); + $this->assertArrayHasKey('itemsKey', $resources); + $this->assertEquals($expectedResponse->getItems()['itemsKey'], $resources['itemsKey']); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.StoragePools/AggregatedList', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function aggregatedListExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + try { + $gapicClient->aggregatedList($project); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/deleteTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $completeOperation = new Operation(); + $completeOperation->setName('customOperations/deleteTest'); + $completeOperation->setStatus(Status::DONE); + $operationsTransport->addResponse($completeOperation); + // Mock request + $project = 'project-309310695'; + $storagePool = 'storagePool897344352'; + $zone = 'zone3744684'; + $response = $gapicClient->delete($project, $storagePool, $zone); + $this->assertFalse($response->isDone()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.StoragePools/Delete', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualApiRequestObject->getStoragePool(); + $this->assertProtobufEquals($storagePool, $actualValue); + $actualValue = $actualApiRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $expectedOperationsRequestObject = new GetZoneOperationRequest(); + $expectedOperationsRequestObject->setOperation($completeOperation->getName()); + $expectedOperationsRequestObject->setProject($project); + $expectedOperationsRequestObject->setZone($zone); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.ZoneOperations/Get', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/deleteExceptionTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + $storagePool = 'storagePool897344352'; + $zone = 'zone3744684'; + $response = $gapicClient->delete($project, $storagePool, $zone); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $capacityProvisioningType = 'capacityProvisioningType1325352199'; + $creationTimestamp = 'creationTimestamp567396278'; + $description = 'description-1724546052'; + $id = 3355; + $kind = 'kind3292052'; + $labelFingerprint = 'labelFingerprint714995737'; + $name = 'name3373707'; + $performanceProvisioningType = 'performanceProvisioningType1542295293'; + $poolProvisionedCapacityGb = 1132075054; + $poolProvisionedIops = 1185834135; + $poolProvisionedThroughput = 1779828376; + $selfLink = 'selfLink-1691268851'; + $selfLinkWithId = 'selfLinkWithId-1029220862'; + $state = 'state109757585'; + $storagePoolType = 'storagePoolType1896612025'; + $zone2 = 'zone2-696322977'; + $expectedResponse = new StoragePool(); + $expectedResponse->setCapacityProvisioningType($capacityProvisioningType); + $expectedResponse->setCreationTimestamp($creationTimestamp); + $expectedResponse->setDescription($description); + $expectedResponse->setId($id); + $expectedResponse->setKind($kind); + $expectedResponse->setLabelFingerprint($labelFingerprint); + $expectedResponse->setName($name); + $expectedResponse->setPerformanceProvisioningType($performanceProvisioningType); + $expectedResponse->setPoolProvisionedCapacityGb($poolProvisionedCapacityGb); + $expectedResponse->setPoolProvisionedIops($poolProvisionedIops); + $expectedResponse->setPoolProvisionedThroughput($poolProvisionedThroughput); + $expectedResponse->setSelfLink($selfLink); + $expectedResponse->setSelfLinkWithId($selfLinkWithId); + $expectedResponse->setState($state); + $expectedResponse->setStoragePoolType($storagePoolType); + $expectedResponse->setZone($zone2); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $storagePool = 'storagePool897344352'; + $zone = 'zone3744684'; + $response = $gapicClient->get($project, $storagePool, $zone); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.StoragePools/Get', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getStoragePool(); + $this->assertProtobufEquals($storagePool, $actualValue); + $actualValue = $actualRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + $storagePool = 'storagePool897344352'; + $zone = 'zone3744684'; + try { + $gapicClient->get($project, $storagePool, $zone); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 + $etag = 'etag3123477'; + $iamOwned = false; + $version = 351608024; + $expectedResponse = new Policy(); + $expectedResponse->setEtag($etag); + $expectedResponse->setIamOwned($iamOwned); + $expectedResponse->setVersion($version); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $resource = 'resource-341064690'; + $zone = 'zone3744684'; + $response = $gapicClient->getIamPolicy($project, $resource, $zone); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.StoragePools/GetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getZone(); + $this->assertProtobufEquals($zone, $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 + $project = 'project-309310695'; + $resource = 'resource-341064690'; + $zone = 'zone3744684'; + try { + $gapicClient->getIamPolicy($project, $resource, $zone); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function insertTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/insertTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $completeOperation = new Operation(); + $completeOperation->setName('customOperations/insertTest'); + $completeOperation->setStatus(Status::DONE); + $operationsTransport->addResponse($completeOperation); + // Mock request + $project = 'project-309310695'; + $storagePoolResource = new StoragePool(); + $zone = 'zone3744684'; + $response = $gapicClient->insert($project, $storagePoolResource, $zone); + $this->assertFalse($response->isDone()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.StoragePools/Insert', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualApiRequestObject->getStoragePoolResource(); + $this->assertProtobufEquals($storagePoolResource, $actualValue); + $actualValue = $actualApiRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $expectedOperationsRequestObject = new GetZoneOperationRequest(); + $expectedOperationsRequestObject->setOperation($completeOperation->getName()); + $expectedOperationsRequestObject->setProject($project); + $expectedOperationsRequestObject->setZone($zone); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.ZoneOperations/Get', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function insertExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/insertExceptionTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + $storagePoolResource = new StoragePool(); + $zone = 'zone3744684'; + $response = $gapicClient->insert($project, $storagePoolResource, $zone); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function listTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $etag = 'etag3123477'; + $id = 'id3355'; + $kind = 'kind3292052'; + $nextPageToken = 'nextPageToken-1530815211'; + $selfLink = 'selfLink-1691268851'; + $expectedResponse = new StoragePoolList(); + $expectedResponse->setEtag($etag); + $expectedResponse->setId($id); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSelfLink($selfLink); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $zone = 'zone3744684'; + $response = $gapicClient->list($project, $zone); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.StoragePools/List', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + $zone = 'zone3744684'; + try { + $gapicClient->list($project, $zone); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDisksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $etag = 'etag3123477'; + $id = 'id3355'; + $kind = 'kind3292052'; + $nextPageToken = 'nextPageToken-1530815211'; + $selfLink = 'selfLink-1691268851'; + $expectedResponse = new StoragePoolListDisks(); + $expectedResponse->setEtag($etag); + $expectedResponse->setId($id); + $expectedResponse->setKind($kind); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSelfLink($selfLink); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $storagePool = 'storagePool897344352'; + $zone = 'zone3744684'; + $response = $gapicClient->listDisks($project, $storagePool, $zone); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.StoragePools/ListDisks', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getStoragePool(); + $this->assertProtobufEquals($storagePool, $actualValue); + $actualValue = $actualRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDisksExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + $storagePool = 'storagePool897344352'; + $zone = 'zone3744684'; + try { + $gapicClient->listDisks($project, $storagePool, $zone); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 + $etag = 'etag3123477'; + $iamOwned = false; + $version = 351608024; + $expectedResponse = new Policy(); + $expectedResponse->setEtag($etag); + $expectedResponse->setIamOwned($iamOwned); + $expectedResponse->setVersion($version); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $resource = 'resource-341064690'; + $zone = 'zone3744684'; + $zoneSetPolicyRequestResource = new ZoneSetPolicyRequest(); + $response = $gapicClient->setIamPolicy($project, $resource, $zone, $zoneSetPolicyRequestResource); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.StoragePools/SetIamPolicy', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $actualValue = $actualRequestObject->getZoneSetPolicyRequestResource(); + $this->assertProtobufEquals($zoneSetPolicyRequestResource, $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 + $project = 'project-309310695'; + $resource = 'resource-341064690'; + $zone = 'zone3744684'; + $zoneSetPolicyRequestResource = new ZoneSetPolicyRequest(); + try { + $gapicClient->setIamPolicy($project, $resource, $zone, $zoneSetPolicyRequestResource); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 TestPermissionsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $project = 'project-309310695'; + $resource = 'resource-341064690'; + $testPermissionsRequestResource = new TestPermissionsRequest(); + $zone = 'zone3744684'; + $response = $gapicClient->testIamPermissions($project, $resource, $testPermissionsRequestResource, $zone); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.StoragePools/TestIamPermissions', $actualFuncCall); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getResource(); + $this->assertProtobufEquals($resource, $actualValue); + $actualValue = $actualRequestObject->getTestPermissionsRequestResource(); + $this->assertProtobufEquals($testPermissionsRequestResource, $actualValue); + $actualValue = $actualRequestObject->getZone(); + $this->assertProtobufEquals($zone, $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 + $project = 'project-309310695'; + $resource = 'resource-341064690'; + $testPermissionsRequestResource = new TestPermissionsRequest(); + $zone = 'zone3744684'; + try { + $gapicClient->testIamPermissions($project, $resource, $testPermissionsRequestResource, $zone); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/updateTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $completeOperation = new Operation(); + $completeOperation->setName('customOperations/updateTest'); + $completeOperation->setStatus(Status::DONE); + $operationsTransport->addResponse($completeOperation); + // Mock request + $project = 'project-309310695'; + $storagePool = 'storagePool897344352'; + $storagePoolResource = new StoragePool(); + $zone = 'zone3744684'; + $response = $gapicClient->update($project, $storagePool, $storagePoolResource, $zone); + $this->assertFalse($response->isDone()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.StoragePools/Update', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualApiRequestObject->getStoragePool(); + $this->assertProtobufEquals($storagePool, $actualValue); + $actualValue = $actualApiRequestObject->getStoragePoolResource(); + $this->assertProtobufEquals($storagePoolResource, $actualValue); + $actualValue = $actualApiRequestObject->getZone(); + $this->assertProtobufEquals($zone, $actualValue); + $expectedOperationsRequestObject = new GetZoneOperationRequest(); + $expectedOperationsRequestObject->setOperation($completeOperation->getName()); + $expectedOperationsRequestObject->setProject($project); + $expectedOperationsRequestObject->setZone($zone); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.compute.v1.ZoneOperations/Get', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new ZoneOperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('customOperations/updateExceptionTest'); + $incompleteOperation->setStatus(Status::RUNNING); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $project = 'project-309310695'; + $storagePool = 'storagePool897344352'; + $storagePoolResource = new StoragePool(); + $zone = 'zone3744684'; + $response = $gapicClient->update($project, $storagePool, $storagePoolResource, $zone); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} From f7c3fd6dac581b5a91f54d2e66fcbc5c8bef5812 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 17:03:32 +0530 Subject: [PATCH 73/86] docs: Update description on allowed_locations in LocationPolicy field (#7270) PiperOrigin-RevId: 629311450 Source-Link: https://github.com/googleapis/googleapis/commit/869b3b21be14ccf6dbc6eb35f0be75e5bdae1c48 Source-Link: https://github.com/googleapis/googleapis-gen/commit/5ed7b07789fba5481e8b0a0a57dfbe11c49af647 Copy-Tag: eyJwIjoiQmF0Y2gvLk93bEJvdC55YW1sIiwiaCI6IjVlZDdiMDc3ODlmYmE1NDgxZThiMGEwYTU3ZGZiZTExYzQ5YWY2NDcifQ== --- .../V1/AllocationPolicy/LocationPolicy.php | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Batch/src/V1/AllocationPolicy/LocationPolicy.php b/Batch/src/V1/AllocationPolicy/LocationPolicy.php index 16a06d0b139a..29d040eefc85 100644 --- a/Batch/src/V1/AllocationPolicy/LocationPolicy.php +++ b/Batch/src/V1/AllocationPolicy/LocationPolicy.php @@ -21,11 +21,11 @@ class LocationPolicy extends \Google\Protobuf\Internal\Message * ["regions/us-central1"] allow VMs in any zones in region us-central1. * ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs * in zones us-central1-a and us-central1-c. - * All locations end up in different regions would cause errors. + * Mixing locations from different regions would cause errors. * For example, * ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", - * "zones/us-west1-a"] contains 2 regions "us-central1" and - * "us-west1". An error is expected in this case. + * "zones/us-west1-a"] contains locations from two distinct regions: + * us-central1 and us-west1. This combination will trigger an error. * * Generated from protobuf field repeated string allowed_locations = 1; */ @@ -45,11 +45,11 @@ class LocationPolicy extends \Google\Protobuf\Internal\Message * ["regions/us-central1"] allow VMs in any zones in region us-central1. * ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs * in zones us-central1-a and us-central1-c. - * All locations end up in different regions would cause errors. + * Mixing locations from different regions would cause errors. * For example, * ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", - * "zones/us-west1-a"] contains 2 regions "us-central1" and - * "us-west1". An error is expected in this case. + * "zones/us-west1-a"] contains locations from two distinct regions: + * us-central1 and us-west1. This combination will trigger an error. * } */ public function __construct($data = NULL) { @@ -65,11 +65,11 @@ public function __construct($data = NULL) { * ["regions/us-central1"] allow VMs in any zones in region us-central1. * ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs * in zones us-central1-a and us-central1-c. - * All locations end up in different regions would cause errors. + * Mixing locations from different regions would cause errors. * For example, * ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", - * "zones/us-west1-a"] contains 2 regions "us-central1" and - * "us-west1". An error is expected in this case. + * "zones/us-west1-a"] contains locations from two distinct regions: + * us-central1 and us-west1. This combination will trigger an error. * * Generated from protobuf field repeated string allowed_locations = 1; * @return \Google\Protobuf\Internal\RepeatedField @@ -87,11 +87,11 @@ public function getAllowedLocations() * ["regions/us-central1"] allow VMs in any zones in region us-central1. * ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs * in zones us-central1-a and us-central1-c. - * All locations end up in different regions would cause errors. + * Mixing locations from different regions would cause errors. * For example, * ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b", - * "zones/us-west1-a"] contains 2 regions "us-central1" and - * "us-west1". An error is expected in this case. + * "zones/us-west1-a"] contains locations from two distinct regions: + * us-central1 and us-west1. This combination will trigger an error. * * Generated from protobuf field repeated string allowed_locations = 1; * @param array|\Google\Protobuf\Internal\RepeatedField $var From d590f0efeea3b6d4e83c79677d8cdb429c7abc75 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Tue, 30 Apr 2024 10:53:08 -0700 Subject: [PATCH 74/86] fix(dev): add grpc ext to docs container (#6595) --- .kokoro/docs/docker/Dockerfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.kokoro/docs/docker/Dockerfile b/.kokoro/docs/docker/Dockerfile index e28028857add..71229ad44422 100644 --- a/.kokoro/docs/docker/Dockerfile +++ b/.kokoro/docs/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM gcr.io/gcp-runtimes/ubuntu_16_0_4 +FROM gcr.io/gcp-runtimes/ubuntu_20_0_4 ENV PHP_DIR=/opt/php80 ENV PHP_VERSION=8.1.18 ENV PHP_SRC_DIR=/usr/local/src/php81-build @@ -21,6 +21,7 @@ RUN apt-get update && \ libkrb5-dev \ libmcrypt-dev \ libpq-dev \ + libsodium-dev \ libssl-dev \ libxml2-dev \ libzip-dev \ @@ -75,11 +76,16 @@ RUN ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a && \ --with-kerberos \ --without-sqlite3 \ --without-pdo-sqlite \ - --with-pear && \ + --with-pear \ + --with-sodium && \ make && \ make install && \ cp php.ini-production ${PHP_DIR}/lib/php.ini +# Install gRPC +RUN pecl install grpc && \ + echo 'extension=grpc.so' >> ${PHP_DIR}/lib/conf.d/ext-grpc.ini + # Install composer RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \ php -r "if (hash_file('SHA384', 'composer-setup.php') === rtrim(file_get_contents('https://composer.github.io/installer.sig'))) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \ From 4a435ea14eef0314511ff03ba26ae21139f6da1a Mon Sep 17 00:00:00 2001 From: Yash Sahu <54198301+yash30201@users.noreply.github.com> Date: Tue, 30 Apr 2024 23:40:27 +0530 Subject: [PATCH 75/86] feat: Introduce ShoppingMerchantConversions (#7269) --- ShoppingMerchantConversions/.OwlBot.yaml | 4 + ShoppingMerchantConversions/.gitattributes | 8 + .../.github/pull_request_template.md | 24 + .../.repo-metadata.json | 8 + ShoppingMerchantConversions/CONTRIBUTING.md | 10 + ShoppingMerchantConversions/LICENSE | 202 +++++++ ShoppingMerchantConversions/README.md | 45 ++ ShoppingMerchantConversions/VERSION | 1 + ShoppingMerchantConversions/composer.json | 30 + .../metadata/V1Beta/Conversionsources.php | Bin 0 -> 5990 bytes ShoppingMerchantConversions/owlbot.py | 62 ++ ShoppingMerchantConversions/phpunit.xml.dist | 16 + .../create_conversion_source.php | 74 +++ .../delete_conversion_source.php | 76 +++ .../get_conversion_source.php | 75 +++ .../list_conversion_sources.php | 77 +++ .../undelete_conversion_source.php | 76 +++ .../update_conversion_source.php | 63 +++ .../src/V1beta/AttributionSettings.php | 148 +++++ .../AttributionSettings/AttributionModel.php | 99 ++++ .../AttributionSettings/ConversionType.php | 106 ++++ .../Client/ConversionSourcesServiceClient.php | 434 ++++++++++++++ .../src/V1beta/ConversionSource.php | 291 ++++++++++ .../V1beta/ConversionSource/Controller.php | 62 ++ .../src/V1beta/ConversionSource/State.php | 70 +++ .../V1beta/CreateConversionSourceRequest.php | 137 +++++ .../V1beta/DeleteConversionSourceRequest.php | 86 +++ .../src/V1beta/GetConversionSourceRequest.php | 86 +++ .../src/V1beta/GoogleAnalyticsLink.php | 154 +++++ .../V1beta/ListConversionSourcesRequest.php | 204 +++++++ .../V1beta/ListConversionSourcesResponse.php | 101 ++++ .../src/V1beta/MerchantCenterDestination.php | 201 +++++++ .../UndeleteConversionSourceRequest.php | 71 +++ .../V1beta/UpdateConversionSourceRequest.php | 141 +++++ .../src/V1beta/gapic_metadata.json | 48 ++ ...version_sources_service_client_config.json | 64 +++ ...sion_sources_service_descriptor_config.php | 113 ++++ ...ion_sources_service_rest_client_config.php | 102 ++++ .../ConversionSourcesServiceClientTest.php | 535 ++++++++++++++++++ composer.json | 5 +- 40 files changed, 4108 insertions(+), 1 deletion(-) create mode 100644 ShoppingMerchantConversions/.OwlBot.yaml create mode 100644 ShoppingMerchantConversions/.gitattributes create mode 100644 ShoppingMerchantConversions/.github/pull_request_template.md create mode 100644 ShoppingMerchantConversions/.repo-metadata.json create mode 100644 ShoppingMerchantConversions/CONTRIBUTING.md create mode 100644 ShoppingMerchantConversions/LICENSE create mode 100644 ShoppingMerchantConversions/README.md create mode 100644 ShoppingMerchantConversions/VERSION create mode 100644 ShoppingMerchantConversions/composer.json create mode 100644 ShoppingMerchantConversions/metadata/V1Beta/Conversionsources.php create mode 100644 ShoppingMerchantConversions/owlbot.py create mode 100644 ShoppingMerchantConversions/phpunit.xml.dist create mode 100644 ShoppingMerchantConversions/samples/V1beta/ConversionSourcesServiceClient/create_conversion_source.php create mode 100644 ShoppingMerchantConversions/samples/V1beta/ConversionSourcesServiceClient/delete_conversion_source.php create mode 100644 ShoppingMerchantConversions/samples/V1beta/ConversionSourcesServiceClient/get_conversion_source.php create mode 100644 ShoppingMerchantConversions/samples/V1beta/ConversionSourcesServiceClient/list_conversion_sources.php create mode 100644 ShoppingMerchantConversions/samples/V1beta/ConversionSourcesServiceClient/undelete_conversion_source.php create mode 100644 ShoppingMerchantConversions/samples/V1beta/ConversionSourcesServiceClient/update_conversion_source.php create mode 100644 ShoppingMerchantConversions/src/V1beta/AttributionSettings.php create mode 100644 ShoppingMerchantConversions/src/V1beta/AttributionSettings/AttributionModel.php create mode 100644 ShoppingMerchantConversions/src/V1beta/AttributionSettings/ConversionType.php create mode 100644 ShoppingMerchantConversions/src/V1beta/Client/ConversionSourcesServiceClient.php create mode 100644 ShoppingMerchantConversions/src/V1beta/ConversionSource.php create mode 100644 ShoppingMerchantConversions/src/V1beta/ConversionSource/Controller.php create mode 100644 ShoppingMerchantConversions/src/V1beta/ConversionSource/State.php create mode 100644 ShoppingMerchantConversions/src/V1beta/CreateConversionSourceRequest.php create mode 100644 ShoppingMerchantConversions/src/V1beta/DeleteConversionSourceRequest.php create mode 100644 ShoppingMerchantConversions/src/V1beta/GetConversionSourceRequest.php create mode 100644 ShoppingMerchantConversions/src/V1beta/GoogleAnalyticsLink.php create mode 100644 ShoppingMerchantConversions/src/V1beta/ListConversionSourcesRequest.php create mode 100644 ShoppingMerchantConversions/src/V1beta/ListConversionSourcesResponse.php create mode 100644 ShoppingMerchantConversions/src/V1beta/MerchantCenterDestination.php create mode 100644 ShoppingMerchantConversions/src/V1beta/UndeleteConversionSourceRequest.php create mode 100644 ShoppingMerchantConversions/src/V1beta/UpdateConversionSourceRequest.php create mode 100644 ShoppingMerchantConversions/src/V1beta/gapic_metadata.json create mode 100644 ShoppingMerchantConversions/src/V1beta/resources/conversion_sources_service_client_config.json create mode 100644 ShoppingMerchantConversions/src/V1beta/resources/conversion_sources_service_descriptor_config.php create mode 100644 ShoppingMerchantConversions/src/V1beta/resources/conversion_sources_service_rest_client_config.php create mode 100644 ShoppingMerchantConversions/tests/Unit/V1beta/Client/ConversionSourcesServiceClientTest.php diff --git a/ShoppingMerchantConversions/.OwlBot.yaml b/ShoppingMerchantConversions/.OwlBot.yaml new file mode 100644 index 000000000000..b290d66e95ad --- /dev/null +++ b/ShoppingMerchantConversions/.OwlBot.yaml @@ -0,0 +1,4 @@ +deep-copy-regex: + - source: /google/shopping/merchant/conversions/(v1|v1beta)/.*-php/(.*) + dest: /owl-bot-staging/ShoppingMerchantConversions/$1/$2 +api-name: ShoppingMerchantConversions diff --git a/ShoppingMerchantConversions/.gitattributes b/ShoppingMerchantConversions/.gitattributes new file mode 100644 index 000000000000..8119e7fcc1b2 --- /dev/null +++ b/ShoppingMerchantConversions/.gitattributes @@ -0,0 +1,8 @@ +/*.xml.dist export-ignore +/.OwlBot.yaml export-ignore +/.github export-ignore +/.repo-metadata.json export-ignore +/owlbot.py export-ignore +/src/**/gapic_metadata.json export-ignore +/samples export-ignore +/tests export-ignore diff --git a/ShoppingMerchantConversions/.github/pull_request_template.md b/ShoppingMerchantConversions/.github/pull_request_template.md new file mode 100644 index 000000000000..ad03e9192009 --- /dev/null +++ b/ShoppingMerchantConversions/.github/pull_request_template.md @@ -0,0 +1,24 @@ +**PLEASE READ THIS ENTIRE MESSAGE** + +Hello, and thank you for your contribution! Please note that this repository is +a read-only split of `googleapis/google-cloud-php`. As such, we are +unable to accept pull requests to this repository. + +We welcome your pull request and would be happy to consider it for inclusion in +our library if you follow these steps: + +* Clone the parent client library repository: + +```sh +$ git clone git@github.com:googleapis/google-cloud-php.git +``` + +* Move your changes into the correct location in that library. Library code +belongs in `ShoppingMerchantConversions/src`, and tests in `ShoppingMerchantConversions/tests`. + +* Push the changes in a new branch to a fork, and open a new pull request +[here](https://github.com/googleapis/google-cloud-php). + +Thanks again, and we look forward to seeing your proposed change! + +The Google Cloud PHP team diff --git a/ShoppingMerchantConversions/.repo-metadata.json b/ShoppingMerchantConversions/.repo-metadata.json new file mode 100644 index 000000000000..13805bce874f --- /dev/null +++ b/ShoppingMerchantConversions/.repo-metadata.json @@ -0,0 +1,8 @@ +{ + "language": "php", + "distribution_name": "google/shopping-merchant-conversions", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/shopping-merchant-conversions/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "merchantapi" +} diff --git a/ShoppingMerchantConversions/CONTRIBUTING.md b/ShoppingMerchantConversions/CONTRIBUTING.md new file mode 100644 index 000000000000..76ea811cacdb --- /dev/null +++ b/ShoppingMerchantConversions/CONTRIBUTING.md @@ -0,0 +1,10 @@ +# How to Contribute + +We'd love to accept your patches and contributions to this project. We accept +and review pull requests against the main +[Google Cloud PHP](https://github.com/googleapis/google-cloud-php) +repository, which contains all of our client libraries. You will also need to +sign a Contributor License Agreement. For more details about how to contribute, +see the +[CONTRIBUTING.md](https://github.com/googleapis/google-cloud-php/blob/main/CONTRIBUTING.md) +file in the main Google Cloud PHP repository. diff --git a/ShoppingMerchantConversions/LICENSE b/ShoppingMerchantConversions/LICENSE new file mode 100644 index 000000000000..8f71f43fee3f --- /dev/null +++ b/ShoppingMerchantConversions/LICENSE @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/ShoppingMerchantConversions/README.md b/ShoppingMerchantConversions/README.md new file mode 100644 index 000000000000..197c1365dde8 --- /dev/null +++ b/ShoppingMerchantConversions/README.md @@ -0,0 +1,45 @@ +# Google Shopping Merchant Conversions for PHP + +> Idiomatic PHP client for [Google Shopping Merchant Conversions](https://developers.google.com/merchant/api). + +[![Latest Stable Version](https://poser.pugx.org/google/shopping-merchant-conversions/v/stable)](https://packagist.org/packages/google/shopping-merchant-conversions) [![Packagist](https://img.shields.io/packagist/dm/google/shopping-merchant-conversions.svg)](https://packagist.org/packages/google/shopping-merchant-conversions) + +* [API documentation](https://cloud.google.com/php/docs/reference/shopping-merchant-conversions/latest) + +**NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any +support requests, bug reports, or development contributions should be directed to +that project. + +### Installation + +To begin, install the preferred dependency manager for PHP, [Composer](https://getcomposer.org/). + +Now, install this component: + +```sh +$ composer require google/shopping-merchant-conversions +``` + +> Browse the complete list of [Google Cloud APIs](https://cloud.google.com/php/docs/reference) +> for PHP + +This component supports both REST over HTTP/1.1 and gRPC. In order to take advantage of the benefits +offered by gRPC (such as streaming methods) please see our +[gRPC installation guide](https://cloud.google.com/php/grpc). + +### Authentication + +Please see our [Authentication guide](https://github.com/googleapis/google-cloud-php/blob/main/AUTHENTICATION.md) for more information +on authenticating your client. Once authenticated, you'll be ready to start making requests. + +### Sample + +See the [samples directory](https://github.com/googleapis/php-shopping-merchant-conversions/tree/main/samples) for a canonical list of samples. + +### Version + +This component is considered alpha. As such, it is still a work-in-progress and is more likely to get backwards-incompatible updates. + +### Next Steps + +1. Understand the [official documentation](https://developers.google.com/merchant/api). diff --git a/ShoppingMerchantConversions/VERSION b/ShoppingMerchantConversions/VERSION new file mode 100644 index 000000000000..77d6f4ca2371 --- /dev/null +++ b/ShoppingMerchantConversions/VERSION @@ -0,0 +1 @@ +0.0.0 diff --git a/ShoppingMerchantConversions/composer.json b/ShoppingMerchantConversions/composer.json new file mode 100644 index 000000000000..8cebf17e357e --- /dev/null +++ b/ShoppingMerchantConversions/composer.json @@ -0,0 +1,30 @@ +{ + "name": "google/shopping-merchant-conversions", + "description": "Google Shopping Merchant Conversions Client for PHP", + "license": "Apache-2.0", + "minimum-stability": "stable", + "autoload": { + "psr-4": { + "Google\\Shopping\\Merchant\\Conversions\\": "src", + "GPBMetadata\\Google\\Shopping\\Merchant\\Conversions\\": "metadata" + } + }, + "extra": { + "component": { + "id": "shopping-merchant-conversions", + "path": "ShoppingMerchantConversions", + "target": "googleapis/php-shopping-merchant-conversions" + } + }, + "require": { + "php": "^8.0", + "google/gax": "^1.32.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "suggest": { + "ext-grpc": "Enables use of gRPC, a universal high-performance RPC framework created by Google.", + "ext-protobuf": "Provides a significant increase in throughput over the pure PHP protobuf implementation. See https://cloud.google.com/php/grpc for installation instructions." + } +} diff --git a/ShoppingMerchantConversions/metadata/V1Beta/Conversionsources.php b/ShoppingMerchantConversions/metadata/V1Beta/Conversionsources.php new file mode 100644 index 0000000000000000000000000000000000000000..2f8bacb6e695d6a6fd5456f13d98d3f63efce7e0 GIT binary patch literal 5990 zcmcgw&u<%59%q~;Oq#;Mm4?Kt)Ewc>I!#GM*V` zo*P1y%N|x*X%9&7SD@AIW&Z;t4%~oSFUw)2mALGULr;9)n;)LoV-b@;RjKa0_x*f- zf4=X%xBl$xJLpBRLM-BHl=Q{kkx2K6=(skub=wqs!`)rtin={;43oHdQ7kvadZQyM z z+!U!hBysJc=n^_~t$W;V25=nx>L!Fza*VEISvHFTi45M*n%Egi!#UZcndvw8Oi6+T=-QVBp-HYKJ3tZtV8pDhi0D(G-{4f(0RW77R^2% zTi9huReM2JgALbX8{8mu!P1Rji8nj+MuD*81dAboM2kN908%ifI@&?QIQtuNUoD{Y zsPEgn@9{3W=BrgT=)xoDdQUYC>mV~H3Tw+7Z|D8hQ-vj8;Y=ijKsCTA&HX6N-+u}Z z(2X#lst)}@T(u8XU|77xG8eeEt(mliJSTHF;Exau)Llgv7+Gcnz+EaW{3wALi}(XH z&sc+G=Hc@*8}dx*#zU8HGbrZY9DV~WlTRJPB`OPgW`TQ?4dKI#>r8Hn;+oG;* z!sy6c1nj=?^oGS&HeuZx*}2P8oeQ#0c}E| zy7oML2Z`F~vufJ*K~K{U)I-DS+lL@~R%mrtu1W2VD%Yy= zyHItoDwW%6v!!e)t(H=bucq)Sx_(l&EOjKc+=9BVr{^b^x2mlOdjV(A)sxb-YF&|9 z>5EuIH&3oK8|^Chpd_`Sr52f8CwFwJ+lpFNWa&YADfdqST}dENd;={5fjGpaN2<~1 z#Wlx5pMub19bJvrmlu>NkMXSR9ZN)5?mSDt9gCp_d@L;a$@@+~*QatY1Zp`>@IDdq zO85h8PT}k5Qs3|#Q#(@mAYkK++noaXdRia4F0u3@RfoRe!^dCCeJ!9>*(E^iql)%9 zqeVU$!id2#T5vQFron7^9WwDmx`SupvX4-VlLDR!a<(~BmyTP>DIoW6@M6aS9-Hb# zq5&*N%Nyrl0Go$Hu3u#bl)$sec^I7{eY1OLwMFstpt&uX^Q0f==mKBxbpYa zqM~et(DCGiC3FsM{7XPLYlb(W!V7hrOPQ{qB}dyMst30}o(WG!AXVA3`IfUEOBtV$Zcl{oFF*YE zi&Q=LX6&F8y)r!Vg*KyO)q28tsyNA0_#Y6KWOkV`EXg3}6qdgVkEPX#fZUGJ5)aPD z8}B9tXF@X1#z-t!F{z+z3hT#7;rd2EE6KDrW4Mw*!f>sG6&c+&_}xBt|FOicLfqSX z>&c~X8sG5G0?JI|PFxGspX%N+4JLHvj4iRvovq|bu_TS^{xr@Ohry623hVfP>|{1c z=eRPH&j|?UukR_&pN8tP zm2ai&^b6_tQuo$ArH)rD6b=s$gK$LGRc%Q3S+!9(8J7MdAox9)C1j-)d3+2t*&At7 z`0xYWw1@o=jNOg*>|c3E2D2vLlAYeY5vzGl?oMm3W e6+On?_8(niZ?x>C#n2PpXZcS59rYL;BlHUyW literal 0 HcmV?d00001 diff --git a/ShoppingMerchantConversions/owlbot.py b/ShoppingMerchantConversions/owlbot.py new file mode 100644 index 000000000000..bf76a9c5dbb8 --- /dev/null +++ b/ShoppingMerchantConversions/owlbot.py @@ -0,0 +1,62 @@ +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""This script is used to synthesize generated parts of this library.""" + +import logging +from pathlib import Path +import subprocess + +import synthtool as s +from synthtool.languages import php +from synthtool import _tracked_paths + +logging.basicConfig(level=logging.DEBUG) + +src = Path(f"../{php.STAGING_DIR}/ShoppingMerchantConversions").resolve() +dest = Path().resolve() + +# Added so that we can pass copy_excludes in the owlbot_main() call +_tracked_paths.add(src) + +php.owlbot_main( + src=src, + dest=dest, + copy_excludes=[ + src / "**/[A-Z]*_*.php", + ] +) + +# remove class_alias code +s.replace( + "src/V*/**/*.php", + r"^// Adding a class alias for backwards compatibility with the previous class name.$" + + "\n" + + r"^class_alias\(.*\);$" + + "\n", + '') + +# format generated clients +subprocess.run([ + 'npm', + 'exec', + '--yes', + '--package=@prettier/plugin-php@^0.16', + '--', + 'prettier', + '**/Client/*', + '--write', + '--parser=php', + '--single-quote', + '--print-width=120']) diff --git a/ShoppingMerchantConversions/phpunit.xml.dist b/ShoppingMerchantConversions/phpunit.xml.dist new file mode 100644 index 000000000000..8f3a876186f7 --- /dev/null +++ b/ShoppingMerchantConversions/phpunit.xml.dist @@ -0,0 +1,16 @@ + + + + + src + + + src/V[!a-zA-Z]* + + + + + tests/Unit + + + diff --git a/ShoppingMerchantConversions/samples/V1beta/ConversionSourcesServiceClient/create_conversion_source.php b/ShoppingMerchantConversions/samples/V1beta/ConversionSourcesServiceClient/create_conversion_source.php new file mode 100644 index 000000000000..628d66f3749c --- /dev/null +++ b/ShoppingMerchantConversions/samples/V1beta/ConversionSourcesServiceClient/create_conversion_source.php @@ -0,0 +1,74 @@ +setParent($formattedParent) + ->setConversionSource($conversionSource); + + // Call the API and handle any network failures. + try { + /** @var ConversionSource $response */ + $response = $conversionSourcesServiceClient->createConversionSource($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ConversionSourcesServiceClient::accountName('[ACCOUNT]'); + + create_conversion_source_sample($formattedParent); +} +// [END merchantapi_v1beta_generated_ConversionSourcesService_CreateConversionSource_sync] diff --git a/ShoppingMerchantConversions/samples/V1beta/ConversionSourcesServiceClient/delete_conversion_source.php b/ShoppingMerchantConversions/samples/V1beta/ConversionSourcesServiceClient/delete_conversion_source.php new file mode 100644 index 000000000000..7e8f6058bf70 --- /dev/null +++ b/ShoppingMerchantConversions/samples/V1beta/ConversionSourcesServiceClient/delete_conversion_source.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $conversionSourcesServiceClient->deleteConversionSource($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 = ConversionSourcesServiceClient::conversionSourceName( + '[ACCOUNT]', + '[CONVERSION_SOURCE]' + ); + + delete_conversion_source_sample($formattedName); +} +// [END merchantapi_v1beta_generated_ConversionSourcesService_DeleteConversionSource_sync] diff --git a/ShoppingMerchantConversions/samples/V1beta/ConversionSourcesServiceClient/get_conversion_source.php b/ShoppingMerchantConversions/samples/V1beta/ConversionSourcesServiceClient/get_conversion_source.php new file mode 100644 index 000000000000..cce96028b2de --- /dev/null +++ b/ShoppingMerchantConversions/samples/V1beta/ConversionSourcesServiceClient/get_conversion_source.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ConversionSource $response */ + $response = $conversionSourcesServiceClient->getConversionSource($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ConversionSourcesServiceClient::conversionSourceName( + '[ACCOUNT]', + '[CONVERSION_SOURCE]' + ); + + get_conversion_source_sample($formattedName); +} +// [END merchantapi_v1beta_generated_ConversionSourcesService_GetConversionSource_sync] diff --git a/ShoppingMerchantConversions/samples/V1beta/ConversionSourcesServiceClient/list_conversion_sources.php b/ShoppingMerchantConversions/samples/V1beta/ConversionSourcesServiceClient/list_conversion_sources.php new file mode 100644 index 000000000000..53a6eca6788e --- /dev/null +++ b/ShoppingMerchantConversions/samples/V1beta/ConversionSourcesServiceClient/list_conversion_sources.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $conversionSourcesServiceClient->listConversionSources($request); + + /** @var ConversionSource $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ConversionSourcesServiceClient::accountName('[ACCOUNT]'); + + list_conversion_sources_sample($formattedParent); +} +// [END merchantapi_v1beta_generated_ConversionSourcesService_ListConversionSources_sync] diff --git a/ShoppingMerchantConversions/samples/V1beta/ConversionSourcesServiceClient/undelete_conversion_source.php b/ShoppingMerchantConversions/samples/V1beta/ConversionSourcesServiceClient/undelete_conversion_source.php new file mode 100644 index 000000000000..61be0f71c2b1 --- /dev/null +++ b/ShoppingMerchantConversions/samples/V1beta/ConversionSourcesServiceClient/undelete_conversion_source.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ConversionSource $response */ + $response = $conversionSourcesServiceClient->undeleteConversionSource($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ConversionSourcesServiceClient::conversionSourceName( + '[ACCOUNT]', + '[CONVERSION_SOURCE]' + ); + + undelete_conversion_source_sample($formattedName); +} +// [END merchantapi_v1beta_generated_ConversionSourcesService_UndeleteConversionSource_sync] diff --git a/ShoppingMerchantConversions/samples/V1beta/ConversionSourcesServiceClient/update_conversion_source.php b/ShoppingMerchantConversions/samples/V1beta/ConversionSourcesServiceClient/update_conversion_source.php new file mode 100644 index 000000000000..1279d6a41e7b --- /dev/null +++ b/ShoppingMerchantConversions/samples/V1beta/ConversionSourcesServiceClient/update_conversion_source.php @@ -0,0 +1,63 @@ +setConversionSource($conversionSource) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var ConversionSource $response */ + $response = $conversionSourcesServiceClient->updateConversionSource($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END merchantapi_v1beta_generated_ConversionSourcesService_UpdateConversionSource_sync] diff --git a/ShoppingMerchantConversions/src/V1beta/AttributionSettings.php b/ShoppingMerchantConversions/src/V1beta/AttributionSettings.php new file mode 100644 index 000000000000..991a2dcb98f0 --- /dev/null +++ b/ShoppingMerchantConversions/src/V1beta/AttributionSettings.php @@ -0,0 +1,148 @@ +google.shopping.merchant.conversions.v1beta.AttributionSettings + */ +class AttributionSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Lookback windows (in days) used for attribution in this source. + * Supported values are 7, 30, 40. + * + * Generated from protobuf field int32 attribution_lookback_window_days = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $attribution_lookback_window_days = 0; + /** + * Required. Attribution model. + * + * Generated from protobuf field .google.shopping.merchant.conversions.v1beta.AttributionSettings.AttributionModel attribution_model = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $attribution_model = 0; + /** + * Immutable. Unordered list. List of different conversion types a conversion + * event can be classified as. A standard "purchase" type will be + * automatically created if this list is empty at creation time. + * + * Generated from protobuf field repeated .google.shopping.merchant.conversions.v1beta.AttributionSettings.ConversionType conversion_type = 3 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = IMMUTABLE]; + */ + private $conversion_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $attribution_lookback_window_days + * Required. Lookback windows (in days) used for attribution in this source. + * Supported values are 7, 30, 40. + * @type int $attribution_model + * Required. Attribution model. + * @type array<\Google\Shopping\Merchant\Conversions\V1beta\AttributionSettings\ConversionType>|\Google\Protobuf\Internal\RepeatedField $conversion_type + * Immutable. Unordered list. List of different conversion types a conversion + * event can be classified as. A standard "purchase" type will be + * automatically created if this list is empty at creation time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Shopping\Merchant\Conversions\V1Beta\Conversionsources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Lookback windows (in days) used for attribution in this source. + * Supported values are 7, 30, 40. + * + * Generated from protobuf field int32 attribution_lookback_window_days = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getAttributionLookbackWindowDays() + { + return $this->attribution_lookback_window_days; + } + + /** + * Required. Lookback windows (in days) used for attribution in this source. + * Supported values are 7, 30, 40. + * + * Generated from protobuf field int32 attribution_lookback_window_days = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setAttributionLookbackWindowDays($var) + { + GPBUtil::checkInt32($var); + $this->attribution_lookback_window_days = $var; + + return $this; + } + + /** + * Required. Attribution model. + * + * Generated from protobuf field .google.shopping.merchant.conversions.v1beta.AttributionSettings.AttributionModel attribution_model = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getAttributionModel() + { + return $this->attribution_model; + } + + /** + * Required. Attribution model. + * + * Generated from protobuf field .google.shopping.merchant.conversions.v1beta.AttributionSettings.AttributionModel attribution_model = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setAttributionModel($var) + { + GPBUtil::checkEnum($var, \Google\Shopping\Merchant\Conversions\V1beta\AttributionSettings\AttributionModel::class); + $this->attribution_model = $var; + + return $this; + } + + /** + * Immutable. Unordered list. List of different conversion types a conversion + * event can be classified as. A standard "purchase" type will be + * automatically created if this list is empty at creation time. + * + * Generated from protobuf field repeated .google.shopping.merchant.conversions.v1beta.AttributionSettings.ConversionType conversion_type = 3 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConversionType() + { + return $this->conversion_type; + } + + /** + * Immutable. Unordered list. List of different conversion types a conversion + * event can be classified as. A standard "purchase" type will be + * automatically created if this list is empty at creation time. + * + * Generated from protobuf field repeated .google.shopping.merchant.conversions.v1beta.AttributionSettings.ConversionType conversion_type = 3 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = IMMUTABLE]; + * @param array<\Google\Shopping\Merchant\Conversions\V1beta\AttributionSettings\ConversionType>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConversionType($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Shopping\Merchant\Conversions\V1beta\AttributionSettings\ConversionType::class); + $this->conversion_type = $arr; + + return $this; + } + +} + diff --git a/ShoppingMerchantConversions/src/V1beta/AttributionSettings/AttributionModel.php b/ShoppingMerchantConversions/src/V1beta/AttributionSettings/AttributionModel.php new file mode 100644 index 000000000000..0943fbc0e498 --- /dev/null +++ b/ShoppingMerchantConversions/src/V1beta/AttributionSettings/AttributionModel.php @@ -0,0 +1,99 @@ +google.shopping.merchant.conversions.v1beta.AttributionSettings.AttributionModel + */ +class AttributionModel +{ + /** + * Unspecified model. + * + * Generated from protobuf enum ATTRIBUTION_MODEL_UNSPECIFIED = 0; + */ + const ATTRIBUTION_MODEL_UNSPECIFIED = 0; + /** + * Cross-channel Last Click model. + * + * Generated from protobuf enum CROSS_CHANNEL_LAST_CLICK = 1; + */ + const CROSS_CHANNEL_LAST_CLICK = 1; + /** + * Ads-preferred Last Click model. + * + * Generated from protobuf enum ADS_PREFERRED_LAST_CLICK = 2; + */ + const ADS_PREFERRED_LAST_CLICK = 2; + /** + * Cross-channel Data Driven model. + * + * Generated from protobuf enum CROSS_CHANNEL_DATA_DRIVEN = 5; + */ + const CROSS_CHANNEL_DATA_DRIVEN = 5; + /** + * Cross-channel First Click model. + * + * Generated from protobuf enum CROSS_CHANNEL_FIRST_CLICK = 6; + */ + const CROSS_CHANNEL_FIRST_CLICK = 6; + /** + * Cross-channel Linear model. + * + * Generated from protobuf enum CROSS_CHANNEL_LINEAR = 7; + */ + const CROSS_CHANNEL_LINEAR = 7; + /** + * Cross-channel Position Based model. + * + * Generated from protobuf enum CROSS_CHANNEL_POSITION_BASED = 8; + */ + const CROSS_CHANNEL_POSITION_BASED = 8; + /** + * Cross-channel Time Decay model. + * + * Generated from protobuf enum CROSS_CHANNEL_TIME_DECAY = 9; + */ + const CROSS_CHANNEL_TIME_DECAY = 9; + + private static $valueToName = [ + self::ATTRIBUTION_MODEL_UNSPECIFIED => 'ATTRIBUTION_MODEL_UNSPECIFIED', + self::CROSS_CHANNEL_LAST_CLICK => 'CROSS_CHANNEL_LAST_CLICK', + self::ADS_PREFERRED_LAST_CLICK => 'ADS_PREFERRED_LAST_CLICK', + self::CROSS_CHANNEL_DATA_DRIVEN => 'CROSS_CHANNEL_DATA_DRIVEN', + self::CROSS_CHANNEL_FIRST_CLICK => 'CROSS_CHANNEL_FIRST_CLICK', + self::CROSS_CHANNEL_LINEAR => 'CROSS_CHANNEL_LINEAR', + self::CROSS_CHANNEL_POSITION_BASED => 'CROSS_CHANNEL_POSITION_BASED', + self::CROSS_CHANNEL_TIME_DECAY => 'CROSS_CHANNEL_TIME_DECAY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/ShoppingMerchantConversions/src/V1beta/AttributionSettings/ConversionType.php b/ShoppingMerchantConversions/src/V1beta/AttributionSettings/ConversionType.php new file mode 100644 index 000000000000..42aa2ab289e4 --- /dev/null +++ b/ShoppingMerchantConversions/src/V1beta/AttributionSettings/ConversionType.php @@ -0,0 +1,106 @@ +google.shopping.merchant.conversions.v1beta.AttributionSettings.ConversionType + */ +class ConversionType extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Conversion event name, as it'll be reported by the client. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Option indicating if the type should be included in Merchant + * Center reporting. + * + * Generated from protobuf field bool report = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $report = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Conversion event name, as it'll be reported by the client. + * @type bool $report + * Output only. Option indicating if the type should be included in Merchant + * Center reporting. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Shopping\Merchant\Conversions\V1Beta\Conversionsources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Conversion event name, as it'll be reported by the client. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Conversion event name, as it'll be reported by the client. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Option indicating if the type should be included in Merchant + * Center reporting. + * + * Generated from protobuf field bool report = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getReport() + { + return $this->report; + } + + /** + * Output only. Option indicating if the type should be included in Merchant + * Center reporting. + * + * Generated from protobuf field bool report = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setReport($var) + { + GPBUtil::checkBool($var); + $this->report = $var; + + return $this; + } + +} + + diff --git a/ShoppingMerchantConversions/src/V1beta/Client/ConversionSourcesServiceClient.php b/ShoppingMerchantConversions/src/V1beta/Client/ConversionSourcesServiceClient.php new file mode 100644 index 000000000000..5842afa5c654 --- /dev/null +++ b/ShoppingMerchantConversions/src/V1beta/Client/ConversionSourcesServiceClient.php @@ -0,0 +1,434 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/conversion_sources_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/conversion_sources_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/conversion_sources_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => + __DIR__ . '/../resources/conversion_sources_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a account + * resource. + * + * @param string $account + * + * @return string The formatted account resource. + * + * @experimental + */ + public static function accountName(string $account): string + { + return self::getPathTemplate('account')->render([ + 'account' => $account, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * conversion_source resource. + * + * @param string $account + * @param string $conversionSource + * + * @return string The formatted conversion_source resource. + * + * @experimental + */ + public static function conversionSourceName(string $account, string $conversionSource): string + { + return self::getPathTemplate('conversionSource')->render([ + 'account' => $account, + 'conversion_source' => $conversionSource, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - account: accounts/{account} + * - conversionSource: accounts/{account}/conversionSources/{conversion_source} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * + * @experimental + */ + public static function parseName(string $formattedName, string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'merchantapi.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new conversion source. + * + * The async variant is + * {@see ConversionSourcesServiceClient::createConversionSourceAsync()} . + * + * @example samples/V1beta/ConversionSourcesServiceClient/create_conversion_source.php + * + * @param CreateConversionSourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ConversionSource + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function createConversionSource( + CreateConversionSourceRequest $request, + array $callOptions = [] + ): ConversionSource { + return $this->startApiCall('CreateConversionSource', $request, $callOptions)->wait(); + } + + /** + * Archives an existing conversion source. If the conversion source is a + * Merchant Center Destination, it will be recoverable for 30 days. If the + * conversion source is a Google Analytics Link, it will be deleted + * immediately and can be restored by creating a new one. + * + * The async variant is + * {@see ConversionSourcesServiceClient::deleteConversionSourceAsync()} . + * + * @example samples/V1beta/ConversionSourcesServiceClient/delete_conversion_source.php + * + * @param DeleteConversionSourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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. + * + * @experimental + */ + public function deleteConversionSource(DeleteConversionSourceRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteConversionSource', $request, $callOptions)->wait(); + } + + /** + * Fetches a conversion source. + * + * The async variant is + * {@see ConversionSourcesServiceClient::getConversionSourceAsync()} . + * + * @example samples/V1beta/ConversionSourcesServiceClient/get_conversion_source.php + * + * @param GetConversionSourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ConversionSource + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function getConversionSource(GetConversionSourceRequest $request, array $callOptions = []): ConversionSource + { + return $this->startApiCall('GetConversionSource', $request, $callOptions)->wait(); + } + + /** + * Retrieves the list of conversion sources the caller has access to. + * + * The async variant is + * {@see ConversionSourcesServiceClient::listConversionSourcesAsync()} . + * + * @example samples/V1beta/ConversionSourcesServiceClient/list_conversion_sources.php + * + * @param ListConversionSourcesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function listConversionSources( + ListConversionSourcesRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListConversionSources', $request, $callOptions); + } + + /** + * Re-enables an archived conversion source. Only Available for Merchant + * Center Destination conversion sources. + * + * The async variant is + * {@see ConversionSourcesServiceClient::undeleteConversionSourceAsync()} . + * + * @example samples/V1beta/ConversionSourcesServiceClient/undelete_conversion_source.php + * + * @param UndeleteConversionSourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ConversionSource + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function undeleteConversionSource( + UndeleteConversionSourceRequest $request, + array $callOptions = [] + ): ConversionSource { + return $this->startApiCall('UndeleteConversionSource', $request, $callOptions)->wait(); + } + + /** + * Updates information of an existing conversion source. Available only for + * Merchant Center Destination conversion sources. + * + * The async variant is + * {@see ConversionSourcesServiceClient::updateConversionSourceAsync()} . + * + * @example samples/V1beta/ConversionSourcesServiceClient/update_conversion_source.php + * + * @param UpdateConversionSourceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ConversionSource + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function updateConversionSource( + UpdateConversionSourceRequest $request, + array $callOptions = [] + ): ConversionSource { + return $this->startApiCall('UpdateConversionSource', $request, $callOptions)->wait(); + } +} diff --git a/ShoppingMerchantConversions/src/V1beta/ConversionSource.php b/ShoppingMerchantConversions/src/V1beta/ConversionSource.php new file mode 100644 index 000000000000..b2acdf0e5549 --- /dev/null +++ b/ShoppingMerchantConversions/src/V1beta/ConversionSource.php @@ -0,0 +1,291 @@ +google.shopping.merchant.conversions.v1beta.ConversionSource + */ +class ConversionSource extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Identifier. Generated by the Content API upon creation of a + * new `ConversionSource`. Format: [a-z]{4}:.+ The four characters before the + * colon represent the type of conversio source. Content after the colon + * represents the ID of the conversion source within that type. The ID of two + * different conversion sources might be the same across different types. The + * following type prefixes are supported: + * - galk: For GoogleAnalyticsLink sources. + * - mcdn: For MerchantCenterDestination sources. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Current state of this conversion source. Can't be edited + * through the API. + * + * Generated from protobuf field .google.shopping.merchant.conversions.v1beta.ConversionSource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The time when an archived conversion source becomes + * permanently deleted and is no longer available to undelete. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + /** + * Output only. Controller of the conversion source. + * + * Generated from protobuf field .google.shopping.merchant.conversions.v1beta.ConversionSource.Controller controller = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $controller = 0; + protected $source_data; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Shopping\Merchant\Conversions\V1beta\GoogleAnalyticsLink $google_analytics_link + * Immutable. Conversion Source of type "Link to Google Analytics Property". + * @type \Google\Shopping\Merchant\Conversions\V1beta\MerchantCenterDestination $merchant_center_destination + * Conversion Source of type "Merchant Center Tag Destination". + * @type string $name + * Output only. Identifier. Generated by the Content API upon creation of a + * new `ConversionSource`. Format: [a-z]{4}:.+ The four characters before the + * colon represent the type of conversio source. Content after the colon + * represents the ID of the conversion source within that type. The ID of two + * different conversion sources might be the same across different types. The + * following type prefixes are supported: + * - galk: For GoogleAnalyticsLink sources. + * - mcdn: For MerchantCenterDestination sources. + * @type int $state + * Output only. Current state of this conversion source. Can't be edited + * through the API. + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. The time when an archived conversion source becomes + * permanently deleted and is no longer available to undelete. + * @type int $controller + * Output only. Controller of the conversion source. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Shopping\Merchant\Conversions\V1Beta\Conversionsources::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Conversion Source of type "Link to Google Analytics Property". + * + * Generated from protobuf field .google.shopping.merchant.conversions.v1beta.GoogleAnalyticsLink google_analytics_link = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Shopping\Merchant\Conversions\V1beta\GoogleAnalyticsLink|null + */ + public function getGoogleAnalyticsLink() + { + return $this->readOneof(3); + } + + public function hasGoogleAnalyticsLink() + { + return $this->hasOneof(3); + } + + /** + * Immutable. Conversion Source of type "Link to Google Analytics Property". + * + * Generated from protobuf field .google.shopping.merchant.conversions.v1beta.GoogleAnalyticsLink google_analytics_link = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Shopping\Merchant\Conversions\V1beta\GoogleAnalyticsLink $var + * @return $this + */ + public function setGoogleAnalyticsLink($var) + { + GPBUtil::checkMessage($var, \Google\Shopping\Merchant\Conversions\V1beta\GoogleAnalyticsLink::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Conversion Source of type "Merchant Center Tag Destination". + * + * Generated from protobuf field .google.shopping.merchant.conversions.v1beta.MerchantCenterDestination merchant_center_destination = 4; + * @return \Google\Shopping\Merchant\Conversions\V1beta\MerchantCenterDestination|null + */ + public function getMerchantCenterDestination() + { + return $this->readOneof(4); + } + + public function hasMerchantCenterDestination() + { + return $this->hasOneof(4); + } + + /** + * Conversion Source of type "Merchant Center Tag Destination". + * + * Generated from protobuf field .google.shopping.merchant.conversions.v1beta.MerchantCenterDestination merchant_center_destination = 4; + * @param \Google\Shopping\Merchant\Conversions\V1beta\MerchantCenterDestination $var + * @return $this + */ + public function setMerchantCenterDestination($var) + { + GPBUtil::checkMessage($var, \Google\Shopping\Merchant\Conversions\V1beta\MerchantCenterDestination::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Output only. Identifier. Generated by the Content API upon creation of a + * new `ConversionSource`. Format: [a-z]{4}:.+ The four characters before the + * colon represent the type of conversio source. Content after the colon + * represents the ID of the conversion source within that type. The ID of two + * different conversion sources might be the same across different types. The + * following type prefixes are supported: + * - galk: For GoogleAnalyticsLink sources. + * - mcdn: For MerchantCenterDestination sources. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Identifier. Generated by the Content API upon creation of a + * new `ConversionSource`. Format: [a-z]{4}:.+ The four characters before the + * colon represent the type of conversio source. Content after the colon + * represents the ID of the conversion source within that type. The ID of two + * different conversion sources might be the same across different types. The + * following type prefixes are supported: + * - galk: For GoogleAnalyticsLink sources. + * - mcdn: For MerchantCenterDestination sources. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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. Current state of this conversion source. Can't be edited + * through the API. + * + * Generated from protobuf field .google.shopping.merchant.conversions.v1beta.ConversionSource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of this conversion source. Can't be edited + * through the API. + * + * Generated from protobuf field .google.shopping.merchant.conversions.v1beta.ConversionSource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Shopping\Merchant\Conversions\V1beta\ConversionSource\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The time when an archived conversion source becomes + * permanently deleted and is no longer available to undelete. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * Output only. The time when an archived conversion source becomes + * permanently deleted and is no longer available to undelete. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + + /** + * Output only. Controller of the conversion source. + * + * Generated from protobuf field .google.shopping.merchant.conversions.v1beta.ConversionSource.Controller controller = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getController() + { + return $this->controller; + } + + /** + * Output only. Controller of the conversion source. + * + * Generated from protobuf field .google.shopping.merchant.conversions.v1beta.ConversionSource.Controller controller = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setController($var) + { + GPBUtil::checkEnum($var, \Google\Shopping\Merchant\Conversions\V1beta\ConversionSource\Controller::class); + $this->controller = $var; + + return $this; + } + + /** + * @return string + */ + public function getSourceData() + { + return $this->whichOneof("source_data"); + } + +} + diff --git a/ShoppingMerchantConversions/src/V1beta/ConversionSource/Controller.php b/ShoppingMerchantConversions/src/V1beta/ConversionSource/Controller.php new file mode 100644 index 000000000000..ebe1ab33d568 --- /dev/null +++ b/ShoppingMerchantConversions/src/V1beta/ConversionSource/Controller.php @@ -0,0 +1,62 @@ +google.shopping.merchant.conversions.v1beta.ConversionSource.Controller + */ +class Controller +{ + /** + * Default value. This value is unused. + * + * Generated from protobuf enum CONTROLLER_UNSPECIFIED = 0; + */ + const CONTROLLER_UNSPECIFIED = 0; + /** + * Controlled by the Merchant who owns the Conversion Source. + * + * Generated from protobuf enum MERCHANT = 1; + */ + const MERCHANT = 1; + /** + * Controlled by the YT Affiliates program. + * + * Generated from protobuf enum YOUTUBE_AFFILIATES = 2; + */ + const YOUTUBE_AFFILIATES = 2; + + private static $valueToName = [ + self::CONTROLLER_UNSPECIFIED => 'CONTROLLER_UNSPECIFIED', + self::MERCHANT => 'MERCHANT', + self::YOUTUBE_AFFILIATES => 'YOUTUBE_AFFILIATES', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/ShoppingMerchantConversions/src/V1beta/ConversionSource/State.php b/ShoppingMerchantConversions/src/V1beta/ConversionSource/State.php new file mode 100644 index 000000000000..3d093bb668a2 --- /dev/null +++ b/ShoppingMerchantConversions/src/V1beta/ConversionSource/State.php @@ -0,0 +1,70 @@ +google.shopping.merchant.conversions.v1beta.ConversionSource.State + */ +class State +{ + /** + * Conversion source has unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Conversion source is fully functional. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * Conversion source has been archived in the last 30 days and not + * currently functional. Can be restored using the undelete method. + * + * Generated from protobuf enum ARCHIVED = 2; + */ + const ARCHIVED = 2; + /** + * Conversion source creation has started but not fully finished yet. + * + * Generated from protobuf enum PENDING = 3; + */ + const PENDING = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::ARCHIVED => 'ARCHIVED', + self::PENDING => 'PENDING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/ShoppingMerchantConversions/src/V1beta/CreateConversionSourceRequest.php b/ShoppingMerchantConversions/src/V1beta/CreateConversionSourceRequest.php new file mode 100644 index 000000000000..0e3a79786436 --- /dev/null +++ b/ShoppingMerchantConversions/src/V1beta/CreateConversionSourceRequest.php @@ -0,0 +1,137 @@ +google.shopping.merchant.conversions.v1beta.CreateConversionSourceRequest + */ +class CreateConversionSourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The merchant account that will own the new conversion source. + * Format: accounts/{account} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The conversion source description. A new ID will be automatically + * assigned to it upon creation. + * + * Generated from protobuf field .google.shopping.merchant.conversions.v1beta.ConversionSource conversion_source = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $conversion_source = null; + + /** + * @param string $parent Required. The merchant account that will own the new conversion source. + * Format: accounts/{account} + * Please see {@see ConversionSourcesServiceClient::accountName()} for help formatting this field. + * @param \Google\Shopping\Merchant\Conversions\V1beta\ConversionSource $conversionSource Required. The conversion source description. A new ID will be automatically + * assigned to it upon creation. + * + * @return \Google\Shopping\Merchant\Conversions\V1beta\CreateConversionSourceRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Shopping\Merchant\Conversions\V1beta\ConversionSource $conversionSource): self + { + return (new self()) + ->setParent($parent) + ->setConversionSource($conversionSource); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The merchant account that will own the new conversion source. + * Format: accounts/{account} + * @type \Google\Shopping\Merchant\Conversions\V1beta\ConversionSource $conversion_source + * Required. The conversion source description. A new ID will be automatically + * assigned to it upon creation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Shopping\Merchant\Conversions\V1Beta\Conversionsources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The merchant account that will own the new conversion source. + * Format: accounts/{account} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The merchant account that will own the new conversion source. + * Format: accounts/{account} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The conversion source description. A new ID will be automatically + * assigned to it upon creation. + * + * Generated from protobuf field .google.shopping.merchant.conversions.v1beta.ConversionSource conversion_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Shopping\Merchant\Conversions\V1beta\ConversionSource|null + */ + public function getConversionSource() + { + return $this->conversion_source; + } + + public function hasConversionSource() + { + return isset($this->conversion_source); + } + + public function clearConversionSource() + { + unset($this->conversion_source); + } + + /** + * Required. The conversion source description. A new ID will be automatically + * assigned to it upon creation. + * + * Generated from protobuf field .google.shopping.merchant.conversions.v1beta.ConversionSource conversion_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Shopping\Merchant\Conversions\V1beta\ConversionSource $var + * @return $this + */ + public function setConversionSource($var) + { + GPBUtil::checkMessage($var, \Google\Shopping\Merchant\Conversions\V1beta\ConversionSource::class); + $this->conversion_source = $var; + + return $this; + } + +} + diff --git a/ShoppingMerchantConversions/src/V1beta/DeleteConversionSourceRequest.php b/ShoppingMerchantConversions/src/V1beta/DeleteConversionSourceRequest.php new file mode 100644 index 000000000000..a149f757807b --- /dev/null +++ b/ShoppingMerchantConversions/src/V1beta/DeleteConversionSourceRequest.php @@ -0,0 +1,86 @@ +google.shopping.merchant.conversions.v1beta.DeleteConversionSourceRequest + */ +class DeleteConversionSourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the conversion source to be deleted. + * Format: accounts/{account}/conversionSources/{conversion_source} + * + * 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 conversion source to be deleted. + * Format: accounts/{account}/conversionSources/{conversion_source} + * Please see {@see ConversionSourcesServiceClient::conversionSourceName()} for help formatting this field. + * + * @return \Google\Shopping\Merchant\Conversions\V1beta\DeleteConversionSourceRequest + * + * @experimental + */ + public static function 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 conversion source to be deleted. + * Format: accounts/{account}/conversionSources/{conversion_source} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Shopping\Merchant\Conversions\V1Beta\Conversionsources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the conversion source to be deleted. + * Format: accounts/{account}/conversionSources/{conversion_source} + * + * Generated from 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 conversion source to be deleted. + * Format: accounts/{account}/conversionSources/{conversion_source} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/ShoppingMerchantConversions/src/V1beta/GetConversionSourceRequest.php b/ShoppingMerchantConversions/src/V1beta/GetConversionSourceRequest.php new file mode 100644 index 000000000000..aa725dd86e65 --- /dev/null +++ b/ShoppingMerchantConversions/src/V1beta/GetConversionSourceRequest.php @@ -0,0 +1,86 @@ +google.shopping.merchant.conversions.v1beta.GetConversionSourceRequest + */ +class GetConversionSourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the conversion source to be fetched. + * Format: accounts/{account}/conversionsources/{conversion_source} + * + * 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 conversion source to be fetched. + * Format: accounts/{account}/conversionsources/{conversion_source} + * Please see {@see ConversionSourcesServiceClient::conversionSourceName()} for help formatting this field. + * + * @return \Google\Shopping\Merchant\Conversions\V1beta\GetConversionSourceRequest + * + * @experimental + */ + public static function 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 conversion source to be fetched. + * Format: accounts/{account}/conversionsources/{conversion_source} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Shopping\Merchant\Conversions\V1Beta\Conversionsources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the conversion source to be fetched. + * Format: accounts/{account}/conversionsources/{conversion_source} + * + * Generated from 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 conversion source to be fetched. + * Format: accounts/{account}/conversionsources/{conversion_source} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/ShoppingMerchantConversions/src/V1beta/GoogleAnalyticsLink.php b/ShoppingMerchantConversions/src/V1beta/GoogleAnalyticsLink.php new file mode 100644 index 000000000000..a064064e1f2c --- /dev/null +++ b/ShoppingMerchantConversions/src/V1beta/GoogleAnalyticsLink.php @@ -0,0 +1,154 @@ +google.shopping.merchant.conversions.v1beta.GoogleAnalyticsLink + */ +class GoogleAnalyticsLink extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Immutable. ID of the Google Analytics property the merchant is + * linked to. + * + * Generated from protobuf field int64 property_id = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $property_id = 0; + /** + * Output only. Attribution settings for the linked Google Analytics property. + * + * Generated from protobuf field .google.shopping.merchant.conversions.v1beta.AttributionSettings attribution_settings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $attribution_settings = null; + /** + * Output only. Name of the Google Analytics property the merchant is linked + * to. + * + * Generated from protobuf field string property = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $property = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $property_id + * Required. Immutable. ID of the Google Analytics property the merchant is + * linked to. + * @type \Google\Shopping\Merchant\Conversions\V1beta\AttributionSettings $attribution_settings + * Output only. Attribution settings for the linked Google Analytics property. + * @type string $property + * Output only. Name of the Google Analytics property the merchant is linked + * to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Shopping\Merchant\Conversions\V1Beta\Conversionsources::initOnce(); + parent::__construct($data); + } + + /** + * Required. Immutable. ID of the Google Analytics property the merchant is + * linked to. + * + * Generated from protobuf field int64 property_id = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return int|string + */ + public function getPropertyId() + { + return $this->property_id; + } + + /** + * Required. Immutable. ID of the Google Analytics property the merchant is + * linked to. + * + * Generated from protobuf field int64 property_id = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param int|string $var + * @return $this + */ + public function setPropertyId($var) + { + GPBUtil::checkInt64($var); + $this->property_id = $var; + + return $this; + } + + /** + * Output only. Attribution settings for the linked Google Analytics property. + * + * Generated from protobuf field .google.shopping.merchant.conversions.v1beta.AttributionSettings attribution_settings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Shopping\Merchant\Conversions\V1beta\AttributionSettings|null + */ + public function getAttributionSettings() + { + return $this->attribution_settings; + } + + public function hasAttributionSettings() + { + return isset($this->attribution_settings); + } + + public function clearAttributionSettings() + { + unset($this->attribution_settings); + } + + /** + * Output only. Attribution settings for the linked Google Analytics property. + * + * Generated from protobuf field .google.shopping.merchant.conversions.v1beta.AttributionSettings attribution_settings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Shopping\Merchant\Conversions\V1beta\AttributionSettings $var + * @return $this + */ + public function setAttributionSettings($var) + { + GPBUtil::checkMessage($var, \Google\Shopping\Merchant\Conversions\V1beta\AttributionSettings::class); + $this->attribution_settings = $var; + + return $this; + } + + /** + * Output only. Name of the Google Analytics property the merchant is linked + * to. + * + * Generated from protobuf field string property = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getProperty() + { + return $this->property; + } + + /** + * Output only. Name of the Google Analytics property the merchant is linked + * to. + * + * Generated from protobuf field string property = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setProperty($var) + { + GPBUtil::checkString($var, True); + $this->property = $var; + + return $this; + } + +} + diff --git a/ShoppingMerchantConversions/src/V1beta/ListConversionSourcesRequest.php b/ShoppingMerchantConversions/src/V1beta/ListConversionSourcesRequest.php new file mode 100644 index 000000000000..f348886adf2d --- /dev/null +++ b/ShoppingMerchantConversions/src/V1beta/ListConversionSourcesRequest.php @@ -0,0 +1,204 @@ +google.shopping.merchant.conversions.v1beta.ListConversionSourcesRequest + */ +class ListConversionSourcesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The merchant account who owns the collection of conversion + * sources. Format: accounts/{account} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of conversion sources to return in a page. + * If no `page_size` is specified, `100` is used as the default value. The + * maximum value is `200`. Values above `200` will be coerced to `200`. + * Regardless of pagination, at most `200` conversion sources are returned + * in total. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Show deleted (archived) option. + * + * Generated from protobuf field bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $show_deleted = false; + + /** + * @param string $parent Required. The merchant account who owns the collection of conversion + * sources. Format: accounts/{account} + * Please see {@see ConversionSourcesServiceClient::accountName()} for help formatting this field. + * + * @return \Google\Shopping\Merchant\Conversions\V1beta\ListConversionSourcesRequest + * + * @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 merchant account who owns the collection of conversion + * sources. Format: accounts/{account} + * @type int $page_size + * Optional. The maximum number of conversion sources to return in a page. + * If no `page_size` is specified, `100` is used as the default value. The + * maximum value is `200`. Values above `200` will be coerced to `200`. + * Regardless of pagination, at most `200` conversion sources are returned + * in total. + * @type string $page_token + * Optional. Page token. + * @type bool $show_deleted + * Optional. Show deleted (archived) option. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Shopping\Merchant\Conversions\V1Beta\Conversionsources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The merchant account who owns the collection of conversion + * sources. Format: accounts/{account} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The merchant account who owns the collection of conversion + * sources. Format: accounts/{account} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of conversion sources to return in a page. + * If no `page_size` is specified, `100` is used as the default value. The + * maximum value is `200`. Values above `200` will be coerced to `200`. + * Regardless of pagination, at most `200` conversion sources are returned + * in total. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of conversion sources to return in a page. + * If no `page_size` is specified, `100` is used as the default value. The + * maximum value is `200`. Values above `200` will be coerced to `200`. + * Regardless of pagination, at most `200` conversion sources are returned + * in total. + * + * 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. Page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. Page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. Show deleted (archived) option. + * + * Generated from protobuf field bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getShowDeleted() + { + return $this->show_deleted; + } + + /** + * Optional. Show deleted (archived) option. + * + * Generated from protobuf field bool show_deleted = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setShowDeleted($var) + { + GPBUtil::checkBool($var); + $this->show_deleted = $var; + + return $this; + } + +} + diff --git a/ShoppingMerchantConversions/src/V1beta/ListConversionSourcesResponse.php b/ShoppingMerchantConversions/src/V1beta/ListConversionSourcesResponse.php new file mode 100644 index 000000000000..f903b9d6c706 --- /dev/null +++ b/ShoppingMerchantConversions/src/V1beta/ListConversionSourcesResponse.php @@ -0,0 +1,101 @@ +google.shopping.merchant.conversions.v1beta.ListConversionSourcesResponse + */ +class ListConversionSourcesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of conversion sources. + * + * Generated from protobuf field repeated .google.shopping.merchant.conversions.v1beta.ConversionSource conversion_sources = 1; + */ + private $conversion_sources; + /** + * Token to be used to fetch the next results page. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Shopping\Merchant\Conversions\V1beta\ConversionSource>|\Google\Protobuf\Internal\RepeatedField $conversion_sources + * List of conversion sources. + * @type string $next_page_token + * Token to be used to fetch the next results page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Shopping\Merchant\Conversions\V1Beta\Conversionsources::initOnce(); + parent::__construct($data); + } + + /** + * List of conversion sources. + * + * Generated from protobuf field repeated .google.shopping.merchant.conversions.v1beta.ConversionSource conversion_sources = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConversionSources() + { + return $this->conversion_sources; + } + + /** + * List of conversion sources. + * + * Generated from protobuf field repeated .google.shopping.merchant.conversions.v1beta.ConversionSource conversion_sources = 1; + * @param array<\Google\Shopping\Merchant\Conversions\V1beta\ConversionSource>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConversionSources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Shopping\Merchant\Conversions\V1beta\ConversionSource::class); + $this->conversion_sources = $arr; + + return $this; + } + + /** + * Token to be used to fetch the next results page. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to be used to fetch the next results page. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/ShoppingMerchantConversions/src/V1beta/MerchantCenterDestination.php b/ShoppingMerchantConversions/src/V1beta/MerchantCenterDestination.php new file mode 100644 index 000000000000..0a64654af2b4 --- /dev/null +++ b/ShoppingMerchantConversions/src/V1beta/MerchantCenterDestination.php @@ -0,0 +1,201 @@ +google.shopping.merchant.conversions.v1beta.MerchantCenterDestination + */ +class MerchantCenterDestination extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Merchant Center Destination ID. + * + * Generated from protobuf field string destination = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $destination = ''; + /** + * Required. Attribution settings being used for the Merchant Center + * Destination. + * + * Generated from protobuf field .google.shopping.merchant.conversions.v1beta.AttributionSettings attribution_settings = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $attribution_settings = null; + /** + * Required. Merchant-specified display name for the destination. This is the + * name that identifies the conversion source within the Merchant Center UI. + * Limited to 64 characters. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Required. Three-letter currency code (ISO 4217). The currency code defines + * in which currency the conversions sent to this destination will be reported + * in Merchant Center. + * + * Generated from protobuf field string currency_code = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $currency_code = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $destination + * Output only. Merchant Center Destination ID. + * @type \Google\Shopping\Merchant\Conversions\V1beta\AttributionSettings $attribution_settings + * Required. Attribution settings being used for the Merchant Center + * Destination. + * @type string $display_name + * Required. Merchant-specified display name for the destination. This is the + * name that identifies the conversion source within the Merchant Center UI. + * Limited to 64 characters. + * @type string $currency_code + * Required. Three-letter currency code (ISO 4217). The currency code defines + * in which currency the conversions sent to this destination will be reported + * in Merchant Center. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Shopping\Merchant\Conversions\V1Beta\Conversionsources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Merchant Center Destination ID. + * + * Generated from protobuf field string destination = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDestination() + { + return $this->destination; + } + + /** + * Output only. Merchant Center Destination ID. + * + * Generated from protobuf field string destination = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDestination($var) + { + GPBUtil::checkString($var, True); + $this->destination = $var; + + return $this; + } + + /** + * Required. Attribution settings being used for the Merchant Center + * Destination. + * + * Generated from protobuf field .google.shopping.merchant.conversions.v1beta.AttributionSettings attribution_settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Shopping\Merchant\Conversions\V1beta\AttributionSettings|null + */ + public function getAttributionSettings() + { + return $this->attribution_settings; + } + + public function hasAttributionSettings() + { + return isset($this->attribution_settings); + } + + public function clearAttributionSettings() + { + unset($this->attribution_settings); + } + + /** + * Required. Attribution settings being used for the Merchant Center + * Destination. + * + * Generated from protobuf field .google.shopping.merchant.conversions.v1beta.AttributionSettings attribution_settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Shopping\Merchant\Conversions\V1beta\AttributionSettings $var + * @return $this + */ + public function setAttributionSettings($var) + { + GPBUtil::checkMessage($var, \Google\Shopping\Merchant\Conversions\V1beta\AttributionSettings::class); + $this->attribution_settings = $var; + + return $this; + } + + /** + * Required. Merchant-specified display name for the destination. This is the + * name that identifies the conversion source within the Merchant Center UI. + * Limited to 64 characters. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. Merchant-specified display name for the destination. This is the + * name that identifies the conversion source within the Merchant Center UI. + * Limited to 64 characters. + * + * Generated from protobuf field string display_name = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Required. Three-letter currency code (ISO 4217). The currency code defines + * in which currency the conversions sent to this destination will be reported + * in Merchant Center. + * + * Generated from protobuf field string currency_code = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCurrencyCode() + { + return $this->currency_code; + } + + /** + * Required. Three-letter currency code (ISO 4217). The currency code defines + * in which currency the conversions sent to this destination will be reported + * in Merchant Center. + * + * Generated from protobuf field string currency_code = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCurrencyCode($var) + { + GPBUtil::checkString($var, True); + $this->currency_code = $var; + + return $this; + } + +} + diff --git a/ShoppingMerchantConversions/src/V1beta/UndeleteConversionSourceRequest.php b/ShoppingMerchantConversions/src/V1beta/UndeleteConversionSourceRequest.php new file mode 100644 index 000000000000..c5229fafc28f --- /dev/null +++ b/ShoppingMerchantConversions/src/V1beta/UndeleteConversionSourceRequest.php @@ -0,0 +1,71 @@ +google.shopping.merchant.conversions.v1beta.UndeleteConversionSourceRequest + */ +class UndeleteConversionSourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the conversion source to be undeleted. + * Format: accounts/{account}/conversionSources/{conversion_source} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the conversion source to be undeleted. + * Format: accounts/{account}/conversionSources/{conversion_source} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Shopping\Merchant\Conversions\V1Beta\Conversionsources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the conversion source to be undeleted. + * Format: accounts/{account}/conversionSources/{conversion_source} + * + * Generated from 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 conversion source to be undeleted. + * Format: accounts/{account}/conversionSources/{conversion_source} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/ShoppingMerchantConversions/src/V1beta/UpdateConversionSourceRequest.php b/ShoppingMerchantConversions/src/V1beta/UpdateConversionSourceRequest.php new file mode 100644 index 000000000000..4250c3ae1168 --- /dev/null +++ b/ShoppingMerchantConversions/src/V1beta/UpdateConversionSourceRequest.php @@ -0,0 +1,141 @@ +google.shopping.merchant.conversions.v1beta.UpdateConversionSourceRequest + */ +class UpdateConversionSourceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The new version of the conversion source data. + * Format: accounts/{account}/conversionSources/{conversion_source} + * + * Generated from protobuf field .google.shopping.merchant.conversions.v1beta.ConversionSource conversion_source = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $conversion_source = null; + /** + * Required. List of fields being updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Shopping\Merchant\Conversions\V1beta\ConversionSource $conversionSource Required. The new version of the conversion source data. + * Format: accounts/{account}/conversionSources/{conversion_source} + * @param \Google\Protobuf\FieldMask $updateMask Required. List of fields being updated. + * + * @return \Google\Shopping\Merchant\Conversions\V1beta\UpdateConversionSourceRequest + * + * @experimental + */ + public static function build(\Google\Shopping\Merchant\Conversions\V1beta\ConversionSource $conversionSource, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setConversionSource($conversionSource) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Shopping\Merchant\Conversions\V1beta\ConversionSource $conversion_source + * Required. The new version of the conversion source data. + * Format: accounts/{account}/conversionSources/{conversion_source} + * @type \Google\Protobuf\FieldMask $update_mask + * Required. List of fields being updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Shopping\Merchant\Conversions\V1Beta\Conversionsources::initOnce(); + parent::__construct($data); + } + + /** + * Required. The new version of the conversion source data. + * Format: accounts/{account}/conversionSources/{conversion_source} + * + * Generated from protobuf field .google.shopping.merchant.conversions.v1beta.ConversionSource conversion_source = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Shopping\Merchant\Conversions\V1beta\ConversionSource|null + */ + public function getConversionSource() + { + return $this->conversion_source; + } + + public function hasConversionSource() + { + return isset($this->conversion_source); + } + + public function clearConversionSource() + { + unset($this->conversion_source); + } + + /** + * Required. The new version of the conversion source data. + * Format: accounts/{account}/conversionSources/{conversion_source} + * + * Generated from protobuf field .google.shopping.merchant.conversions.v1beta.ConversionSource conversion_source = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Shopping\Merchant\Conversions\V1beta\ConversionSource $var + * @return $this + */ + public function setConversionSource($var) + { + GPBUtil::checkMessage($var, \Google\Shopping\Merchant\Conversions\V1beta\ConversionSource::class); + $this->conversion_source = $var; + + return $this; + } + + /** + * Required. List of fields being 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. List of fields being updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/ShoppingMerchantConversions/src/V1beta/gapic_metadata.json b/ShoppingMerchantConversions/src/V1beta/gapic_metadata.json new file mode 100644 index 000000000000..8c3a4d2928de --- /dev/null +++ b/ShoppingMerchantConversions/src/V1beta/gapic_metadata.json @@ -0,0 +1,48 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.shopping.merchant.conversions.v1beta", + "libraryPackage": "Google\\Shopping\\Merchant\\Conversions\\V1beta", + "services": { + "ConversionSourcesService": { + "clients": { + "grpc": { + "libraryClient": "ConversionSourcesServiceGapicClient", + "rpcs": { + "CreateConversionSource": { + "methods": [ + "createConversionSource" + ] + }, + "DeleteConversionSource": { + "methods": [ + "deleteConversionSource" + ] + }, + "GetConversionSource": { + "methods": [ + "getConversionSource" + ] + }, + "ListConversionSources": { + "methods": [ + "listConversionSources" + ] + }, + "UndeleteConversionSource": { + "methods": [ + "undeleteConversionSource" + ] + }, + "UpdateConversionSource": { + "methods": [ + "updateConversionSource" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/ShoppingMerchantConversions/src/V1beta/resources/conversion_sources_service_client_config.json b/ShoppingMerchantConversions/src/V1beta/resources/conversion_sources_service_client_config.json new file mode 100644 index 000000000000..a7f105b4bb7b --- /dev/null +++ b/ShoppingMerchantConversions/src/V1beta/resources/conversion_sources_service_client_config.json @@ -0,0 +1,64 @@ +{ + "interfaces": { + "google.shopping.merchant.conversions.v1beta.ConversionSourcesService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateConversionSource": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteConversionSource": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetConversionSource": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListConversionSources": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UndeleteConversionSource": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateConversionSource": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/ShoppingMerchantConversions/src/V1beta/resources/conversion_sources_service_descriptor_config.php b/ShoppingMerchantConversions/src/V1beta/resources/conversion_sources_service_descriptor_config.php new file mode 100644 index 000000000000..85c79fc96cba --- /dev/null +++ b/ShoppingMerchantConversions/src/V1beta/resources/conversion_sources_service_descriptor_config.php @@ -0,0 +1,113 @@ + [ + 'google.shopping.merchant.conversions.v1beta.ConversionSourcesService' => [ + 'CreateConversionSource' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Shopping\Merchant\Conversions\V1beta\ConversionSource', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteConversionSource' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetConversionSource' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Shopping\Merchant\Conversions\V1beta\ConversionSource', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListConversionSources' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getConversionSources', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Shopping\Merchant\Conversions\V1beta\ListConversionSourcesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UndeleteConversionSource' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Shopping\Merchant\Conversions\V1beta\ConversionSource', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateConversionSource' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Shopping\Merchant\Conversions\V1beta\ConversionSource', + 'headerParams' => [ + [ + 'keyName' => 'conversion_source.name', + 'fieldAccessors' => [ + 'getConversionSource', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'account' => 'accounts/{account}', + 'conversionSource' => 'accounts/{account}/conversionSources/{conversion_source}', + ], + ], + ], +]; diff --git a/ShoppingMerchantConversions/src/V1beta/resources/conversion_sources_service_rest_client_config.php b/ShoppingMerchantConversions/src/V1beta/resources/conversion_sources_service_rest_client_config.php new file mode 100644 index 000000000000..aec10f4e58c7 --- /dev/null +++ b/ShoppingMerchantConversions/src/V1beta/resources/conversion_sources_service_rest_client_config.php @@ -0,0 +1,102 @@ + [ + 'google.shopping.merchant.conversions.v1beta.ConversionSourcesService' => [ + 'CreateConversionSource' => [ + 'method' => 'post', + 'uriTemplate' => '/conversions/v1beta/{parent=accounts/*}/conversionSources', + 'body' => 'conversion_source', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteConversionSource' => [ + 'method' => 'delete', + 'uriTemplate' => '/conversions/v1beta/{name=accounts/*/conversionSources/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetConversionSource' => [ + 'method' => 'get', + 'uriTemplate' => '/conversions/v1beta/{name=accounts/*/conversionSources/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListConversionSources' => [ + 'method' => 'get', + 'uriTemplate' => '/conversions/v1beta/{parent=accounts/*}/conversionSources', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UndeleteConversionSource' => [ + 'method' => 'post', + 'uriTemplate' => '/conversions/v1beta/{name=accounts/*/conversionSources/*}:undelete', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateConversionSource' => [ + 'method' => 'patch', + 'uriTemplate' => '/conversions/v1beta/{conversion_source.name=accounts/*/conversionSources/*}', + 'body' => 'conversion_source', + 'placeholders' => [ + 'conversion_source.name' => [ + 'getters' => [ + 'getConversionSource', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/ShoppingMerchantConversions/tests/Unit/V1beta/Client/ConversionSourcesServiceClientTest.php b/ShoppingMerchantConversions/tests/Unit/V1beta/Client/ConversionSourcesServiceClientTest.php new file mode 100644 index 000000000000..9611a9199b2f --- /dev/null +++ b/ShoppingMerchantConversions/tests/Unit/V1beta/Client/ConversionSourcesServiceClientTest.php @@ -0,0 +1,535 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return ConversionSourcesServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ConversionSourcesServiceClient($options); + } + + /** @test */ + public function createConversionSourceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new ConversionSource(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->accountName('[ACCOUNT]'); + $conversionSource = new ConversionSource(); + $request = (new CreateConversionSourceRequest()) + ->setParent($formattedParent) + ->setConversionSource($conversionSource); + $response = $gapicClient->createConversionSource($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.shopping.merchant.conversions.v1beta.ConversionSourcesService/CreateConversionSource', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getConversionSource(); + $this->assertProtobufEquals($conversionSource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createConversionSourceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->accountName('[ACCOUNT]'); + $conversionSource = new ConversionSource(); + $request = (new CreateConversionSourceRequest()) + ->setParent($formattedParent) + ->setConversionSource($conversionSource); + try { + $gapicClient->createConversionSource($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteConversionSourceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->conversionSourceName('[ACCOUNT]', '[CONVERSION_SOURCE]'); + $request = (new DeleteConversionSourceRequest())->setName($formattedName); + $gapicClient->deleteConversionSource($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.shopping.merchant.conversions.v1beta.ConversionSourcesService/DeleteConversionSource', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteConversionSourceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->conversionSourceName('[ACCOUNT]', '[CONVERSION_SOURCE]'); + $request = (new DeleteConversionSourceRequest())->setName($formattedName); + try { + $gapicClient->deleteConversionSource($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getConversionSourceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new ConversionSource(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->conversionSourceName('[ACCOUNT]', '[CONVERSION_SOURCE]'); + $request = (new GetConversionSourceRequest())->setName($formattedName); + $response = $gapicClient->getConversionSource($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.shopping.merchant.conversions.v1beta.ConversionSourcesService/GetConversionSource', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getConversionSourceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->conversionSourceName('[ACCOUNT]', '[CONVERSION_SOURCE]'); + $request = (new GetConversionSourceRequest())->setName($formattedName); + try { + $gapicClient->getConversionSource($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConversionSourcesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $conversionSourcesElement = new ConversionSource(); + $conversionSources = [$conversionSourcesElement]; + $expectedResponse = new ListConversionSourcesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setConversionSources($conversionSources); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->accountName('[ACCOUNT]'); + $request = (new ListConversionSourcesRequest())->setParent($formattedParent); + $response = $gapicClient->listConversionSources($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getConversionSources()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.shopping.merchant.conversions.v1beta.ConversionSourcesService/ListConversionSources', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConversionSourcesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->accountName('[ACCOUNT]'); + $request = (new ListConversionSourcesRequest())->setParent($formattedParent); + try { + $gapicClient->listConversionSources($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function undeleteConversionSourceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new ConversionSource(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->conversionSourceName('[ACCOUNT]', '[CONVERSION_SOURCE]'); + $request = (new UndeleteConversionSourceRequest())->setName($formattedName); + $response = $gapicClient->undeleteConversionSource($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.shopping.merchant.conversions.v1beta.ConversionSourcesService/UndeleteConversionSource', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function undeleteConversionSourceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->conversionSourceName('[ACCOUNT]', '[CONVERSION_SOURCE]'); + $request = (new UndeleteConversionSourceRequest())->setName($formattedName); + try { + $gapicClient->undeleteConversionSource($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateConversionSourceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new ConversionSource(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $conversionSource = new ConversionSource(); + $updateMask = new FieldMask(); + $request = (new UpdateConversionSourceRequest()) + ->setConversionSource($conversionSource) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateConversionSource($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.shopping.merchant.conversions.v1beta.ConversionSourcesService/UpdateConversionSource', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getConversionSource(); + $this->assertProtobufEquals($conversionSource, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateConversionSourceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $conversionSource = new ConversionSource(); + $updateMask = new FieldMask(); + $request = (new UpdateConversionSourceRequest()) + ->setConversionSource($conversionSource) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateConversionSource($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createConversionSourceAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new ConversionSource(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->accountName('[ACCOUNT]'); + $conversionSource = new ConversionSource(); + $request = (new CreateConversionSourceRequest()) + ->setParent($formattedParent) + ->setConversionSource($conversionSource); + $response = $gapicClient->createConversionSourceAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.shopping.merchant.conversions.v1beta.ConversionSourcesService/CreateConversionSource', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getConversionSource(); + $this->assertProtobufEquals($conversionSource, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/composer.json b/composer.json index 37c2a0716d85..3a04d2bb630b 100644 --- a/composer.json +++ b/composer.json @@ -73,8 +73,8 @@ "google/access-context-manager": "0.5.3", "google/analytics-admin": "0.22.3", "google/analytics-data": "0.16.3", - "google/apps-events-subscriptions": "0.1.1", "google/apps-chat": "0.1.0", + "google/apps-events-subscriptions": "0.1.1", "google/apps-meet": "0.2.1", "google/cloud-access-approval": "1.2.3", "google/cloud-advisorynotifications": "0.8.1", @@ -244,6 +244,7 @@ "google/longrunning": "0.4.1", "google/shopping-common-protos": "0.3.0", "google/shopping-css": "0.2.4", + "google/shopping-merchant-conversions": "0.0.0", "google/shopping-merchant-inventories": "0.4.1", "google/shopping-merchant-quota": "0.1.1", "google/shopping-merchant-reports": "0.7.1" @@ -430,6 +431,7 @@ "GPBMetadata\\Google\\Pubsub\\": "PubSub/metadata", "GPBMetadata\\Google\\Rpc\\": "CommonProtos/metadata/Rpc", "GPBMetadata\\Google\\Shopping\\Css\\": "ShoppingCss/metadata", + "GPBMetadata\\Google\\Shopping\\Merchant\\Conversions\\": "ShoppingMerchantConversions/metadata", "GPBMetadata\\Google\\Shopping\\Merchant\\Inventories\\": "ShoppingMerchantInventories/metadata", "GPBMetadata\\Google\\Shopping\\Merchant\\Quota\\": "ShoppingMerchantQuota/metadata", "GPBMetadata\\Google\\Shopping\\Merchant\\Reports\\": "ShoppingMerchantReports/metadata", @@ -618,6 +620,7 @@ "Google\\Identity\\AccessContextManager\\": "AccessContextManager/src", "Google\\LongRunning\\": "LongRunning/src/LongRunning", "Google\\Shopping\\Css\\": "ShoppingCss/src", + "Google\\Shopping\\Merchant\\Conversions\\": "ShoppingMerchantConversions/src", "Google\\Shopping\\Merchant\\Inventories\\": "ShoppingMerchantInventories/src", "Google\\Shopping\\Merchant\\Quota\\": "ShoppingMerchantQuota/src", "Google\\Shopping\\Merchant\\Reports\\": "ShoppingMerchantReports/src", From 819f6a46fac161a8a39675aac65517b06a229a92 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Wed, 1 May 2024 12:31:05 -0700 Subject: [PATCH 76/86] build: remove .repo-metadata.json from export-ignore gitattributes config (#7276) --- AccessApproval/.gitattributes | 1 - AccessContextManager/.gitattributes | 1 - AdvisoryNotifications/.gitattributes | 1 - AiPlatform/.gitattributes | 1 - AlloyDb/.gitattributes | 1 - AnalyticsAdmin/.gitattributes | 1 - AnalyticsData/.gitattributes | 1 - ApiGateway/.gitattributes | 1 - ApiKeys/.gitattributes | 1 - ApigeeConnect/.gitattributes | 1 - ApigeeRegistry/.gitattributes | 1 - AppEngineAdmin/.gitattributes | 1 - AppHub/.gitattributes | 1 - AppsChat/.gitattributes | 1 - AppsEventsSubscriptions/.gitattributes | 1 - AppsMeet/.gitattributes | 1 - ArtifactRegistry/.gitattributes | 1 - Asset/.gitattributes | 1 - AssuredWorkloads/.gitattributes | 1 - AutoMl/.gitattributes | 1 - BareMetalSolution/.gitattributes | 1 - Batch/.gitattributes | 1 - BeyondCorpAppConnections/.gitattributes | 1 - BeyondCorpAppConnectors/.gitattributes | 1 - BeyondCorpAppGateways/.gitattributes | 1 - BeyondCorpClientConnectorServices/.gitattributes | 1 - BeyondCorpClientGateways/.gitattributes | 1 - BigQueryAnalyticsHub/.gitattributes | 1 - BigQueryConnection/.gitattributes | 1 - BigQueryDataExchange/.gitattributes | 1 - BigQueryDataPolicies/.gitattributes | 1 - BigQueryDataTransfer/.gitattributes | 1 - BigQueryMigration/.gitattributes | 1 - BigQueryReservation/.gitattributes | 1 - BigQueryStorage/.gitattributes | 1 - Bigtable/.gitattributes | 1 - Billing/.gitattributes | 1 - BillingBudgets/.gitattributes | 1 - BinaryAuthorization/.gitattributes | 1 - Build/.gitattributes | 1 - CertificateManager/.gitattributes | 1 - Channel/.gitattributes | 1 - CommerceConsumerProcurement/.gitattributes | 1 - Compute/.gitattributes | 1 - ConfidentialComputing/.gitattributes | 1 - Config/.gitattributes | 1 - ContactCenterInsights/.gitattributes | 1 - Container/.gitattributes | 1 - ContainerAnalysis/.gitattributes | 1 - ControlsPartner/.gitattributes | 1 - DataCatalog/.gitattributes | 1 - DataCatalogLineage/.gitattributes | 1 - DataFusion/.gitattributes | 1 - DataLabeling/.gitattributes | 1 - Dataflow/.gitattributes | 1 - Dataform/.gitattributes | 1 - Dataplex/.gitattributes | 1 - Dataproc/.gitattributes | 1 - DataprocMetastore/.gitattributes | 1 - Datastore/.gitattributes | 1 - DatastoreAdmin/.gitattributes | 1 - Datastream/.gitattributes | 1 - Debugger/.gitattributes | 1 - Deploy/.gitattributes | 1 - Dialogflow/.gitattributes | 1 - DialogflowCx/.gitattributes | 1 - DiscoveryEngine/.gitattributes | 1 - Dlp/.gitattributes | 1 - Dms/.gitattributes | 1 - DocumentAi/.gitattributes | 1 - Domains/.gitattributes | 1 - EdgeNetwork/.gitattributes | 1 - ErrorReporting/.gitattributes | 1 - EssentialContacts/.gitattributes | 1 - Eventarc/.gitattributes | 1 - EventarcPublishing/.gitattributes | 1 - Filestore/.gitattributes | 1 - Firestore/.gitattributes | 1 - Functions/.gitattributes | 1 - GSuiteAddOns/.gitattributes | 1 - Gaming/.gitattributes | 1 - GkeBackup/.gitattributes | 1 - GkeConnectGateway/.gitattributes | 1 - GkeHub/.gitattributes | 1 - GkeMultiCloud/.gitattributes | 1 - Grafeas/.gitattributes | 1 - Iam/.gitattributes | 1 - IamCredentials/.gitattributes | 1 - Iap/.gitattributes | 1 - Ids/.gitattributes | 1 - Iot/.gitattributes | 1 - Kms/.gitattributes | 1 - KmsInventory/.gitattributes | 1 - Language/.gitattributes | 1 - LifeSciences/.gitattributes | 1 - Logging/.gitattributes | 1 - LongRunning/.gitattributes | 1 - ManagedIdentities/.gitattributes | 1 - MediaTranslation/.gitattributes | 1 - Memcache/.gitattributes | 1 - MigrationCenter/.gitattributes | 1 - Monitoring/.gitattributes | 1 - NetApp/.gitattributes | 1 - NetworkConnectivity/.gitattributes | 1 - NetworkManagement/.gitattributes | 1 - NetworkSecurity/.gitattributes | 1 - Notebooks/.gitattributes | 1 - Optimization/.gitattributes | 1 - OrchestrationAirflow/.gitattributes | 1 - OrgPolicy/.gitattributes | 1 - OsConfig/.gitattributes | 1 - Parallelstore/.gitattributes | 1 - PolicySimulator/.gitattributes | 1 - PolicyTroubleshooter/.gitattributes | 1 - PolicyTroubleshooterIam/.gitattributes | 1 - PrivateCatalog/.gitattributes | 1 - Profiler/.gitattributes | 1 - PubSub/.gitattributes | 1 - Quotas/.gitattributes | 1 - RapidMigrationAssessment/.gitattributes | 1 - RecommendationEngine/.gitattributes | 1 - Recommender/.gitattributes | 1 - Redis/.gitattributes | 1 - RedisCluster/.gitattributes | 1 - ResourceManager/.gitattributes | 1 - ResourceSettings/.gitattributes | 1 - Retail/.gitattributes | 1 - Run/.gitattributes | 1 - Scheduler/.gitattributes | 1 - SecretManager/.gitattributes | 1 - SecureSourceManager/.gitattributes | 1 - SecurityCenter/.gitattributes | 1 - SecurityCenterManagement/.gitattributes | 1 - SecurityPrivateCa/.gitattributes | 1 - SecurityPublicCA/.gitattributes | 1 - ServiceControl/.gitattributes | 1 - ServiceDirectory/.gitattributes | 1 - ServiceHealth/.gitattributes | 1 - ServiceManagement/.gitattributes | 1 - ServiceUsage/.gitattributes | 1 - Shell/.gitattributes | 1 - ShoppingCommonProtos/.gitattributes | 1 - ShoppingCss/.gitattributes | 1 - ShoppingMerchantConversions/.gitattributes | 1 - ShoppingMerchantInventories/.gitattributes | 1 - ShoppingMerchantQuota/.gitattributes | 1 - ShoppingMerchantReports/.gitattributes | 1 - Spanner/.gitattributes | 1 - Speech/.gitattributes | 1 - SqlAdmin/.gitattributes | 1 - StorageControl/.gitattributes | 1 - StorageInsights/.gitattributes | 1 - StorageTransfer/.gitattributes | 1 - Support/.gitattributes | 1 - Talent/.gitattributes | 1 - Tasks/.gitattributes | 1 - TelcoAutomation/.gitattributes | 1 - TextToSpeech/.gitattributes | 1 - Tpu/.gitattributes | 1 - Trace/.gitattributes | 1 - Translate/.gitattributes | 1 - VideoIntelligence/.gitattributes | 1 - VideoLiveStream/.gitattributes | 1 - VideoStitcher/.gitattributes | 1 - VideoTranscoder/.gitattributes | 1 - Vision/.gitattributes | 1 - VmMigration/.gitattributes | 1 - VmwareEngine/.gitattributes | 1 - VpcAccess/.gitattributes | 1 - WebRisk/.gitattributes | 1 - WebSecurityScanner/.gitattributes | 1 - Workflows/.gitattributes | 1 - dev/templates/.gitattributes | 1 - dev/tests/fixtures/component/CustomInput/.gitattributes | 1 - dev/tests/fixtures/component/SecretManager/.gitattributes | 1 - 175 files changed, 175 deletions(-) diff --git a/AccessApproval/.gitattributes b/AccessApproval/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/AccessApproval/.gitattributes +++ b/AccessApproval/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/AccessContextManager/.gitattributes b/AccessContextManager/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/AccessContextManager/.gitattributes +++ b/AccessContextManager/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/AdvisoryNotifications/.gitattributes b/AdvisoryNotifications/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/AdvisoryNotifications/.gitattributes +++ b/AdvisoryNotifications/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/AiPlatform/.gitattributes b/AiPlatform/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/AiPlatform/.gitattributes +++ b/AiPlatform/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/AlloyDb/.gitattributes b/AlloyDb/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/AlloyDb/.gitattributes +++ b/AlloyDb/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/AnalyticsAdmin/.gitattributes b/AnalyticsAdmin/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/AnalyticsAdmin/.gitattributes +++ b/AnalyticsAdmin/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/AnalyticsData/.gitattributes b/AnalyticsData/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/AnalyticsData/.gitattributes +++ b/AnalyticsData/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/ApiGateway/.gitattributes b/ApiGateway/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/ApiGateway/.gitattributes +++ b/ApiGateway/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/ApiKeys/.gitattributes b/ApiKeys/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/ApiKeys/.gitattributes +++ b/ApiKeys/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/ApigeeConnect/.gitattributes b/ApigeeConnect/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/ApigeeConnect/.gitattributes +++ b/ApigeeConnect/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/ApigeeRegistry/.gitattributes b/ApigeeRegistry/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/ApigeeRegistry/.gitattributes +++ b/ApigeeRegistry/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/AppEngineAdmin/.gitattributes b/AppEngineAdmin/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/AppEngineAdmin/.gitattributes +++ b/AppEngineAdmin/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/AppHub/.gitattributes b/AppHub/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/AppHub/.gitattributes +++ b/AppHub/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/AppsChat/.gitattributes b/AppsChat/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/AppsChat/.gitattributes +++ b/AppsChat/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/AppsEventsSubscriptions/.gitattributes b/AppsEventsSubscriptions/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/AppsEventsSubscriptions/.gitattributes +++ b/AppsEventsSubscriptions/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/AppsMeet/.gitattributes b/AppsMeet/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/AppsMeet/.gitattributes +++ b/AppsMeet/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/ArtifactRegistry/.gitattributes b/ArtifactRegistry/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/ArtifactRegistry/.gitattributes +++ b/ArtifactRegistry/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Asset/.gitattributes b/Asset/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Asset/.gitattributes +++ b/Asset/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/AssuredWorkloads/.gitattributes b/AssuredWorkloads/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/AssuredWorkloads/.gitattributes +++ b/AssuredWorkloads/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/AutoMl/.gitattributes b/AutoMl/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/AutoMl/.gitattributes +++ b/AutoMl/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/BareMetalSolution/.gitattributes b/BareMetalSolution/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/BareMetalSolution/.gitattributes +++ b/BareMetalSolution/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Batch/.gitattributes b/Batch/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Batch/.gitattributes +++ b/Batch/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/BeyondCorpAppConnections/.gitattributes b/BeyondCorpAppConnections/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/BeyondCorpAppConnections/.gitattributes +++ b/BeyondCorpAppConnections/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/BeyondCorpAppConnectors/.gitattributes b/BeyondCorpAppConnectors/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/BeyondCorpAppConnectors/.gitattributes +++ b/BeyondCorpAppConnectors/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/BeyondCorpAppGateways/.gitattributes b/BeyondCorpAppGateways/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/BeyondCorpAppGateways/.gitattributes +++ b/BeyondCorpAppGateways/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/BeyondCorpClientConnectorServices/.gitattributes b/BeyondCorpClientConnectorServices/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/BeyondCorpClientConnectorServices/.gitattributes +++ b/BeyondCorpClientConnectorServices/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/BeyondCorpClientGateways/.gitattributes b/BeyondCorpClientGateways/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/BeyondCorpClientGateways/.gitattributes +++ b/BeyondCorpClientGateways/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/BigQueryAnalyticsHub/.gitattributes b/BigQueryAnalyticsHub/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/BigQueryAnalyticsHub/.gitattributes +++ b/BigQueryAnalyticsHub/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/BigQueryConnection/.gitattributes b/BigQueryConnection/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/BigQueryConnection/.gitattributes +++ b/BigQueryConnection/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/BigQueryDataExchange/.gitattributes b/BigQueryDataExchange/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/BigQueryDataExchange/.gitattributes +++ b/BigQueryDataExchange/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/BigQueryDataPolicies/.gitattributes b/BigQueryDataPolicies/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/BigQueryDataPolicies/.gitattributes +++ b/BigQueryDataPolicies/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/BigQueryDataTransfer/.gitattributes b/BigQueryDataTransfer/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/BigQueryDataTransfer/.gitattributes +++ b/BigQueryDataTransfer/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/BigQueryMigration/.gitattributes b/BigQueryMigration/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/BigQueryMigration/.gitattributes +++ b/BigQueryMigration/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/BigQueryReservation/.gitattributes b/BigQueryReservation/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/BigQueryReservation/.gitattributes +++ b/BigQueryReservation/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/BigQueryStorage/.gitattributes b/BigQueryStorage/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/BigQueryStorage/.gitattributes +++ b/BigQueryStorage/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Bigtable/.gitattributes b/Bigtable/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Bigtable/.gitattributes +++ b/Bigtable/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Billing/.gitattributes b/Billing/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Billing/.gitattributes +++ b/Billing/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/BillingBudgets/.gitattributes b/BillingBudgets/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/BillingBudgets/.gitattributes +++ b/BillingBudgets/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/BinaryAuthorization/.gitattributes b/BinaryAuthorization/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/BinaryAuthorization/.gitattributes +++ b/BinaryAuthorization/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Build/.gitattributes b/Build/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Build/.gitattributes +++ b/Build/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/CertificateManager/.gitattributes b/CertificateManager/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/CertificateManager/.gitattributes +++ b/CertificateManager/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Channel/.gitattributes b/Channel/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Channel/.gitattributes +++ b/Channel/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/CommerceConsumerProcurement/.gitattributes b/CommerceConsumerProcurement/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/CommerceConsumerProcurement/.gitattributes +++ b/CommerceConsumerProcurement/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/Compute/.gitattributes b/Compute/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Compute/.gitattributes +++ b/Compute/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/ConfidentialComputing/.gitattributes b/ConfidentialComputing/.gitattributes index 6f03738972ae..5f13a9e0ef62 100644 --- a/ConfidentialComputing/.gitattributes +++ b/ConfidentialComputing/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/Config/.gitattributes b/Config/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/Config/.gitattributes +++ b/Config/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/ContactCenterInsights/.gitattributes b/ContactCenterInsights/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/ContactCenterInsights/.gitattributes +++ b/ContactCenterInsights/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Container/.gitattributes b/Container/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Container/.gitattributes +++ b/Container/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/ContainerAnalysis/.gitattributes b/ContainerAnalysis/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/ContainerAnalysis/.gitattributes +++ b/ContainerAnalysis/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/ControlsPartner/.gitattributes b/ControlsPartner/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/ControlsPartner/.gitattributes +++ b/ControlsPartner/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/DataCatalog/.gitattributes b/DataCatalog/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/DataCatalog/.gitattributes +++ b/DataCatalog/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/DataCatalogLineage/.gitattributes b/DataCatalogLineage/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/DataCatalogLineage/.gitattributes +++ b/DataCatalogLineage/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/DataFusion/.gitattributes b/DataFusion/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/DataFusion/.gitattributes +++ b/DataFusion/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/DataLabeling/.gitattributes b/DataLabeling/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/DataLabeling/.gitattributes +++ b/DataLabeling/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Dataflow/.gitattributes b/Dataflow/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Dataflow/.gitattributes +++ b/Dataflow/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Dataform/.gitattributes b/Dataform/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Dataform/.gitattributes +++ b/Dataform/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Dataplex/.gitattributes b/Dataplex/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Dataplex/.gitattributes +++ b/Dataplex/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Dataproc/.gitattributes b/Dataproc/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Dataproc/.gitattributes +++ b/Dataproc/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/DataprocMetastore/.gitattributes b/DataprocMetastore/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/DataprocMetastore/.gitattributes +++ b/DataprocMetastore/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Datastore/.gitattributes b/Datastore/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Datastore/.gitattributes +++ b/Datastore/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/DatastoreAdmin/.gitattributes b/DatastoreAdmin/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/DatastoreAdmin/.gitattributes +++ b/DatastoreAdmin/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Datastream/.gitattributes b/Datastream/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Datastream/.gitattributes +++ b/Datastream/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Debugger/.gitattributes b/Debugger/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Debugger/.gitattributes +++ b/Debugger/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Deploy/.gitattributes b/Deploy/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Deploy/.gitattributes +++ b/Deploy/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Dialogflow/.gitattributes b/Dialogflow/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Dialogflow/.gitattributes +++ b/Dialogflow/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/DialogflowCx/.gitattributes b/DialogflowCx/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/DialogflowCx/.gitattributes +++ b/DialogflowCx/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/DiscoveryEngine/.gitattributes b/DiscoveryEngine/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/DiscoveryEngine/.gitattributes +++ b/DiscoveryEngine/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/Dlp/.gitattributes b/Dlp/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Dlp/.gitattributes +++ b/Dlp/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Dms/.gitattributes b/Dms/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Dms/.gitattributes +++ b/Dms/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/DocumentAi/.gitattributes b/DocumentAi/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/DocumentAi/.gitattributes +++ b/DocumentAi/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Domains/.gitattributes b/Domains/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Domains/.gitattributes +++ b/Domains/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/EdgeNetwork/.gitattributes b/EdgeNetwork/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/EdgeNetwork/.gitattributes +++ b/EdgeNetwork/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/ErrorReporting/.gitattributes b/ErrorReporting/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/ErrorReporting/.gitattributes +++ b/ErrorReporting/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/EssentialContacts/.gitattributes b/EssentialContacts/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/EssentialContacts/.gitattributes +++ b/EssentialContacts/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Eventarc/.gitattributes b/Eventarc/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Eventarc/.gitattributes +++ b/Eventarc/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/EventarcPublishing/.gitattributes b/EventarcPublishing/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/EventarcPublishing/.gitattributes +++ b/EventarcPublishing/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Filestore/.gitattributes b/Filestore/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Filestore/.gitattributes +++ b/Filestore/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Firestore/.gitattributes b/Firestore/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Firestore/.gitattributes +++ b/Firestore/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Functions/.gitattributes b/Functions/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Functions/.gitattributes +++ b/Functions/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/GSuiteAddOns/.gitattributes b/GSuiteAddOns/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/GSuiteAddOns/.gitattributes +++ b/GSuiteAddOns/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Gaming/.gitattributes b/Gaming/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Gaming/.gitattributes +++ b/Gaming/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/GkeBackup/.gitattributes b/GkeBackup/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/GkeBackup/.gitattributes +++ b/GkeBackup/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/GkeConnectGateway/.gitattributes b/GkeConnectGateway/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/GkeConnectGateway/.gitattributes +++ b/GkeConnectGateway/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/GkeHub/.gitattributes b/GkeHub/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/GkeHub/.gitattributes +++ b/GkeHub/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/GkeMultiCloud/.gitattributes b/GkeMultiCloud/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/GkeMultiCloud/.gitattributes +++ b/GkeMultiCloud/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Grafeas/.gitattributes b/Grafeas/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Grafeas/.gitattributes +++ b/Grafeas/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Iam/.gitattributes b/Iam/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Iam/.gitattributes +++ b/Iam/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/IamCredentials/.gitattributes b/IamCredentials/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/IamCredentials/.gitattributes +++ b/IamCredentials/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Iap/.gitattributes b/Iap/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Iap/.gitattributes +++ b/Iap/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Ids/.gitattributes b/Ids/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Ids/.gitattributes +++ b/Ids/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Iot/.gitattributes b/Iot/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Iot/.gitattributes +++ b/Iot/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Kms/.gitattributes b/Kms/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Kms/.gitattributes +++ b/Kms/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/KmsInventory/.gitattributes b/KmsInventory/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/KmsInventory/.gitattributes +++ b/KmsInventory/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Language/.gitattributes b/Language/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Language/.gitattributes +++ b/Language/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/LifeSciences/.gitattributes b/LifeSciences/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/LifeSciences/.gitattributes +++ b/LifeSciences/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Logging/.gitattributes b/Logging/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Logging/.gitattributes +++ b/Logging/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/LongRunning/.gitattributes b/LongRunning/.gitattributes index 986ee5f5fe7c..f51251a9b18a 100644 --- a/LongRunning/.gitattributes +++ b/LongRunning/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /tests export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/ManagedIdentities/.gitattributes b/ManagedIdentities/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/ManagedIdentities/.gitattributes +++ b/ManagedIdentities/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/MediaTranslation/.gitattributes b/MediaTranslation/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/MediaTranslation/.gitattributes +++ b/MediaTranslation/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Memcache/.gitattributes b/Memcache/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Memcache/.gitattributes +++ b/Memcache/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/MigrationCenter/.gitattributes b/MigrationCenter/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/MigrationCenter/.gitattributes +++ b/MigrationCenter/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/Monitoring/.gitattributes b/Monitoring/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Monitoring/.gitattributes +++ b/Monitoring/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/NetApp/.gitattributes b/NetApp/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/NetApp/.gitattributes +++ b/NetApp/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/NetworkConnectivity/.gitattributes b/NetworkConnectivity/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/NetworkConnectivity/.gitattributes +++ b/NetworkConnectivity/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/NetworkManagement/.gitattributes b/NetworkManagement/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/NetworkManagement/.gitattributes +++ b/NetworkManagement/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/NetworkSecurity/.gitattributes b/NetworkSecurity/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/NetworkSecurity/.gitattributes +++ b/NetworkSecurity/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Notebooks/.gitattributes b/Notebooks/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Notebooks/.gitattributes +++ b/Notebooks/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Optimization/.gitattributes b/Optimization/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Optimization/.gitattributes +++ b/Optimization/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/OrchestrationAirflow/.gitattributes b/OrchestrationAirflow/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/OrchestrationAirflow/.gitattributes +++ b/OrchestrationAirflow/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/OrgPolicy/.gitattributes b/OrgPolicy/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/OrgPolicy/.gitattributes +++ b/OrgPolicy/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/OsConfig/.gitattributes b/OsConfig/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/OsConfig/.gitattributes +++ b/OsConfig/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Parallelstore/.gitattributes b/Parallelstore/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/Parallelstore/.gitattributes +++ b/Parallelstore/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/PolicySimulator/.gitattributes b/PolicySimulator/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/PolicySimulator/.gitattributes +++ b/PolicySimulator/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/PolicyTroubleshooter/.gitattributes b/PolicyTroubleshooter/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/PolicyTroubleshooter/.gitattributes +++ b/PolicyTroubleshooter/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/PolicyTroubleshooterIam/.gitattributes b/PolicyTroubleshooterIam/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/PolicyTroubleshooterIam/.gitattributes +++ b/PolicyTroubleshooterIam/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/PrivateCatalog/.gitattributes b/PrivateCatalog/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/PrivateCatalog/.gitattributes +++ b/PrivateCatalog/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Profiler/.gitattributes b/Profiler/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Profiler/.gitattributes +++ b/Profiler/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/PubSub/.gitattributes b/PubSub/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/PubSub/.gitattributes +++ b/PubSub/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Quotas/.gitattributes b/Quotas/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/Quotas/.gitattributes +++ b/Quotas/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/RapidMigrationAssessment/.gitattributes b/RapidMigrationAssessment/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/RapidMigrationAssessment/.gitattributes +++ b/RapidMigrationAssessment/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/RecommendationEngine/.gitattributes b/RecommendationEngine/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/RecommendationEngine/.gitattributes +++ b/RecommendationEngine/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Recommender/.gitattributes b/Recommender/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Recommender/.gitattributes +++ b/Recommender/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Redis/.gitattributes b/Redis/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Redis/.gitattributes +++ b/Redis/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/RedisCluster/.gitattributes b/RedisCluster/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/RedisCluster/.gitattributes +++ b/RedisCluster/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/ResourceManager/.gitattributes b/ResourceManager/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/ResourceManager/.gitattributes +++ b/ResourceManager/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/ResourceSettings/.gitattributes b/ResourceSettings/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/ResourceSettings/.gitattributes +++ b/ResourceSettings/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Retail/.gitattributes b/Retail/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Retail/.gitattributes +++ b/Retail/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Run/.gitattributes b/Run/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Run/.gitattributes +++ b/Run/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Scheduler/.gitattributes b/Scheduler/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Scheduler/.gitattributes +++ b/Scheduler/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/SecretManager/.gitattributes b/SecretManager/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/SecretManager/.gitattributes +++ b/SecretManager/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/SecureSourceManager/.gitattributes b/SecureSourceManager/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/SecureSourceManager/.gitattributes +++ b/SecureSourceManager/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/SecurityCenter/.gitattributes b/SecurityCenter/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/SecurityCenter/.gitattributes +++ b/SecurityCenter/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/SecurityCenterManagement/.gitattributes b/SecurityCenterManagement/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/SecurityCenterManagement/.gitattributes +++ b/SecurityCenterManagement/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/SecurityPrivateCa/.gitattributes b/SecurityPrivateCa/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/SecurityPrivateCa/.gitattributes +++ b/SecurityPrivateCa/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/SecurityPublicCA/.gitattributes b/SecurityPublicCA/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/SecurityPublicCA/.gitattributes +++ b/SecurityPublicCA/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/ServiceControl/.gitattributes b/ServiceControl/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/ServiceControl/.gitattributes +++ b/ServiceControl/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/ServiceDirectory/.gitattributes b/ServiceDirectory/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/ServiceDirectory/.gitattributes +++ b/ServiceDirectory/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/ServiceHealth/.gitattributes b/ServiceHealth/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/ServiceHealth/.gitattributes +++ b/ServiceHealth/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/ServiceManagement/.gitattributes b/ServiceManagement/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/ServiceManagement/.gitattributes +++ b/ServiceManagement/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/ServiceUsage/.gitattributes b/ServiceUsage/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/ServiceUsage/.gitattributes +++ b/ServiceUsage/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Shell/.gitattributes b/Shell/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Shell/.gitattributes +++ b/Shell/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/ShoppingCommonProtos/.gitattributes b/ShoppingCommonProtos/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/ShoppingCommonProtos/.gitattributes +++ b/ShoppingCommonProtos/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/ShoppingCss/.gitattributes b/ShoppingCss/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/ShoppingCss/.gitattributes +++ b/ShoppingCss/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/ShoppingMerchantConversions/.gitattributes b/ShoppingMerchantConversions/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/ShoppingMerchantConversions/.gitattributes +++ b/ShoppingMerchantConversions/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/ShoppingMerchantInventories/.gitattributes b/ShoppingMerchantInventories/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/ShoppingMerchantInventories/.gitattributes +++ b/ShoppingMerchantInventories/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/ShoppingMerchantQuota/.gitattributes b/ShoppingMerchantQuota/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/ShoppingMerchantQuota/.gitattributes +++ b/ShoppingMerchantQuota/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/ShoppingMerchantReports/.gitattributes b/ShoppingMerchantReports/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/ShoppingMerchantReports/.gitattributes +++ b/ShoppingMerchantReports/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/Spanner/.gitattributes b/Spanner/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Spanner/.gitattributes +++ b/Spanner/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Speech/.gitattributes b/Speech/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Speech/.gitattributes +++ b/Speech/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/SqlAdmin/.gitattributes b/SqlAdmin/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/SqlAdmin/.gitattributes +++ b/SqlAdmin/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/StorageControl/.gitattributes b/StorageControl/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/StorageControl/.gitattributes +++ b/StorageControl/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/StorageInsights/.gitattributes b/StorageInsights/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/StorageInsights/.gitattributes +++ b/StorageInsights/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/StorageTransfer/.gitattributes b/StorageTransfer/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/StorageTransfer/.gitattributes +++ b/StorageTransfer/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Support/.gitattributes b/Support/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/Support/.gitattributes +++ b/Support/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/Talent/.gitattributes b/Talent/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Talent/.gitattributes +++ b/Talent/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Tasks/.gitattributes b/Tasks/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Tasks/.gitattributes +++ b/Tasks/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/TelcoAutomation/.gitattributes b/TelcoAutomation/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/TelcoAutomation/.gitattributes +++ b/TelcoAutomation/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/TextToSpeech/.gitattributes b/TextToSpeech/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/TextToSpeech/.gitattributes +++ b/TextToSpeech/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Tpu/.gitattributes b/Tpu/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Tpu/.gitattributes +++ b/Tpu/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Trace/.gitattributes b/Trace/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Trace/.gitattributes +++ b/Trace/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Translate/.gitattributes b/Translate/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/Translate/.gitattributes +++ b/Translate/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/VideoIntelligence/.gitattributes b/VideoIntelligence/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/VideoIntelligence/.gitattributes +++ b/VideoIntelligence/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/VideoLiveStream/.gitattributes b/VideoLiveStream/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/VideoLiveStream/.gitattributes +++ b/VideoLiveStream/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/VideoStitcher/.gitattributes b/VideoStitcher/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/VideoStitcher/.gitattributes +++ b/VideoStitcher/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/VideoTranscoder/.gitattributes b/VideoTranscoder/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/VideoTranscoder/.gitattributes +++ b/VideoTranscoder/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/Vision/.gitattributes b/Vision/.gitattributes index f4f2a7d70268..32c1a5a10211 100644 --- a/Vision/.gitattributes +++ b/Vision/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /.owlbot export-ignore /owlbot.py export-ignore diff --git a/VmMigration/.gitattributes b/VmMigration/.gitattributes index bcbde07f4641..d3a486b8cd38 100644 --- a/VmMigration/.gitattributes +++ b/VmMigration/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore \ No newline at end of file diff --git a/VmwareEngine/.gitattributes b/VmwareEngine/.gitattributes index 9a8480242644..3e957a6e18b7 100644 --- a/VmwareEngine/.gitattributes +++ b/VmwareEngine/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore diff --git a/VpcAccess/.gitattributes b/VpcAccess/.gitattributes index bcbde07f4641..d3a486b8cd38 100644 --- a/VpcAccess/.gitattributes +++ b/VpcAccess/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore \ No newline at end of file diff --git a/WebRisk/.gitattributes b/WebRisk/.gitattributes index bcbde07f4641..d3a486b8cd38 100644 --- a/WebRisk/.gitattributes +++ b/WebRisk/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore \ No newline at end of file diff --git a/WebSecurityScanner/.gitattributes b/WebSecurityScanner/.gitattributes index bcbde07f4641..d3a486b8cd38 100644 --- a/WebSecurityScanner/.gitattributes +++ b/WebSecurityScanner/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore \ No newline at end of file diff --git a/Workflows/.gitattributes b/Workflows/.gitattributes index bcbde07f4641..d3a486b8cd38 100644 --- a/Workflows/.gitattributes +++ b/Workflows/.gitattributes @@ -2,7 +2,6 @@ /tests export-ignore /.github export-ignore /samples export-ignore -/.repo-metadata.json export-ignore /.OwlBot.yaml export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore \ No newline at end of file diff --git a/dev/templates/.gitattributes b/dev/templates/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/dev/templates/.gitattributes +++ b/dev/templates/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/dev/tests/fixtures/component/CustomInput/.gitattributes b/dev/tests/fixtures/component/CustomInput/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/dev/tests/fixtures/component/CustomInput/.gitattributes +++ b/dev/tests/fixtures/component/CustomInput/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore diff --git a/dev/tests/fixtures/component/SecretManager/.gitattributes b/dev/tests/fixtures/component/SecretManager/.gitattributes index 8119e7fcc1b2..4bf0fe6f415b 100644 --- a/dev/tests/fixtures/component/SecretManager/.gitattributes +++ b/dev/tests/fixtures/component/SecretManager/.gitattributes @@ -1,7 +1,6 @@ /*.xml.dist export-ignore /.OwlBot.yaml export-ignore /.github export-ignore -/.repo-metadata.json export-ignore /owlbot.py export-ignore /src/**/gapic_metadata.json export-ignore /samples export-ignore From 077e672ff2fb7d5202b69bd317cc20551b2cdad9 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Thu, 2 May 2024 10:17:13 -0700 Subject: [PATCH 77/86] chore(AppsChat): fix README.md (#7272) --- AppsChat/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppsChat/README.md b/AppsChat/README.md index 4f4e02075d2d..ccc2d238681c 100644 --- a/AppsChat/README.md +++ b/AppsChat/README.md @@ -17,7 +17,7 @@ To begin, install the preferred dependency manager for PHP, [Composer](https://g Now, install this component: ```sh -$ composer require google/chat +$ composer require google/apps-chat ``` > Browse the complete list of [Google Cloud APIs](https://cloud.google.com/php/docs/reference) From 586c2fd5b8f60476de295ef7ccb3ec4a6e1ae101 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 2 May 2024 19:35:44 +0200 Subject: [PATCH 78/86] chore(deps): update gcr.io/cloud-spanner-emulator/emulator docker tag to v1.5.17 (#7262) --- .github/workflows/spanner-emulator-system-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/spanner-emulator-system-tests.yaml b/.github/workflows/spanner-emulator-system-tests.yaml index bcd9f801f04f..3d14706a5450 100644 --- a/.github/workflows/spanner-emulator-system-tests.yaml +++ b/.github/workflows/spanner-emulator-system-tests.yaml @@ -18,7 +18,7 @@ jobs: services: emulator: - image: gcr.io/cloud-spanner-emulator/emulator:1.5.16 + image: gcr.io/cloud-spanner-emulator/emulator:1.5.17 ports: - 9010:9010 - 9020:9020 From 1c9455b413e25660122fceab2da35d3bf9b50483 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 3 May 2024 19:20:42 +0530 Subject: [PATCH 79/86] docs: small corrections to Cloud Deploy API documentation (#7278) PiperOrigin-RevId: 629796364 Source-Link: https://github.com/googleapis/googleapis/commit/62bc6257938d5fe9cd4fbce9d4b2f23e9467929f Source-Link: https://github.com/googleapis/googleapis-gen/commit/1d568e357a320fbd81d5c3a52c961a183311287f Copy-Tag: eyJwIjoiRGVwbG95Ly5Pd2xCb3QueWFtbCIsImgiOiIxZDU2OGUzNTdhMzIwZmJkODFkNWMzYTUyYzk2MWExODMzMTEyODdmIn0= --- Deploy/metadata/V1/CloudDeploy.php | Bin 43782 -> 43788 bytes Deploy/src/V1/AdvanceChildRolloutJobRun.php | 8 +++---- Deploy/src/V1/AdvanceRolloutRule.php | 12 +++++++---- Deploy/src/V1/AnthosCluster.php | 22 ++++++++++---------- Deploy/src/V1/CreateChildRolloutJobRun.php | 8 +++---- Deploy/src/V1/CustomTargetType.php | 16 ++++++++++---- Deploy/src/V1/DeliveryPipeline.php | 16 ++++++++++---- Deploy/src/V1/GkeCluster.php | 14 ++++++------- Deploy/src/V1/PromoteReleaseRule.php | 12 +++++++---- Deploy/src/V1/Release.php | 12 +++++++---- Deploy/src/V1/RepairRolloutRule.php | 12 +++++++---- Deploy/src/V1/Rollout.php | 20 +++++++++++------- Deploy/src/V1/Target.php | 12 +++++++---- 13 files changed, 102 insertions(+), 62 deletions(-) diff --git a/Deploy/metadata/V1/CloudDeploy.php b/Deploy/metadata/V1/CloudDeploy.php index 0aaa65011208c3d243fe9d10bcaa5b03ec5aa56b..a882503800722b4794b7ff8f0b53f60a05266a26 100644 GIT binary patch delta 103 zcmZp>#?*6-X@e{aWAA1;mf3R3iCkRn*{RMsrNt$wMM9Qb?8y+O1fv3@2B(w814qWm oH&P*{RMsrNt$wMM7p=?8y+O1fv3@2B(wistring rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -38,7 +38,7 @@ class AdvanceChildRolloutJobRun extends \Google\Protobuf\Internal\Message * * @type string $rollout * Output only. Name of the `ChildRollout`. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. * @type string $rollout_phase_id * Output only. the ID of the ChildRollout's Phase. * } @@ -50,7 +50,7 @@ public function __construct($data = NULL) { /** * Output only. Name of the `ChildRollout`. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. * * Generated from protobuf field string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -62,7 +62,7 @@ public function getRollout() /** * Output only. Name of the `ChildRollout`. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. * * Generated from protobuf field string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var diff --git a/Deploy/src/V1/AdvanceRolloutRule.php b/Deploy/src/V1/AdvanceRolloutRule.php index 0ac9ab030b72..0d5e07e21571 100644 --- a/Deploy/src/V1/AdvanceRolloutRule.php +++ b/Deploy/src/V1/AdvanceRolloutRule.php @@ -18,7 +18,8 @@ class AdvanceRolloutRule extends \Google\Protobuf\Internal\Message { /** * Required. ID of the rule. This id must be unique in the `Automation` - * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. + * resource to which this rule belongs. The format is + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. * * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; */ @@ -54,7 +55,8 @@ class AdvanceRolloutRule extends \Google\Protobuf\Internal\Message * * @type string $id * Required. ID of the rule. This id must be unique in the `Automation` - * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. + * resource to which this rule belongs. The format is + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. * @type array|\Google\Protobuf\Internal\RepeatedField $source_phases * Optional. Proceeds only after phase name matched any one in the list. * This value must consist of lower-case letters, numbers, and hyphens, @@ -74,7 +76,8 @@ public function __construct($data = NULL) { /** * Required. ID of the rule. This id must be unique in the `Automation` - * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. + * resource to which this rule belongs. The format is + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. * * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -86,7 +89,8 @@ public function getId() /** * Required. ID of the rule. This id must be unique in the `Automation` - * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. + * resource to which this rule belongs. The format is + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. * * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; * @param string $var diff --git a/Deploy/src/V1/AnthosCluster.php b/Deploy/src/V1/AnthosCluster.php index 97dd7cb2b432..fe6579e6d720 100644 --- a/Deploy/src/V1/AnthosCluster.php +++ b/Deploy/src/V1/AnthosCluster.php @@ -16,11 +16,11 @@ class AnthosCluster extends \Google\Protobuf\Internal\Message { /** - * Membership of the GKE Hub-registered cluster to which to apply the Skaffold - * configuration. Format is + * Optional. Membership of the GKE Hub-registered cluster to which to apply + * the Skaffold configuration. Format is * `projects/{project}/locations/{location}/memberships/{membership_name}`. * - * Generated from protobuf field string membership = 1 [(.google.api.resource_reference) = { + * Generated from protobuf field string membership = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { */ private $membership = ''; @@ -31,8 +31,8 @@ class AnthosCluster extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $membership - * Membership of the GKE Hub-registered cluster to which to apply the Skaffold - * configuration. Format is + * Optional. Membership of the GKE Hub-registered cluster to which to apply + * the Skaffold configuration. Format is * `projects/{project}/locations/{location}/memberships/{membership_name}`. * } */ @@ -42,11 +42,11 @@ public function __construct($data = NULL) { } /** - * Membership of the GKE Hub-registered cluster to which to apply the Skaffold - * configuration. Format is + * Optional. Membership of the GKE Hub-registered cluster to which to apply + * the Skaffold configuration. Format is * `projects/{project}/locations/{location}/memberships/{membership_name}`. * - * Generated from protobuf field string membership = 1 [(.google.api.resource_reference) = { + * Generated from protobuf field string membership = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { * @return string */ public function getMembership() @@ -55,11 +55,11 @@ public function getMembership() } /** - * Membership of the GKE Hub-registered cluster to which to apply the Skaffold - * configuration. Format is + * Optional. Membership of the GKE Hub-registered cluster to which to apply + * the Skaffold configuration. Format is * `projects/{project}/locations/{location}/memberships/{membership_name}`. * - * Generated from protobuf field string membership = 1 [(.google.api.resource_reference) = { + * Generated from protobuf field string membership = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { * @param string $var * @return $this */ diff --git a/Deploy/src/V1/CreateChildRolloutJobRun.php b/Deploy/src/V1/CreateChildRolloutJobRun.php index 89484e5f5401..b62a3bb82522 100644 --- a/Deploy/src/V1/CreateChildRolloutJobRun.php +++ b/Deploy/src/V1/CreateChildRolloutJobRun.php @@ -18,7 +18,7 @@ class CreateChildRolloutJobRun extends \Google\Protobuf\Internal\Message { /** * Output only. Name of the `ChildRollout`. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. * * Generated from protobuf field string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -38,7 +38,7 @@ class CreateChildRolloutJobRun extends \Google\Protobuf\Internal\Message * * @type string $rollout * Output only. Name of the `ChildRollout`. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. * @type string $rollout_phase_id * Output only. The ID of the childRollout Phase initiated by this JobRun. * } @@ -50,7 +50,7 @@ public function __construct($data = NULL) { /** * Output only. Name of the `ChildRollout`. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. * * Generated from protobuf field string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -62,7 +62,7 @@ public function getRollout() /** * Output only. Name of the `ChildRollout`. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. * * Generated from protobuf field string rollout = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var diff --git a/Deploy/src/V1/CustomTargetType.php b/Deploy/src/V1/CustomTargetType.php index 2371511d3942..0de4895368a1 100644 --- a/Deploy/src/V1/CustomTargetType.php +++ b/Deploy/src/V1/CustomTargetType.php @@ -20,7 +20,9 @@ class CustomTargetType extends \Google\Protobuf\Internal\Message { /** * Optional. Name of the `CustomTargetType`. Format is - * `projects/{project}/locations/{location}/customTargetTypes/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/customTargetTypes/{customTargetType}`. + * The `customTargetType` component must match + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -97,7 +99,9 @@ class CustomTargetType extends \Google\Protobuf\Internal\Message * * @type string $name * Optional. Name of the `CustomTargetType`. Format is - * `projects/{project}/locations/{location}/customTargetTypes/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/customTargetTypes/{customTargetType}`. + * The `customTargetType` component must match + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` * @type string $custom_target_type_id * Output only. Resource id of the `CustomTargetType`. * @type string $uid @@ -140,7 +144,9 @@ public function __construct($data = NULL) { /** * Optional. Name of the `CustomTargetType`. Format is - * `projects/{project}/locations/{location}/customTargetTypes/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/customTargetTypes/{customTargetType}`. + * The `customTargetType` component must match + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -152,7 +158,9 @@ public function getName() /** * Optional. Name of the `CustomTargetType`. Format is - * `projects/{project}/locations/{location}/customTargetTypes/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/customTargetTypes/{customTargetType}`. + * The `customTargetType` component must match + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var diff --git a/Deploy/src/V1/DeliveryPipeline.php b/Deploy/src/V1/DeliveryPipeline.php index 6fdcabce6375..251fada507ca 100644 --- a/Deploy/src/V1/DeliveryPipeline.php +++ b/Deploy/src/V1/DeliveryPipeline.php @@ -19,7 +19,9 @@ class DeliveryPipeline extends \Google\Protobuf\Internal\Message { /** * Optional. Name of the `DeliveryPipeline`. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}`. + * The `deliveryPipeline` component must match + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -100,7 +102,9 @@ class DeliveryPipeline extends \Google\Protobuf\Internal\Message * * @type string $name * Optional. Name of the `DeliveryPipeline`. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}`. + * The `deliveryPipeline` component must match + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` * @type string $uid * Output only. Unique identifier of the `DeliveryPipeline`. * @type string $description @@ -143,7 +147,9 @@ public function __construct($data = NULL) { /** * Optional. Name of the `DeliveryPipeline`. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}`. + * The `deliveryPipeline` component must match + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -155,7 +161,9 @@ public function getName() /** * Optional. Name of the `DeliveryPipeline`. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}`. + * The `deliveryPipeline` component must match + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var diff --git a/Deploy/src/V1/GkeCluster.php b/Deploy/src/V1/GkeCluster.php index f740425b9e3b..b28fe7fad7fb 100644 --- a/Deploy/src/V1/GkeCluster.php +++ b/Deploy/src/V1/GkeCluster.php @@ -16,10 +16,10 @@ class GkeCluster extends \Google\Protobuf\Internal\Message { /** - * Information specifying a GKE Cluster. Format is + * Optional. Information specifying a GKE Cluster. Format is * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`. * - * Generated from protobuf field string cluster = 1 [(.google.api.resource_reference) = { + * Generated from protobuf field string cluster = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { */ private $cluster = ''; /** @@ -42,7 +42,7 @@ class GkeCluster extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $cluster - * Information specifying a GKE Cluster. Format is + * Optional. Information specifying a GKE Cluster. Format is * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`. * @type bool $internal_ip * Optional. If true, `cluster` is accessed using the private IP address of @@ -60,10 +60,10 @@ public function __construct($data = NULL) { } /** - * Information specifying a GKE Cluster. Format is + * Optional. Information specifying a GKE Cluster. Format is * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`. * - * Generated from protobuf field string cluster = 1 [(.google.api.resource_reference) = { + * Generated from protobuf field string cluster = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { * @return string */ public function getCluster() @@ -72,10 +72,10 @@ public function getCluster() } /** - * Information specifying a GKE Cluster. Format is + * Optional. Information specifying a GKE Cluster. Format is * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`. * - * Generated from protobuf field string cluster = 1 [(.google.api.resource_reference) = { + * Generated from protobuf field string cluster = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { * @param string $var * @return $this */ diff --git a/Deploy/src/V1/PromoteReleaseRule.php b/Deploy/src/V1/PromoteReleaseRule.php index 9d30291eefdc..4405b3a1f2d6 100644 --- a/Deploy/src/V1/PromoteReleaseRule.php +++ b/Deploy/src/V1/PromoteReleaseRule.php @@ -18,7 +18,8 @@ class PromoteReleaseRule extends \Google\Protobuf\Internal\Message { /** * Required. ID of the rule. This id must be unique in the `Automation` - * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. + * resource to which this rule belongs. The format is + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. * * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; */ @@ -64,7 +65,8 @@ class PromoteReleaseRule extends \Google\Protobuf\Internal\Message * * @type string $id * Required. ID of the rule. This id must be unique in the `Automation` - * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. + * resource to which this rule belongs. The format is + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. * @type \Google\Protobuf\Duration $wait * Optional. How long the release need to be paused until being promoted to * the next target. @@ -90,7 +92,8 @@ public function __construct($data = NULL) { /** * Required. ID of the rule. This id must be unique in the `Automation` - * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. + * resource to which this rule belongs. The format is + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. * * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -102,7 +105,8 @@ public function getId() /** * Required. ID of the rule. This id must be unique in the `Automation` - * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. + * resource to which this rule belongs. The format is + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. * * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; * @param string $var diff --git a/Deploy/src/V1/Release.php b/Deploy/src/V1/Release.php index ed82e52c8a5d..bf8b7e0623b6 100644 --- a/Deploy/src/V1/Release.php +++ b/Deploy/src/V1/Release.php @@ -19,7 +19,8 @@ class Release extends \Google\Protobuf\Internal\Message { /** * Optional. Name of the `Release`. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`. + * The `release` component must match `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -178,7 +179,8 @@ class Release extends \Google\Protobuf\Internal\Message * * @type string $name * Optional. Name of the `Release`. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`. + * The `release` component must match `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` * @type string $uid * Output only. Unique identifier of the `Release`. * @type string $description @@ -249,7 +251,8 @@ public function __construct($data = NULL) { /** * Optional. Name of the `Release`. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`. + * The `release` component must match `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -261,7 +264,8 @@ public function getName() /** * Optional. Name of the `Release`. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}`. + * The `release` component must match `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var diff --git a/Deploy/src/V1/RepairRolloutRule.php b/Deploy/src/V1/RepairRolloutRule.php index 91d287c89e3e..9e3d1b0cde74 100644 --- a/Deploy/src/V1/RepairRolloutRule.php +++ b/Deploy/src/V1/RepairRolloutRule.php @@ -18,7 +18,8 @@ class RepairRolloutRule extends \Google\Protobuf\Internal\Message { /** * Required. ID of the rule. This id must be unique in the `Automation` - * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. + * resource to which this rule belongs. The format is + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. * * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; */ @@ -67,7 +68,8 @@ class RepairRolloutRule extends \Google\Protobuf\Internal\Message * * @type string $id * Required. ID of the rule. This id must be unique in the `Automation` - * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. + * resource to which this rule belongs. The format is + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. * @type array|\Google\Protobuf\Internal\RepeatedField $source_phases * Optional. Phases within which jobs are subject to automatic repair actions * on failure. Proceeds only after phase name matched any one in the list, or @@ -96,7 +98,8 @@ public function __construct($data = NULL) { /** * Required. ID of the rule. This id must be unique in the `Automation` - * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. + * resource to which this rule belongs. The format is + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. * * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -108,7 +111,8 @@ public function getId() /** * Required. ID of the rule. This id must be unique in the `Automation` - * resource to which this rule belongs. The format is `[a-z][a-z0-9\-]{0,62}`. + * resource to which this rule belongs. The format is + * `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. * * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = REQUIRED]; * @param string $var diff --git a/Deploy/src/V1/Rollout.php b/Deploy/src/V1/Rollout.php index 349bb81594ce..2198b481909c 100644 --- a/Deploy/src/V1/Rollout.php +++ b/Deploy/src/V1/Rollout.php @@ -18,7 +18,8 @@ class Rollout extends \Google\Protobuf\Internal\Message { /** * Optional. Name of the `Rollout`. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. + * The `rollout` component must match `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -150,7 +151,7 @@ class Rollout extends \Google\Protobuf\Internal\Message private $metadata = null; /** * Output only. Name of the `ControllerRollout`. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. * * Generated from protobuf field string controller_rollout = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ @@ -177,7 +178,8 @@ class Rollout extends \Google\Protobuf\Internal\Message * * @type string $name * Optional. Name of the `Rollout`. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. + * The `rollout` component must match `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` * @type string $uid * Output only. Unique identifier of the `Rollout`. * @type string $description @@ -233,7 +235,7 @@ class Rollout extends \Google\Protobuf\Internal\Message * Output only. Metadata contains information about the rollout. * @type string $controller_rollout * Output only. Name of the `ControllerRollout`. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. * @type string $rollback_of_rollout * Output only. Name of the `Rollout` that is rolled back by this `Rollout`. * Empty if this `Rollout` wasn't created as a rollback. @@ -248,7 +250,8 @@ public function __construct($data = NULL) { /** * Optional. Name of the `Rollout`. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. + * The `rollout` component must match `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -260,7 +263,8 @@ public function getName() /** * Optional. Name of the `Rollout`. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. + * The `rollout` component must match `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var @@ -838,7 +842,7 @@ public function setMetadata($var) /** * Output only. Name of the `ControllerRollout`. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. * * Generated from protobuf field string controller_rollout = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return string @@ -850,7 +854,7 @@ public function getControllerRollout() /** * Output only. Name of the `ControllerRollout`. Format is - * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/deliveryPipelines/{deliveryPipeline}/releases/{release}/rollouts/{rollout}`. * * Generated from protobuf field string controller_rollout = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param string $var diff --git a/Deploy/src/V1/Target.php b/Deploy/src/V1/Target.php index bcaef82d2ce9..50b30289ef67 100644 --- a/Deploy/src/V1/Target.php +++ b/Deploy/src/V1/Target.php @@ -19,7 +19,8 @@ class Target extends \Google\Protobuf\Internal\Message { /** * Optional. Name of the `Target`. Format is - * `projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/targets/{target}`. + * The `target` component must match `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -119,7 +120,8 @@ class Target extends \Google\Protobuf\Internal\Message * * @type string $name * Optional. Name of the `Target`. Format is - * `projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/targets/{target}`. + * The `target` component must match `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` * @type string $target_id * Output only. Resource id of the `Target`. * @type string $uid @@ -180,7 +182,8 @@ public function __construct($data = NULL) { /** * Optional. Name of the `Target`. Format is - * `projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/targets/{target}`. + * The `target` component must match `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -192,7 +195,8 @@ public function getName() /** * Optional. Name of the `Target`. Format is - * `projects/{project}/locations/{location}/targets/[a-z][a-z0-9\-]{0,62}`. + * `projects/{project}/locations/{location}/targets/{target}`. + * The `target` component must match `[a-z]([a-z0-9-]{0,61}[a-z0-9])?` * * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var From 63ace28b2b1e86203c6ca376c0467ffa5ac975cd Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 3 May 2024 19:21:11 +0530 Subject: [PATCH 80/86] feat: A new value `TPU_V5_LITEPOD` is added to enum `AcceleratorType` (#7275) feat: A new field `search_entry_point` is added to message `.google.cloud.aiplatform.v1.GroundingMetadata` feat: A new message `SearchEntryPoint` is added feat: A new field `private_service_connect_config` is added to message `.google.cloud.aiplatform.v1.Endpoint` feat: A new value `INVALID_TOKEN_VALUE` is added to enum `RecordErrorType` feat: A new field `deploy_task_name` is added to message `.google.cloud.aiplatform.v1.PublisherModel` docs: A comment for field `parent` in message `.google.cloud.aiplatform.v1.CreateFeatureGroupRequest` is changed docs: A comment for field `name` in message `.google.cloud.aiplatform.v1.NotebookRuntimeTemplate` is changed docs: A comment for field `base_model` in message `.google.cloud.aiplatform.v1.TuningJob` is changed docs: A comment for field `tuned_model_display_name` in message `.google.cloud.aiplatform.v1.TuningJob` is changed docs: A comment for field `epoch_count` in message `.google.cloud.aiplatform.v1.SupervisedHyperParameters` is changed docs: A comment for field `learning_rate_multiplier` in message `.google.cloud.aiplatform.v1.SupervisedHyperParameters` is changed docs: A comment for field `training_dataset_uri` in message `.google.cloud.aiplatform.v1.SupervisedTuningSpec` is changed docs: A comment for field `validation_dataset_uri` in message `.google.cloud.aiplatform.v1.SupervisedTuningSpec` is changed PiperOrigin-RevId: 629522152 Source-Link: https://github.com/googleapis/googleapis/commit/f9767ca40b6e547ffe59e998659326e69d71f269 Source-Link: https://github.com/googleapis/googleapis-gen/commit/95e3cf4a65180e7a8e26853a03c335c77a98d0c5 Copy-Tag: eyJwIjoiQWlQbGF0Zm9ybS8uT3dsQm90LnlhbWwiLCJoIjoiOTVlM2NmNGE2NTE4MGU3YThlMjY4NTNhMDNjMzM1Yzc3YTk4ZDBjNSJ9 --- AiPlatform/metadata/V1/AcceleratorType.php | Bin 1154 -> 1174 bytes AiPlatform/metadata/V1/Content.php | Bin 4935 -> 5116 bytes AiPlatform/metadata/V1/Endpoint.php | Bin 3680 -> 3914 bytes AiPlatform/metadata/V1/IndexService.php | Bin 5644 -> 5669 bytes AiPlatform/metadata/V1/NotebookRuntime.php | Bin 4250 -> 4245 bytes AiPlatform/metadata/V1/PublisherModel.php | Bin 5434 -> 5491 bytes .../create_feature_group.php | 2 +- AiPlatform/src/V1/AcceleratorType.php | 7 ++ .../src/V1/CreateFeatureGroupRequest.php | 10 +- AiPlatform/src/V1/Endpoint.php | 56 +++++++++ .../FeatureRegistryServiceGapicClient.php | 2 +- AiPlatform/src/V1/GroundingMetadata.php | 44 +++++++ .../RecordError/RecordErrorType.php | 7 ++ AiPlatform/src/V1/NotebookRuntimeTemplate.php | 14 +-- .../V1/PublisherModel/CallToAction/Deploy.php | 48 ++++++++ AiPlatform/src/V1/SearchEntryPoint.php | 109 ++++++++++++++++++ .../src/V1/SupervisedHyperParameters.php | 20 ++-- AiPlatform/src/V1/SupervisedTuningSpec.php | 16 +-- AiPlatform/src/V1/TuningJob.php | 22 ++-- AiPlatform/src/V1/gapic_metadata.json | 78 ++++++------- 20 files changed, 355 insertions(+), 80 deletions(-) create mode 100644 AiPlatform/src/V1/SearchEntryPoint.php diff --git a/AiPlatform/metadata/V1/AcceleratorType.php b/AiPlatform/metadata/V1/AcceleratorType.php index faf2f31df7d53580594bf81064dd5b81babbcc6b..6e95f49265a9ae05fe64b6161cb096bbe13f4bdd 100644 GIT binary patch delta 46 zcmZqToW{A~9V6qt$?q8h8P{)iWRhVN5fb9!3ke8~4>OJT@eFYd@OKg5*&NHP$_M~n CK@B(n delta 25 hcmbQn*~Gcw9V6qZ$?q8h8E0>HWRhXrT*$1-2mpL*2xR~O diff --git a/AiPlatform/metadata/V1/Content.php b/AiPlatform/metadata/V1/Content.php index 9a92f19e33a259e9b0d3db07f2a4ea7320602820..a636d5016879e7f3882b1f390f53a3fa86ad9d18 100644 GIT binary patch delta 183 zcmX@E_D6lg2_~jjiknX{$?!3LoBUj$M?xrwOQ<+Cu_!qsJ~gkTs4~7FKQpgHf@QKj zpHh7=Si%(~9sm+{Vt(Mr=)usz$mk@>B^-~bPsxKz09})iESEr0YFjg!1x5`{uyI17TpYzI+3`s^`AHH?Kw%!Ru+|nvuFd6w7Z?FDLOdA& delta 26 icmeyPeq3$C2_~kk3Y$+c$?!3DPkt`Yvspvv3L^lQ3kq)l diff --git a/AiPlatform/metadata/V1/Endpoint.php b/AiPlatform/metadata/V1/Endpoint.php index 9a807e5658a18279416caf445e5925e9061f68c2..087c1ed2e17891e5a5250f0f49918391109460e9 100644 GIT binary patch delta 164 zcmaDLb4qSQ1oPxmOd^88sYPX($*F#+CFS`=*_nCilNT^)O^#p=XKE1JypdUkkGn?JDlFlnZ6$rTi3mL-;?#=}%5=jY|6CYQtm>9ovr2~h<` i4Q?az$@5ud; delta 35 rcmX>l_dsSt1oPzO%;8K=MK-a>Fis9+Rb)EEvAKlRhiS7KhYC9Y-fIf3 diff --git a/AiPlatform/metadata/V1/IndexService.php b/AiPlatform/metadata/V1/IndexService.php index 4a480b7ae1af26c88cddad46ed9d0330da5a4abc..a132f9b706eef465ff9f25b5d90bd007c083fd0b 100644 GIT binary patch delta 71 zcmeCtS*o*vorUFsGMC=uH7p97wOLHq8DCCL;6BKBX|fW}9mcPl|MSE$N(zZ{348j5 bIr@0I#E1BMyZXfg*`cli{F`I=Hn0N#Hmnvj delta 55 zcmV-70LcHPEQ~C$2LuGSBML5)tOOvlD+DwL0nn3R3&8=olOhb<0o=3y3|#>Q8qxs@ N7L)J`7qgKLln3_85?=rS diff --git a/AiPlatform/metadata/V1/NotebookRuntime.php b/AiPlatform/metadata/V1/NotebookRuntime.php index 1eb999bcdfe8f6d3f090cc8e9e36e6bca4a85d9a..733b499f0c5cb9702da6c722ad9247ac354b7923 100644 GIT binary patch delta 46 zcmbQGI8||jAq&fN2`hro0qUjaWXAu*?fS1A)}HKmq1EtK~8>U vd`V()c6?r9ZmI;A0;2|}6Y~Q{Mi0gg#>w%5{-RF8T!QiF3OBD4>|q7~ibW$v delta 46 zcmV+}0MY;RD!MAL?g9aUlkWn@0^K09xC80}0_YaAqy`!Z0`3E|zz?ATlZ6pYv*!_v E1KV&D4*&oF diff --git a/AiPlatform/samples/V1/FeatureRegistryServiceClient/create_feature_group.php b/AiPlatform/samples/V1/FeatureRegistryServiceClient/create_feature_group.php index 8090303c9000..5a8f53f07ef9 100644 --- a/AiPlatform/samples/V1/FeatureRegistryServiceClient/create_feature_group.php +++ b/AiPlatform/samples/V1/FeatureRegistryServiceClient/create_feature_group.php @@ -35,7 +35,7 @@ * * @param string $formattedParent The resource name of the Location to create FeatureGroups. * Format: - * `projects/{project}/locations/{location}'` + * `projects/{project}/locations/{location}` * Please see {@see FeatureRegistryServiceClient::locationName()} for help formatting this field. * @param string $featureGroupId The ID to use for this FeatureGroup, which will become the final * component of the FeatureGroup's resource name. diff --git a/AiPlatform/src/V1/AcceleratorType.php b/AiPlatform/src/V1/AcceleratorType.php index 795510275c25..f5472bd1f42b 100644 --- a/AiPlatform/src/V1/AcceleratorType.php +++ b/AiPlatform/src/V1/AcceleratorType.php @@ -91,6 +91,12 @@ class AcceleratorType * Generated from protobuf enum TPU_V4_POD = 10; */ const TPU_V4_POD = 10; + /** + * TPU v5. + * + * Generated from protobuf enum TPU_V5_LITEPOD = 12; + */ + const TPU_V5_LITEPOD = 12; private static $valueToName = [ self::ACCELERATOR_TYPE_UNSPECIFIED => 'ACCELERATOR_TYPE_UNSPECIFIED', @@ -106,6 +112,7 @@ class AcceleratorType self::TPU_V2 => 'TPU_V2', self::TPU_V3 => 'TPU_V3', self::TPU_V4_POD => 'TPU_V4_POD', + self::TPU_V5_LITEPOD => 'TPU_V5_LITEPOD', ]; public static function name($value) diff --git a/AiPlatform/src/V1/CreateFeatureGroupRequest.php b/AiPlatform/src/V1/CreateFeatureGroupRequest.php index e935a34493bd..13c6eb258287 100644 --- a/AiPlatform/src/V1/CreateFeatureGroupRequest.php +++ b/AiPlatform/src/V1/CreateFeatureGroupRequest.php @@ -19,7 +19,7 @@ class CreateFeatureGroupRequest extends \Google\Protobuf\Internal\Message /** * Required. The resource name of the Location to create FeatureGroups. * Format: - * `projects/{project}/locations/{location}'` + * `projects/{project}/locations/{location}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { */ @@ -44,7 +44,7 @@ class CreateFeatureGroupRequest extends \Google\Protobuf\Internal\Message /** * @param string $parent Required. The resource name of the Location to create FeatureGroups. * Format: - * `projects/{project}/locations/{location}'` + * `projects/{project}/locations/{location}` * Please see {@see FeatureRegistryServiceClient::locationName()} for help formatting this field. * @param \Google\Cloud\AIPlatform\V1\FeatureGroup $featureGroup Required. The FeatureGroup to create. * @param string $featureGroupId Required. The ID to use for this FeatureGroup, which will become the final @@ -76,7 +76,7 @@ public static function build(string $parent, \Google\Cloud\AIPlatform\V1\Feature * @type string $parent * Required. The resource name of the Location to create FeatureGroups. * Format: - * `projects/{project}/locations/{location}'` + * `projects/{project}/locations/{location}` * @type \Google\Cloud\AIPlatform\V1\FeatureGroup $feature_group * Required. The FeatureGroup to create. * @type string $feature_group_id @@ -95,7 +95,7 @@ public function __construct($data = NULL) { /** * Required. The resource name of the Location to create FeatureGroups. * Format: - * `projects/{project}/locations/{location}'` + * `projects/{project}/locations/{location}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @return string @@ -108,7 +108,7 @@ public function getParent() /** * Required. The resource name of the Location to create FeatureGroups. * Format: - * `projects/{project}/locations/{location}'` + * `projects/{project}/locations/{location}` * * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { * @param string $var diff --git a/AiPlatform/src/V1/Endpoint.php b/AiPlatform/src/V1/Endpoint.php index 2add109629b1..70cd2309a29f 100644 --- a/AiPlatform/src/V1/Endpoint.php +++ b/AiPlatform/src/V1/Endpoint.php @@ -124,6 +124,15 @@ class Endpoint extends \Google\Protobuf\Internal\Message * @deprecated */ protected $enable_private_service_connect = false; + /** + * Optional. Configuration for private service connect. + * [network][google.cloud.aiplatform.v1.Endpoint.network] and + * [private_service_connect_config][google.cloud.aiplatform.v1.Endpoint.private_service_connect_config] + * are mutually exclusive. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PrivateServiceConnectConfig private_service_connect_config = 21 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $private_service_connect_config = null; /** * Output only. Resource name of the Model Monitoring job associated with this * Endpoint if monitoring is enabled by @@ -206,6 +215,11 @@ class Endpoint extends \Google\Protobuf\Internal\Message * [network][google.cloud.aiplatform.v1.Endpoint.network] or * [enable_private_service_connect][google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect], * can be set. + * @type \Google\Cloud\AIPlatform\V1\PrivateServiceConnectConfig $private_service_connect_config + * Optional. Configuration for private service connect. + * [network][google.cloud.aiplatform.v1.Endpoint.network] and + * [private_service_connect_config][google.cloud.aiplatform.v1.Endpoint.private_service_connect_config] + * are mutually exclusive. * @type string $model_deployment_monitoring_job * Output only. Resource name of the Model Monitoring job associated with this * Endpoint if monitoring is enabled by @@ -637,6 +651,48 @@ public function setEnablePrivateServiceConnect($var) return $this; } + /** + * Optional. Configuration for private service connect. + * [network][google.cloud.aiplatform.v1.Endpoint.network] and + * [private_service_connect_config][google.cloud.aiplatform.v1.Endpoint.private_service_connect_config] + * are mutually exclusive. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PrivateServiceConnectConfig private_service_connect_config = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\AIPlatform\V1\PrivateServiceConnectConfig|null + */ + public function getPrivateServiceConnectConfig() + { + return $this->private_service_connect_config; + } + + public function hasPrivateServiceConnectConfig() + { + return isset($this->private_service_connect_config); + } + + public function clearPrivateServiceConnectConfig() + { + unset($this->private_service_connect_config); + } + + /** + * Optional. Configuration for private service connect. + * [network][google.cloud.aiplatform.v1.Endpoint.network] and + * [private_service_connect_config][google.cloud.aiplatform.v1.Endpoint.private_service_connect_config] + * are mutually exclusive. + * + * Generated from protobuf field .google.cloud.aiplatform.v1.PrivateServiceConnectConfig private_service_connect_config = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\AIPlatform\V1\PrivateServiceConnectConfig $var + * @return $this + */ + public function setPrivateServiceConnectConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\PrivateServiceConnectConfig::class); + $this->private_service_connect_config = $var; + + return $this; + } + /** * Output only. Resource name of the Model Monitoring job associated with this * Endpoint if monitoring is enabled by diff --git a/AiPlatform/src/V1/Gapic/FeatureRegistryServiceGapicClient.php b/AiPlatform/src/V1/Gapic/FeatureRegistryServiceGapicClient.php index 52b1cd3fd74f..58f0c33818d6 100644 --- a/AiPlatform/src/V1/Gapic/FeatureRegistryServiceGapicClient.php +++ b/AiPlatform/src/V1/Gapic/FeatureRegistryServiceGapicClient.php @@ -699,7 +699,7 @@ public function createFeature( * * @param string $parent Required. The resource name of the Location to create FeatureGroups. * Format: - * `projects/{project}/locations/{location}'` + * `projects/{project}/locations/{location}` * @param FeatureGroup $featureGroup Required. The FeatureGroup to create. * @param string $featureGroupId Required. The ID to use for this FeatureGroup, which will become the final * component of the FeatureGroup's resource name. diff --git a/AiPlatform/src/V1/GroundingMetadata.php b/AiPlatform/src/V1/GroundingMetadata.php index 4ab8973cb5aa..21ddb7c0406b 100644 --- a/AiPlatform/src/V1/GroundingMetadata.php +++ b/AiPlatform/src/V1/GroundingMetadata.php @@ -27,6 +27,12 @@ class GroundingMetadata extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.cloud.aiplatform.v1.GroundingAttribution grounding_attributions = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $grounding_attributions; + /** + * Optional. Google search entry for the following-up web searches. + * + * Generated from protobuf field optional .google.cloud.aiplatform.v1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $search_entry_point = null; /** * Constructor. @@ -38,6 +44,8 @@ class GroundingMetadata extends \Google\Protobuf\Internal\Message * Optional. Web search queries for the following-up web search. * @type array<\Google\Cloud\AIPlatform\V1\GroundingAttribution>|\Google\Protobuf\Internal\RepeatedField $grounding_attributions * Optional. List of grounding attributions. + * @type \Google\Cloud\AIPlatform\V1\SearchEntryPoint $search_entry_point + * Optional. Google search entry for the following-up web searches. * } */ public function __construct($data = NULL) { @@ -97,5 +105,41 @@ public function setGroundingAttributions($var) return $this; } + /** + * Optional. Google search entry for the following-up web searches. + * + * Generated from protobuf field optional .google.cloud.aiplatform.v1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\AIPlatform\V1\SearchEntryPoint|null + */ + public function getSearchEntryPoint() + { + return $this->search_entry_point; + } + + public function hasSearchEntryPoint() + { + return isset($this->search_entry_point); + } + + public function clearSearchEntryPoint() + { + unset($this->search_entry_point); + } + + /** + * Optional. Google search entry for the following-up web searches. + * + * Generated from protobuf field optional .google.cloud.aiplatform.v1.SearchEntryPoint search_entry_point = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\AIPlatform\V1\SearchEntryPoint $var + * @return $this + */ + public function setSearchEntryPoint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\SearchEntryPoint::class); + $this->search_entry_point = $var; + + return $this; + } + } diff --git a/AiPlatform/src/V1/NearestNeighborSearchOperationMetadata/RecordError/RecordErrorType.php b/AiPlatform/src/V1/NearestNeighborSearchOperationMetadata/RecordError/RecordErrorType.php index f67d8820d9e3..45c80bc76444 100644 --- a/AiPlatform/src/V1/NearestNeighborSearchOperationMetadata/RecordError/RecordErrorType.php +++ b/AiPlatform/src/V1/NearestNeighborSearchOperationMetadata/RecordError/RecordErrorType.php @@ -97,6 +97,12 @@ class RecordErrorType * Generated from protobuf enum INVALID_ENCODING = 13; */ const INVALID_ENCODING = 13; + /** + * Token restrict value is invalid. + * + * Generated from protobuf enum INVALID_TOKEN_VALUE = 15; + */ + const INVALID_TOKEN_VALUE = 15; private static $valueToName = [ self::ERROR_TYPE_UNSPECIFIED => 'ERROR_TYPE_UNSPECIFIED', @@ -113,6 +119,7 @@ class RecordErrorType self::MULTIPLE_VALUES => 'MULTIPLE_VALUES', self::INVALID_NUMERIC_VALUE => 'INVALID_NUMERIC_VALUE', self::INVALID_ENCODING => 'INVALID_ENCODING', + self::INVALID_TOKEN_VALUE => 'INVALID_TOKEN_VALUE', ]; public static function name($value) diff --git a/AiPlatform/src/V1/NotebookRuntimeTemplate.php b/AiPlatform/src/V1/NotebookRuntimeTemplate.php index bbf5c92fdc96..bebc4d4d964c 100644 --- a/AiPlatform/src/V1/NotebookRuntimeTemplate.php +++ b/AiPlatform/src/V1/NotebookRuntimeTemplate.php @@ -18,9 +18,9 @@ class NotebookRuntimeTemplate extends \Google\Protobuf\Internal\Message { /** - * Output only. The resource name of the NotebookRuntimeTemplate. + * The resource name of the NotebookRuntimeTemplate. * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field string name = 1; */ private $name = ''; /** @@ -146,7 +146,7 @@ class NotebookRuntimeTemplate extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $name - * Output only. The resource name of the NotebookRuntimeTemplate. + * The resource name of the NotebookRuntimeTemplate. * @type string $display_name * Required. The display name of the NotebookRuntimeTemplate. * The name can be up to 128 characters long and can consist of any UTF-8 @@ -206,9 +206,9 @@ public function __construct($data = NULL) { } /** - * Output only. The resource name of the NotebookRuntimeTemplate. + * The resource name of the NotebookRuntimeTemplate. * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field string name = 1; * @return string */ public function getName() @@ -217,9 +217,9 @@ public function getName() } /** - * Output only. The resource name of the NotebookRuntimeTemplate. + * The resource name of the NotebookRuntimeTemplate. * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * Generated from protobuf field string name = 1; * @param string $var * @return $this */ diff --git a/AiPlatform/src/V1/PublisherModel/CallToAction/Deploy.php b/AiPlatform/src/V1/PublisherModel/CallToAction/Deploy.php index 297c71a9aee1..057ad509a6ab 100644 --- a/AiPlatform/src/V1/PublisherModel/CallToAction/Deploy.php +++ b/AiPlatform/src/V1/PublisherModel/CallToAction/Deploy.php @@ -43,6 +43,13 @@ class Deploy extends \Google\Protobuf\Internal\Message * Generated from protobuf field string artifact_uri = 4 [(.google.api.field_behavior) = OPTIONAL]; */ private $artifact_uri = ''; + /** + * Optional. The name of the deploy task (e.g., "text to image + * generation"). + * + * Generated from protobuf field optional string deploy_task_name = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $deploy_task_name = null; /** * Required. The title of the regional resource reference. * @@ -85,6 +92,9 @@ class Deploy extends \Google\Protobuf\Internal\Message * @type string $artifact_uri * Optional. The path to the directory containing the Model artifact and * any of its supporting files. + * @type string $deploy_task_name + * Optional. The name of the deploy task (e.g., "text to image + * generation"). * @type string $title * Required. The title of the regional resource reference. * @type string $public_artifact_uri @@ -328,6 +338,44 @@ public function setArtifactUri($var) return $this; } + /** + * Optional. The name of the deploy task (e.g., "text to image + * generation"). + * + * Generated from protobuf field optional string deploy_task_name = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDeployTaskName() + { + return isset($this->deploy_task_name) ? $this->deploy_task_name : ''; + } + + public function hasDeployTaskName() + { + return isset($this->deploy_task_name); + } + + public function clearDeployTaskName() + { + unset($this->deploy_task_name); + } + + /** + * Optional. The name of the deploy task (e.g., "text to image + * generation"). + * + * Generated from protobuf field optional string deploy_task_name = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDeployTaskName($var) + { + GPBUtil::checkString($var, True); + $this->deploy_task_name = $var; + + return $this; + } + /** * Required. The title of the regional resource reference. * diff --git a/AiPlatform/src/V1/SearchEntryPoint.php b/AiPlatform/src/V1/SearchEntryPoint.php new file mode 100644 index 000000000000..b9d692394464 --- /dev/null +++ b/AiPlatform/src/V1/SearchEntryPoint.php @@ -0,0 +1,109 @@ +google.cloud.aiplatform.v1.SearchEntryPoint + */ +class SearchEntryPoint extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Web content snippet that can be embedded in a web page or an app + * webview. + * + * Generated from protobuf field string rendered_content = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $rendered_content = ''; + /** + * Optional. Base64 encoded JSON representing array of tuple. + * + * Generated from protobuf field bytes sdk_blob = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $sdk_blob = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $rendered_content + * Optional. Web content snippet that can be embedded in a web page or an app + * webview. + * @type string $sdk_blob + * Optional. Base64 encoded JSON representing array of tuple. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Aiplatform\V1\Content::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Web content snippet that can be embedded in a web page or an app + * webview. + * + * Generated from protobuf field string rendered_content = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRenderedContent() + { + return $this->rendered_content; + } + + /** + * Optional. Web content snippet that can be embedded in a web page or an app + * webview. + * + * Generated from protobuf field string rendered_content = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRenderedContent($var) + { + GPBUtil::checkString($var, True); + $this->rendered_content = $var; + + return $this; + } + + /** + * Optional. Base64 encoded JSON representing array of tuple. + * + * Generated from protobuf field bytes sdk_blob = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSdkBlob() + { + return $this->sdk_blob; + } + + /** + * Optional. Base64 encoded JSON representing array of tuple. + * + * Generated from protobuf field bytes sdk_blob = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSdkBlob($var) + { + GPBUtil::checkString($var, False); + $this->sdk_blob = $var; + + return $this; + } + +} + diff --git a/AiPlatform/src/V1/SupervisedHyperParameters.php b/AiPlatform/src/V1/SupervisedHyperParameters.php index 2399d0e50cc1..81caf4595c0b 100644 --- a/AiPlatform/src/V1/SupervisedHyperParameters.php +++ b/AiPlatform/src/V1/SupervisedHyperParameters.php @@ -16,13 +16,14 @@ class SupervisedHyperParameters extends \Google\Protobuf\Internal\Message { /** - * Optional. Number of training epoches for this tuning job. + * Optional. Number of complete passes the model makes over the entire + * training dataset during training. * * Generated from protobuf field int64 epoch_count = 1 [(.google.api.field_behavior) = OPTIONAL]; */ private $epoch_count = 0; /** - * Optional. Learning rate multiplier for tuning. + * Optional. Multiplier for adjusting the default learning rate. * * Generated from protobuf field double learning_rate_multiplier = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -41,9 +42,10 @@ class SupervisedHyperParameters extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type int|string $epoch_count - * Optional. Number of training epoches for this tuning job. + * Optional. Number of complete passes the model makes over the entire + * training dataset during training. * @type float $learning_rate_multiplier - * Optional. Learning rate multiplier for tuning. + * Optional. Multiplier for adjusting the default learning rate. * @type int $adapter_size * Optional. Adapter size for tuning. * } @@ -54,7 +56,8 @@ public function __construct($data = NULL) { } /** - * Optional. Number of training epoches for this tuning job. + * Optional. Number of complete passes the model makes over the entire + * training dataset during training. * * Generated from protobuf field int64 epoch_count = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return int|string @@ -65,7 +68,8 @@ public function getEpochCount() } /** - * Optional. Number of training epoches for this tuning job. + * Optional. Number of complete passes the model makes over the entire + * training dataset during training. * * Generated from protobuf field int64 epoch_count = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param int|string $var @@ -80,7 +84,7 @@ public function setEpochCount($var) } /** - * Optional. Learning rate multiplier for tuning. + * Optional. Multiplier for adjusting the default learning rate. * * Generated from protobuf field double learning_rate_multiplier = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return float @@ -91,7 +95,7 @@ public function getLearningRateMultiplier() } /** - * Optional. Learning rate multiplier for tuning. + * Optional. Multiplier for adjusting the default learning rate. * * Generated from protobuf field double learning_rate_multiplier = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param float $var diff --git a/AiPlatform/src/V1/SupervisedTuningSpec.php b/AiPlatform/src/V1/SupervisedTuningSpec.php index 3964310e38fd..b4126db6dd11 100644 --- a/AiPlatform/src/V1/SupervisedTuningSpec.php +++ b/AiPlatform/src/V1/SupervisedTuningSpec.php @@ -17,14 +17,14 @@ class SupervisedTuningSpec extends \Google\Protobuf\Internal\Message { /** * Required. Cloud Storage path to file containing training dataset for - * tuning. + * tuning. The dataset must be formatted as a JSONL file. * * Generated from protobuf field string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED]; */ private $training_dataset_uri = ''; /** * Optional. Cloud Storage path to file containing validation dataset for - * tuning. + * tuning. The dataset must be formatted as a JSONL file. * * Generated from protobuf field string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -44,10 +44,10 @@ class SupervisedTuningSpec extends \Google\Protobuf\Internal\Message * * @type string $training_dataset_uri * Required. Cloud Storage path to file containing training dataset for - * tuning. + * tuning. The dataset must be formatted as a JSONL file. * @type string $validation_dataset_uri * Optional. Cloud Storage path to file containing validation dataset for - * tuning. + * tuning. The dataset must be formatted as a JSONL file. * @type \Google\Cloud\AIPlatform\V1\SupervisedHyperParameters $hyper_parameters * Optional. Hyperparameters for SFT. * } @@ -59,7 +59,7 @@ public function __construct($data = NULL) { /** * Required. Cloud Storage path to file containing training dataset for - * tuning. + * tuning. The dataset must be formatted as a JSONL file. * * Generated from protobuf field string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -71,7 +71,7 @@ public function getTrainingDatasetUri() /** * Required. Cloud Storage path to file containing training dataset for - * tuning. + * tuning. The dataset must be formatted as a JSONL file. * * Generated from protobuf field string training_dataset_uri = 1 [(.google.api.field_behavior) = REQUIRED]; * @param string $var @@ -87,7 +87,7 @@ public function setTrainingDatasetUri($var) /** * Optional. Cloud Storage path to file containing validation dataset for - * tuning. + * tuning. The dataset must be formatted as a JSONL file. * * Generated from protobuf field string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -99,7 +99,7 @@ public function getValidationDatasetUri() /** * Optional. Cloud Storage path to file containing validation dataset for - * tuning. + * tuning. The dataset must be formatted as a JSONL file. * * Generated from protobuf field string validation_dataset_uri = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var diff --git a/AiPlatform/src/V1/TuningJob.php b/AiPlatform/src/V1/TuningJob.php index 60e01bd7b5ea..c0d19270d9a2 100644 --- a/AiPlatform/src/V1/TuningJob.php +++ b/AiPlatform/src/V1/TuningJob.php @@ -24,8 +24,8 @@ class TuningJob extends \Google\Protobuf\Internal\Message private $name = ''; /** * Optional. The display name of the - * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to - * 128 characters long and can consist of any UTF-8 characters. + * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128 + * characters long and can consist of any UTF-8 characters. * * Generated from protobuf field string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -125,7 +125,7 @@ class TuningJob extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $base_model - * Model name for tuning, e.g., "gemini-1.0-pro-002". + * The base model that is being tuned, e.g., "gemini-1.0-pro-002". * @type \Google\Cloud\AIPlatform\V1\SupervisedTuningSpec $supervised_tuning_spec * Tuning Spec for Supervised Fine Tuning. * @type string $name @@ -133,8 +133,8 @@ class TuningJob extends \Google\Protobuf\Internal\Message * `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` * @type string $tuned_model_display_name * Optional. The display name of the - * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to - * 128 characters long and can consist of any UTF-8 characters. + * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128 + * characters long and can consist of any UTF-8 characters. * @type string $description * Optional. The description of the * [TuningJob][google.cloud.aiplatform.v1.TuningJob]. @@ -184,7 +184,7 @@ public function __construct($data = NULL) { } /** - * Model name for tuning, e.g., "gemini-1.0-pro-002". + * The base model that is being tuned, e.g., "gemini-1.0-pro-002". * * Generated from protobuf field string base_model = 4; * @return string @@ -200,7 +200,7 @@ public function hasBaseModel() } /** - * Model name for tuning, e.g., "gemini-1.0-pro-002". + * The base model that is being tuned, e.g., "gemini-1.0-pro-002". * * Generated from protobuf field string base_model = 4; * @param string $var @@ -275,8 +275,8 @@ public function setName($var) /** * Optional. The display name of the - * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to - * 128 characters long and can consist of any UTF-8 characters. + * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128 + * characters long and can consist of any UTF-8 characters. * * Generated from protobuf field string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -288,8 +288,8 @@ public function getTunedModelDisplayName() /** * Optional. The display name of the - * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to - * 128 characters long and can consist of any UTF-8 characters. + * [TunedModel][google.cloud.aiplatform.v1.Model]. The name can be up to 128 + * characters long and can consist of any UTF-8 characters. * * Generated from protobuf field string tuned_model_display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var diff --git a/AiPlatform/src/V1/gapic_metadata.json b/AiPlatform/src/V1/gapic_metadata.json index e1ab0115869f..ef97dda2a06b 100644 --- a/AiPlatform/src/V1/gapic_metadata.json +++ b/AiPlatform/src/V1/gapic_metadata.json @@ -1508,6 +1508,45 @@ } } }, + "ModelGardenService": { + "clients": { + "grpc": { + "libraryClient": "ModelGardenServiceGapicClient", + "rpcs": { + "GetPublisherModel": { + "methods": [ + "getPublisherModel" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + } + } + } + } + }, "ModelService": { "clients": { "grpc": { @@ -1632,45 +1671,6 @@ } } }, - "ModelGardenService": { - "clients": { - "grpc": { - "libraryClient": "ModelGardenServiceGapicClient", - "rpcs": { - "GetPublisherModel": { - "methods": [ - "getPublisherModel" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - } - } - } - } - }, "NotebookService": { "clients": { "grpc": { From e48698dd2626b37f55be4ef674636326754a980c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 3 May 2024 19:21:33 +0530 Subject: [PATCH 81/86] feat: Support for the AcquireSsrsLease and ReleaseSsrsLease RPCs (#7273) * feat: add `AcquireSsrsLease` and `ReleaseSsrsLease` RPCs feat: add `migration_type` to `SqlInstancesVerifyExternalSyncSettingsRequest` feat: add `sync_parallel_level` to `SqlInstancesVerifyExternalSyncSettingsRequest` feat: add `migration_type` to `SqlInstancesStartExternalSyncRequest` feat: add `transactional_log_storage_state` to `BackupConfiguration` feat: add `replication_cluster` to `DatabaseInstance` feat: add `gemini_config` to `DatabaseInstance` feat: add `sql_import_options` to `ImportContext` feat: add `acquire_ssrs_lease_context` to `Operation` feat: add `enable_google_ml_integration` to `Settings` feat: ssl_mode supports SQL Server now chore: update go_package and Go importpath docs: update ssl_mode instructions PiperOrigin-RevId: 629467712 Source-Link: https://github.com/googleapis/googleapis/commit/84c8f366f08e02dbb0f1d854986b9850d0536ce3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e8b4caec6c3ad962d42e6918dabe1a84c64092ba Copy-Tag: eyJwIjoiU3FsQWRtaW4vLk93bEJvdC55YW1sIiwiaCI6ImU4YjRjYWVjNmMzYWQ5NjJkNDJlNjkxOGRhYmUxYTg0YzY0MDkyYmEifQ== * feat: Support for the AcquireSsrsLease and ReleaseSsrsLease RPCs feat: Support for migration type and PostgreSQL parallel level in the VerifyExternalSyncSettings call feat: Support for setting the migration type when starting an external sync feat: Support for additional error types in external sync settings feat: DatabaseInstance resource now includes disaster recovery replica information and Gemini configuration feat: BackupConfiguration resource now includes transactional log storage location feat: ImportContext now includes options for importing data from SQL statements feat: Operation resource now includes context for acquire SSRS lease operations feat: Support for additional SQL operations related to SSRS leases and old primary reconfiguration feat: Databsae instance settings now includes a flag to enable Vertex AI integration feat: Support for several newer releases of MySQL 8.0 docs: Note that `ssl_mode` is now used by all databases including SQL Server PiperOrigin-RevId: 629471589 Source-Link: https://github.com/googleapis/googleapis/commit/b63fdfa0b1d548a3603f86eeab8e770a6da797df Source-Link: https://github.com/googleapis/googleapis-gen/commit/8f51198cada87fdaef808ded8035b3078421138c Copy-Tag: eyJwIjoiU3FsQWRtaW4vLk93bEJvdC55YW1sIiwiaCI6IjhmNTExOThjYWRhODdmZGFlZjgwOGRlZDgwMzViMzA3ODQyMTEzOGMifQ== --- SqlAdmin/metadata/V1/CloudSqlInstances.php | Bin 19939 -> 22017 bytes SqlAdmin/metadata/V1/CloudSqlResources.php | Bin 14057 -> 15132 bytes SqlAdmin/metadata/V1Beta4/CloudSql.php | Bin 17746 -> 18990 bytes .../metadata/V1Beta4/CloudSqlResources.php | Bin 25414 -> 27392 bytes .../acquire_ssrs_lease.php | 80 +++++ .../release_ssrs_lease.php | 76 +++++ .../acquire_ssrs_lease.php | 71 +++++ .../release_ssrs_lease.php | 71 +++++ SqlAdmin/src/V1/AcquireSsrsLeaseContext.php | 217 +++++++++++++ SqlAdmin/src/V1/BackupConfiguration.php | 48 +++ .../TransactionalLogStorageState.php | 79 +++++ .../V1/Client/SqlInstancesServiceClient.php | 58 ++++ SqlAdmin/src/V1/DatabaseInstance.php | 96 ++++++ SqlAdmin/src/V1/GeminiInstanceConfig.php | 297 ++++++++++++++++++ SqlAdmin/src/V1/ImportContext.php | 44 +++ .../src/V1/ImportContext/SqlImportOptions.php | 174 ++++++++++ .../V1/InstancesAcquireSsrsLeaseRequest.php | 77 +++++ SqlAdmin/src/V1/IpConfiguration.php | 60 ++-- SqlAdmin/src/V1/Operation.php | 44 +++ .../src/V1/Operation/SqlOperationType.php | 24 ++ SqlAdmin/src/V1/ReplicationCluster.php | 125 ++++++++ SqlAdmin/src/V1/Settings.php | 89 ++++++ SqlAdmin/src/V1/SqlDatabaseVersion.php | 28 ++ .../SqlExternalSyncSettingErrorType.php | 32 ++ .../SqlInstancesAcquireSsrsLeaseRequest.php | 161 ++++++++++ .../SqlInstancesAcquireSsrsLeaseResponse.php | 67 ++++ .../SqlInstancesReleaseSsrsLeaseRequest.php | 113 +++++++ .../SqlInstancesReleaseSsrsLeaseResponse.php | 67 ++++ .../SqlInstancesStartExternalSyncRequest.php | 38 +++ ...ancesVerifyExternalSyncSettingsRequest.php | 76 +++++ .../MigrationType.php | 63 ++++ SqlAdmin/src/V1/gapic_metadata.json | 10 + .../sql_instances_service_client_config.json | 10 + ...ql_instances_service_descriptor_config.php | 36 +++ ...l_instances_service_rest_client_config.php | 33 ++ .../src/V1beta4/AcquireSsrsLeaseContext.php | 217 +++++++++++++ SqlAdmin/src/V1beta4/BackupConfiguration.php | 48 +++ .../TransactionalLogStorageState.php | 79 +++++ SqlAdmin/src/V1beta4/DatabaseInstance.php | 100 ++++++ .../Gapic/SqlInstancesServiceGapicClient.php | 162 +++++++++- SqlAdmin/src/V1beta4/GeminiInstanceConfig.php | 297 ++++++++++++++++++ SqlAdmin/src/V1beta4/ImportContext.php | 44 +++ .../ImportContext/SqlImportOptions.php | 174 ++++++++++ .../InstancesAcquireSsrsLeaseRequest.php | 77 +++++ SqlAdmin/src/V1beta4/IpConfiguration.php | 60 ++-- .../src/V1beta4/IpConfiguration/SslMode.php | 1 + SqlAdmin/src/V1beta4/Operation.php | 44 +++ .../V1beta4/Operation/SqlOperationType.php | 24 ++ SqlAdmin/src/V1beta4/ReplicationCluster.php | 145 +++++++++ SqlAdmin/src/V1beta4/Settings.php | 89 ++++++ SqlAdmin/src/V1beta4/SqlDatabaseVersion.php | 28 ++ .../SqlInstancesAcquireSsrsLeaseRequest.php | 161 ++++++++++ .../SqlInstancesAcquireSsrsLeaseResponse.php | 77 +++++ .../SqlInstancesReleaseSsrsLeaseRequest.php | 117 +++++++ .../SqlInstancesReleaseSsrsLeaseResponse.php | 67 ++++ .../SqlInstancesStartExternalSyncRequest.php | 38 +++ ...ancesVerifyExternalSyncSettingsRequest.php | 76 +++++ .../MigrationType.php | 63 ++++ SqlAdmin/src/V1beta4/gapic_metadata.json | 10 + .../sql_instances_service_client_config.json | 10 + ...l_instances_service_rest_client_config.php | 33 ++ .../Client/SqlInstancesServiceClientTest.php | 190 +++++++++-- .../V1beta4/SqlInstancesServiceClientTest.php | 130 ++++++++ 63 files changed, 4953 insertions(+), 72 deletions(-) create mode 100644 SqlAdmin/samples/V1/SqlInstancesServiceClient/acquire_ssrs_lease.php create mode 100644 SqlAdmin/samples/V1/SqlInstancesServiceClient/release_ssrs_lease.php create mode 100644 SqlAdmin/samples/V1beta4/SqlInstancesServiceClient/acquire_ssrs_lease.php create mode 100644 SqlAdmin/samples/V1beta4/SqlInstancesServiceClient/release_ssrs_lease.php create mode 100644 SqlAdmin/src/V1/AcquireSsrsLeaseContext.php create mode 100644 SqlAdmin/src/V1/BackupConfiguration/TransactionalLogStorageState.php create mode 100644 SqlAdmin/src/V1/GeminiInstanceConfig.php create mode 100644 SqlAdmin/src/V1/ImportContext/SqlImportOptions.php create mode 100644 SqlAdmin/src/V1/InstancesAcquireSsrsLeaseRequest.php create mode 100644 SqlAdmin/src/V1/ReplicationCluster.php create mode 100644 SqlAdmin/src/V1/SqlInstancesAcquireSsrsLeaseRequest.php create mode 100644 SqlAdmin/src/V1/SqlInstancesAcquireSsrsLeaseResponse.php create mode 100644 SqlAdmin/src/V1/SqlInstancesReleaseSsrsLeaseRequest.php create mode 100644 SqlAdmin/src/V1/SqlInstancesReleaseSsrsLeaseResponse.php create mode 100644 SqlAdmin/src/V1/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php create mode 100644 SqlAdmin/src/V1beta4/AcquireSsrsLeaseContext.php create mode 100644 SqlAdmin/src/V1beta4/BackupConfiguration/TransactionalLogStorageState.php create mode 100644 SqlAdmin/src/V1beta4/GeminiInstanceConfig.php create mode 100644 SqlAdmin/src/V1beta4/ImportContext/SqlImportOptions.php create mode 100644 SqlAdmin/src/V1beta4/InstancesAcquireSsrsLeaseRequest.php create mode 100644 SqlAdmin/src/V1beta4/ReplicationCluster.php create mode 100644 SqlAdmin/src/V1beta4/SqlInstancesAcquireSsrsLeaseRequest.php create mode 100644 SqlAdmin/src/V1beta4/SqlInstancesAcquireSsrsLeaseResponse.php create mode 100644 SqlAdmin/src/V1beta4/SqlInstancesReleaseSsrsLeaseRequest.php create mode 100644 SqlAdmin/src/V1beta4/SqlInstancesReleaseSsrsLeaseResponse.php create mode 100644 SqlAdmin/src/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php diff --git a/SqlAdmin/metadata/V1/CloudSqlInstances.php b/SqlAdmin/metadata/V1/CloudSqlInstances.php index cd33ba979b7394b69fac85d1af75608351ae0649..a4d17c35d2de24fab89b645915c9bb8a230a3d01 100644 GIT binary patch delta 1681 zcmaJ>U2oe|7@qBX^`sw}n>0>JOJ}x1yRI99ZCW*u64!0KxoL<~qypl|beA89L0ypMPRZgv} zZXKcx43??KC4#PjY5TxXU|Y6iO+y;gP#0-T%3aM~b#K$}eav1569aYhJSc7noApvd z*sj9HZjFaKRjI~v!iK=FXHL**kQBE!1+FA!2znf(YL#6n_(hf{Ksr!UOyj27V*jSR z#I!updFpxRlY`E^z3gvs&H)R8VLP&+AiJdOcT@{Wwq=V*wox7JcaZJibVWIYpp7vc z4ucS@JLs0f5boWD+01aQmoI)xkv|l?pXYv07H9!XTd1w6O4wFK>(~ymn9J_7!Ydc* z5yFK)*i{}(w2-bEs;`BUGFKLeH_{iE+;7sknauz>^v(r@O2Yf(%towN&VWfcP|Dt+ zKz39KT?8p)II5$eCPU!&Q@%D;Iq?-i&?}(WGR>BTU{_W;9UbZ|-GRuE_k1=Pv57w0 zG<9gBo^AWHqxenLj_6cGCw=-N$jXYNb`iu~whoSXv4}_cypLW7In`*QTTpIxRok?V znDK}i^O?(lxv9x5*t3vg>N>(j5jhc&u|=0_tSklae1l&VtZ!u zfNA2-o4$Anuf}|Dco+M7?6-$xuYuDqc@yuv-8Kyy(OEEVwo(5Ks^M;ovGqYmbrjr! z!HeOpCCfpE&RVv;I4L0RpouvwS_Z6|>h=DgkG+FhT$T diff --git a/SqlAdmin/metadata/V1/CloudSqlResources.php b/SqlAdmin/metadata/V1/CloudSqlResources.php index 4e6006f6315761536de453b6e60cd21e8aed2ee7..fd0a2267dd466a5c172870304d11f042e2bc1841 100644 GIT binary patch delta 960 zcmaiyU2D@&7{^W0_2t>xr3YuTw$`?Y47)csVG{&N+pG)Cnl4Eh1M!%3p%mJtO|r2I zVR|QcrMc7#FU8>yvM=C;*MgtG`Nq8PD~L%up-$1Ohx7lP|9Kw%=lRxtw)^@$>HDF> z%;WNmLs2Ir`PA=xA9+XQ&>mc}47Fpbb*rg&)D~{(4QyJvp*A$Ps+Pt;nwW|#aJG77 z!oC~u+vTb7{;V==67+^Vu*jYxPkmsi)pHLCB6~nU@?Tfc9OM*OIR{2T^D2Wfuz`Eev4x$nTU> zC*&Hs0EjKD*LcZISe9fgaIDPHS3OQ+m`4P9@zrR~Pz&ekwgFBE3VJ|55byab%o^dYsM{YXHJ z{rkX(fl*VlcDmk9HaiUA?qR6ERwxc(Q!{p(b?uaqeMYz|hmtUEX#J1aRxNeQ4S=Eg zl=SF41h;oihw-KD!?_f@O1U5(fiXPPEl)$lJrDKBBcSn_m-C|#!rRWjGZJ^LTNI{zST)HY_dEpU+A+=r3oa>+|$i(s{DDLHz_&VkA8P delta 104 zcmV-u0GI!qcIj=f(gFm_X9_KmOD(el1Ly(-&jSh*k}DLm0|vPPvj_=+2m-JNvx^Zf z0keq{7YYK546~vg!U6*#=LNI5Am{?K?jt+{0__pAEGMl8vmh_71GBR;X#oPi2D2VD KTmrMkH&z2jbR#kV diff --git a/SqlAdmin/metadata/V1Beta4/CloudSql.php b/SqlAdmin/metadata/V1Beta4/CloudSql.php index 1454c8bf840f2a3c14f5617f06ddbc43621ef5bf..d3ee36266ae2e9c171fd3ee425738696a3224fb2 100644 GIT binary patch delta 802 zcmccA#kg(?Vo7FxUVKSq zL8=710;2|>QRrkw5w*#2mNJHgrK!awdcH74AwV@w%nuwHg+jT6i!1Yz;|mgt5_57= zbK-MS%TjYBI418Gx0|db78s}G#l?%FPe_hS%Gc99$T7sz-!DESGQc%H)Gs)|)!Ea{ z)73?QL5Q1+-N)bE)7jBSfKiBtizC1zG8oKba^mIU2HTdLpO==IuJoCCbFWwdRu6EX zdO#S92R8o@k6@8k3gS`@F3j=FD=taQOHM5gO3g`4EKUtBE-Ll`GA3{1G>ucT;Znh) zCN(IvxFA2TI8{i5izmMz6&jG4DH4o8S8yuLVMMjUF}bibvk2J=Gky;)mZbcYN{JMp z4sIhWV8BaF{vg1ajiwf871$?0SEINHQyJ7nlGt42!O+3T=)}*(8;|VT%>gn;IhpR8 zY!+7&l@J$t#>gdrZmf_kC`Cx13qu_xHTj^Gx)P=@R_O_!fcX7W{Xo%~VOR5uYd z5K^tc{ug=xv=uE1Qo*)rh@r#_EFd6uqU(S~h>|bZPIri%0!65Cn>tzErEc>oyA^Bz DB?J!W delta 101 zcmV-r0Gj`W@%?4{{jjmlO8=Jv&t7r0keo1Qv|bMAH@j*lQFX=DHRx#`$&GX HhC`?Zo+ly` diff --git a/SqlAdmin/metadata/V1Beta4/CloudSqlResources.php b/SqlAdmin/metadata/V1Beta4/CloudSqlResources.php index 867f91c7e6ba251214c483bb608880d28ad44ba0..bac030aa61ad8ecdd85b6a5e7dbb1c86a12ffa2e 100644 GIT binary patch delta 1824 zcmah~OK;;;6vj@P$4wvZ?IUi|mNXLWs1K$T#FPaHJIN%Trb!zoVk(Wec#=Djg&(Qy zRGkINh}8&|-oOTd5Ny~Wnc1>nF)R@Ru|jCXOCvV?0VKHBPMfsTGAk?R`_A)z=j7o- z=H5@tmp`-Yx8Hfcu8PfmXh<{L$aYLiX=CzL9Ly&& z%$4!28}8&}%AFA6y*p~VYbliee0|upY_{dVQKo)k=#daAJ#(L7vR^P@{{N`(Dp;%6 zgo-TW>Qc2Llu@}_L~^}a6N&}$73u}lsK|SToOE4sug;D1Vj!HCmq9ISvT z3wJcN=}!eUwXW@8i+|buej~G58z8v=C`HIn;0-X=#=2^#sA(Exru;Sc@Ab@V(YHwk znZ41(IUg!Ty+m>++!JTPG`b*@$boTmCRq0K5SYFw6ik5_HXPN_aEoWi%f<%p1lK{T zZJKQjqa&r+?dnKx>kh((a+|W*-hj@~4hY>eb!21PCSpKMTCjFX4-MEXWiNwiDzYPt z4!hX8d&&zBcp=KWwE|{TqlJ%=(mGOY(>i7LMh4U{rLF@0j;6H9NSdauW8yR*M+V#x z!W9!BP67puiwhu)F7MQbFX*h-pM;nMGw7mTL>|nd3u_nCU=CeYYxX?`z$azmx2LF@ zc|_W3S;*=IN3$=nU9>dk3X!D|ANE?yA4jFTAak+ip?%dtO z%q~AA(6rx?A1HM`5ZO`$c! zkr;jNR$n4K-Sc?KU-3;4YxVychyvZeZY~NXy3^t~7$s-oG@E~~&g2jw;HY?qBl|1c z@|c6SLgDwL0J@({OnJw*itNrL7~MUP_seJ-ZK4;ialf(Tjt`r*x!=#5Ug7>YXL@Oq M`;+y)e)E3#KmSocIsgCw delta 137 zcmV;40CxX?)&a)G0kGTx0*=75-U2KG0@MSu3V_X8Wd1i+M&4VwD diff --git a/SqlAdmin/samples/V1/SqlInstancesServiceClient/acquire_ssrs_lease.php b/SqlAdmin/samples/V1/SqlInstancesServiceClient/acquire_ssrs_lease.php new file mode 100644 index 000000000000..eb1711a8938e --- /dev/null +++ b/SqlAdmin/samples/V1/SqlInstancesServiceClient/acquire_ssrs_lease.php @@ -0,0 +1,80 @@ +setInstance($instance) + ->setProject($project) + ->setBody($body); + + // Call the API and handle any network failures. + try { + /** @var SqlInstancesAcquireSsrsLeaseResponse $response */ + $response = $sqlInstancesServiceClient->acquireSsrsLease($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $instance = '[INSTANCE]'; + $project = '[PROJECT]'; + + acquire_ssrs_lease_sample($instance, $project); +} +// [END sqladmin_v1_generated_SqlInstancesService_AcquireSsrsLease_sync] diff --git a/SqlAdmin/samples/V1/SqlInstancesServiceClient/release_ssrs_lease.php b/SqlAdmin/samples/V1/SqlInstancesServiceClient/release_ssrs_lease.php new file mode 100644 index 000000000000..9795d90041e8 --- /dev/null +++ b/SqlAdmin/samples/V1/SqlInstancesServiceClient/release_ssrs_lease.php @@ -0,0 +1,76 @@ +setInstance($instance) + ->setProject($project); + + // Call the API and handle any network failures. + try { + /** @var SqlInstancesReleaseSsrsLeaseResponse $response */ + $response = $sqlInstancesServiceClient->releaseSsrsLease($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $instance = '[INSTANCE]'; + $project = '[PROJECT]'; + + release_ssrs_lease_sample($instance, $project); +} +// [END sqladmin_v1_generated_SqlInstancesService_ReleaseSsrsLease_sync] diff --git a/SqlAdmin/samples/V1beta4/SqlInstancesServiceClient/acquire_ssrs_lease.php b/SqlAdmin/samples/V1beta4/SqlInstancesServiceClient/acquire_ssrs_lease.php new file mode 100644 index 000000000000..e64643a2bbdb --- /dev/null +++ b/SqlAdmin/samples/V1beta4/SqlInstancesServiceClient/acquire_ssrs_lease.php @@ -0,0 +1,71 @@ +acquireSsrsLease($instance, $project); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $instance = '[INSTANCE]'; + $project = '[PROJECT]'; + + acquire_ssrs_lease_sample($instance, $project); +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_AcquireSsrsLease_sync] diff --git a/SqlAdmin/samples/V1beta4/SqlInstancesServiceClient/release_ssrs_lease.php b/SqlAdmin/samples/V1beta4/SqlInstancesServiceClient/release_ssrs_lease.php new file mode 100644 index 000000000000..6b4fcf66f3cc --- /dev/null +++ b/SqlAdmin/samples/V1beta4/SqlInstancesServiceClient/release_ssrs_lease.php @@ -0,0 +1,71 @@ +releaseSsrsLease($instance, $project); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $instance = '[INSTANCE]'; + $project = '[PROJECT]'; + + release_ssrs_lease_sample($instance, $project); +} +// [END sqladmin_v1beta4_generated_SqlInstancesService_ReleaseSsrsLease_sync] diff --git a/SqlAdmin/src/V1/AcquireSsrsLeaseContext.php b/SqlAdmin/src/V1/AcquireSsrsLeaseContext.php new file mode 100644 index 000000000000..9838cf0fc437 --- /dev/null +++ b/SqlAdmin/src/V1/AcquireSsrsLeaseContext.php @@ -0,0 +1,217 @@ +google.cloud.sql.v1.AcquireSsrsLeaseContext + */ +class AcquireSsrsLeaseContext extends \Google\Protobuf\Internal\Message +{ + /** + * The username to be used as the setup login to connect to the database + * server for SSRS setup. + * + * Generated from protobuf field optional string setup_login = 1; + */ + private $setup_login = null; + /** + * The username to be used as the service login to connect to the report + * database for SSRS setup. + * + * Generated from protobuf field optional string service_login = 2; + */ + private $service_login = null; + /** + * The report database to be used for SSRS setup. + * + * Generated from protobuf field optional string report_database = 3; + */ + private $report_database = null; + /** + * Lease duration needed for SSRS setup. + * + * Generated from protobuf field optional .google.protobuf.Duration duration = 4; + */ + private $duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $setup_login + * The username to be used as the setup login to connect to the database + * server for SSRS setup. + * @type string $service_login + * The username to be used as the service login to connect to the report + * database for SSRS setup. + * @type string $report_database + * The report database to be used for SSRS setup. + * @type \Google\Protobuf\Duration $duration + * Lease duration needed for SSRS setup. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The username to be used as the setup login to connect to the database + * server for SSRS setup. + * + * Generated from protobuf field optional string setup_login = 1; + * @return string + */ + public function getSetupLogin() + { + return isset($this->setup_login) ? $this->setup_login : ''; + } + + public function hasSetupLogin() + { + return isset($this->setup_login); + } + + public function clearSetupLogin() + { + unset($this->setup_login); + } + + /** + * The username to be used as the setup login to connect to the database + * server for SSRS setup. + * + * Generated from protobuf field optional string setup_login = 1; + * @param string $var + * @return $this + */ + public function setSetupLogin($var) + { + GPBUtil::checkString($var, True); + $this->setup_login = $var; + + return $this; + } + + /** + * The username to be used as the service login to connect to the report + * database for SSRS setup. + * + * Generated from protobuf field optional string service_login = 2; + * @return string + */ + public function getServiceLogin() + { + return isset($this->service_login) ? $this->service_login : ''; + } + + public function hasServiceLogin() + { + return isset($this->service_login); + } + + public function clearServiceLogin() + { + unset($this->service_login); + } + + /** + * The username to be used as the service login to connect to the report + * database for SSRS setup. + * + * Generated from protobuf field optional string service_login = 2; + * @param string $var + * @return $this + */ + public function setServiceLogin($var) + { + GPBUtil::checkString($var, True); + $this->service_login = $var; + + return $this; + } + + /** + * The report database to be used for SSRS setup. + * + * Generated from protobuf field optional string report_database = 3; + * @return string + */ + public function getReportDatabase() + { + return isset($this->report_database) ? $this->report_database : ''; + } + + public function hasReportDatabase() + { + return isset($this->report_database); + } + + public function clearReportDatabase() + { + unset($this->report_database); + } + + /** + * The report database to be used for SSRS setup. + * + * Generated from protobuf field optional string report_database = 3; + * @param string $var + * @return $this + */ + public function setReportDatabase($var) + { + GPBUtil::checkString($var, True); + $this->report_database = $var; + + return $this; + } + + /** + * Lease duration needed for SSRS setup. + * + * Generated from protobuf field optional .google.protobuf.Duration duration = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Lease duration needed for SSRS setup. + * + * Generated from protobuf field optional .google.protobuf.Duration duration = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + +} + diff --git a/SqlAdmin/src/V1/BackupConfiguration.php b/SqlAdmin/src/V1/BackupConfiguration.php index fe0013ef8eb0..14d47f2f57b7 100644 --- a/SqlAdmin/src/V1/BackupConfiguration.php +++ b/SqlAdmin/src/V1/BackupConfiguration.php @@ -72,6 +72,13 @@ class BackupConfiguration extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.protobuf.Int32Value transaction_log_retention_days = 9; */ private $transaction_log_retention_days = null; + /** + * Output only. This value contains the storage location of transactional logs + * for the database for point-in-time recovery. + * + * Generated from protobuf field optional .google.cloud.sql.v1.BackupConfiguration.TransactionalLogStorageState transactional_log_storage_state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $transactional_log_storage_state = null; /** * Constructor. @@ -100,6 +107,9 @@ class BackupConfiguration extends \Google\Protobuf\Internal\Message * @type \Google\Protobuf\Int32Value $transaction_log_retention_days * The number of days of transaction logs we retain for point in time * restore, from 1-7. + * @type int $transactional_log_storage_state + * Output only. This value contains the storage location of transactional logs + * for the database for point-in-time recovery. * } */ public function __construct($data = NULL) { @@ -546,5 +556,43 @@ public function setTransactionLogRetentionDaysValue($var) $this->writeWrapperValue("transaction_log_retention_days", $var); return $this;} + /** + * Output only. This value contains the storage location of transactional logs + * for the database for point-in-time recovery. + * + * Generated from protobuf field optional .google.cloud.sql.v1.BackupConfiguration.TransactionalLogStorageState transactional_log_storage_state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getTransactionalLogStorageState() + { + return isset($this->transactional_log_storage_state) ? $this->transactional_log_storage_state : 0; + } + + public function hasTransactionalLogStorageState() + { + return isset($this->transactional_log_storage_state); + } + + public function clearTransactionalLogStorageState() + { + unset($this->transactional_log_storage_state); + } + + /** + * Output only. This value contains the storage location of transactional logs + * for the database for point-in-time recovery. + * + * Generated from protobuf field optional .google.cloud.sql.v1.BackupConfiguration.TransactionalLogStorageState transactional_log_storage_state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTransactionalLogStorageState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\BackupConfiguration\TransactionalLogStorageState::class); + $this->transactional_log_storage_state = $var; + + return $this; + } + } diff --git a/SqlAdmin/src/V1/BackupConfiguration/TransactionalLogStorageState.php b/SqlAdmin/src/V1/BackupConfiguration/TransactionalLogStorageState.php new file mode 100644 index 000000000000..60e6472ee91a --- /dev/null +++ b/SqlAdmin/src/V1/BackupConfiguration/TransactionalLogStorageState.php @@ -0,0 +1,79 @@ +google.cloud.sql.v1.BackupConfiguration.TransactionalLogStorageState + */ +class TransactionalLogStorageState +{ + /** + * Unspecified. + * + * Generated from protobuf enum TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED = 0; + */ + const TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED = 0; + /** + * The transaction logs for the instance are stored on a data disk. + * + * Generated from protobuf enum DISK = 1; + */ + const DISK = 1; + /** + * The transaction logs for the instance are switching from being stored on + * a data disk to being stored in Cloud Storage. + * + * Generated from protobuf enum SWITCHING_TO_CLOUD_STORAGE = 2; + */ + const SWITCHING_TO_CLOUD_STORAGE = 2; + /** + * The transaction logs for the instance are now stored in Cloud Storage. + * Previously, they were stored on a data disk. + * + * Generated from protobuf enum SWITCHED_TO_CLOUD_STORAGE = 3; + */ + const SWITCHED_TO_CLOUD_STORAGE = 3; + /** + * The transaction logs for the instance are stored in Cloud Storage. + * + * Generated from protobuf enum CLOUD_STORAGE = 4; + */ + const CLOUD_STORAGE = 4; + + private static $valueToName = [ + self::TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED => 'TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED', + self::DISK => 'DISK', + self::SWITCHING_TO_CLOUD_STORAGE => 'SWITCHING_TO_CLOUD_STORAGE', + self::SWITCHED_TO_CLOUD_STORAGE => 'SWITCHED_TO_CLOUD_STORAGE', + self::CLOUD_STORAGE => 'CLOUD_STORAGE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/SqlAdmin/src/V1/Client/SqlInstancesServiceClient.php b/SqlAdmin/src/V1/Client/SqlInstancesServiceClient.php index 1a4e696cdb2f..1b79b87cdfc9 100644 --- a/SqlAdmin/src/V1/Client/SqlInstancesServiceClient.php +++ b/SqlAdmin/src/V1/Client/SqlInstancesServiceClient.php @@ -35,6 +35,8 @@ use Google\Cloud\Sql\V1\InstancesListResponse; use Google\Cloud\Sql\V1\InstancesListServerCasResponse; use Google\Cloud\Sql\V1\Operation; +use Google\Cloud\Sql\V1\SqlInstancesAcquireSsrsLeaseRequest; +use Google\Cloud\Sql\V1\SqlInstancesAcquireSsrsLeaseResponse; use Google\Cloud\Sql\V1\SqlInstancesAddServerCaRequest; use Google\Cloud\Sql\V1\SqlInstancesCloneRequest; use Google\Cloud\Sql\V1\SqlInstancesCreateEphemeralCertRequest; @@ -56,6 +58,8 @@ use Google\Cloud\Sql\V1\SqlInstancesPerformDiskShrinkRequest; use Google\Cloud\Sql\V1\SqlInstancesPromoteReplicaRequest; use Google\Cloud\Sql\V1\SqlInstancesReencryptRequest; +use Google\Cloud\Sql\V1\SqlInstancesReleaseSsrsLeaseRequest; +use Google\Cloud\Sql\V1\SqlInstancesReleaseSsrsLeaseResponse; use Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequest; use Google\Cloud\Sql\V1\SqlInstancesResetReplicaSizeRequest; use Google\Cloud\Sql\V1\SqlInstancesResetSslConfigRequest; @@ -79,6 +83,7 @@ * This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. * + * @method PromiseInterface acquireSsrsLeaseAsync(SqlInstancesAcquireSsrsLeaseRequest $request, array $optionalArgs = []) * @method PromiseInterface addServerCaAsync(SqlInstancesAddServerCaRequest $request, array $optionalArgs = []) * @method PromiseInterface cloneAsync(SqlInstancesCloneRequest $request, array $optionalArgs = []) * @method PromiseInterface createEphemeralAsync(SqlInstancesCreateEphemeralCertRequest $request, array $optionalArgs = []) @@ -98,6 +103,7 @@ * @method PromiseInterface performDiskShrinkAsync(SqlInstancesPerformDiskShrinkRequest $request, array $optionalArgs = []) * @method PromiseInterface promoteReplicaAsync(SqlInstancesPromoteReplicaRequest $request, array $optionalArgs = []) * @method PromiseInterface reencryptAsync(SqlInstancesReencryptRequest $request, array $optionalArgs = []) + * @method PromiseInterface releaseSsrsLeaseAsync(SqlInstancesReleaseSsrsLeaseRequest $request, array $optionalArgs = []) * @method PromiseInterface rescheduleMaintenanceAsync(SqlInstancesRescheduleMaintenanceRequest $request, array $optionalArgs = []) * @method PromiseInterface resetReplicaSizeAsync(SqlInstancesResetReplicaSizeRequest $request, array $optionalArgs = []) * @method PromiseInterface resetSslConfigAsync(SqlInstancesResetSslConfigRequest $request, array $optionalArgs = []) @@ -231,6 +237,32 @@ public function __call($method, $args) return call_user_func_array([$this, 'startAsyncCall'], $args); } + /** + * Acquire a lease for the setup of SQL Server Reporting Services (SSRS). + * + * The async variant is {@see SqlInstancesServiceClient::acquireSsrsLeaseAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/acquire_ssrs_lease.php + * + * @param SqlInstancesAcquireSsrsLeaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SqlInstancesAcquireSsrsLeaseResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function acquireSsrsLease(SqlInstancesAcquireSsrsLeaseRequest $request, array $callOptions = []): SqlInstancesAcquireSsrsLeaseResponse + { + return $this->startApiCall('AcquireSsrsLease', $request, $callOptions)->wait(); + } + /** * Adds a new trusted Certificate Authority (CA) version for the specified * instance. Required to prepare for a certificate rotation. If a CA version @@ -753,6 +785,32 @@ public function reencrypt(SqlInstancesReencryptRequest $request, array $callOpti return $this->startApiCall('Reencrypt', $request, $callOptions)->wait(); } + /** + * Release a lease for the setup of SQL Server Reporting Services (SSRS). + * + * The async variant is {@see SqlInstancesServiceClient::releaseSsrsLeaseAsync()} . + * + * @example samples/V1/SqlInstancesServiceClient/release_ssrs_lease.php + * + * @param SqlInstancesReleaseSsrsLeaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SqlInstancesReleaseSsrsLeaseResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function releaseSsrsLease(SqlInstancesReleaseSsrsLeaseRequest $request, array $callOptions = []): SqlInstancesReleaseSsrsLeaseResponse + { + return $this->startApiCall('ReleaseSsrsLease', $request, $callOptions)->wait(); + } + /** * Reschedules the maintenance on the given instance. * diff --git a/SqlAdmin/src/V1/DatabaseInstance.php b/SqlAdmin/src/V1/DatabaseInstance.php index 24a20ebd6da7..667241e24161 100644 --- a/SqlAdmin/src/V1/DatabaseInstance.php +++ b/SqlAdmin/src/V1/DatabaseInstance.php @@ -300,6 +300,20 @@ class DatabaseInstance extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional string write_endpoint = 52 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $write_endpoint = null; + /** + * Optional. The pair of a primary instance and disaster recovery (DR) + * replica. A DR replica is a cross-region replica that you designate for + * failover in the event that the primary instance has regional failure. + * + * Generated from protobuf field .google.cloud.sql.v1.ReplicationCluster replication_cluster = 54 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $replication_cluster = null; + /** + * Gemini configuration. + * + * Generated from protobuf field optional .google.cloud.sql.v1.GeminiInstanceConfig gemini_config = 55; + */ + private $gemini_config = null; /** * Constructor. @@ -425,6 +439,12 @@ class DatabaseInstance extends \Google\Protobuf\Internal\Message * Output only. DEPRECATED: please use write_endpoint instead. * @type string $write_endpoint * Output only. The dns name of the primary instance in a replication group. + * @type \Google\Cloud\Sql\V1\ReplicationCluster $replication_cluster + * Optional. The pair of a primary instance and disaster recovery (DR) + * replica. A DR replica is a cross-region replica that you designate for + * failover in the event that the primary instance has regional failure. + * @type \Google\Cloud\Sql\V1\GeminiInstanceConfig $gemini_config + * Gemini configuration. * } */ public function __construct($data = NULL) { @@ -1865,5 +1885,81 @@ public function setWriteEndpoint($var) return $this; } + /** + * Optional. The pair of a primary instance and disaster recovery (DR) + * replica. A DR replica is a cross-region replica that you designate for + * failover in the event that the primary instance has regional failure. + * + * Generated from protobuf field .google.cloud.sql.v1.ReplicationCluster replication_cluster = 54 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Sql\V1\ReplicationCluster|null + */ + public function getReplicationCluster() + { + return $this->replication_cluster; + } + + public function hasReplicationCluster() + { + return isset($this->replication_cluster); + } + + public function clearReplicationCluster() + { + unset($this->replication_cluster); + } + + /** + * Optional. The pair of a primary instance and disaster recovery (DR) + * replica. A DR replica is a cross-region replica that you designate for + * failover in the event that the primary instance has regional failure. + * + * Generated from protobuf field .google.cloud.sql.v1.ReplicationCluster replication_cluster = 54 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Sql\V1\ReplicationCluster $var + * @return $this + */ + public function setReplicationCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ReplicationCluster::class); + $this->replication_cluster = $var; + + return $this; + } + + /** + * Gemini configuration. + * + * Generated from protobuf field optional .google.cloud.sql.v1.GeminiInstanceConfig gemini_config = 55; + * @return \Google\Cloud\Sql\V1\GeminiInstanceConfig|null + */ + public function getGeminiConfig() + { + return $this->gemini_config; + } + + public function hasGeminiConfig() + { + return isset($this->gemini_config); + } + + public function clearGeminiConfig() + { + unset($this->gemini_config); + } + + /** + * Gemini configuration. + * + * Generated from protobuf field optional .google.cloud.sql.v1.GeminiInstanceConfig gemini_config = 55; + * @param \Google\Cloud\Sql\V1\GeminiInstanceConfig $var + * @return $this + */ + public function setGeminiConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\GeminiInstanceConfig::class); + $this->gemini_config = $var; + + return $this; + } + } diff --git a/SqlAdmin/src/V1/GeminiInstanceConfig.php b/SqlAdmin/src/V1/GeminiInstanceConfig.php new file mode 100644 index 000000000000..7965703349ee --- /dev/null +++ b/SqlAdmin/src/V1/GeminiInstanceConfig.php @@ -0,0 +1,297 @@ +google.cloud.sql.v1.GeminiInstanceConfig + */ +class GeminiInstanceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Whether gemini is enabled. + * + * Generated from protobuf field optional bool entitled = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $entitled = null; + /** + * Output only. Whether vacuum management is enabled. + * + * Generated from protobuf field optional bool google_vacuum_mgmt_enabled = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $google_vacuum_mgmt_enabled = null; + /** + * Output only. Whether oom session cancel is enabled. + * + * Generated from protobuf field optional bool oom_session_cancel_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $oom_session_cancel_enabled = null; + /** + * Output only. Whether active query is enabled. + * + * Generated from protobuf field optional bool active_query_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $active_query_enabled = null; + /** + * Output only. Whether index advisor is enabled. + * + * Generated from protobuf field optional bool index_advisor_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $index_advisor_enabled = null; + /** + * Output only. Whether flag recommender is enabled. + * + * Generated from protobuf field optional bool flag_recommender_enabled = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $flag_recommender_enabled = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $entitled + * Output only. Whether gemini is enabled. + * @type bool $google_vacuum_mgmt_enabled + * Output only. Whether vacuum management is enabled. + * @type bool $oom_session_cancel_enabled + * Output only. Whether oom session cancel is enabled. + * @type bool $active_query_enabled + * Output only. Whether active query is enabled. + * @type bool $index_advisor_enabled + * Output only. Whether index advisor is enabled. + * @type bool $flag_recommender_enabled + * Output only. Whether flag recommender is enabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Whether gemini is enabled. + * + * Generated from protobuf field optional bool entitled = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getEntitled() + { + return isset($this->entitled) ? $this->entitled : false; + } + + public function hasEntitled() + { + return isset($this->entitled); + } + + public function clearEntitled() + { + unset($this->entitled); + } + + /** + * Output only. Whether gemini is enabled. + * + * Generated from protobuf field optional bool entitled = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setEntitled($var) + { + GPBUtil::checkBool($var); + $this->entitled = $var; + + return $this; + } + + /** + * Output only. Whether vacuum management is enabled. + * + * Generated from protobuf field optional bool google_vacuum_mgmt_enabled = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getGoogleVacuumMgmtEnabled() + { + return isset($this->google_vacuum_mgmt_enabled) ? $this->google_vacuum_mgmt_enabled : false; + } + + public function hasGoogleVacuumMgmtEnabled() + { + return isset($this->google_vacuum_mgmt_enabled); + } + + public function clearGoogleVacuumMgmtEnabled() + { + unset($this->google_vacuum_mgmt_enabled); + } + + /** + * Output only. Whether vacuum management is enabled. + * + * Generated from protobuf field optional bool google_vacuum_mgmt_enabled = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setGoogleVacuumMgmtEnabled($var) + { + GPBUtil::checkBool($var); + $this->google_vacuum_mgmt_enabled = $var; + + return $this; + } + + /** + * Output only. Whether oom session cancel is enabled. + * + * Generated from protobuf field optional bool oom_session_cancel_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getOomSessionCancelEnabled() + { + return isset($this->oom_session_cancel_enabled) ? $this->oom_session_cancel_enabled : false; + } + + public function hasOomSessionCancelEnabled() + { + return isset($this->oom_session_cancel_enabled); + } + + public function clearOomSessionCancelEnabled() + { + unset($this->oom_session_cancel_enabled); + } + + /** + * Output only. Whether oom session cancel is enabled. + * + * Generated from protobuf field optional bool oom_session_cancel_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setOomSessionCancelEnabled($var) + { + GPBUtil::checkBool($var); + $this->oom_session_cancel_enabled = $var; + + return $this; + } + + /** + * Output only. Whether active query is enabled. + * + * Generated from protobuf field optional bool active_query_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getActiveQueryEnabled() + { + return isset($this->active_query_enabled) ? $this->active_query_enabled : false; + } + + public function hasActiveQueryEnabled() + { + return isset($this->active_query_enabled); + } + + public function clearActiveQueryEnabled() + { + unset($this->active_query_enabled); + } + + /** + * Output only. Whether active query is enabled. + * + * Generated from protobuf field optional bool active_query_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setActiveQueryEnabled($var) + { + GPBUtil::checkBool($var); + $this->active_query_enabled = $var; + + return $this; + } + + /** + * Output only. Whether index advisor is enabled. + * + * Generated from protobuf field optional bool index_advisor_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getIndexAdvisorEnabled() + { + return isset($this->index_advisor_enabled) ? $this->index_advisor_enabled : false; + } + + public function hasIndexAdvisorEnabled() + { + return isset($this->index_advisor_enabled); + } + + public function clearIndexAdvisorEnabled() + { + unset($this->index_advisor_enabled); + } + + /** + * Output only. Whether index advisor is enabled. + * + * Generated from protobuf field optional bool index_advisor_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setIndexAdvisorEnabled($var) + { + GPBUtil::checkBool($var); + $this->index_advisor_enabled = $var; + + return $this; + } + + /** + * Output only. Whether flag recommender is enabled. + * + * Generated from protobuf field optional bool flag_recommender_enabled = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getFlagRecommenderEnabled() + { + return isset($this->flag_recommender_enabled) ? $this->flag_recommender_enabled : false; + } + + public function hasFlagRecommenderEnabled() + { + return isset($this->flag_recommender_enabled); + } + + public function clearFlagRecommenderEnabled() + { + unset($this->flag_recommender_enabled); + } + + /** + * Output only. Whether flag recommender is enabled. + * + * Generated from protobuf field optional bool flag_recommender_enabled = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setFlagRecommenderEnabled($var) + { + GPBUtil::checkBool($var); + $this->flag_recommender_enabled = $var; + + return $this; + } + +} + diff --git a/SqlAdmin/src/V1/ImportContext.php b/SqlAdmin/src/V1/ImportContext.php index 72721ba71fc7..a0a6bdf601d4 100644 --- a/SqlAdmin/src/V1/ImportContext.php +++ b/SqlAdmin/src/V1/ImportContext.php @@ -64,6 +64,12 @@ class ImportContext extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlBakImportOptions bak_import_options = 7; */ private $bak_import_options = null; + /** + * Optional. Options for importing data from SQL statements. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlImportOptions sql_import_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $sql_import_options = null; /** * Constructor. @@ -92,6 +98,8 @@ class ImportContext extends \Google\Protobuf\Internal\Message * The PostgreSQL user for this import operation. PostgreSQL instances only. * @type \Google\Cloud\Sql\V1\ImportContext\SqlBakImportOptions $bak_import_options * Import parameters specific to SQL Server .BAK files + * @type \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions $sql_import_options + * Optional. Options for importing data from SQL statements. * } */ public function __construct($data = NULL) { @@ -315,5 +323,41 @@ public function setBakImportOptions($var) return $this; } + /** + * Optional. Options for importing data from SQL statements. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlImportOptions sql_import_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions|null + */ + public function getSqlImportOptions() + { + return $this->sql_import_options; + } + + public function hasSqlImportOptions() + { + return isset($this->sql_import_options); + } + + public function clearSqlImportOptions() + { + unset($this->sql_import_options); + } + + /** + * Optional. Options for importing data from SQL statements. + * + * Generated from protobuf field .google.cloud.sql.v1.ImportContext.SqlImportOptions sql_import_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions $var + * @return $this + */ + public function setSqlImportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\ImportContext\SqlImportOptions::class); + $this->sql_import_options = $var; + + return $this; + } + } diff --git a/SqlAdmin/src/V1/ImportContext/SqlImportOptions.php b/SqlAdmin/src/V1/ImportContext/SqlImportOptions.php new file mode 100644 index 000000000000..a1efd5fe7bac --- /dev/null +++ b/SqlAdmin/src/V1/ImportContext/SqlImportOptions.php @@ -0,0 +1,174 @@ +google.cloud.sql.v1.ImportContext.SqlImportOptions + */ +class SqlImportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The number of threads to use for parallel import. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $threads = null; + /** + * Optional. Whether or not the import should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $parallel = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Int32Value $threads + * Optional. The number of threads to use for parallel import. + * @type \Google\Protobuf\BoolValue $parallel + * Optional. Whether or not the import should be parallel. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The number of threads to use for parallel import. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int32Value|null + */ + public function getThreads() + { + return $this->threads; + } + + public function hasThreads() + { + return isset($this->threads); + } + + public function clearThreads() + { + unset($this->threads); + } + + /** + * Returns the unboxed value from getThreads() + + * Optional. The number of threads to use for parallel import. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|null + */ + public function getThreadsValue() + { + return $this->readWrapperValue("threads"); + } + + /** + * Optional. The number of threads to use for parallel import. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setThreads($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->threads = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Optional. The number of threads to use for parallel import. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|null $var + * @return $this + */ + public function setThreadsValue($var) + { + $this->writeWrapperValue("threads", $var); + return $this;} + + /** + * Optional. Whether or not the import should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getParallel() + { + return $this->parallel; + } + + public function hasParallel() + { + return isset($this->parallel); + } + + public function clearParallel() + { + unset($this->parallel); + } + + /** + * Returns the unboxed value from getParallel() + + * Optional. Whether or not the import should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool|null + */ + public function getParallelValue() + { + return $this->readWrapperValue("parallel"); + } + + /** + * Optional. Whether or not the import should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setParallel($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->parallel = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Optional. Whether or not the import should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool|null $var + * @return $this + */ + public function setParallelValue($var) + { + $this->writeWrapperValue("parallel", $var); + return $this;} + +} + + diff --git a/SqlAdmin/src/V1/InstancesAcquireSsrsLeaseRequest.php b/SqlAdmin/src/V1/InstancesAcquireSsrsLeaseRequest.php new file mode 100644 index 000000000000..fce47a781af6 --- /dev/null +++ b/SqlAdmin/src/V1/InstancesAcquireSsrsLeaseRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1.InstancesAcquireSsrsLeaseRequest + */ +class InstancesAcquireSsrsLeaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Contains details about the acquire SSRS lease operation. + * + * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 1; + */ + private $acquire_ssrs_lease_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext $acquire_ssrs_lease_context + * Contains details about the acquire SSRS lease operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Contains details about the acquire SSRS lease operation. + * + * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 1; + * @return \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext|null + */ + public function getAcquireSsrsLeaseContext() + { + return $this->acquire_ssrs_lease_context; + } + + public function hasAcquireSsrsLeaseContext() + { + return isset($this->acquire_ssrs_lease_context); + } + + public function clearAcquireSsrsLeaseContext() + { + unset($this->acquire_ssrs_lease_context); + } + + /** + * Contains details about the acquire SSRS lease operation. + * + * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 1; + * @param \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext $var + * @return $this + */ + public function setAcquireSsrsLeaseContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext::class); + $this->acquire_ssrs_lease_context = $var; + + return $this; + } + +} + diff --git a/SqlAdmin/src/V1/IpConfiguration.php b/SqlAdmin/src/V1/IpConfiguration.php index b236a52ac707..3de6807f2421 100644 --- a/SqlAdmin/src/V1/IpConfiguration.php +++ b/SqlAdmin/src/V1/IpConfiguration.php @@ -31,7 +31,7 @@ class IpConfiguration extends \Google\Protobuf\Internal\Message */ private $private_network = ''; /** - * Use `ssl_mode` instead for MySQL and PostgreSQL. SQL Server uses this flag. + * Use `ssl_mode` instead. * Whether SSL/TLS connections over IP are enforced. * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. * For SSL/TLS connections, the client certificate won't be verified. If @@ -70,20 +70,22 @@ class IpConfiguration extends \Google\Protobuf\Internal\Message */ private $enable_private_path_for_google_cloud_services = null; /** - * Specify how SSL/TLS is enforced in database connections. MySQL and - * PostgreSQL use the `ssl_mode` flag. If you must use the `require_ssl` flag - * for backward compatibility, then only the following value pairs are valid: + * Specify how SSL/TLS is enforced in database connections. If you must use + * the `require_ssl` flag for backward compatibility, then only the following + * value pairs are valid: + * For PostgreSQL and MySQL: * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` * * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` + * For SQL Server: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` * The value of `ssl_mode` gets priority over the value of `require_ssl`. For * example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, * the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the * `require_ssl=false` means accept both non-SSL and SSL connections. MySQL * and PostgreSQL databases respect `ssl_mode` in this case and accept only * SSL connections. - * SQL Server uses the `require_ssl` flag. You can set the value for this flag - * to `true` or `false`. * * Generated from protobuf field .google.cloud.sql.v1.IpConfiguration.SslMode ssl_mode = 8; */ @@ -109,7 +111,7 @@ class IpConfiguration extends \Google\Protobuf\Internal\Message * `/projects/myProject/global/networks/default`. This setting can * be updated, but it cannot be removed after it is set. * @type \Google\Protobuf\BoolValue $require_ssl - * Use `ssl_mode` instead for MySQL and PostgreSQL. SQL Server uses this flag. + * Use `ssl_mode` instead. * Whether SSL/TLS connections over IP are enforced. * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. * For SSL/TLS connections, the client certificate won't be verified. If @@ -132,20 +134,22 @@ class IpConfiguration extends \Google\Protobuf\Internal\Message * Controls connectivity to private IP instances from Google services, * such as BigQuery. * @type int $ssl_mode - * Specify how SSL/TLS is enforced in database connections. MySQL and - * PostgreSQL use the `ssl_mode` flag. If you must use the `require_ssl` flag - * for backward compatibility, then only the following value pairs are valid: + * Specify how SSL/TLS is enforced in database connections. If you must use + * the `require_ssl` flag for backward compatibility, then only the following + * value pairs are valid: + * For PostgreSQL and MySQL: * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` * * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` + * For SQL Server: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` * The value of `ssl_mode` gets priority over the value of `require_ssl`. For * example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, * the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the * `require_ssl=false` means accept both non-SSL and SSL connections. MySQL * and PostgreSQL databases respect `ssl_mode` in this case and accept only * SSL connections. - * SQL Server uses the `require_ssl` flag. You can set the value for this flag - * to `true` or `false`. * @type \Google\Cloud\Sql\V1\PscConfig $psc_config * PSC settings for this instance. * } @@ -251,7 +255,7 @@ public function setPrivateNetwork($var) } /** - * Use `ssl_mode` instead for MySQL and PostgreSQL. SQL Server uses this flag. + * Use `ssl_mode` instead. * Whether SSL/TLS connections over IP are enforced. * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. * For SSL/TLS connections, the client certificate won't be verified. If @@ -281,7 +285,7 @@ public function clearRequireSsl() /** * Returns the unboxed value from getRequireSsl() - * Use `ssl_mode` instead for MySQL and PostgreSQL. SQL Server uses this flag. + * Use `ssl_mode` instead. * Whether SSL/TLS connections over IP are enforced. * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. * For SSL/TLS connections, the client certificate won't be verified. If @@ -299,7 +303,7 @@ public function getRequireSslValue() } /** - * Use `ssl_mode` instead for MySQL and PostgreSQL. SQL Server uses this flag. + * Use `ssl_mode` instead. * Whether SSL/TLS connections over IP are enforced. * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. * For SSL/TLS connections, the client certificate won't be verified. If @@ -323,7 +327,7 @@ public function setRequireSsl($var) /** * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - * Use `ssl_mode` instead for MySQL and PostgreSQL. SQL Server uses this flag. + * Use `ssl_mode` instead. * Whether SSL/TLS connections over IP are enforced. * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. * For SSL/TLS connections, the client certificate won't be verified. If @@ -475,20 +479,22 @@ public function setEnablePrivatePathForGoogleCloudServicesValue($var) return $this;} /** - * Specify how SSL/TLS is enforced in database connections. MySQL and - * PostgreSQL use the `ssl_mode` flag. If you must use the `require_ssl` flag - * for backward compatibility, then only the following value pairs are valid: + * Specify how SSL/TLS is enforced in database connections. If you must use + * the `require_ssl` flag for backward compatibility, then only the following + * value pairs are valid: + * For PostgreSQL and MySQL: * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` * * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` + * For SQL Server: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` * The value of `ssl_mode` gets priority over the value of `require_ssl`. For * example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, * the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the * `require_ssl=false` means accept both non-SSL and SSL connections. MySQL * and PostgreSQL databases respect `ssl_mode` in this case and accept only * SSL connections. - * SQL Server uses the `require_ssl` flag. You can set the value for this flag - * to `true` or `false`. * * Generated from protobuf field .google.cloud.sql.v1.IpConfiguration.SslMode ssl_mode = 8; * @return int @@ -499,20 +505,22 @@ public function getSslMode() } /** - * Specify how SSL/TLS is enforced in database connections. MySQL and - * PostgreSQL use the `ssl_mode` flag. If you must use the `require_ssl` flag - * for backward compatibility, then only the following value pairs are valid: + * Specify how SSL/TLS is enforced in database connections. If you must use + * the `require_ssl` flag for backward compatibility, then only the following + * value pairs are valid: + * For PostgreSQL and MySQL: * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` * * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` + * For SQL Server: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` * The value of `ssl_mode` gets priority over the value of `require_ssl`. For * example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, * the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the * `require_ssl=false` means accept both non-SSL and SSL connections. MySQL * and PostgreSQL databases respect `ssl_mode` in this case and accept only * SSL connections. - * SQL Server uses the `require_ssl` flag. You can set the value for this flag - * to `true` or `false`. * * Generated from protobuf field .google.cloud.sql.v1.IpConfiguration.SslMode ssl_mode = 8; * @param int $var diff --git a/SqlAdmin/src/V1/Operation.php b/SqlAdmin/src/V1/Operation.php index cfb27ddb76ee..75d8ac25b4be 100644 --- a/SqlAdmin/src/V1/Operation.php +++ b/SqlAdmin/src/V1/Operation.php @@ -138,6 +138,12 @@ class Operation extends \Google\Protobuf\Internal\Message * Generated from protobuf field string target_project = 15; */ private $target_project = ''; + /** + * The context for acquire SSRS lease operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 20; + */ + private $acquire_ssrs_lease_context = null; /** * Constructor. @@ -199,6 +205,8 @@ class Operation extends \Google\Protobuf\Internal\Message * The URI of this resource. * @type string $target_project * The project ID of the target instance related to this operation. + * @type \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext $acquire_ssrs_lease_context + * The context for acquire SSRS lease operation, if applicable. * } */ public function __construct($data = NULL) { @@ -766,5 +774,41 @@ public function setTargetProject($var) return $this; } + /** + * The context for acquire SSRS lease operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 20; + * @return \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext|null + */ + public function getAcquireSsrsLeaseContext() + { + return $this->acquire_ssrs_lease_context; + } + + public function hasAcquireSsrsLeaseContext() + { + return isset($this->acquire_ssrs_lease_context); + } + + public function clearAcquireSsrsLeaseContext() + { + unset($this->acquire_ssrs_lease_context); + } + + /** + * The context for acquire SSRS lease operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 20; + * @param \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext $var + * @return $this + */ + public function setAcquireSsrsLeaseContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\AcquireSsrsLeaseContext::class); + $this->acquire_ssrs_lease_context = $var; + + return $this; + } + } diff --git a/SqlAdmin/src/V1/Operation/SqlOperationType.php b/SqlAdmin/src/V1/Operation/SqlOperationType.php index f69079bcd620..c1a10393293b 100644 --- a/SqlAdmin/src/V1/Operation/SqlOperationType.php +++ b/SqlAdmin/src/V1/Operation/SqlOperationType.php @@ -245,6 +245,27 @@ class SqlOperationType * Generated from protobuf enum SWITCHOVER = 39; */ const SWITCHOVER = 39; + /** + * Acquire a lease for the setup of SQL Server Reporting Services (SSRS). + * + * Generated from protobuf enum ACQUIRE_SSRS_LEASE = 42; + */ + const ACQUIRE_SSRS_LEASE = 42; + /** + * Release a lease for the setup of SQL Server Reporting Services (SSRS). + * + * Generated from protobuf enum RELEASE_SSRS_LEASE = 43; + */ + const RELEASE_SSRS_LEASE = 43; + /** + * Reconfigures old primary after a promote replica operation. Effect of a + * promote operation to the old primary is executed in this operation, + * asynchronously from the promote replica operation executed to the + * replica. + * + * Generated from protobuf enum RECONFIGURE_OLD_PRIMARY = 44; + */ + const RECONFIGURE_OLD_PRIMARY = 44; private static $valueToName = [ self::SQL_OPERATION_TYPE_UNSPECIFIED => 'SQL_OPERATION_TYPE_UNSPECIFIED', @@ -286,6 +307,9 @@ class SqlOperationType self::AUTO_RESTART => 'AUTO_RESTART', self::REENCRYPT => 'REENCRYPT', self::SWITCHOVER => 'SWITCHOVER', + self::ACQUIRE_SSRS_LEASE => 'ACQUIRE_SSRS_LEASE', + self::RELEASE_SSRS_LEASE => 'RELEASE_SSRS_LEASE', + self::RECONFIGURE_OLD_PRIMARY => 'RECONFIGURE_OLD_PRIMARY', ]; public static function name($value) diff --git a/SqlAdmin/src/V1/ReplicationCluster.php b/SqlAdmin/src/V1/ReplicationCluster.php new file mode 100644 index 000000000000..d505dd43e6c9 --- /dev/null +++ b/SqlAdmin/src/V1/ReplicationCluster.php @@ -0,0 +1,125 @@ +google.cloud.sql.v1.ReplicationCluster + */ +class ReplicationCluster extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. If the instance is a primary instance, then this field identifies + * the disaster recovery (DR) replica. A DR replica is an optional + * configuration for Enterprise Plus edition instances. If the instance is a + * read replica, then the field is not set. Users can set this field to set a + * designated DR replica for a primary. Removing this field removes the DR + * replica. + * + * Generated from protobuf field string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $failover_dr_replica_name = ''; + /** + * Output only. read-only field that indicates if the replica is a dr_replica; + * not set for a primary. + * + * Generated from protobuf field bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $dr_replica = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $failover_dr_replica_name + * Optional. If the instance is a primary instance, then this field identifies + * the disaster recovery (DR) replica. A DR replica is an optional + * configuration for Enterprise Plus edition instances. If the instance is a + * read replica, then the field is not set. Users can set this field to set a + * designated DR replica for a primary. Removing this field removes the DR + * replica. + * @type bool $dr_replica + * Output only. read-only field that indicates if the replica is a dr_replica; + * not set for a primary. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Optional. If the instance is a primary instance, then this field identifies + * the disaster recovery (DR) replica. A DR replica is an optional + * configuration for Enterprise Plus edition instances. If the instance is a + * read replica, then the field is not set. Users can set this field to set a + * designated DR replica for a primary. Removing this field removes the DR + * replica. + * + * Generated from protobuf field string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFailoverDrReplicaName() + { + return $this->failover_dr_replica_name; + } + + /** + * Optional. If the instance is a primary instance, then this field identifies + * the disaster recovery (DR) replica. A DR replica is an optional + * configuration for Enterprise Plus edition instances. If the instance is a + * read replica, then the field is not set. Users can set this field to set a + * designated DR replica for a primary. Removing this field removes the DR + * replica. + * + * Generated from protobuf field string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFailoverDrReplicaName($var) + { + GPBUtil::checkString($var, True); + $this->failover_dr_replica_name = $var; + + return $this; + } + + /** + * Output only. read-only field that indicates if the replica is a dr_replica; + * not set for a primary. + * + * Generated from protobuf field bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getDrReplica() + { + return $this->dr_replica; + } + + /** + * Output only. read-only field that indicates if the replica is a dr_replica; + * not set for a primary. + * + * Generated from protobuf field bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setDrReplica($var) + { + GPBUtil::checkBool($var); + $this->dr_replica = $var; + + return $this; + } + +} + diff --git a/SqlAdmin/src/V1/Settings.php b/SqlAdmin/src/V1/Settings.php index c8f58188880f..f577cf3cf310 100644 --- a/SqlAdmin/src/V1/Settings.php +++ b/SqlAdmin/src/V1/Settings.php @@ -252,6 +252,15 @@ class Settings extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.sql.v1.DataCacheConfig data_cache_config = 37; */ private $data_cache_config = null; + /** + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $enable_google_ml_integration = null; /** * Constructor. @@ -365,6 +374,11 @@ class Settings extends \Google\Protobuf\Internal\Message * relevant only for SQL Server. * @type \Google\Cloud\Sql\V1\DataCacheConfig $data_cache_config * Configuration for data cache. + * @type \Google\Protobuf\BoolValue $enable_google_ml_integration + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. * } */ public function __construct($data = NULL) { @@ -1680,5 +1694,80 @@ public function setDataCacheConfig($var) return $this; } + /** + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getEnableGoogleMlIntegration() + { + return $this->enable_google_ml_integration; + } + + public function hasEnableGoogleMlIntegration() + { + return isset($this->enable_google_ml_integration); + } + + public function clearEnableGoogleMlIntegration() + { + unset($this->enable_google_ml_integration); + } + + /** + * Returns the unboxed value from getEnableGoogleMlIntegration() + + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool|null + */ + public function getEnableGoogleMlIntegrationValue() + { + return $this->readWrapperValue("enable_google_ml_integration"); + } + + /** + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setEnableGoogleMlIntegration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->enable_google_ml_integration = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool|null $var + * @return $this + */ + public function setEnableGoogleMlIntegrationValue($var) + { + $this->writeWrapperValue("enable_google_ml_integration", $var); + return $this;} + } diff --git a/SqlAdmin/src/V1/SqlDatabaseVersion.php b/SqlAdmin/src/V1/SqlDatabaseVersion.php index 89df701db588..98b70d4298d9 100644 --- a/SqlAdmin/src/V1/SqlDatabaseVersion.php +++ b/SqlAdmin/src/V1/SqlDatabaseVersion.php @@ -187,6 +187,30 @@ class SqlDatabaseVersion * Generated from protobuf enum MYSQL_8_0_36 = 241; */ const MYSQL_8_0_36 = 241; + /** + * The database major version is MySQL 8.0 and the minor version is 37. + * + * Generated from protobuf enum MYSQL_8_0_37 = 355; + */ + const MYSQL_8_0_37 = 355; + /** + * The database major version is MySQL 8.0 and the minor version is 38. + * + * Generated from protobuf enum MYSQL_8_0_38 = 356; + */ + const MYSQL_8_0_38 = 356; + /** + * The database major version is MySQL 8.0 and the minor version is 39. + * + * Generated from protobuf enum MYSQL_8_0_39 = 357; + */ + const MYSQL_8_0_39 = 357; + /** + * The database major version is MySQL 8.0 and the minor version is 40. + * + * Generated from protobuf enum MYSQL_8_0_40 = 358; + */ + const MYSQL_8_0_40 = 358; /** * The database version is SQL Server 2019 Standard. * @@ -266,6 +290,10 @@ class SqlDatabaseVersion self::MYSQL_8_0_34 => 'MYSQL_8_0_34', self::MYSQL_8_0_35 => 'MYSQL_8_0_35', self::MYSQL_8_0_36 => 'MYSQL_8_0_36', + self::MYSQL_8_0_37 => 'MYSQL_8_0_37', + self::MYSQL_8_0_38 => 'MYSQL_8_0_38', + self::MYSQL_8_0_39 => 'MYSQL_8_0_39', + self::MYSQL_8_0_40 => 'MYSQL_8_0_40', self::SQLSERVER_2019_STANDARD => 'SQLSERVER_2019_STANDARD', self::SQLSERVER_2019_ENTERPRISE => 'SQLSERVER_2019_ENTERPRISE', self::SQLSERVER_2019_EXPRESS => 'SQLSERVER_2019_EXPRESS', diff --git a/SqlAdmin/src/V1/SqlExternalSyncSettingError/SqlExternalSyncSettingErrorType.php b/SqlAdmin/src/V1/SqlExternalSyncSettingError/SqlExternalSyncSettingErrorType.php index 6298ed3e95bc..18c538dbf5e2 100644 --- a/SqlAdmin/src/V1/SqlExternalSyncSettingError/SqlExternalSyncSettingErrorType.php +++ b/SqlAdmin/src/V1/SqlExternalSyncSettingError/SqlExternalSyncSettingErrorType.php @@ -257,6 +257,34 @@ class SqlExternalSyncSettingErrorType * Generated from protobuf enum SUBSCRIPTION_CALCULATION_STATUS = 40; */ const SUBSCRIPTION_CALCULATION_STATUS = 40; + /** + * Count of subscriptions needed to sync source data for PostgreSQL + * database. + * + * Generated from protobuf enum PG_SUBSCRIPTION_COUNT = 41; + */ + const PG_SUBSCRIPTION_COUNT = 41; + /** + * Final parallel level that is used to do migration. + * + * Generated from protobuf enum PG_SYNC_PARALLEL_LEVEL = 42; + */ + const PG_SYNC_PARALLEL_LEVEL = 42; + /** + * The disk size of the replica instance is smaller than the data size of + * the source instance. + * + * Generated from protobuf enum INSUFFICIENT_DISK_SIZE = 43; + */ + const INSUFFICIENT_DISK_SIZE = 43; + /** + * The data size of the source instance is greater than 1 TB, the number of + * cores of the replica instance is less than 8, and the memory of the + * replica is less than 32 GB. + * + * Generated from protobuf enum INSUFFICIENT_MACHINE_TIER = 44; + */ + const INSUFFICIENT_MACHINE_TIER = 44; private static $valueToName = [ self::SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED => 'SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED', @@ -300,6 +328,10 @@ class SqlExternalSyncSettingErrorType self::SOURCE_MAX_SUBSCRIPTIONS => 'SOURCE_MAX_SUBSCRIPTIONS', self::UNABLE_TO_VERIFY_DEFINERS => 'UNABLE_TO_VERIFY_DEFINERS', self::SUBSCRIPTION_CALCULATION_STATUS => 'SUBSCRIPTION_CALCULATION_STATUS', + self::PG_SUBSCRIPTION_COUNT => 'PG_SUBSCRIPTION_COUNT', + self::PG_SYNC_PARALLEL_LEVEL => 'PG_SYNC_PARALLEL_LEVEL', + self::INSUFFICIENT_DISK_SIZE => 'INSUFFICIENT_DISK_SIZE', + self::INSUFFICIENT_MACHINE_TIER => 'INSUFFICIENT_MACHINE_TIER', ]; public static function name($value) diff --git a/SqlAdmin/src/V1/SqlInstancesAcquireSsrsLeaseRequest.php b/SqlAdmin/src/V1/SqlInstancesAcquireSsrsLeaseRequest.php new file mode 100644 index 000000000000..d66d621ebf52 --- /dev/null +++ b/SqlAdmin/src/V1/SqlInstancesAcquireSsrsLeaseRequest.php @@ -0,0 +1,161 @@ +google.cloud.sql.v1.SqlInstancesAcquireSsrsLeaseRequest + */ +class SqlInstancesAcquireSsrsLeaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Cloud SQL instance ID. This doesn't include the project ID. It's + * composed of lowercase letters, numbers, and hyphens, and it must start with + * a letter. The total length must be 98 characters or less (Example: + * instance-id). + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $instance = ''; + /** + * Required. Project ID of the project that contains the instance (Example: + * project-id). + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $project = ''; + /** + * Required. The request body. + * + * Generated from protobuf field .google.cloud.sql.v1.InstancesAcquireSsrsLeaseRequest body = 100 [(.google.api.field_behavior) = REQUIRED]; + */ + private $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Required. Cloud SQL instance ID. This doesn't include the project ID. It's + * composed of lowercase letters, numbers, and hyphens, and it must start with + * a letter. The total length must be 98 characters or less (Example: + * instance-id). + * @type string $project + * Required. Project ID of the project that contains the instance (Example: + * project-id). + * @type \Google\Cloud\Sql\V1\InstancesAcquireSsrsLeaseRequest $body + * Required. The request body. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Required. Cloud SQL instance ID. This doesn't include the project ID. It's + * composed of lowercase letters, numbers, and hyphens, and it must start with + * a letter. The total length must be 98 characters or less (Example: + * instance-id). + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Required. Cloud SQL instance ID. This doesn't include the project ID. It's + * composed of lowercase letters, numbers, and hyphens, and it must start with + * a letter. The total length must be 98 characters or less (Example: + * instance-id). + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Required. Project ID of the project that contains the instance (Example: + * project-id). + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Required. Project ID of the project that contains the instance (Example: + * project-id). + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * Required. The request body. + * + * Generated from protobuf field .google.cloud.sql.v1.InstancesAcquireSsrsLeaseRequest body = 100 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Sql\V1\InstancesAcquireSsrsLeaseRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Required. The request body. + * + * Generated from protobuf field .google.cloud.sql.v1.InstancesAcquireSsrsLeaseRequest body = 100 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Sql\V1\InstancesAcquireSsrsLeaseRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1\InstancesAcquireSsrsLeaseRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/SqlAdmin/src/V1/SqlInstancesAcquireSsrsLeaseResponse.php b/SqlAdmin/src/V1/SqlInstancesAcquireSsrsLeaseResponse.php new file mode 100644 index 000000000000..f11b91f265b9 --- /dev/null +++ b/SqlAdmin/src/V1/SqlInstancesAcquireSsrsLeaseResponse.php @@ -0,0 +1,67 @@ +google.cloud.sql.v1.SqlInstancesAcquireSsrsLeaseResponse + */ +class SqlInstancesAcquireSsrsLeaseResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier for this operation. + * + * Generated from protobuf field string operation_id = 1; + */ + private $operation_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $operation_id + * The unique identifier for this operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier for this operation. + * + * Generated from protobuf field string operation_id = 1; + * @return string + */ + public function getOperationId() + { + return $this->operation_id; + } + + /** + * The unique identifier for this operation. + * + * Generated from protobuf field string operation_id = 1; + * @param string $var + * @return $this + */ + public function setOperationId($var) + { + GPBUtil::checkString($var, True); + $this->operation_id = $var; + + return $this; + } + +} + diff --git a/SqlAdmin/src/V1/SqlInstancesReleaseSsrsLeaseRequest.php b/SqlAdmin/src/V1/SqlInstancesReleaseSsrsLeaseRequest.php new file mode 100644 index 000000000000..a4585bf0c915 --- /dev/null +++ b/SqlAdmin/src/V1/SqlInstancesReleaseSsrsLeaseRequest.php @@ -0,0 +1,113 @@ +google.cloud.sql.v1.SqlInstancesReleaseSsrsLeaseRequest + */ +class SqlInstancesReleaseSsrsLeaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Cloud SQL instance ID. This doesn't include the project ID. + * The instance ID contains lowercase letters, numbers, and hyphens, and it + * must start with a letter. This ID can have a maximum length of 98 + * characters. + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $instance = ''; + /** + * Required. The project ID that contains the instance. + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Required. The Cloud SQL instance ID. This doesn't include the project ID. + * The instance ID contains lowercase letters, numbers, and hyphens, and it + * must start with a letter. This ID can have a maximum length of 98 + * characters. + * @type string $project + * Required. The project ID that contains the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Cloud SQL instance ID. This doesn't include the project ID. + * The instance ID contains lowercase letters, numbers, and hyphens, and it + * must start with a letter. This ID can have a maximum length of 98 + * characters. + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Required. The Cloud SQL instance ID. This doesn't include the project ID. + * The instance ID contains lowercase letters, numbers, and hyphens, and it + * must start with a letter. This ID can have a maximum length of 98 + * characters. + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Required. The project ID that contains the instance. + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Required. The project ID that contains the instance. + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/SqlAdmin/src/V1/SqlInstancesReleaseSsrsLeaseResponse.php b/SqlAdmin/src/V1/SqlInstancesReleaseSsrsLeaseResponse.php new file mode 100644 index 000000000000..3444ea0123af --- /dev/null +++ b/SqlAdmin/src/V1/SqlInstancesReleaseSsrsLeaseResponse.php @@ -0,0 +1,67 @@ +google.cloud.sql.v1.SqlInstancesReleaseSsrsLeaseResponse + */ +class SqlInstancesReleaseSsrsLeaseResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier for this operation. + * + * Generated from protobuf field string operation_id = 1; + */ + private $operation_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $operation_id + * The unique identifier for this operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1\CloudSqlInstances::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier for this operation. + * + * Generated from protobuf field string operation_id = 1; + * @return string + */ + public function getOperationId() + { + return $this->operation_id; + } + + /** + * The unique identifier for this operation. + * + * Generated from protobuf field string operation_id = 1; + * @param string $var + * @return $this + */ + public function setOperationId($var) + { + GPBUtil::checkString($var, True); + $this->operation_id = $var; + + return $this; + } + +} + diff --git a/SqlAdmin/src/V1/SqlInstancesStartExternalSyncRequest.php b/SqlAdmin/src/V1/SqlInstancesStartExternalSyncRequest.php index 9cea84047e77..47a5d515ddd1 100644 --- a/SqlAdmin/src/V1/SqlInstancesStartExternalSyncRequest.php +++ b/SqlAdmin/src/V1/SqlInstancesStartExternalSyncRequest.php @@ -46,6 +46,13 @@ class SqlInstancesStartExternalSyncRequest extends \Google\Protobuf\Internal\Mes * Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 7 [(.google.api.field_behavior) = OPTIONAL]; */ private $sync_parallel_level = 0; + /** + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $migration_type = 0; protected $sync_config; /** @@ -67,6 +74,9 @@ class SqlInstancesStartExternalSyncRequest extends \Google\Protobuf\Internal\Mes * @type int $sync_parallel_level * Optional. Parallel level for initial data sync. Currently only applicable * for MySQL. + * @type int $migration_type + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration. * } */ public function __construct($data = NULL) { @@ -237,6 +247,34 @@ public function setSyncParallelLevel($var) return $this; } + /** + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMigrationType() + { + return $this->migration_type; + } + + /** + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration. + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMigrationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlInstancesVerifyExternalSyncSettingsRequest\MigrationType::class); + $this->migration_type = $var; + + return $this; + } + /** * @return string */ diff --git a/SqlAdmin/src/V1/SqlInstancesVerifyExternalSyncSettingsRequest.php b/SqlAdmin/src/V1/SqlInstancesVerifyExternalSyncSettingsRequest.php index 55101b42f30d..f376cd9abdf8 100644 --- a/SqlAdmin/src/V1/SqlInstancesVerifyExternalSyncSettingsRequest.php +++ b/SqlAdmin/src/V1/SqlInstancesVerifyExternalSyncSettingsRequest.php @@ -45,6 +45,20 @@ class SqlInstancesVerifyExternalSyncSettingsRequest extends \Google\Protobuf\Int * Generated from protobuf field bool verify_replication_only = 5 [(.google.api.field_behavior) = OPTIONAL]; */ private $verify_replication_only = false; + /** + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $migration_type = 0; + /** + * Optional. Parallel level for initial data sync. Currently only applicable + * for PostgreSQL. + * + * Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $sync_parallel_level = 0; protected $sync_config; /** @@ -65,6 +79,12 @@ class SqlInstancesVerifyExternalSyncSettingsRequest extends \Google\Protobuf\Int * Optional. Flag to verify settings required by replication setup only * @type \Google\Cloud\Sql\V1\MySqlSyncConfig $mysql_sync_config * Optional. MySQL-specific settings for start external sync. + * @type int $migration_type + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration + * @type int $sync_parallel_level + * Optional. Parallel level for initial data sync. Currently only applicable + * for PostgreSQL. * } */ public function __construct($data = NULL) { @@ -233,6 +253,62 @@ public function setMysqlSyncConfig($var) return $this; } + /** + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMigrationType() + { + return $this->migration_type; + } + + /** + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration + * + * Generated from protobuf field .google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMigrationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\SqlInstancesVerifyExternalSyncSettingsRequest\MigrationType::class); + $this->migration_type = $var; + + return $this; + } + + /** + * Optional. Parallel level for initial data sync. Currently only applicable + * for PostgreSQL. + * + * Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSyncParallelLevel() + { + return $this->sync_parallel_level; + } + + /** + * Optional. Parallel level for initial data sync. Currently only applicable + * for PostgreSQL. + * + * Generated from protobuf field .google.cloud.sql.v1.ExternalSyncParallelLevel sync_parallel_level = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSyncParallelLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1\ExternalSyncParallelLevel::class); + $this->sync_parallel_level = $var; + + return $this; + } + /** * @return string */ diff --git a/SqlAdmin/src/V1/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php b/SqlAdmin/src/V1/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php new file mode 100644 index 000000000000..a73bae426519 --- /dev/null +++ b/SqlAdmin/src/V1/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php @@ -0,0 +1,63 @@ +google.cloud.sql.v1.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType + */ +class MigrationType +{ + /** + * Default value is logical migration + * + * Generated from protobuf enum MIGRATION_TYPE_UNSPECIFIED = 0; + */ + const MIGRATION_TYPE_UNSPECIFIED = 0; + /** + * Logical Migrations + * + * Generated from protobuf enum LOGICAL = 1; + */ + const LOGICAL = 1; + /** + * Physical file based Migrations + * + * Generated from protobuf enum PHYSICAL = 2; + */ + const PHYSICAL = 2; + + private static $valueToName = [ + self::MIGRATION_TYPE_UNSPECIFIED => 'MIGRATION_TYPE_UNSPECIFIED', + self::LOGICAL => 'LOGICAL', + self::PHYSICAL => 'PHYSICAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/SqlAdmin/src/V1/gapic_metadata.json b/SqlAdmin/src/V1/gapic_metadata.json index 82bcd33fb50f..a32b84c89910 100644 --- a/SqlAdmin/src/V1/gapic_metadata.json +++ b/SqlAdmin/src/V1/gapic_metadata.json @@ -139,6 +139,11 @@ "grpc": { "libraryClient": "SqlInstancesServiceGapicClient", "rpcs": { + "AcquireSsrsLease": { + "methods": [ + "acquireSsrsLease" + ] + }, "AddServerCa": { "methods": [ "addServerCa" @@ -234,6 +239,11 @@ "reencrypt" ] }, + "ReleaseSsrsLease": { + "methods": [ + "releaseSsrsLease" + ] + }, "RescheduleMaintenance": { "methods": [ "rescheduleMaintenance" diff --git a/SqlAdmin/src/V1/resources/sql_instances_service_client_config.json b/SqlAdmin/src/V1/resources/sql_instances_service_client_config.json index 31b90aad90a8..acab843eb19f 100644 --- a/SqlAdmin/src/V1/resources/sql_instances_service_client_config.json +++ b/SqlAdmin/src/V1/resources/sql_instances_service_client_config.json @@ -26,6 +26,11 @@ } }, "methods": { + "AcquireSsrsLease": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, "AddServerCa": { "timeout_millis": 60000, "retry_codes_name": "no_retry_1_codes", @@ -121,6 +126,11 @@ "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "ReleaseSsrsLease": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, "RescheduleMaintenance": { "timeout_millis": 60000, "retry_codes_name": "no_retry_1_codes", diff --git a/SqlAdmin/src/V1/resources/sql_instances_service_descriptor_config.php b/SqlAdmin/src/V1/resources/sql_instances_service_descriptor_config.php index 9a8d5c2df561..8a91a4186997 100644 --- a/SqlAdmin/src/V1/resources/sql_instances_service_descriptor_config.php +++ b/SqlAdmin/src/V1/resources/sql_instances_service_descriptor_config.php @@ -23,6 +23,24 @@ return [ 'interfaces' => [ 'google.cloud.sql.v1.SqlInstancesService' => [ + 'AcquireSsrsLease' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\SqlInstancesAcquireSsrsLeaseResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], 'AddServerCa' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\Sql\V1\Operation', @@ -353,6 +371,24 @@ ], ], ], + 'ReleaseSsrsLease' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Sql\V1\SqlInstancesReleaseSsrsLeaseResponse', + 'headerParams' => [ + [ + 'keyName' => 'project', + 'fieldAccessors' => [ + 'getProject', + ], + ], + [ + 'keyName' => 'instance', + 'fieldAccessors' => [ + 'getInstance', + ], + ], + ], + ], 'RescheduleMaintenance' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\Sql\V1\Operation', diff --git a/SqlAdmin/src/V1/resources/sql_instances_service_rest_client_config.php b/SqlAdmin/src/V1/resources/sql_instances_service_rest_client_config.php index 6e5988acb669..29c60fc1eb5c 100644 --- a/SqlAdmin/src/V1/resources/sql_instances_service_rest_client_config.php +++ b/SqlAdmin/src/V1/resources/sql_instances_service_rest_client_config.php @@ -23,6 +23,23 @@ return [ 'interfaces' => [ 'google.cloud.sql.v1.SqlInstancesService' => [ + 'AcquireSsrsLease' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/acquireSsrsLease', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], 'AddServerCa' => [ 'method' => 'post', 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/addServerCa', @@ -328,6 +345,22 @@ ], ], ], + 'ReleaseSsrsLease' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/releaseSsrsLease', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], 'RescheduleMaintenance' => [ 'method' => 'post', 'uriTemplate' => '/v1/projects/{project}/instances/{instance}/rescheduleMaintenance', diff --git a/SqlAdmin/src/V1beta4/AcquireSsrsLeaseContext.php b/SqlAdmin/src/V1beta4/AcquireSsrsLeaseContext.php new file mode 100644 index 000000000000..c8bf109437ef --- /dev/null +++ b/SqlAdmin/src/V1beta4/AcquireSsrsLeaseContext.php @@ -0,0 +1,217 @@ +google.cloud.sql.v1beta4.AcquireSsrsLeaseContext + */ +class AcquireSsrsLeaseContext extends \Google\Protobuf\Internal\Message +{ + /** + * The username to be used as the setup login to connect to the database + * server for SSRS setup. + * + * Generated from protobuf field optional string setup_login = 1; + */ + private $setup_login = null; + /** + * The username to be used as the service login to connect to the report + * database for SSRS setup. + * + * Generated from protobuf field optional string service_login = 2; + */ + private $service_login = null; + /** + * The report database to be used for the SSRS setup. + * + * Generated from protobuf field optional string report_database = 3; + */ + private $report_database = null; + /** + * Lease duration needed for the SSRS setup. + * + * Generated from protobuf field optional .google.protobuf.Duration duration = 4; + */ + private $duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $setup_login + * The username to be used as the setup login to connect to the database + * server for SSRS setup. + * @type string $service_login + * The username to be used as the service login to connect to the report + * database for SSRS setup. + * @type string $report_database + * The report database to be used for the SSRS setup. + * @type \Google\Protobuf\Duration $duration + * Lease duration needed for the SSRS setup. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * The username to be used as the setup login to connect to the database + * server for SSRS setup. + * + * Generated from protobuf field optional string setup_login = 1; + * @return string + */ + public function getSetupLogin() + { + return isset($this->setup_login) ? $this->setup_login : ''; + } + + public function hasSetupLogin() + { + return isset($this->setup_login); + } + + public function clearSetupLogin() + { + unset($this->setup_login); + } + + /** + * The username to be used as the setup login to connect to the database + * server for SSRS setup. + * + * Generated from protobuf field optional string setup_login = 1; + * @param string $var + * @return $this + */ + public function setSetupLogin($var) + { + GPBUtil::checkString($var, True); + $this->setup_login = $var; + + return $this; + } + + /** + * The username to be used as the service login to connect to the report + * database for SSRS setup. + * + * Generated from protobuf field optional string service_login = 2; + * @return string + */ + public function getServiceLogin() + { + return isset($this->service_login) ? $this->service_login : ''; + } + + public function hasServiceLogin() + { + return isset($this->service_login); + } + + public function clearServiceLogin() + { + unset($this->service_login); + } + + /** + * The username to be used as the service login to connect to the report + * database for SSRS setup. + * + * Generated from protobuf field optional string service_login = 2; + * @param string $var + * @return $this + */ + public function setServiceLogin($var) + { + GPBUtil::checkString($var, True); + $this->service_login = $var; + + return $this; + } + + /** + * The report database to be used for the SSRS setup. + * + * Generated from protobuf field optional string report_database = 3; + * @return string + */ + public function getReportDatabase() + { + return isset($this->report_database) ? $this->report_database : ''; + } + + public function hasReportDatabase() + { + return isset($this->report_database); + } + + public function clearReportDatabase() + { + unset($this->report_database); + } + + /** + * The report database to be used for the SSRS setup. + * + * Generated from protobuf field optional string report_database = 3; + * @param string $var + * @return $this + */ + public function setReportDatabase($var) + { + GPBUtil::checkString($var, True); + $this->report_database = $var; + + return $this; + } + + /** + * Lease duration needed for the SSRS setup. + * + * Generated from protobuf field optional .google.protobuf.Duration duration = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Lease duration needed for the SSRS setup. + * + * Generated from protobuf field optional .google.protobuf.Duration duration = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + +} + diff --git a/SqlAdmin/src/V1beta4/BackupConfiguration.php b/SqlAdmin/src/V1beta4/BackupConfiguration.php index 1159732493b1..e2e55186241a 100644 --- a/SqlAdmin/src/V1beta4/BackupConfiguration.php +++ b/SqlAdmin/src/V1beta4/BackupConfiguration.php @@ -72,6 +72,13 @@ class BackupConfiguration extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.sql.v1beta4.BackupRetentionSettings backup_retention_settings = 10; */ private $backup_retention_settings = null; + /** + * Output only. This value contains the storage location of transactional logs + * for the database for point-in-time recovery. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.BackupConfiguration.TransactionalLogStorageState transactional_log_storage_state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $transactional_log_storage_state = null; /** * Constructor. @@ -100,6 +107,9 @@ class BackupConfiguration extends \Google\Protobuf\Internal\Message * restore, from 1-7. * @type \Google\Cloud\Sql\V1beta4\BackupRetentionSettings $backup_retention_settings * Backup retention settings. + * @type int $transactional_log_storage_state + * Output only. This value contains the storage location of transactional logs + * for the database for point-in-time recovery. * } */ public function __construct($data = NULL) { @@ -546,5 +556,43 @@ public function setBackupRetentionSettings($var) return $this; } + /** + * Output only. This value contains the storage location of transactional logs + * for the database for point-in-time recovery. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.BackupConfiguration.TransactionalLogStorageState transactional_log_storage_state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getTransactionalLogStorageState() + { + return isset($this->transactional_log_storage_state) ? $this->transactional_log_storage_state : 0; + } + + public function hasTransactionalLogStorageState() + { + return isset($this->transactional_log_storage_state); + } + + public function clearTransactionalLogStorageState() + { + unset($this->transactional_log_storage_state); + } + + /** + * Output only. This value contains the storage location of transactional logs + * for the database for point-in-time recovery. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.BackupConfiguration.TransactionalLogStorageState transactional_log_storage_state = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTransactionalLogStorageState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\BackupConfiguration\TransactionalLogStorageState::class); + $this->transactional_log_storage_state = $var; + + return $this; + } + } diff --git a/SqlAdmin/src/V1beta4/BackupConfiguration/TransactionalLogStorageState.php b/SqlAdmin/src/V1beta4/BackupConfiguration/TransactionalLogStorageState.php new file mode 100644 index 000000000000..9b18b6a7219a --- /dev/null +++ b/SqlAdmin/src/V1beta4/BackupConfiguration/TransactionalLogStorageState.php @@ -0,0 +1,79 @@ +google.cloud.sql.v1beta4.BackupConfiguration.TransactionalLogStorageState + */ +class TransactionalLogStorageState +{ + /** + * Unspecified. + * + * Generated from protobuf enum TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED = 0; + */ + const TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED = 0; + /** + * The transaction logs for the instance are stored on a data disk. + * + * Generated from protobuf enum DISK = 1; + */ + const DISK = 1; + /** + * The transaction logs for the instance are switching from being stored on + * a data disk to being stored in Cloud Storage. + * + * Generated from protobuf enum SWITCHING_TO_CLOUD_STORAGE = 2; + */ + const SWITCHING_TO_CLOUD_STORAGE = 2; + /** + * The transaction logs for the instance are now stored in Cloud Storage. + * Previously, they were stored on a data disk. + * + * Generated from protobuf enum SWITCHED_TO_CLOUD_STORAGE = 3; + */ + const SWITCHED_TO_CLOUD_STORAGE = 3; + /** + * The transaction logs for the instance are stored in Cloud Storage. + * + * Generated from protobuf enum CLOUD_STORAGE = 4; + */ + const CLOUD_STORAGE = 4; + + private static $valueToName = [ + self::TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED => 'TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED', + self::DISK => 'DISK', + self::SWITCHING_TO_CLOUD_STORAGE => 'SWITCHING_TO_CLOUD_STORAGE', + self::SWITCHED_TO_CLOUD_STORAGE => 'SWITCHED_TO_CLOUD_STORAGE', + self::CLOUD_STORAGE => 'CLOUD_STORAGE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/SqlAdmin/src/V1beta4/DatabaseInstance.php b/SqlAdmin/src/V1beta4/DatabaseInstance.php index 23d73f832ac3..8efed83d3db3 100644 --- a/SqlAdmin/src/V1beta4/DatabaseInstance.php +++ b/SqlAdmin/src/V1beta4/DatabaseInstance.php @@ -302,6 +302,21 @@ class DatabaseInstance extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional string write_endpoint = 52 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $write_endpoint = null; + /** + * The pair of a primary instance and disaster recovery (DR) replica. + * A DR replica is a cross-region replica that you designate + * for failover in the event that the primary instance + * has regional failure. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.ReplicationCluster replication_cluster = 54; + */ + private $replication_cluster = null; + /** + * Gemini instance configuration. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.GeminiInstanceConfig gemini_config = 55; + */ + private $gemini_config = null; /** * Constructor. @@ -428,6 +443,13 @@ class DatabaseInstance extends \Google\Protobuf\Internal\Message * Output only. DEPRECATED: please use write_endpoint instead. * @type string $write_endpoint * Output only. The dns name of the primary instance in a replication group. + * @type \Google\Cloud\Sql\V1beta4\ReplicationCluster $replication_cluster + * The pair of a primary instance and disaster recovery (DR) replica. + * A DR replica is a cross-region replica that you designate + * for failover in the event that the primary instance + * has regional failure. + * @type \Google\Cloud\Sql\V1beta4\GeminiInstanceConfig $gemini_config + * Gemini instance configuration. * } */ public function __construct($data = NULL) { @@ -1872,5 +1894,83 @@ public function setWriteEndpoint($var) return $this; } + /** + * The pair of a primary instance and disaster recovery (DR) replica. + * A DR replica is a cross-region replica that you designate + * for failover in the event that the primary instance + * has regional failure. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.ReplicationCluster replication_cluster = 54; + * @return \Google\Cloud\Sql\V1beta4\ReplicationCluster|null + */ + public function getReplicationCluster() + { + return $this->replication_cluster; + } + + public function hasReplicationCluster() + { + return isset($this->replication_cluster); + } + + public function clearReplicationCluster() + { + unset($this->replication_cluster); + } + + /** + * The pair of a primary instance and disaster recovery (DR) replica. + * A DR replica is a cross-region replica that you designate + * for failover in the event that the primary instance + * has regional failure. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.ReplicationCluster replication_cluster = 54; + * @param \Google\Cloud\Sql\V1beta4\ReplicationCluster $var + * @return $this + */ + public function setReplicationCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\ReplicationCluster::class); + $this->replication_cluster = $var; + + return $this; + } + + /** + * Gemini instance configuration. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.GeminiInstanceConfig gemini_config = 55; + * @return \Google\Cloud\Sql\V1beta4\GeminiInstanceConfig|null + */ + public function getGeminiConfig() + { + return $this->gemini_config; + } + + public function hasGeminiConfig() + { + return isset($this->gemini_config); + } + + public function clearGeminiConfig() + { + unset($this->gemini_config); + } + + /** + * Gemini instance configuration. + * + * Generated from protobuf field optional .google.cloud.sql.v1beta4.GeminiInstanceConfig gemini_config = 55; + * @param \Google\Cloud\Sql\V1beta4\GeminiInstanceConfig $var + * @return $this + */ + public function setGeminiConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\GeminiInstanceConfig::class); + $this->gemini_config = $var; + + return $this; + } + } diff --git a/SqlAdmin/src/V1beta4/Gapic/SqlInstancesServiceGapicClient.php b/SqlAdmin/src/V1beta4/Gapic/SqlInstancesServiceGapicClient.php index 52e7011fee85..d08d06b5136b 100644 --- a/SqlAdmin/src/V1beta4/Gapic/SqlInstancesServiceGapicClient.php +++ b/SqlAdmin/src/V1beta4/Gapic/SqlInstancesServiceGapicClient.php @@ -35,6 +35,7 @@ use Google\ApiCore\ValidationException; use Google\Auth\FetchAuthTokenInterface; use Google\Cloud\Sql\V1beta4\DatabaseInstance; +use Google\Cloud\Sql\V1beta4\InstancesAcquireSsrsLeaseRequest; use Google\Cloud\Sql\V1beta4\InstancesCloneRequest; use Google\Cloud\Sql\V1beta4\InstancesDemoteMasterRequest; use Google\Cloud\Sql\V1beta4\InstancesDemoteRequest; @@ -50,6 +51,8 @@ use Google\Cloud\Sql\V1beta4\MySqlSyncConfig; use Google\Cloud\Sql\V1beta4\Operation; use Google\Cloud\Sql\V1beta4\PerformDiskShrinkContext; +use Google\Cloud\Sql\V1beta4\SqlInstancesAcquireSsrsLeaseRequest; +use Google\Cloud\Sql\V1beta4\SqlInstancesAcquireSsrsLeaseResponse; use Google\Cloud\Sql\V1beta4\SqlInstancesAddServerCaRequest; use Google\Cloud\Sql\V1beta4\SqlInstancesCloneRequest; use Google\Cloud\Sql\V1beta4\SqlInstancesCreateEphemeralCertRequest; @@ -71,6 +74,8 @@ use Google\Cloud\Sql\V1beta4\SqlInstancesPerformDiskShrinkRequest; use Google\Cloud\Sql\V1beta4\SqlInstancesPromoteReplicaRequest; use Google\Cloud\Sql\V1beta4\SqlInstancesReencryptRequest; +use Google\Cloud\Sql\V1beta4\SqlInstancesReleaseSsrsLeaseRequest; +use Google\Cloud\Sql\V1beta4\SqlInstancesReleaseSsrsLeaseResponse; use Google\Cloud\Sql\V1beta4\SqlInstancesRescheduleMaintenanceRequest; use Google\Cloud\Sql\V1beta4\SqlInstancesRescheduleMaintenanceRequestBody; use Google\Cloud\Sql\V1beta4\SqlInstancesResetReplicaSizeRequest; @@ -85,6 +90,7 @@ use Google\Cloud\Sql\V1beta4\SqlInstancesTruncateLogRequest; use Google\Cloud\Sql\V1beta4\SqlInstancesUpdateRequest; use Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsRequest; +use Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsRequest\MigrationType; use Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsResponse; use Google\Cloud\Sql\V1beta4\SslCert; use Google\Cloud\Sql\V1beta4\SslCertsCreateEphemeralRequest; @@ -99,7 +105,9 @@ * ``` * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); * try { - * $response = $sqlInstancesServiceClient->addServerCa(); + * $instance = 'instance'; + * $project = 'project'; + * $response = $sqlInstancesServiceClient->acquireSsrsLease($instance, $project); * } finally { * $sqlInstancesServiceClient->close(); * } @@ -228,6 +236,73 @@ public function __construct(array $options = []) $this->setClientOptions($clientOptions); } + /** + * Acquire a lease for the setup of SQL Server Reporting Services (SSRS). + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $instance = 'instance'; + * $project = 'project'; + * $response = $sqlInstancesServiceClient->acquireSsrsLease($instance, $project); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param string $instance Required. Cloud SQL instance ID. This doesn't include the project ID. It's + * composed of lowercase letters, numbers, and hyphens, and it must start with + * a letter. The total length must be 98 characters or less (Example: + * instance-id). + * @param string $project Required. ID of the project that contains the instance (Example: + * project-id). + * @param array $optionalArgs { + * Optional. + * + * @type InstancesAcquireSsrsLeaseRequest $body + * The body for request to acquire an SSRS lease. + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Sql\V1beta4\SqlInstancesAcquireSsrsLeaseResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function acquireSsrsLease( + $instance, + $project, + array $optionalArgs = [] + ) { + $request = new SqlInstancesAcquireSsrsLeaseRequest(); + $requestParamHeaders = []; + $request->setInstance($instance); + $request->setProject($project); + $requestParamHeaders['instance'] = $instance; + $requestParamHeaders['project'] = $project; + if (isset($optionalArgs['body'])) { + $request->setBody($optionalArgs['body']); + } + + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'AcquireSsrsLease', + SqlInstancesAcquireSsrsLeaseResponse::class, + $optionalArgs, + $request + )->wait(); + } + /** * Add a new trusted Certificate Authority (CA) version for the specified * instance. Required to prepare for a certificate rotation. If a CA version @@ -1471,6 +1546,67 @@ public function reencrypt(array $optionalArgs = []) )->wait(); } + /** + * Release a lease for the setup of SQL Server Reporting Services (SSRS). + * + * Sample code: + * ``` + * $sqlInstancesServiceClient = new SqlInstancesServiceClient(); + * try { + * $instance = 'instance'; + * $project = 'project'; + * $response = $sqlInstancesServiceClient->releaseSsrsLease($instance, $project); + * } finally { + * $sqlInstancesServiceClient->close(); + * } + * ``` + * + * @param string $instance Required. The Cloud SQL instance ID. This doesn't include the project ID. + * It's composed of lowercase letters, numbers, and hyphens, and it must start + * with a letter. The total length must be 98 characters or less (Example: + * instance-id). + * @param string $project Required. The ID of the project that contains the instance (Example: + * project-id). + * @param array $optionalArgs { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return \Google\Cloud\Sql\V1beta4\SqlInstancesReleaseSsrsLeaseResponse + * + * @throws ApiException if the remote call fails + * + * @experimental + */ + public function releaseSsrsLease( + $instance, + $project, + array $optionalArgs = [] + ) { + $request = new SqlInstancesReleaseSsrsLeaseRequest(); + $requestParamHeaders = []; + $request->setInstance($instance); + $request->setProject($project); + $requestParamHeaders['instance'] = $instance; + $requestParamHeaders['project'] = $project; + $requestParams = new RequestParamsHeaderDescriptor( + $requestParamHeaders + ); + $optionalArgs['headers'] = isset($optionalArgs['headers']) + ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) + : $requestParams->getHeader(); + return $this->startCall( + 'ReleaseSsrsLease', + SqlInstancesReleaseSsrsLeaseResponse::class, + $optionalArgs, + $request + )->wait(); + } + /** * Reschedules the maintenance on the given instance. * @@ -1880,6 +2016,10 @@ public function rotateServerCa(array $optionalArgs = []) * Optional. Parallel level for initial data sync. Currently only applicable * for MySQL. * For allowed values, use constants defined on {@see \Google\Cloud\Sql\V1beta4\ExternalSyncParallelLevel} + * @type int $migrationType + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration. + * For allowed values, use constants defined on {@see \Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsRequest\MigrationType} * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on @@ -1922,6 +2062,10 @@ public function startExternalSync(array $optionalArgs = []) $request->setSyncParallelLevel($optionalArgs['syncParallelLevel']); } + if (isset($optionalArgs['migrationType'])) { + $request->setMigrationType($optionalArgs['migrationType']); + } + $requestParams = new RequestParamsHeaderDescriptor( $requestParamHeaders ); @@ -2285,6 +2429,14 @@ public function update(array $optionalArgs = []) * Optional. Flag to verify settings required by replication setup only * @type MySqlSyncConfig $mysqlSyncConfig * Optional. MySQL-specific settings for start external sync. + * @type int $migrationType + * Optional. MigrationType field decides if the migration is a physical file + * based migration or logical migration + * For allowed values, use constants defined on {@see \Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsRequest\MigrationType} + * @type int $syncParallelLevel + * Optional. Parallel level for initial data sync. Currently only applicable + * for PostgreSQL. + * For allowed values, use constants defined on {@see \Google\Cloud\Sql\V1beta4\ExternalSyncParallelLevel} * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on @@ -2331,6 +2483,14 @@ public function verifyExternalSyncSettings(array $optionalArgs = []) $request->setMysqlSyncConfig($optionalArgs['mysqlSyncConfig']); } + if (isset($optionalArgs['migrationType'])) { + $request->setMigrationType($optionalArgs['migrationType']); + } + + if (isset($optionalArgs['syncParallelLevel'])) { + $request->setSyncParallelLevel($optionalArgs['syncParallelLevel']); + } + $requestParams = new RequestParamsHeaderDescriptor( $requestParamHeaders ); diff --git a/SqlAdmin/src/V1beta4/GeminiInstanceConfig.php b/SqlAdmin/src/V1beta4/GeminiInstanceConfig.php new file mode 100644 index 000000000000..0ce6fcd8316c --- /dev/null +++ b/SqlAdmin/src/V1beta4/GeminiInstanceConfig.php @@ -0,0 +1,297 @@ +google.cloud.sql.v1beta4.GeminiInstanceConfig + */ +class GeminiInstanceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Whether Gemini is enabled. + * + * Generated from protobuf field optional bool entitled = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $entitled = null; + /** + * Output only. Whether vacuum management is enabled. + * + * Generated from protobuf field optional bool google_vacuum_mgmt_enabled = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $google_vacuum_mgmt_enabled = null; + /** + * Output only. Whether oom session cancel is enabled. + * + * Generated from protobuf field optional bool oom_session_cancel_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $oom_session_cancel_enabled = null; + /** + * Output only. Whether active query is enabled. + * + * Generated from protobuf field optional bool active_query_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $active_query_enabled = null; + /** + * Output only. Whether index advisor is enabled. + * + * Generated from protobuf field optional bool index_advisor_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $index_advisor_enabled = null; + /** + * Output only. Whether flag recommender is enabled. + * + * Generated from protobuf field optional bool flag_recommender_enabled = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $flag_recommender_enabled = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $entitled + * Output only. Whether Gemini is enabled. + * @type bool $google_vacuum_mgmt_enabled + * Output only. Whether vacuum management is enabled. + * @type bool $oom_session_cancel_enabled + * Output only. Whether oom session cancel is enabled. + * @type bool $active_query_enabled + * Output only. Whether active query is enabled. + * @type bool $index_advisor_enabled + * Output only. Whether index advisor is enabled. + * @type bool $flag_recommender_enabled + * Output only. Whether flag recommender is enabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Whether Gemini is enabled. + * + * Generated from protobuf field optional bool entitled = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getEntitled() + { + return isset($this->entitled) ? $this->entitled : false; + } + + public function hasEntitled() + { + return isset($this->entitled); + } + + public function clearEntitled() + { + unset($this->entitled); + } + + /** + * Output only. Whether Gemini is enabled. + * + * Generated from protobuf field optional bool entitled = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setEntitled($var) + { + GPBUtil::checkBool($var); + $this->entitled = $var; + + return $this; + } + + /** + * Output only. Whether vacuum management is enabled. + * + * Generated from protobuf field optional bool google_vacuum_mgmt_enabled = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getGoogleVacuumMgmtEnabled() + { + return isset($this->google_vacuum_mgmt_enabled) ? $this->google_vacuum_mgmt_enabled : false; + } + + public function hasGoogleVacuumMgmtEnabled() + { + return isset($this->google_vacuum_mgmt_enabled); + } + + public function clearGoogleVacuumMgmtEnabled() + { + unset($this->google_vacuum_mgmt_enabled); + } + + /** + * Output only. Whether vacuum management is enabled. + * + * Generated from protobuf field optional bool google_vacuum_mgmt_enabled = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setGoogleVacuumMgmtEnabled($var) + { + GPBUtil::checkBool($var); + $this->google_vacuum_mgmt_enabled = $var; + + return $this; + } + + /** + * Output only. Whether oom session cancel is enabled. + * + * Generated from protobuf field optional bool oom_session_cancel_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getOomSessionCancelEnabled() + { + return isset($this->oom_session_cancel_enabled) ? $this->oom_session_cancel_enabled : false; + } + + public function hasOomSessionCancelEnabled() + { + return isset($this->oom_session_cancel_enabled); + } + + public function clearOomSessionCancelEnabled() + { + unset($this->oom_session_cancel_enabled); + } + + /** + * Output only. Whether oom session cancel is enabled. + * + * Generated from protobuf field optional bool oom_session_cancel_enabled = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setOomSessionCancelEnabled($var) + { + GPBUtil::checkBool($var); + $this->oom_session_cancel_enabled = $var; + + return $this; + } + + /** + * Output only. Whether active query is enabled. + * + * Generated from protobuf field optional bool active_query_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getActiveQueryEnabled() + { + return isset($this->active_query_enabled) ? $this->active_query_enabled : false; + } + + public function hasActiveQueryEnabled() + { + return isset($this->active_query_enabled); + } + + public function clearActiveQueryEnabled() + { + unset($this->active_query_enabled); + } + + /** + * Output only. Whether active query is enabled. + * + * Generated from protobuf field optional bool active_query_enabled = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setActiveQueryEnabled($var) + { + GPBUtil::checkBool($var); + $this->active_query_enabled = $var; + + return $this; + } + + /** + * Output only. Whether index advisor is enabled. + * + * Generated from protobuf field optional bool index_advisor_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getIndexAdvisorEnabled() + { + return isset($this->index_advisor_enabled) ? $this->index_advisor_enabled : false; + } + + public function hasIndexAdvisorEnabled() + { + return isset($this->index_advisor_enabled); + } + + public function clearIndexAdvisorEnabled() + { + unset($this->index_advisor_enabled); + } + + /** + * Output only. Whether index advisor is enabled. + * + * Generated from protobuf field optional bool index_advisor_enabled = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setIndexAdvisorEnabled($var) + { + GPBUtil::checkBool($var); + $this->index_advisor_enabled = $var; + + return $this; + } + + /** + * Output only. Whether flag recommender is enabled. + * + * Generated from protobuf field optional bool flag_recommender_enabled = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getFlagRecommenderEnabled() + { + return isset($this->flag_recommender_enabled) ? $this->flag_recommender_enabled : false; + } + + public function hasFlagRecommenderEnabled() + { + return isset($this->flag_recommender_enabled); + } + + public function clearFlagRecommenderEnabled() + { + unset($this->flag_recommender_enabled); + } + + /** + * Output only. Whether flag recommender is enabled. + * + * Generated from protobuf field optional bool flag_recommender_enabled = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setFlagRecommenderEnabled($var) + { + GPBUtil::checkBool($var); + $this->flag_recommender_enabled = $var; + + return $this; + } + +} + diff --git a/SqlAdmin/src/V1beta4/ImportContext.php b/SqlAdmin/src/V1beta4/ImportContext.php index 6bdb78a79f2d..9e0f7690d688 100644 --- a/SqlAdmin/src/V1beta4/ImportContext.php +++ b/SqlAdmin/src/V1beta4/ImportContext.php @@ -66,6 +66,12 @@ class ImportContext extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext.SqlBakImportOptions bak_import_options = 7; */ private $bak_import_options = null; + /** + * Optional. Options for importing data from SQL statements. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext.SqlImportOptions sql_import_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $sql_import_options = null; /** * Constructor. @@ -96,6 +102,8 @@ class ImportContext extends \Google\Protobuf\Internal\Message * The PostgreSQL user for this import operation. PostgreSQL instances only. * @type \Google\Cloud\Sql\V1beta4\ImportContext\SqlBakImportOptions $bak_import_options * Import parameters specific to SQL Server .BAK files + * @type \Google\Cloud\Sql\V1beta4\ImportContext\SqlImportOptions $sql_import_options + * Optional. Options for importing data from SQL statements. * } */ public function __construct($data = NULL) { @@ -323,5 +331,41 @@ public function setBakImportOptions($var) return $this; } + /** + * Optional. Options for importing data from SQL statements. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext.SqlImportOptions sql_import_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Sql\V1beta4\ImportContext\SqlImportOptions|null + */ + public function getSqlImportOptions() + { + return $this->sql_import_options; + } + + public function hasSqlImportOptions() + { + return isset($this->sql_import_options); + } + + public function clearSqlImportOptions() + { + unset($this->sql_import_options); + } + + /** + * Optional. Options for importing data from SQL statements. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ImportContext.SqlImportOptions sql_import_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Sql\V1beta4\ImportContext\SqlImportOptions $var + * @return $this + */ + public function setSqlImportOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\ImportContext\SqlImportOptions::class); + $this->sql_import_options = $var; + + return $this; + } + } diff --git a/SqlAdmin/src/V1beta4/ImportContext/SqlImportOptions.php b/SqlAdmin/src/V1beta4/ImportContext/SqlImportOptions.php new file mode 100644 index 000000000000..d781dfd445e8 --- /dev/null +++ b/SqlAdmin/src/V1beta4/ImportContext/SqlImportOptions.php @@ -0,0 +1,174 @@ +google.cloud.sql.v1beta4.ImportContext.SqlImportOptions + */ +class SqlImportOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The number of threads to use for parallel import. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $threads = null; + /** + * Optional. Whether or not the import should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $parallel = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Int32Value $threads + * Optional. The number of threads to use for parallel import. + * @type \Google\Protobuf\BoolValue $parallel + * Optional. Whether or not the import should be parallel. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The number of threads to use for parallel import. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int32Value|null + */ + public function getThreads() + { + return $this->threads; + } + + public function hasThreads() + { + return isset($this->threads); + } + + public function clearThreads() + { + unset($this->threads); + } + + /** + * Returns the unboxed value from getThreads() + + * Optional. The number of threads to use for parallel import. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|null + */ + public function getThreadsValue() + { + return $this->readWrapperValue("threads"); + } + + /** + * Optional. The number of threads to use for parallel import. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setThreads($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->threads = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Optional. The number of threads to use for parallel import. + * + * Generated from protobuf field .google.protobuf.Int32Value threads = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|null $var + * @return $this + */ + public function setThreadsValue($var) + { + $this->writeWrapperValue("threads", $var); + return $this;} + + /** + * Optional. Whether or not the import should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getParallel() + { + return $this->parallel; + } + + public function hasParallel() + { + return isset($this->parallel); + } + + public function clearParallel() + { + unset($this->parallel); + } + + /** + * Returns the unboxed value from getParallel() + + * Optional. Whether or not the import should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool|null + */ + public function getParallelValue() + { + return $this->readWrapperValue("parallel"); + } + + /** + * Optional. Whether or not the import should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setParallel($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->parallel = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Optional. Whether or not the import should be parallel. + * + * Generated from protobuf field .google.protobuf.BoolValue parallel = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool|null $var + * @return $this + */ + public function setParallelValue($var) + { + $this->writeWrapperValue("parallel", $var); + return $this;} + +} + + diff --git a/SqlAdmin/src/V1beta4/InstancesAcquireSsrsLeaseRequest.php b/SqlAdmin/src/V1beta4/InstancesAcquireSsrsLeaseRequest.php new file mode 100644 index 000000000000..aa38e5bff65d --- /dev/null +++ b/SqlAdmin/src/V1beta4/InstancesAcquireSsrsLeaseRequest.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1beta4.InstancesAcquireSsrsLeaseRequest + */ +class InstancesAcquireSsrsLeaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Contains details about the acquire SSRS lease operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 1; + */ + private $acquire_ssrs_lease_context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Sql\V1beta4\AcquireSsrsLeaseContext $acquire_ssrs_lease_context + * Contains details about the acquire SSRS lease operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Contains details about the acquire SSRS lease operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 1; + * @return \Google\Cloud\Sql\V1beta4\AcquireSsrsLeaseContext|null + */ + public function getAcquireSsrsLeaseContext() + { + return $this->acquire_ssrs_lease_context; + } + + public function hasAcquireSsrsLeaseContext() + { + return isset($this->acquire_ssrs_lease_context); + } + + public function clearAcquireSsrsLeaseContext() + { + unset($this->acquire_ssrs_lease_context); + } + + /** + * Contains details about the acquire SSRS lease operation. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 1; + * @param \Google\Cloud\Sql\V1beta4\AcquireSsrsLeaseContext $var + * @return $this + */ + public function setAcquireSsrsLeaseContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\AcquireSsrsLeaseContext::class); + $this->acquire_ssrs_lease_context = $var; + + return $this; + } + +} + diff --git a/SqlAdmin/src/V1beta4/IpConfiguration.php b/SqlAdmin/src/V1beta4/IpConfiguration.php index fba37b4505b9..6f570c16aafd 100644 --- a/SqlAdmin/src/V1beta4/IpConfiguration.php +++ b/SqlAdmin/src/V1beta4/IpConfiguration.php @@ -31,7 +31,7 @@ class IpConfiguration extends \Google\Protobuf\Internal\Message */ private $private_network = ''; /** - * Use `ssl_mode` instead for MySQL and PostgreSQL. SQL Server uses this flag. + * Use `ssl_mode` instead. * Whether SSL/TLS connections over IP are enforced. * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. * For SSL/TLS connections, the client certificate won't be verified. If @@ -70,20 +70,22 @@ class IpConfiguration extends \Google\Protobuf\Internal\Message */ private $enable_private_path_for_google_cloud_services = null; /** - * Specify how SSL/TLS is enforced in database connections. MySQL and - * PostgreSQL use the `ssl_mode` flag. If you must use the `require_ssl` flag - * for backward compatibility, then only the following value pairs are valid: + * Specify how SSL/TLS is enforced in database connections. If you must use + * the `require_ssl` flag for backward compatibility, then only the following + * value pairs are valid: + * For PostgreSQL and MySQL: * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` * * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` + * For SQL Server: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` * The value of `ssl_mode` gets priority over the value of `require_ssl`. For * example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, * the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the * `require_ssl=false` means accept both non-SSL and SSL connections. MySQL * and PostgreSQL databases respect `ssl_mode` in this case and accept only * SSL connections. - * SQL Server uses the `require_ssl` flag. You can set the value for this flag - * to `true` or `false`. * * Generated from protobuf field .google.cloud.sql.v1beta4.IpConfiguration.SslMode ssl_mode = 8; */ @@ -109,7 +111,7 @@ class IpConfiguration extends \Google\Protobuf\Internal\Message * `/projects/myProject/global/networks/default`. This setting can * be updated, but it cannot be removed after it is set. * @type \Google\Protobuf\BoolValue $require_ssl - * Use `ssl_mode` instead for MySQL and PostgreSQL. SQL Server uses this flag. + * Use `ssl_mode` instead. * Whether SSL/TLS connections over IP are enforced. * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. * For SSL/TLS connections, the client certificate won't be verified. If @@ -132,20 +134,22 @@ class IpConfiguration extends \Google\Protobuf\Internal\Message * Controls connectivity to private IP instances from Google services, * such as BigQuery. * @type int $ssl_mode - * Specify how SSL/TLS is enforced in database connections. MySQL and - * PostgreSQL use the `ssl_mode` flag. If you must use the `require_ssl` flag - * for backward compatibility, then only the following value pairs are valid: + * Specify how SSL/TLS is enforced in database connections. If you must use + * the `require_ssl` flag for backward compatibility, then only the following + * value pairs are valid: + * For PostgreSQL and MySQL: * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` * * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` + * For SQL Server: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` * The value of `ssl_mode` gets priority over the value of `require_ssl`. For * example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, * the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the * `require_ssl=false` means accept both non-SSL and SSL connections. MySQL * and PostgreSQL databases respect `ssl_mode` in this case and accept only * SSL connections. - * SQL Server uses the `require_ssl` flag. You can set the value for this flag - * to `true` or `false`. * @type \Google\Cloud\Sql\V1beta4\PscConfig $psc_config * PSC settings for this instance. * } @@ -251,7 +255,7 @@ public function setPrivateNetwork($var) } /** - * Use `ssl_mode` instead for MySQL and PostgreSQL. SQL Server uses this flag. + * Use `ssl_mode` instead. * Whether SSL/TLS connections over IP are enforced. * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. * For SSL/TLS connections, the client certificate won't be verified. If @@ -281,7 +285,7 @@ public function clearRequireSsl() /** * Returns the unboxed value from getRequireSsl() - * Use `ssl_mode` instead for MySQL and PostgreSQL. SQL Server uses this flag. + * Use `ssl_mode` instead. * Whether SSL/TLS connections over IP are enforced. * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. * For SSL/TLS connections, the client certificate won't be verified. If @@ -299,7 +303,7 @@ public function getRequireSslValue() } /** - * Use `ssl_mode` instead for MySQL and PostgreSQL. SQL Server uses this flag. + * Use `ssl_mode` instead. * Whether SSL/TLS connections over IP are enforced. * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. * For SSL/TLS connections, the client certificate won't be verified. If @@ -323,7 +327,7 @@ public function setRequireSsl($var) /** * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - * Use `ssl_mode` instead for MySQL and PostgreSQL. SQL Server uses this flag. + * Use `ssl_mode` instead. * Whether SSL/TLS connections over IP are enforced. * If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. * For SSL/TLS connections, the client certificate won't be verified. If @@ -475,20 +479,22 @@ public function setEnablePrivatePathForGoogleCloudServicesValue($var) return $this;} /** - * Specify how SSL/TLS is enforced in database connections. MySQL and - * PostgreSQL use the `ssl_mode` flag. If you must use the `require_ssl` flag - * for backward compatibility, then only the following value pairs are valid: + * Specify how SSL/TLS is enforced in database connections. If you must use + * the `require_ssl` flag for backward compatibility, then only the following + * value pairs are valid: + * For PostgreSQL and MySQL: * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` * * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` + * For SQL Server: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` * The value of `ssl_mode` gets priority over the value of `require_ssl`. For * example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, * the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the * `require_ssl=false` means accept both non-SSL and SSL connections. MySQL * and PostgreSQL databases respect `ssl_mode` in this case and accept only * SSL connections. - * SQL Server uses the `require_ssl` flag. You can set the value for this flag - * to `true` or `false`. * * Generated from protobuf field .google.cloud.sql.v1beta4.IpConfiguration.SslMode ssl_mode = 8; * @return int @@ -499,20 +505,22 @@ public function getSslMode() } /** - * Specify how SSL/TLS is enforced in database connections. MySQL and - * PostgreSQL use the `ssl_mode` flag. If you must use the `require_ssl` flag - * for backward compatibility, then only the following value pairs are valid: + * Specify how SSL/TLS is enforced in database connections. If you must use + * the `require_ssl` flag for backward compatibility, then only the following + * value pairs are valid: + * For PostgreSQL and MySQL: * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` * * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` + * For SQL Server: + * * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` + * * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` * The value of `ssl_mode` gets priority over the value of `require_ssl`. For * example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, * the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the * `require_ssl=false` means accept both non-SSL and SSL connections. MySQL * and PostgreSQL databases respect `ssl_mode` in this case and accept only * SSL connections. - * SQL Server uses the `require_ssl` flag. You can set the value for this flag - * to `true` or `false`. * * Generated from protobuf field .google.cloud.sql.v1beta4.IpConfiguration.SslMode ssl_mode = 8; * @param int $var diff --git a/SqlAdmin/src/V1beta4/IpConfiguration/SslMode.php b/SqlAdmin/src/V1beta4/IpConfiguration/SslMode.php index a112c0b2aa62..d9ba3359399b 100644 --- a/SqlAdmin/src/V1beta4/IpConfiguration/SslMode.php +++ b/SqlAdmin/src/V1beta4/IpConfiguration/SslMode.php @@ -48,6 +48,7 @@ class SslMode * [Cloud SQL * Connectors](https://cloud.google.com/sql/docs/postgres/connect-connectors) * to enforce client identity verification. + * This value is not applicable to SQL Server. * * Generated from protobuf enum TRUSTED_CLIENT_CERTIFICATE_REQUIRED = 3; */ diff --git a/SqlAdmin/src/V1beta4/Operation.php b/SqlAdmin/src/V1beta4/Operation.php index bd3e83e511ed..2eb82c343da9 100644 --- a/SqlAdmin/src/V1beta4/Operation.php +++ b/SqlAdmin/src/V1beta4/Operation.php @@ -138,6 +138,12 @@ class Operation extends \Google\Protobuf\Internal\Message * Generated from protobuf field string target_project = 15; */ private $target_project = ''; + /** + * The context for acquire SSRS lease operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 20; + */ + private $acquire_ssrs_lease_context = null; /** * Constructor. @@ -199,6 +205,8 @@ class Operation extends \Google\Protobuf\Internal\Message * The URI of this resource. * @type string $target_project * The project ID of the target instance related to this operation. + * @type \Google\Cloud\Sql\V1beta4\AcquireSsrsLeaseContext $acquire_ssrs_lease_context + * The context for acquire SSRS lease operation, if applicable. * } */ public function __construct($data = NULL) { @@ -766,5 +774,41 @@ public function setTargetProject($var) return $this; } + /** + * The context for acquire SSRS lease operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 20; + * @return \Google\Cloud\Sql\V1beta4\AcquireSsrsLeaseContext|null + */ + public function getAcquireSsrsLeaseContext() + { + return $this->acquire_ssrs_lease_context; + } + + public function hasAcquireSsrsLeaseContext() + { + return isset($this->acquire_ssrs_lease_context); + } + + public function clearAcquireSsrsLeaseContext() + { + unset($this->acquire_ssrs_lease_context); + } + + /** + * The context for acquire SSRS lease operation, if applicable. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.AcquireSsrsLeaseContext acquire_ssrs_lease_context = 20; + * @param \Google\Cloud\Sql\V1beta4\AcquireSsrsLeaseContext $var + * @return $this + */ + public function setAcquireSsrsLeaseContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\AcquireSsrsLeaseContext::class); + $this->acquire_ssrs_lease_context = $var; + + return $this; + } + } diff --git a/SqlAdmin/src/V1beta4/Operation/SqlOperationType.php b/SqlAdmin/src/V1beta4/Operation/SqlOperationType.php index 8a16c29d16da..95a74ec14960 100644 --- a/SqlAdmin/src/V1beta4/Operation/SqlOperationType.php +++ b/SqlAdmin/src/V1beta4/Operation/SqlOperationType.php @@ -245,6 +245,27 @@ class SqlOperationType * Generated from protobuf enum SWITCHOVER = 39; */ const SWITCHOVER = 39; + /** + * Acquire a lease for the setup of SQL Server Reporting Services (SSRS). + * + * Generated from protobuf enum ACQUIRE_SSRS_LEASE = 42; + */ + const ACQUIRE_SSRS_LEASE = 42; + /** + * Release a lease for the setup of SQL Server Reporting Services (SSRS). + * + * Generated from protobuf enum RELEASE_SSRS_LEASE = 43; + */ + const RELEASE_SSRS_LEASE = 43; + /** + * Reconfigures old primary after a promote replica operation. Effect of a + * promote operation to the old primary is executed in this operation, + * asynchronously from the promote replica operation executed to the + * replica. + * + * Generated from protobuf enum RECONFIGURE_OLD_PRIMARY = 44; + */ + const RECONFIGURE_OLD_PRIMARY = 44; private static $valueToName = [ self::SQL_OPERATION_TYPE_UNSPECIFIED => 'SQL_OPERATION_TYPE_UNSPECIFIED', @@ -286,6 +307,9 @@ class SqlOperationType self::AUTO_RESTART => 'AUTO_RESTART', self::REENCRYPT => 'REENCRYPT', self::SWITCHOVER => 'SWITCHOVER', + self::ACQUIRE_SSRS_LEASE => 'ACQUIRE_SSRS_LEASE', + self::RELEASE_SSRS_LEASE => 'RELEASE_SSRS_LEASE', + self::RECONFIGURE_OLD_PRIMARY => 'RECONFIGURE_OLD_PRIMARY', ]; public static function name($value) diff --git a/SqlAdmin/src/V1beta4/ReplicationCluster.php b/SqlAdmin/src/V1beta4/ReplicationCluster.php new file mode 100644 index 000000000000..3cfb5ceed15b --- /dev/null +++ b/SqlAdmin/src/V1beta4/ReplicationCluster.php @@ -0,0 +1,145 @@ +google.cloud.sql.v1beta4.ReplicationCluster + */ +class ReplicationCluster extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. If the instance is a primary instance, then this field identifies + * the disaster recovery (DR) replica. A DR replica is an optional + * configuration for Enterprise Plus edition instances. If the instance is a + * read replica, then the field is not set. Users can set this field to set a + * designated DR replica for a primary. Removing this field removes the DR + * replica. + * + * Generated from protobuf field optional string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $failover_dr_replica_name = null; + /** + * Output only. read-only field that indicates if the replica is a dr_replica; + * not set for a primary. + * + * Generated from protobuf field optional bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $dr_replica = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $failover_dr_replica_name + * Optional. If the instance is a primary instance, then this field identifies + * the disaster recovery (DR) replica. A DR replica is an optional + * configuration for Enterprise Plus edition instances. If the instance is a + * read replica, then the field is not set. Users can set this field to set a + * designated DR replica for a primary. Removing this field removes the DR + * replica. + * @type bool $dr_replica + * Output only. read-only field that indicates if the replica is a dr_replica; + * not set for a primary. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce(); + parent::__construct($data); + } + + /** + * Optional. If the instance is a primary instance, then this field identifies + * the disaster recovery (DR) replica. A DR replica is an optional + * configuration for Enterprise Plus edition instances. If the instance is a + * read replica, then the field is not set. Users can set this field to set a + * designated DR replica for a primary. Removing this field removes the DR + * replica. + * + * Generated from protobuf field optional string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFailoverDrReplicaName() + { + return isset($this->failover_dr_replica_name) ? $this->failover_dr_replica_name : ''; + } + + public function hasFailoverDrReplicaName() + { + return isset($this->failover_dr_replica_name); + } + + public function clearFailoverDrReplicaName() + { + unset($this->failover_dr_replica_name); + } + + /** + * Optional. If the instance is a primary instance, then this field identifies + * the disaster recovery (DR) replica. A DR replica is an optional + * configuration for Enterprise Plus edition instances. If the instance is a + * read replica, then the field is not set. Users can set this field to set a + * designated DR replica for a primary. Removing this field removes the DR + * replica. + * + * Generated from protobuf field optional string failover_dr_replica_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFailoverDrReplicaName($var) + { + GPBUtil::checkString($var, True); + $this->failover_dr_replica_name = $var; + + return $this; + } + + /** + * Output only. read-only field that indicates if the replica is a dr_replica; + * not set for a primary. + * + * Generated from protobuf field optional bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getDrReplica() + { + return isset($this->dr_replica) ? $this->dr_replica : false; + } + + public function hasDrReplica() + { + return isset($this->dr_replica); + } + + public function clearDrReplica() + { + unset($this->dr_replica); + } + + /** + * Output only. read-only field that indicates if the replica is a dr_replica; + * not set for a primary. + * + * Generated from protobuf field optional bool dr_replica = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setDrReplica($var) + { + GPBUtil::checkBool($var); + $this->dr_replica = $var; + + return $this; + } + +} + diff --git a/SqlAdmin/src/V1beta4/Settings.php b/SqlAdmin/src/V1beta4/Settings.php index 24d10e3ed774..5ade6e2a6f06 100644 --- a/SqlAdmin/src/V1beta4/Settings.php +++ b/SqlAdmin/src/V1beta4/Settings.php @@ -252,6 +252,15 @@ class Settings extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.sql.v1beta4.DataCacheConfig data_cache_config = 37; */ private $data_cache_config = null; + /** + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $enable_google_ml_integration = null; /** * Constructor. @@ -365,6 +374,11 @@ class Settings extends \Google\Protobuf\Internal\Message * relevant only for SQL Server. * @type \Google\Cloud\Sql\V1beta4\DataCacheConfig $data_cache_config * Configuration for data cache. + * @type \Google\Protobuf\BoolValue $enable_google_ml_integration + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. * } */ public function __construct($data = NULL) { @@ -1680,5 +1694,80 @@ public function setDataCacheConfig($var) return $this; } + /** + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getEnableGoogleMlIntegration() + { + return $this->enable_google_ml_integration; + } + + public function hasEnableGoogleMlIntegration() + { + return isset($this->enable_google_ml_integration); + } + + public function clearEnableGoogleMlIntegration() + { + unset($this->enable_google_ml_integration); + } + + /** + * Returns the unboxed value from getEnableGoogleMlIntegration() + + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool|null + */ + public function getEnableGoogleMlIntegrationValue() + { + return $this->readWrapperValue("enable_google_ml_integration"); + } + + /** + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setEnableGoogleMlIntegration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->enable_google_ml_integration = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Optional. When this parameter is set to true, Cloud SQL instances can + * connect to Vertex AI to pass requests for real-time predictions and + * insights to the AI. The default value is false. This applies only to Cloud + * SQL for PostgreSQL instances. + * + * Generated from protobuf field .google.protobuf.BoolValue enable_google_ml_integration = 40 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool|null $var + * @return $this + */ + public function setEnableGoogleMlIntegrationValue($var) + { + $this->writeWrapperValue("enable_google_ml_integration", $var); + return $this;} + } diff --git a/SqlAdmin/src/V1beta4/SqlDatabaseVersion.php b/SqlAdmin/src/V1beta4/SqlDatabaseVersion.php index 0d4a492ed295..a5072e10aa56 100644 --- a/SqlAdmin/src/V1beta4/SqlDatabaseVersion.php +++ b/SqlAdmin/src/V1beta4/SqlDatabaseVersion.php @@ -187,6 +187,30 @@ class SqlDatabaseVersion * Generated from protobuf enum MYSQL_8_0_36 = 241; */ const MYSQL_8_0_36 = 241; + /** + * The database major version is MySQL 8.0 and the minor version is 37. + * + * Generated from protobuf enum MYSQL_8_0_37 = 355; + */ + const MYSQL_8_0_37 = 355; + /** + * The database major version is MySQL 8.0 and the minor version is 38. + * + * Generated from protobuf enum MYSQL_8_0_38 = 356; + */ + const MYSQL_8_0_38 = 356; + /** + * The database major version is MySQL 8.0 and the minor version is 39. + * + * Generated from protobuf enum MYSQL_8_0_39 = 357; + */ + const MYSQL_8_0_39 = 357; + /** + * The database major version is MySQL 8.0 and the minor version is 40. + * + * Generated from protobuf enum MYSQL_8_0_40 = 358; + */ + const MYSQL_8_0_40 = 358; /** * The database version is SQL Server 2019 Standard. * @@ -266,6 +290,10 @@ class SqlDatabaseVersion self::MYSQL_8_0_34 => 'MYSQL_8_0_34', self::MYSQL_8_0_35 => 'MYSQL_8_0_35', self::MYSQL_8_0_36 => 'MYSQL_8_0_36', + self::MYSQL_8_0_37 => 'MYSQL_8_0_37', + self::MYSQL_8_0_38 => 'MYSQL_8_0_38', + self::MYSQL_8_0_39 => 'MYSQL_8_0_39', + self::MYSQL_8_0_40 => 'MYSQL_8_0_40', self::SQLSERVER_2019_STANDARD => 'SQLSERVER_2019_STANDARD', self::SQLSERVER_2019_ENTERPRISE => 'SQLSERVER_2019_ENTERPRISE', self::SQLSERVER_2019_EXPRESS => 'SQLSERVER_2019_EXPRESS', diff --git a/SqlAdmin/src/V1beta4/SqlInstancesAcquireSsrsLeaseRequest.php b/SqlAdmin/src/V1beta4/SqlInstancesAcquireSsrsLeaseRequest.php new file mode 100644 index 000000000000..15c1ea5c7267 --- /dev/null +++ b/SqlAdmin/src/V1beta4/SqlInstancesAcquireSsrsLeaseRequest.php @@ -0,0 +1,161 @@ +google.cloud.sql.v1beta4.SqlInstancesAcquireSsrsLeaseRequest + */ +class SqlInstancesAcquireSsrsLeaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Cloud SQL instance ID. This doesn't include the project ID. It's + * composed of lowercase letters, numbers, and hyphens, and it must start with + * a letter. The total length must be 98 characters or less (Example: + * instance-id). + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $instance = ''; + /** + * Required. ID of the project that contains the instance (Example: + * project-id). + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $project = ''; + /** + * The body for request to acquire an SSRS lease. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesAcquireSsrsLeaseRequest body = 100; + */ + private $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Required. Cloud SQL instance ID. This doesn't include the project ID. It's + * composed of lowercase letters, numbers, and hyphens, and it must start with + * a letter. The total length must be 98 characters or less (Example: + * instance-id). + * @type string $project + * Required. ID of the project that contains the instance (Example: + * project-id). + * @type \Google\Cloud\Sql\V1beta4\InstancesAcquireSsrsLeaseRequest $body + * The body for request to acquire an SSRS lease. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Required. Cloud SQL instance ID. This doesn't include the project ID. It's + * composed of lowercase letters, numbers, and hyphens, and it must start with + * a letter. The total length must be 98 characters or less (Example: + * instance-id). + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Required. Cloud SQL instance ID. This doesn't include the project ID. It's + * composed of lowercase letters, numbers, and hyphens, and it must start with + * a letter. The total length must be 98 characters or less (Example: + * instance-id). + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Required. ID of the project that contains the instance (Example: + * project-id). + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Required. ID of the project that contains the instance (Example: + * project-id). + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + + /** + * The body for request to acquire an SSRS lease. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesAcquireSsrsLeaseRequest body = 100; + * @return \Google\Cloud\Sql\V1beta4\InstancesAcquireSsrsLeaseRequest|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * The body for request to acquire an SSRS lease. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.InstancesAcquireSsrsLeaseRequest body = 100; + * @param \Google\Cloud\Sql\V1beta4\InstancesAcquireSsrsLeaseRequest $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Sql\V1beta4\InstancesAcquireSsrsLeaseRequest::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/SqlAdmin/src/V1beta4/SqlInstancesAcquireSsrsLeaseResponse.php b/SqlAdmin/src/V1beta4/SqlInstancesAcquireSsrsLeaseResponse.php new file mode 100644 index 000000000000..f6f6448148cc --- /dev/null +++ b/SqlAdmin/src/V1beta4/SqlInstancesAcquireSsrsLeaseResponse.php @@ -0,0 +1,77 @@ +google.cloud.sql.v1beta4.SqlInstancesAcquireSsrsLeaseResponse + */ +class SqlInstancesAcquireSsrsLeaseResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The unique identifier for this operation. + * + * Generated from protobuf field optional string operation_id = 1; + */ + private $operation_id = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $operation_id + * The unique identifier for this operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * The unique identifier for this operation. + * + * Generated from protobuf field optional string operation_id = 1; + * @return string + */ + public function getOperationId() + { + return isset($this->operation_id) ? $this->operation_id : ''; + } + + public function hasOperationId() + { + return isset($this->operation_id); + } + + public function clearOperationId() + { + unset($this->operation_id); + } + + /** + * The unique identifier for this operation. + * + * Generated from protobuf field optional string operation_id = 1; + * @param string $var + * @return $this + */ + public function setOperationId($var) + { + GPBUtil::checkString($var, True); + $this->operation_id = $var; + + return $this; + } + +} + diff --git a/SqlAdmin/src/V1beta4/SqlInstancesReleaseSsrsLeaseRequest.php b/SqlAdmin/src/V1beta4/SqlInstancesReleaseSsrsLeaseRequest.php new file mode 100644 index 000000000000..cb7171633712 --- /dev/null +++ b/SqlAdmin/src/V1beta4/SqlInstancesReleaseSsrsLeaseRequest.php @@ -0,0 +1,117 @@ +google.cloud.sql.v1beta4.SqlInstancesReleaseSsrsLeaseRequest + */ +class SqlInstancesReleaseSsrsLeaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Cloud SQL instance ID. This doesn't include the project ID. + * It's composed of lowercase letters, numbers, and hyphens, and it must start + * with a letter. The total length must be 98 characters or less (Example: + * instance-id). + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $instance = ''; + /** + * Required. The ID of the project that contains the instance (Example: + * project-id). + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $project = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance + * Required. The Cloud SQL instance ID. This doesn't include the project ID. + * It's composed of lowercase letters, numbers, and hyphens, and it must start + * with a letter. The total length must be 98 characters or less (Example: + * instance-id). + * @type string $project + * Required. The ID of the project that contains the instance (Example: + * project-id). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Cloud SQL instance ID. This doesn't include the project ID. + * It's composed of lowercase letters, numbers, and hyphens, and it must start + * with a letter. The total length must be 98 characters or less (Example: + * instance-id). + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Required. The Cloud SQL instance ID. This doesn't include the project ID. + * It's composed of lowercase letters, numbers, and hyphens, and it must start + * with a letter. The total length must be 98 characters or less (Example: + * instance-id). + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Required. The ID of the project that contains the instance (Example: + * project-id). + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Required. The ID of the project that contains the instance (Example: + * project-id). + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProject($var) + { + GPBUtil::checkString($var, True); + $this->project = $var; + + return $this; + } + +} + diff --git a/SqlAdmin/src/V1beta4/SqlInstancesReleaseSsrsLeaseResponse.php b/SqlAdmin/src/V1beta4/SqlInstancesReleaseSsrsLeaseResponse.php new file mode 100644 index 000000000000..0ea3d2f79c38 --- /dev/null +++ b/SqlAdmin/src/V1beta4/SqlInstancesReleaseSsrsLeaseResponse.php @@ -0,0 +1,67 @@ +google.cloud.sql.v1beta4.SqlInstancesReleaseSsrsLeaseResponse + */ +class SqlInstancesReleaseSsrsLeaseResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The operation ID. + * + * Generated from protobuf field string operation_id = 1; + */ + private $operation_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $operation_id + * The operation ID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSql::initOnce(); + parent::__construct($data); + } + + /** + * The operation ID. + * + * Generated from protobuf field string operation_id = 1; + * @return string + */ + public function getOperationId() + { + return $this->operation_id; + } + + /** + * The operation ID. + * + * Generated from protobuf field string operation_id = 1; + * @param string $var + * @return $this + */ + public function setOperationId($var) + { + GPBUtil::checkString($var, True); + $this->operation_id = $var; + + return $this; + } + +} + diff --git a/SqlAdmin/src/V1beta4/SqlInstancesStartExternalSyncRequest.php b/SqlAdmin/src/V1beta4/SqlInstancesStartExternalSyncRequest.php index 3d469525bc2d..f9ad0d745410 100644 --- a/SqlAdmin/src/V1beta4/SqlInstancesStartExternalSyncRequest.php +++ b/SqlAdmin/src/V1beta4/SqlInstancesStartExternalSyncRequest.php @@ -44,6 +44,13 @@ class SqlInstancesStartExternalSyncRequest extends \Google\Protobuf\Internal\Mes * Generated from protobuf field .google.cloud.sql.v1beta4.ExternalSyncParallelLevel sync_parallel_level = 7 [(.google.api.field_behavior) = OPTIONAL]; */ private $sync_parallel_level = 0; + /** + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $migration_type = 0; protected $sync_config; /** @@ -65,6 +72,9 @@ class SqlInstancesStartExternalSyncRequest extends \Google\Protobuf\Internal\Mes * @type int $sync_parallel_level * Optional. Parallel level for initial data sync. Currently only applicable * for MySQL. + * @type int $migration_type + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration. * } */ public function __construct($data = NULL) { @@ -235,6 +245,34 @@ public function setSyncParallelLevel($var) return $this; } + /** + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMigrationType() + { + return $this->migration_type; + } + + /** + * Optional. MigrationType decides if the migration is a physical file based + * migration or logical migration. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMigrationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsRequest\MigrationType::class); + $this->migration_type = $var; + + return $this; + } + /** * @return string */ diff --git a/SqlAdmin/src/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest.php b/SqlAdmin/src/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest.php index e8a0b883e504..b0e70355a21d 100644 --- a/SqlAdmin/src/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest.php +++ b/SqlAdmin/src/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest.php @@ -43,6 +43,20 @@ class SqlInstancesVerifyExternalSyncSettingsRequest extends \Google\Protobuf\Int * Generated from protobuf field bool verify_replication_only = 5 [(.google.api.field_behavior) = OPTIONAL]; */ private $verify_replication_only = false; + /** + * Optional. MigrationType field decides if the migration is a physical file + * based migration or logical migration + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $migration_type = 0; + /** + * Optional. Parallel level for initial data sync. Currently only applicable + * for PostgreSQL. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ExternalSyncParallelLevel sync_parallel_level = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $sync_parallel_level = 0; protected $sync_config; /** @@ -63,6 +77,12 @@ class SqlInstancesVerifyExternalSyncSettingsRequest extends \Google\Protobuf\Int * Optional. Flag to verify settings required by replication setup only * @type \Google\Cloud\Sql\V1beta4\MySqlSyncConfig $mysql_sync_config * Optional. MySQL-specific settings for start external sync. + * @type int $migration_type + * Optional. MigrationType field decides if the migration is a physical file + * based migration or logical migration + * @type int $sync_parallel_level + * Optional. Parallel level for initial data sync. Currently only applicable + * for PostgreSQL. * } */ public function __construct($data = NULL) { @@ -231,6 +251,62 @@ public function setMysqlSyncConfig($var) return $this; } + /** + * Optional. MigrationType field decides if the migration is a physical file + * based migration or logical migration + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMigrationType() + { + return $this->migration_type; + } + + /** + * Optional. MigrationType field decides if the migration is a physical file + * based migration or logical migration + * + * Generated from protobuf field .google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMigrationType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsRequest\MigrationType::class); + $this->migration_type = $var; + + return $this; + } + + /** + * Optional. Parallel level for initial data sync. Currently only applicable + * for PostgreSQL. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ExternalSyncParallelLevel sync_parallel_level = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSyncParallelLevel() + { + return $this->sync_parallel_level; + } + + /** + * Optional. Parallel level for initial data sync. Currently only applicable + * for PostgreSQL. + * + * Generated from protobuf field .google.cloud.sql.v1beta4.ExternalSyncParallelLevel sync_parallel_level = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSyncParallelLevel($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Sql\V1beta4\ExternalSyncParallelLevel::class); + $this->sync_parallel_level = $var; + + return $this; + } + /** * @return string */ diff --git a/SqlAdmin/src/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php b/SqlAdmin/src/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php new file mode 100644 index 000000000000..02e6833a98f2 --- /dev/null +++ b/SqlAdmin/src/V1beta4/SqlInstancesVerifyExternalSyncSettingsRequest/MigrationType.php @@ -0,0 +1,63 @@ +google.cloud.sql.v1beta4.SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType + */ +class MigrationType +{ + /** + * If no migration type is specified it will be defaulted to LOGICAL. + * + * Generated from protobuf enum MIGRATION_TYPE_UNSPECIFIED = 0; + */ + const MIGRATION_TYPE_UNSPECIFIED = 0; + /** + * Logical Migrations + * + * Generated from protobuf enum LOGICAL = 1; + */ + const LOGICAL = 1; + /** + * Physical file based Migrations + * + * Generated from protobuf enum PHYSICAL = 2; + */ + const PHYSICAL = 2; + + private static $valueToName = [ + self::MIGRATION_TYPE_UNSPECIFIED => 'MIGRATION_TYPE_UNSPECIFIED', + self::LOGICAL => 'LOGICAL', + self::PHYSICAL => 'PHYSICAL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + + diff --git a/SqlAdmin/src/V1beta4/gapic_metadata.json b/SqlAdmin/src/V1beta4/gapic_metadata.json index 653c830da22b..932d7dbbfc16 100644 --- a/SqlAdmin/src/V1beta4/gapic_metadata.json +++ b/SqlAdmin/src/V1beta4/gapic_metadata.json @@ -92,6 +92,11 @@ "grpc": { "libraryClient": "SqlInstancesServiceGapicClient", "rpcs": { + "AcquireSsrsLease": { + "methods": [ + "acquireSsrsLease" + ] + }, "AddServerCa": { "methods": [ "addServerCa" @@ -187,6 +192,11 @@ "reencrypt" ] }, + "ReleaseSsrsLease": { + "methods": [ + "releaseSsrsLease" + ] + }, "RescheduleMaintenance": { "methods": [ "rescheduleMaintenance" diff --git a/SqlAdmin/src/V1beta4/resources/sql_instances_service_client_config.json b/SqlAdmin/src/V1beta4/resources/sql_instances_service_client_config.json index bbf1ebe22bca..57673d4b71f9 100644 --- a/SqlAdmin/src/V1beta4/resources/sql_instances_service_client_config.json +++ b/SqlAdmin/src/V1beta4/resources/sql_instances_service_client_config.json @@ -26,6 +26,11 @@ } }, "methods": { + "AcquireSsrsLease": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, "AddServerCa": { "timeout_millis": 60000, "retry_codes_name": "no_retry_1_codes", @@ -121,6 +126,11 @@ "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "ReleaseSsrsLease": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, "RescheduleMaintenance": { "timeout_millis": 60000, "retry_codes_name": "no_retry_1_codes", diff --git a/SqlAdmin/src/V1beta4/resources/sql_instances_service_rest_client_config.php b/SqlAdmin/src/V1beta4/resources/sql_instances_service_rest_client_config.php index 981162de4c65..3dd890d997db 100644 --- a/SqlAdmin/src/V1beta4/resources/sql_instances_service_rest_client_config.php +++ b/SqlAdmin/src/V1beta4/resources/sql_instances_service_rest_client_config.php @@ -23,6 +23,23 @@ return [ 'interfaces' => [ 'google.cloud.sql.v1beta4.SqlInstancesService' => [ + 'AcquireSsrsLease' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/acquireSsrsLease', + 'body' => 'body', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], 'AddServerCa' => [ 'method' => 'post', 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/addServerCa', @@ -328,6 +345,22 @@ ], ], ], + 'ReleaseSsrsLease' => [ + 'method' => 'post', + 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/releaseSsrsLease', + 'placeholders' => [ + 'instance' => [ + 'getters' => [ + 'getInstance', + ], + ], + 'project' => [ + 'getters' => [ + 'getProject', + ], + ], + ], + ], 'RescheduleMaintenance' => [ 'method' => 'post', 'uriTemplate' => '/sql/v1beta4/projects/{project}/instances/{instance}/rescheduleMaintenance', diff --git a/SqlAdmin/tests/Unit/V1/Client/SqlInstancesServiceClientTest.php b/SqlAdmin/tests/Unit/V1/Client/SqlInstancesServiceClientTest.php index 54c3251d0c6f..28c10e28a19e 100644 --- a/SqlAdmin/tests/Unit/V1/Client/SqlInstancesServiceClientTest.php +++ b/SqlAdmin/tests/Unit/V1/Client/SqlInstancesServiceClientTest.php @@ -29,10 +29,13 @@ use Google\Cloud\Sql\V1\Client\SqlInstancesServiceClient; use Google\Cloud\Sql\V1\DatabaseInstance; use Google\Cloud\Sql\V1\DemoteContext; +use Google\Cloud\Sql\V1\InstancesAcquireSsrsLeaseRequest; use Google\Cloud\Sql\V1\InstancesDemoteRequest; use Google\Cloud\Sql\V1\InstancesListResponse; use Google\Cloud\Sql\V1\InstancesListServerCasResponse; use Google\Cloud\Sql\V1\Operation; +use Google\Cloud\Sql\V1\SqlInstancesAcquireSsrsLeaseRequest; +use Google\Cloud\Sql\V1\SqlInstancesAcquireSsrsLeaseResponse; use Google\Cloud\Sql\V1\SqlInstancesAddServerCaRequest; use Google\Cloud\Sql\V1\SqlInstancesCloneRequest; use Google\Cloud\Sql\V1\SqlInstancesCreateEphemeralCertRequest; @@ -54,6 +57,8 @@ use Google\Cloud\Sql\V1\SqlInstancesPerformDiskShrinkRequest; use Google\Cloud\Sql\V1\SqlInstancesPromoteReplicaRequest; use Google\Cloud\Sql\V1\SqlInstancesReencryptRequest; +use Google\Cloud\Sql\V1\SqlInstancesReleaseSsrsLeaseRequest; +use Google\Cloud\Sql\V1\SqlInstancesReleaseSsrsLeaseResponse; use Google\Cloud\Sql\V1\SqlInstancesRescheduleMaintenanceRequest; use Google\Cloud\Sql\V1\SqlInstancesResetReplicaSizeRequest; use Google\Cloud\Sql\V1\SqlInstancesResetSslConfigRequest; @@ -100,6 +105,82 @@ private function createClient(array $options = []) return new SqlInstancesServiceClient($options); } + /** @test */ + public function acquireSsrsLeaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $operationId = 'operationId-274116877'; + $expectedResponse = new SqlInstancesAcquireSsrsLeaseResponse(); + $expectedResponse->setOperationId($operationId); + $transport->addResponse($expectedResponse); + // Mock request + $instance = 'instance555127957'; + $project = 'project-309310695'; + $body = new InstancesAcquireSsrsLeaseRequest(); + $request = (new SqlInstancesAcquireSsrsLeaseRequest()) + ->setInstance($instance) + ->setProject($project) + ->setBody($body); + $response = $gapicClient->acquireSsrsLease($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1.SqlInstancesService/AcquireSsrsLease', $actualFuncCall); + $actualValue = $actualRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getBody(); + $this->assertProtobufEquals($body, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function acquireSsrsLeaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $instance = 'instance555127957'; + $project = 'project-309310695'; + $body = new InstancesAcquireSsrsLeaseRequest(); + $request = (new SqlInstancesAcquireSsrsLeaseRequest()) + ->setInstance($instance) + ->setProject($project) + ->setBody($body); + try { + $gapicClient->acquireSsrsLease($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function addServerCaTest() { @@ -1404,6 +1485,76 @@ public function reencryptExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function releaseSsrsLeaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $operationId = 'operationId-274116877'; + $expectedResponse = new SqlInstancesReleaseSsrsLeaseResponse(); + $expectedResponse->setOperationId($operationId); + $transport->addResponse($expectedResponse); + // Mock request + $instance = 'instance555127957'; + $project = 'project-309310695'; + $request = (new SqlInstancesReleaseSsrsLeaseRequest()) + ->setInstance($instance) + ->setProject($project); + $response = $gapicClient->releaseSsrsLease($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1.SqlInstancesService/ReleaseSsrsLease', $actualFuncCall); + $actualValue = $actualRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function releaseSsrsLeaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $instance = 'instance555127957'; + $project = 'project-309310695'; + $request = (new SqlInstancesReleaseSsrsLeaseRequest()) + ->setInstance($instance) + ->setProject($project); + try { + $gapicClient->releaseSsrsLease($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function rescheduleMaintenanceTest() { @@ -2277,7 +2428,7 @@ public function verifyExternalSyncSettingsExceptionTest() } /** @test */ - public function addServerCaAsyncTest() + public function acquireSsrsLeaseAsyncTest() { $transport = $this->createTransport(); $gapicClient = $this->createClient([ @@ -2285,30 +2436,31 @@ public function addServerCaAsyncTest() ]); $this->assertTrue($transport->isExhausted()); // Mock response - $kind = 'kind3292052'; - $targetLink = 'targetLink-2084812312'; - $user = 'user3599307'; - $name = 'name3373707'; - $targetId = 'targetId-815576439'; - $selfLink = 'selfLink-1691268851'; - $targetProject = 'targetProject392184427'; - $expectedResponse = new Operation(); - $expectedResponse->setKind($kind); - $expectedResponse->setTargetLink($targetLink); - $expectedResponse->setUser($user); - $expectedResponse->setName($name); - $expectedResponse->setTargetId($targetId); - $expectedResponse->setSelfLink($selfLink); - $expectedResponse->setTargetProject($targetProject); + $operationId = 'operationId-274116877'; + $expectedResponse = new SqlInstancesAcquireSsrsLeaseResponse(); + $expectedResponse->setOperationId($operationId); $transport->addResponse($expectedResponse); - $request = new SqlInstancesAddServerCaRequest(); - $response = $gapicClient->addServerCaAsync($request)->wait(); + // Mock request + $instance = 'instance555127957'; + $project = 'project-309310695'; + $body = new InstancesAcquireSsrsLeaseRequest(); + $request = (new SqlInstancesAcquireSsrsLeaseRequest()) + ->setInstance($instance) + ->setProject($project) + ->setBody($body); + $response = $gapicClient->acquireSsrsLeaseAsync($request)->wait(); $this->assertEquals($expectedResponse, $response); $actualRequests = $transport->popReceivedCalls(); $this->assertSame(1, count($actualRequests)); $actualFuncCall = $actualRequests[0]->getFuncCall(); $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.sql.v1.SqlInstancesService/AddServerCa', $actualFuncCall); + $this->assertSame('/google.cloud.sql.v1.SqlInstancesService/AcquireSsrsLease', $actualFuncCall); + $actualValue = $actualRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $actualValue = $actualRequestObject->getBody(); + $this->assertProtobufEquals($body, $actualValue); $this->assertTrue($transport->isExhausted()); } } diff --git a/SqlAdmin/tests/Unit/V1beta4/SqlInstancesServiceClientTest.php b/SqlAdmin/tests/Unit/V1beta4/SqlInstancesServiceClientTest.php index 74d6d5426a6a..199fa209d58d 100644 --- a/SqlAdmin/tests/Unit/V1beta4/SqlInstancesServiceClientTest.php +++ b/SqlAdmin/tests/Unit/V1beta4/SqlInstancesServiceClientTest.php @@ -30,8 +30,10 @@ use Google\Cloud\Sql\V1beta4\InstancesListResponse; use Google\Cloud\Sql\V1beta4\InstancesListServerCasResponse; use Google\Cloud\Sql\V1beta4\Operation; +use Google\Cloud\Sql\V1beta4\SqlInstancesAcquireSsrsLeaseResponse; use Google\Cloud\Sql\V1beta4\SqlInstancesGetDiskShrinkConfigResponse; use Google\Cloud\Sql\V1beta4\SqlInstancesGetLatestRecoveryTimeResponse; +use Google\Cloud\Sql\V1beta4\SqlInstancesReleaseSsrsLeaseResponse; use Google\Cloud\Sql\V1beta4\SqlInstancesServiceClient; use Google\Cloud\Sql\V1beta4\SqlInstancesVerifyExternalSyncSettingsResponse; use Google\Cloud\Sql\V1beta4\SslCert; @@ -66,6 +68,70 @@ private function createClient(array $options = []) return new SqlInstancesServiceClient($options); } + /** @test */ + public function acquireSsrsLeaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $operationId = 'operationId-274116877'; + $expectedResponse = new SqlInstancesAcquireSsrsLeaseResponse(); + $expectedResponse->setOperationId($operationId); + $transport->addResponse($expectedResponse); + // Mock request + $instance = 'instance555127957'; + $project = 'project-309310695'; + $response = $gapicClient->acquireSsrsLease($instance, $project); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/AcquireSsrsLease', $actualFuncCall); + $actualValue = $actualRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function acquireSsrsLeaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $instance = 'instance555127957'; + $project = 'project-309310695'; + try { + $gapicClient->acquireSsrsLease($instance, $project); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function addServerCaTest() { @@ -1314,6 +1380,70 @@ public function reencryptExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function releaseSsrsLeaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $operationId = 'operationId-274116877'; + $expectedResponse = new SqlInstancesReleaseSsrsLeaseResponse(); + $expectedResponse->setOperationId($operationId); + $transport->addResponse($expectedResponse); + // Mock request + $instance = 'instance555127957'; + $project = 'project-309310695'; + $response = $gapicClient->releaseSsrsLease($instance, $project); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.sql.v1beta4.SqlInstancesService/ReleaseSsrsLease', $actualFuncCall); + $actualValue = $actualRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $actualValue = $actualRequestObject->getProject(); + $this->assertProtobufEquals($project, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function releaseSsrsLeaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $instance = 'instance555127957'; + $project = 'project-309310695'; + try { + $gapicClient->releaseSsrsLease($instance, $project); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function rescheduleMaintenanceTest() { From 0a5e5f68f6b93d940c65a23704b671c5cc635887 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Fri, 3 May 2024 09:50:16 -0700 Subject: [PATCH 82/86] chore(dev): move repo-metadata.json files to repo-metadata-full.json (#7281) --- .repo-metadata-full.json | 1445 +++++++++++++++++ AccessApproval/.repo-metadata.json | 8 - AccessContextManager/.repo-metadata.json | 8 - AdvisoryNotifications/.repo-metadata.json | 8 - AiPlatform/.repo-metadata.json | 8 - AlloyDb/.repo-metadata.json | 8 - AnalyticsAdmin/.repo-metadata.json | 8 - AnalyticsData/.repo-metadata.json | 8 - ApiGateway/.repo-metadata.json | 8 - ApiKeys/.repo-metadata.json | 10 - ApigeeConnect/.repo-metadata.json | 8 - ApigeeRegistry/.repo-metadata.json | 8 - AppEngineAdmin/.repo-metadata.json | 8 - AppHub/.repo-metadata.json | 8 - AppsChat/.repo-metadata.json | 8 - AppsEventsSubscriptions/.repo-metadata.json | 8 - AppsMeet/.repo-metadata.json | 8 - ArtifactRegistry/.repo-metadata.json | 8 - Asset/.repo-metadata.json | 8 - AssuredWorkloads/.repo-metadata.json | 8 - AutoMl/.repo-metadata.json | 8 - BareMetalSolution/.repo-metadata.json | 8 - Batch/.repo-metadata.json | 10 - BeyondCorpAppConnections/.repo-metadata.json | 10 - BeyondCorpAppConnectors/.repo-metadata.json | 8 - BeyondCorpAppGateways/.repo-metadata.json | 8 - .../.repo-metadata.json | 8 - BeyondCorpClientGateways/.repo-metadata.json | 8 - BigQuery/.repo-metadata.json | 8 - BigQueryAnalyticsHub/.repo-metadata.json | 10 - BigQueryConnection/.repo-metadata.json | 8 - BigQueryDataExchange/.repo-metadata.json | 8 - BigQueryDataPolicies/.repo-metadata.json | 10 - BigQueryDataTransfer/.repo-metadata.json | 8 - BigQueryMigration/.repo-metadata.json | 10 - BigQueryReservation/.repo-metadata.json | 8 - BigQueryStorage/.repo-metadata.json | 8 - Bigtable/.repo-metadata.json | 8 - Billing/.repo-metadata.json | 8 - BillingBudgets/.repo-metadata.json | 8 - BinaryAuthorization/.repo-metadata.json | 8 - Build/.repo-metadata.json | 8 - CertificateManager/.repo-metadata.json | 8 - Channel/.repo-metadata.json | 8 - .../.repo-metadata.json | 8 - CommonProtos/.repo-metadata.json | 7 - Compute/.repo-metadata.json | 8 - ConfidentialComputing/.repo-metadata.json | 8 - Config/.repo-metadata.json | 8 - ContactCenterInsights/.repo-metadata.json | 8 - Container/.repo-metadata.json | 9 - ContainerAnalysis/.repo-metadata.json | 8 - ControlsPartner/.repo-metadata.json | 8 - Core/.repo-metadata.json | 8 - DataCatalog/.repo-metadata.json | 8 - DataCatalogLineage/.repo-metadata.json | 8 - DataFusion/.repo-metadata.json | 8 - DataLabeling/.repo-metadata.json | 8 - Dataflow/.repo-metadata.json | 8 - Dataform/.repo-metadata.json | 10 - Dataplex/.repo-metadata.json | 8 - Dataproc/.repo-metadata.json | 8 - DataprocMetastore/.repo-metadata.json | 8 - Datastore/.repo-metadata.json | 8 - DatastoreAdmin/.repo-metadata.json | 8 - Datastream/.repo-metadata.json | 8 - Debugger/.repo-metadata.json | 8 - Deploy/.repo-metadata.json | 8 - Dialogflow/.repo-metadata.json | 8 - DialogflowCx/.repo-metadata.json | 8 - DiscoveryEngine/.repo-metadata.json | 8 - Dlp/.repo-metadata.json | 8 - Dms/.repo-metadata.json | 8 - DocumentAi/.repo-metadata.json | 8 - Domains/.repo-metadata.json | 8 - EdgeNetwork/.repo-metadata.json | 8 - ErrorReporting/.repo-metadata.json | 8 - EssentialContacts/.repo-metadata.json | 8 - Eventarc/.repo-metadata.json | 8 - EventarcPublishing/.repo-metadata.json | 8 - Filestore/.repo-metadata.json | 8 - Firestore/.repo-metadata.json | 8 - Functions/.repo-metadata.json | 8 - GSuiteAddOns/.repo-metadata.json | 10 - Gaming/.repo-metadata.json | 8 - GkeBackup/.repo-metadata.json | 8 - GkeConnectGateway/.repo-metadata.json | 8 - GkeHub/.repo-metadata.json | 8 - GkeMultiCloud/.repo-metadata.json | 8 - Grafeas/.repo-metadata.json | 8 - Iam/.repo-metadata.json | 10 - IamCredentials/.repo-metadata.json | 8 - Iap/.repo-metadata.json | 8 - Ids/.repo-metadata.json | 8 - Iot/.repo-metadata.json | 8 - Kms/.repo-metadata.json | 8 - KmsInventory/.repo-metadata.json | 8 - Language/.repo-metadata.json | 8 - LifeSciences/.repo-metadata.json | 8 - Logging/.repo-metadata.json | 8 - LongRunning/.repo-metadata.json | 8 - ManagedIdentities/.repo-metadata.json | 8 - MediaTranslation/.repo-metadata.json | 8 - Memcache/.repo-metadata.json | 8 - MigrationCenter/.repo-metadata.json | 8 - Monitoring/.repo-metadata.json | 8 - NetApp/.repo-metadata.json | 8 - NetworkConnectivity/.repo-metadata.json | 8 - NetworkManagement/.repo-metadata.json | 8 - NetworkSecurity/.repo-metadata.json | 8 - Notebooks/.repo-metadata.json | 8 - Optimization/.repo-metadata.json | 8 - OrchestrationAirflow/.repo-metadata.json | 8 - OrgPolicy/.repo-metadata.json | 8 - OsConfig/.repo-metadata.json | 8 - OsLogin/.repo-metadata.json | 8 - Parallelstore/.repo-metadata.json | 8 - PolicySimulator/.repo-metadata.json | 8 - PolicyTroubleshooter/.repo-metadata.json | 8 - PolicyTroubleshooterIam/.repo-metadata.json | 8 - PrivateCatalog/.repo-metadata.json | 8 - Profiler/.repo-metadata.json | 8 - PubSub/.repo-metadata.json | 8 - Quotas/.repo-metadata.json | 8 - RapidMigrationAssessment/.repo-metadata.json | 8 - RecaptchaEnterprise/.repo-metadata.json | 8 - RecommendationEngine/.repo-metadata.json | 8 - Recommender/.repo-metadata.json | 8 - Redis/.repo-metadata.json | 8 - RedisCluster/.repo-metadata.json | 8 - ResourceManager/.repo-metadata.json | 8 - ResourceSettings/.repo-metadata.json | 8 - Retail/.repo-metadata.json | 8 - Run/.repo-metadata.json | 8 - Scheduler/.repo-metadata.json | 8 - SecretManager/.repo-metadata.json | 8 - SecureSourceManager/.repo-metadata.json | 8 - SecurityCenter/.repo-metadata.json | 8 - SecurityCenterManagement/.repo-metadata.json | 8 - SecurityPrivateCa/.repo-metadata.json | 8 - SecurityPublicCA/.repo-metadata.json | 10 - ServiceControl/.repo-metadata.json | 8 - ServiceDirectory/.repo-metadata.json | 8 - ServiceHealth/.repo-metadata.json | 8 - ServiceManagement/.repo-metadata.json | 8 - ServiceUsage/.repo-metadata.json | 8 - Shell/.repo-metadata.json | 8 - ShoppingCommonProtos/.repo-metadata.json | 6 - ShoppingCss/.repo-metadata.json | 8 - .../.repo-metadata.json | 8 - .../.repo-metadata.json | 7 - ShoppingMerchantQuota/.repo-metadata.json | 8 - ShoppingMerchantReports/.repo-metadata.json | 8 - Spanner/.repo-metadata.json | 8 - Speech/.repo-metadata.json | 8 - SqlAdmin/.repo-metadata.json | 8 - Storage/.repo-metadata.json | 8 - StorageControl/.repo-metadata.json | 8 - StorageInsights/.repo-metadata.json | 8 - StorageTransfer/.repo-metadata.json | 8 - Support/.repo-metadata.json | 8 - Talent/.repo-metadata.json | 8 - Tasks/.repo-metadata.json | 8 - TelcoAutomation/.repo-metadata.json | 8 - TextToSpeech/.repo-metadata.json | 8 - Tpu/.repo-metadata.json | 8 - Trace/.repo-metadata.json | 8 - Translate/.repo-metadata.json | 8 - VideoIntelligence/.repo-metadata.json | 8 - VideoLiveStream/.repo-metadata.json | 8 - VideoStitcher/.repo-metadata.json | 8 - VideoTranscoder/.repo-metadata.json | 8 - Vision/.repo-metadata.json | 8 - VmMigration/.repo-metadata.json | 8 - VmwareEngine/.repo-metadata.json | 10 - VpcAccess/.repo-metadata.json | 8 - WebRisk/.repo-metadata.json | 8 - WebSecurityScanner/.repo-metadata.json | 8 - Workflows/.repo-metadata.json | 8 - dev/src/Command/AddComponentCommand.php | 11 +- dev/src/Component.php | 20 +- dev/templates/.repo_metadata.json.twig | 7 - .../Unit/Command/AddComponentCommandTest.php | 4 +- .../Unit/Command/ComponentInfoCommandTest.php | 13 - .../component/CustomInput/.repo-metadata.json | 8 - .../SecretManager/.repo-metadata.json | 8 - .../component/Vision/.repo-metadata.json | 8 - 187 files changed, 1466 insertions(+), 1501 deletions(-) create mode 100644 .repo-metadata-full.json delete mode 100644 AccessApproval/.repo-metadata.json delete mode 100644 AccessContextManager/.repo-metadata.json delete mode 100644 AdvisoryNotifications/.repo-metadata.json delete mode 100644 AiPlatform/.repo-metadata.json delete mode 100644 AlloyDb/.repo-metadata.json delete mode 100644 AnalyticsAdmin/.repo-metadata.json delete mode 100644 AnalyticsData/.repo-metadata.json delete mode 100644 ApiGateway/.repo-metadata.json delete mode 100644 ApiKeys/.repo-metadata.json delete mode 100644 ApigeeConnect/.repo-metadata.json delete mode 100644 ApigeeRegistry/.repo-metadata.json delete mode 100644 AppEngineAdmin/.repo-metadata.json delete mode 100644 AppHub/.repo-metadata.json delete mode 100644 AppsChat/.repo-metadata.json delete mode 100644 AppsEventsSubscriptions/.repo-metadata.json delete mode 100644 AppsMeet/.repo-metadata.json delete mode 100644 ArtifactRegistry/.repo-metadata.json delete mode 100644 Asset/.repo-metadata.json delete mode 100644 AssuredWorkloads/.repo-metadata.json delete mode 100644 AutoMl/.repo-metadata.json delete mode 100644 BareMetalSolution/.repo-metadata.json delete mode 100644 Batch/.repo-metadata.json delete mode 100644 BeyondCorpAppConnections/.repo-metadata.json delete mode 100644 BeyondCorpAppConnectors/.repo-metadata.json delete mode 100644 BeyondCorpAppGateways/.repo-metadata.json delete mode 100644 BeyondCorpClientConnectorServices/.repo-metadata.json delete mode 100644 BeyondCorpClientGateways/.repo-metadata.json delete mode 100644 BigQuery/.repo-metadata.json delete mode 100644 BigQueryAnalyticsHub/.repo-metadata.json delete mode 100644 BigQueryConnection/.repo-metadata.json delete mode 100644 BigQueryDataExchange/.repo-metadata.json delete mode 100644 BigQueryDataPolicies/.repo-metadata.json delete mode 100644 BigQueryDataTransfer/.repo-metadata.json delete mode 100644 BigQueryMigration/.repo-metadata.json delete mode 100644 BigQueryReservation/.repo-metadata.json delete mode 100644 BigQueryStorage/.repo-metadata.json delete mode 100644 Bigtable/.repo-metadata.json delete mode 100644 Billing/.repo-metadata.json delete mode 100644 BillingBudgets/.repo-metadata.json delete mode 100644 BinaryAuthorization/.repo-metadata.json delete mode 100644 Build/.repo-metadata.json delete mode 100644 CertificateManager/.repo-metadata.json delete mode 100644 Channel/.repo-metadata.json delete mode 100644 CommerceConsumerProcurement/.repo-metadata.json delete mode 100644 CommonProtos/.repo-metadata.json delete mode 100644 Compute/.repo-metadata.json delete mode 100644 ConfidentialComputing/.repo-metadata.json delete mode 100644 Config/.repo-metadata.json delete mode 100644 ContactCenterInsights/.repo-metadata.json delete mode 100644 Container/.repo-metadata.json delete mode 100644 ContainerAnalysis/.repo-metadata.json delete mode 100644 ControlsPartner/.repo-metadata.json delete mode 100644 Core/.repo-metadata.json delete mode 100644 DataCatalog/.repo-metadata.json delete mode 100644 DataCatalogLineage/.repo-metadata.json delete mode 100644 DataFusion/.repo-metadata.json delete mode 100644 DataLabeling/.repo-metadata.json delete mode 100644 Dataflow/.repo-metadata.json delete mode 100644 Dataform/.repo-metadata.json delete mode 100644 Dataplex/.repo-metadata.json delete mode 100644 Dataproc/.repo-metadata.json delete mode 100644 DataprocMetastore/.repo-metadata.json delete mode 100644 Datastore/.repo-metadata.json delete mode 100644 DatastoreAdmin/.repo-metadata.json delete mode 100644 Datastream/.repo-metadata.json delete mode 100644 Debugger/.repo-metadata.json delete mode 100644 Deploy/.repo-metadata.json delete mode 100644 Dialogflow/.repo-metadata.json delete mode 100644 DialogflowCx/.repo-metadata.json delete mode 100644 DiscoveryEngine/.repo-metadata.json delete mode 100644 Dlp/.repo-metadata.json delete mode 100644 Dms/.repo-metadata.json delete mode 100644 DocumentAi/.repo-metadata.json delete mode 100644 Domains/.repo-metadata.json delete mode 100644 EdgeNetwork/.repo-metadata.json delete mode 100644 ErrorReporting/.repo-metadata.json delete mode 100644 EssentialContacts/.repo-metadata.json delete mode 100644 Eventarc/.repo-metadata.json delete mode 100644 EventarcPublishing/.repo-metadata.json delete mode 100644 Filestore/.repo-metadata.json delete mode 100644 Firestore/.repo-metadata.json delete mode 100644 Functions/.repo-metadata.json delete mode 100644 GSuiteAddOns/.repo-metadata.json delete mode 100644 Gaming/.repo-metadata.json delete mode 100644 GkeBackup/.repo-metadata.json delete mode 100644 GkeConnectGateway/.repo-metadata.json delete mode 100644 GkeHub/.repo-metadata.json delete mode 100644 GkeMultiCloud/.repo-metadata.json delete mode 100644 Grafeas/.repo-metadata.json delete mode 100644 Iam/.repo-metadata.json delete mode 100644 IamCredentials/.repo-metadata.json delete mode 100644 Iap/.repo-metadata.json delete mode 100644 Ids/.repo-metadata.json delete mode 100644 Iot/.repo-metadata.json delete mode 100644 Kms/.repo-metadata.json delete mode 100644 KmsInventory/.repo-metadata.json delete mode 100644 Language/.repo-metadata.json delete mode 100644 LifeSciences/.repo-metadata.json delete mode 100644 Logging/.repo-metadata.json delete mode 100644 LongRunning/.repo-metadata.json delete mode 100644 ManagedIdentities/.repo-metadata.json delete mode 100644 MediaTranslation/.repo-metadata.json delete mode 100644 Memcache/.repo-metadata.json delete mode 100644 MigrationCenter/.repo-metadata.json delete mode 100644 Monitoring/.repo-metadata.json delete mode 100644 NetApp/.repo-metadata.json delete mode 100644 NetworkConnectivity/.repo-metadata.json delete mode 100644 NetworkManagement/.repo-metadata.json delete mode 100644 NetworkSecurity/.repo-metadata.json delete mode 100644 Notebooks/.repo-metadata.json delete mode 100644 Optimization/.repo-metadata.json delete mode 100644 OrchestrationAirflow/.repo-metadata.json delete mode 100644 OrgPolicy/.repo-metadata.json delete mode 100644 OsConfig/.repo-metadata.json delete mode 100644 OsLogin/.repo-metadata.json delete mode 100644 Parallelstore/.repo-metadata.json delete mode 100644 PolicySimulator/.repo-metadata.json delete mode 100644 PolicyTroubleshooter/.repo-metadata.json delete mode 100644 PolicyTroubleshooterIam/.repo-metadata.json delete mode 100644 PrivateCatalog/.repo-metadata.json delete mode 100644 Profiler/.repo-metadata.json delete mode 100644 PubSub/.repo-metadata.json delete mode 100644 Quotas/.repo-metadata.json delete mode 100644 RapidMigrationAssessment/.repo-metadata.json delete mode 100644 RecaptchaEnterprise/.repo-metadata.json delete mode 100644 RecommendationEngine/.repo-metadata.json delete mode 100644 Recommender/.repo-metadata.json delete mode 100644 Redis/.repo-metadata.json delete mode 100644 RedisCluster/.repo-metadata.json delete mode 100644 ResourceManager/.repo-metadata.json delete mode 100644 ResourceSettings/.repo-metadata.json delete mode 100644 Retail/.repo-metadata.json delete mode 100644 Run/.repo-metadata.json delete mode 100644 Scheduler/.repo-metadata.json delete mode 100644 SecretManager/.repo-metadata.json delete mode 100644 SecureSourceManager/.repo-metadata.json delete mode 100644 SecurityCenter/.repo-metadata.json delete mode 100644 SecurityCenterManagement/.repo-metadata.json delete mode 100644 SecurityPrivateCa/.repo-metadata.json delete mode 100644 SecurityPublicCA/.repo-metadata.json delete mode 100644 ServiceControl/.repo-metadata.json delete mode 100644 ServiceDirectory/.repo-metadata.json delete mode 100644 ServiceHealth/.repo-metadata.json delete mode 100644 ServiceManagement/.repo-metadata.json delete mode 100644 ServiceUsage/.repo-metadata.json delete mode 100644 Shell/.repo-metadata.json delete mode 100644 ShoppingCommonProtos/.repo-metadata.json delete mode 100644 ShoppingCss/.repo-metadata.json delete mode 100644 ShoppingMerchantConversions/.repo-metadata.json delete mode 100644 ShoppingMerchantInventories/.repo-metadata.json delete mode 100644 ShoppingMerchantQuota/.repo-metadata.json delete mode 100644 ShoppingMerchantReports/.repo-metadata.json delete mode 100644 Spanner/.repo-metadata.json delete mode 100644 Speech/.repo-metadata.json delete mode 100644 SqlAdmin/.repo-metadata.json delete mode 100644 Storage/.repo-metadata.json delete mode 100644 StorageControl/.repo-metadata.json delete mode 100644 StorageInsights/.repo-metadata.json delete mode 100644 StorageTransfer/.repo-metadata.json delete mode 100644 Support/.repo-metadata.json delete mode 100644 Talent/.repo-metadata.json delete mode 100644 Tasks/.repo-metadata.json delete mode 100644 TelcoAutomation/.repo-metadata.json delete mode 100644 TextToSpeech/.repo-metadata.json delete mode 100644 Tpu/.repo-metadata.json delete mode 100644 Trace/.repo-metadata.json delete mode 100644 Translate/.repo-metadata.json delete mode 100644 VideoIntelligence/.repo-metadata.json delete mode 100644 VideoLiveStream/.repo-metadata.json delete mode 100644 VideoStitcher/.repo-metadata.json delete mode 100644 VideoTranscoder/.repo-metadata.json delete mode 100644 Vision/.repo-metadata.json delete mode 100644 VmMigration/.repo-metadata.json delete mode 100644 VmwareEngine/.repo-metadata.json delete mode 100644 VpcAccess/.repo-metadata.json delete mode 100644 WebRisk/.repo-metadata.json delete mode 100644 WebSecurityScanner/.repo-metadata.json delete mode 100644 Workflows/.repo-metadata.json delete mode 100644 dev/templates/.repo_metadata.json.twig delete mode 100644 dev/tests/fixtures/component/CustomInput/.repo-metadata.json delete mode 100644 dev/tests/fixtures/component/SecretManager/.repo-metadata.json delete mode 100644 dev/tests/fixtures/component/Vision/.repo-metadata.json diff --git a/.repo-metadata-full.json b/.repo-metadata-full.json new file mode 100644 index 000000000000..a006a17b8a14 --- /dev/null +++ b/.repo-metadata-full.json @@ -0,0 +1,1445 @@ +{ + "AccessApproval": { + "language": "php", + "distribution_name": "google/cloud-access-approval", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-access-approval/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "accessapproval" + }, + "AccessContextManager": { + "language": "php", + "distribution_name": "google/access-context-manager", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/access-context-manager/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "accesscontextmanager" + }, + "AdvisoryNotifications": { + "language": "php", + "distribution_name": "google/cloud-advisorynotifications", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-advisorynotifications/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "advisorynotifications" + }, + "AiPlatform": { + "language": "php", + "distribution_name": "google/cloud-ai-platform", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-ai-platform/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "aiplatform" + }, + "AlloyDb": { + "language": "php", + "distribution_name": "google/cloud-alloydb", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-alloydb/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "alloydb" + }, + "AnalyticsAdmin": { + "language": "php", + "distribution_name": "google/analytics-admin", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/analytics-admin/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "analyticsadmin" + }, + "AnalyticsData": { + "language": "php", + "distribution_name": "google/analytics-data", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/analytics-data/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "analyticsdata" + }, + "ApiGateway": { + "language": "php", + "distribution_name": "google/cloud-api-gateway", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-api-gateway/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "apigateway" + }, + "ApiKeys": { + "language": "php", + "distribution_name": "google/cloud-api-keys", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-api-keys/latest", + "library_type": "GAPIC_AUTO", + "product_documentation": "https://cloud.google.com/api-keys/docs", + "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues", + "api_shortname": "apikeys" + }, + "ApigeeConnect": { + "language": "php", + "distribution_name": "google/cloud-apigee-connect", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-apigee-connect/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "apigeeconnect" + }, + "ApigeeRegistry": { + "language": "php", + "distribution_name": "google/cloud-apigee-registry", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-apigee-registry/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "apigeeregistry" + }, + "AppEngineAdmin": { + "language": "php", + "distribution_name": "google/cloud-appengine-admin", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-appengine-admin/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "appengine" + }, + "AppHub": { + "language": "php", + "distribution_name": "google/cloud-apphub", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-apphub/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "apphub" + }, + "AppsChat": { + "language": "php", + "distribution_name": "google/apps-chat", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/apps-chat/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "chat" + }, + "AppsEventsSubscriptions": { + "language": "php", + "distribution_name": "google/apps-events-subscriptions", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/apps-events-subscriptions/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "workspaceevents" + }, + "AppsMeet": { + "language": "php", + "distribution_name": "google/apps-meet", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/apps-meet/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "meet" + }, + "ArtifactRegistry": { + "language": "php", + "distribution_name": "google/cloud-artifact-registry", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-artifact-registry/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "artifactregistry" + }, + "Asset": { + "language": "php", + "distribution_name": "google/cloud-asset", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-asset/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "cloudasset" + }, + "AssuredWorkloads": { + "language": "php", + "distribution_name": "google/cloud-assured-workloads", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-assured-workloads/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "assuredworkloads" + }, + "AutoMl": { + "language": "php", + "distribution_name": "google/cloud-automl", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-automl/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "automl" + }, + "BareMetalSolution": { + "language": "php", + "distribution_name": "google/cloud-bare-metal-solution", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "baremetalsolution" + }, + "Batch": { + "language": "php", + "distribution_name": "google/cloud-batch", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-batch/latest", + "library_type": "GAPIC_AUTO", + "product_documentation": "https://cloud.google.com/batch/docs", + "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues", + "api_shortname": "batch" + }, + "BeyondCorpAppConnections": { + "language": "php", + "distribution_name": "google/cloud-beyondcorp-appconnections", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-beyondcorp-appconnections/latest", + "library_type": "GAPIC_AUTO", + "product_documentation": "https://cloud.google.com/beyondcorp-enterprise/docs", + "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues", + "api_shortname": "beyondcorp" + }, + "BeyondCorpAppConnectors": { + "language": "php", + "distribution_name": "google/cloud-beyondcorp-appconnectors", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-beyondcorp-appconnectors/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "beyondcorp" + }, + "BeyondCorpAppGateways": { + "language": "php", + "distribution_name": "google/cloud-beyondcorp-appgateways", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-beyondcorp-appgateways/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "beyondcorp" + }, + "BeyondCorpClientConnectorServices": { + "language": "php", + "distribution_name": "google/cloud-beyondcorp-clientconnectorservices", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-beyondcorp-clientconnectorservices/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "beyondcorp" + }, + "BeyondCorpClientGateways": { + "language": "php", + "distribution_name": "google/cloud-beyondcorp-clientgateways", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-beyondcorp-clientgateways/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "beyondcorp" + }, + "BigQuery": { + "language": "php", + "distribution_name": "google/cloud-bigquery", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquery/latest", + "library_type": "GAPIC_MANUAL", + "api_shortname": "bigquery" + }, + "BigQueryAnalyticsHub": { + "language": "php", + "distribution_name": "google/cloud-bigquery-analyticshub", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquery-analyticshub/latest", + "library_type": "GAPIC_AUTO", + "product_documentation": "https://cloud.google.com/analytics-hub", + "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues", + "api_shortname": "analyticshub" + }, + "BigQueryConnection": { + "language": "php", + "distribution_name": "google/cloud-bigquery-connection", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquery-connection/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "bigqueryconnection" + }, + "BigQueryDataExchange": { + "language": "php", + "distribution_name": "google/cloud-bigquery-data-exchange", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquery-data-exchange/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "analyticshub" + }, + "BigQueryDataPolicies": { + "language": "php", + "distribution_name": "google/cloud-bigquery-datapolicies", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquery-datapolicies/latest", + "library_type": "GAPIC_AUTO", + "product_documentation": "https://cloud.google.com/bigquery/docs/reference/bigquerydatapolicy/rest", + "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues", + "api_shortname": "bigquerydatapolicy" + }, + "BigQueryDataTransfer": { + "language": "php", + "distribution_name": "google/cloud-bigquerydatatransfer", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquerydatatransfer/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "bigquerydatatransfer" + }, + "BigQueryMigration": { + "language": "php", + "distribution_name": "google/cloud-bigquery-migration", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquery-migration/latest", + "library_type": "GAPIC_AUTO", + "product_documentation": "https://cloud.google.com/bigquery/docs/migration-intro/docs", + "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues", + "api_shortname": "bigquerymigration" + }, + "BigQueryReservation": { + "language": "php", + "distribution_name": "google/cloud-bigquery-reservation", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquery-reservation/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "bigqueryreservation" + }, + "BigQueryStorage": { + "language": "php", + "distribution_name": "google/cloud-bigquery-storage", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquery-storage/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "bigquerystorage" + }, + "Bigtable": { + "language": "php", + "distribution_name": "google/cloud-bigtable", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigtable/latest", + "library_type": "GAPIC_COMBO", + "api_shortname": "bigtable" + }, + "Billing": { + "language": "php", + "distribution_name": "google/cloud-billing", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-billing/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "cloudbilling" + }, + "BillingBudgets": { + "language": "php", + "distribution_name": "google/cloud-billing-budgets", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-billing-budgets/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "billingbudgets" + }, + "BinaryAuthorization": { + "language": "php", + "distribution_name": "google/cloud-binary-authorization", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-binary-authorization/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "binaryauthorization" + }, + "Build": { + "language": "php", + "distribution_name": "google/cloud-build", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-build/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "cloudbuild" + }, + "CertificateManager": { + "language": "php", + "distribution_name": "google/cloud-certificate-manager", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-certificate-manager/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "certificatemanager" + }, + "Channel": { + "language": "php", + "distribution_name": "google/cloud-channel", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-channel/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "cloudchannel" + }, + "CommerceConsumerProcurement": { + "language": "php", + "distribution_name": "google/cloud-commerce-consumer-procurement", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-commerce-consumer-procurement/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "cloudcommerceconsumerprocurement" + }, + "CommonProtos": { + "language": "php", + "distribution_name": "google/cloud-common-protos", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-common-protos/latest", + "library_type": "CORE" + }, + "Compute": { + "language": "php", + "distribution_name": "google/cloud-compute", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-compute/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "compute" + }, + "ConfidentialComputing": { + "language": "php", + "distribution_name": "google/cloud-confidentialcomputing", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-confidentialcomputing/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "confidentialcomputing" + }, + "Config": { + "language": "php", + "distribution_name": "google/cloud-config", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-config/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "config" + }, + "ContactCenterInsights": { + "language": "php", + "distribution_name": "google/cloud-contact-center-insights", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-contact-center-insights/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "contactcenterinsights" + }, + "Container": { + "language": "php", + "distribution_name": "google/cloud-container", + "release_level": "stable", + "codeowner_team": "@googleapis/cicd", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-container/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "container" + }, + "ContainerAnalysis": { + "language": "php", + "distribution_name": "google/cloud-container-analysis", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-container-analysis/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "containeranalysis" + }, + "ControlsPartner": { + "language": "php", + "distribution_name": "google/cloud-cloudcontrolspartner", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-cloudcontrolspartner/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "cloudcontrolspartner" + }, + "Core": { + "language": "php", + "distribution_name": "google/cloud-core", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-core/latest", + "library_type": "CORE", + "api_shortname": "" + }, + "DataCatalog": { + "language": "php", + "distribution_name": "google/cloud-data-catalog", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-data-catalog/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "datacatalog" + }, + "DataCatalogLineage": { + "language": "php", + "distribution_name": "google/cloud-datacatalog-lineage", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "datalineage" + }, + "DataFusion": { + "language": "php", + "distribution_name": "google/cloud-data-fusion", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-data-fusion/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "datafusion" + }, + "DataLabeling": { + "language": "php", + "distribution_name": "google/cloud-datalabeling", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-datalabeling/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "datalabeling" + }, + "Dataflow": { + "language": "php", + "distribution_name": "google/cloud-dataflow", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dataflow/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "dataflow" + }, + "Dataform": { + "language": "php", + "distribution_name": "google/cloud-dataform", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dataform/latest", + "library_type": "GAPIC_AUTO", + "product_documentation": "https://cloud.google.com/dataform/docs", + "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues", + "api_shortname": "dataform" + }, + "Dataplex": { + "language": "php", + "distribution_name": "google/cloud-dataplex", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dataplex/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "dataplex" + }, + "Dataproc": { + "language": "php", + "distribution_name": "google/cloud-dataproc", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dataproc/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "dataproc" + }, + "DataprocMetastore": { + "language": "php", + "distribution_name": "google/cloud-dataproc-metastore", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dataproc-metastore/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "metastore" + }, + "Datastore": { + "language": "php", + "distribution_name": "google/cloud-datastore", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-datastore/latest", + "library_type": "GAPIC_COMBO", + "api_shortname": "datastore" + }, + "DatastoreAdmin": { + "language": "php", + "distribution_name": "google/cloud-datastore-admin", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-datastore-admin/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "datastore" + }, + "Datastream": { + "language": "php", + "distribution_name": "google/cloud-datastream", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-datastream/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "datastream" + }, + "Debugger": { + "language": "php", + "distribution_name": "google/cloud-debugger", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-debugger/latest", + "library_type": "GAPIC_COMBO", + "api_shortname": "clouddebugger" + }, + "Deploy": { + "language": "php", + "distribution_name": "google/cloud-deploy", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-deploy/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "clouddeploy" + }, + "Dialogflow": { + "language": "php", + "distribution_name": "google/cloud-dialogflow", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dialogflow/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "dialogflow" + }, + "DialogflowCx": { + "language": "php", + "distribution_name": "google/cloud-dialogflow-cx", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "dialogflow" + }, + "DiscoveryEngine": { + "language": "php", + "distribution_name": "google/cloud-discoveryengine", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-discoveryengine/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "discoveryengine" + }, + "Dlp": { + "language": "php", + "distribution_name": "google/cloud-dlp", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dlp/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "dlp" + }, + "Dms": { + "language": "php", + "distribution_name": "google/cloud-dms", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dms/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "datamigration" + }, + "DocumentAi": { + "language": "php", + "distribution_name": "google/cloud-document-ai", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-document-ai/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "documentai" + }, + "Domains": { + "language": "php", + "distribution_name": "google/cloud-domains", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-domains/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "domains" + }, + "EdgeNetwork": { + "language": "php", + "distribution_name": "google/cloud-edgenetwork", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-edgenetwork/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "edgenetwork" + }, + "ErrorReporting": { + "language": "php", + "distribution_name": "google/cloud-error-reporting", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-error-reporting/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "clouderrorreporting" + }, + "EssentialContacts": { + "language": "php", + "distribution_name": "google/cloud-essential-contacts", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-essential-contacts/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "essentialcontacts" + }, + "Eventarc": { + "language": "php", + "distribution_name": "google/cloud-eventarc", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-eventarc/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "eventarc" + }, + "EventarcPublishing": { + "language": "php", + "distribution_name": "google/cloud-eventarc-publishing", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-eventarc-publishing/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "eventarcpublishing" + }, + "Filestore": { + "language": "php", + "distribution_name": "google/cloud-filestore", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-filestore/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "file" + }, + "Firestore": { + "language": "php", + "distribution_name": "google/cloud-firestore", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-firestore/latest", + "library_type": "GAPIC_COMBO", + "api_shortname": "firestore" + }, + "Functions": { + "language": "php", + "distribution_name": "google/cloud-functions", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-functions/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "cloudfunctions" + }, + "GSuiteAddOns": { + "language": "php", + "distribution_name": "google/cloud-gsuite-addons", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-gsuite-addons/latest", + "library_type": "GAPIC_AUTO", + "product_documentation": "https://developers.google.com/workspace/add-ons/overview", + "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues", + "api_shortname": "gsuiteaddons" + }, + "Gaming": { + "language": "php", + "distribution_name": "google/cloud-game-servers", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-game-servers/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "gameservices" + }, + "GkeBackup": { + "language": "php", + "distribution_name": "google/cloud-gke-backup", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-gke-backup/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "gkebackup" + }, + "GkeConnectGateway": { + "language": "php", + "distribution_name": "google/cloud-gke-connect-gateway", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-gke-connect-gateway/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "connectgateway" + }, + "GkeHub": { + "language": "php", + "distribution_name": "google/cloud-gke-hub", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-gke-hub/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "gkehub" + }, + "GkeMultiCloud": { + "language": "php", + "distribution_name": "google/cloud-gke-multi-cloud", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "gkemulticloud" + }, + "Grafeas": { + "language": "php", + "distribution_name": "google/grafeas", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/grafeas/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "containeranalysis" + }, + "Iam": { + "language": "php", + "distribution_name": "google/cloud-iam", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-iam/latest", + "library_type": "GAPIC_AUTO", + "product_documentation": "https://cloud.google.com/iam/docs", + "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues", + "api_shortname": "iam" + }, + "IamCredentials": { + "language": "php", + "distribution_name": "google/cloud-iam-credentials", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-iam-credentials/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "iamcredentials" + }, + "Iap": { + "language": "php", + "distribution_name": "google/cloud-iap", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-iap/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "iap" + }, + "Ids": { + "language": "php", + "distribution_name": "google/cloud-ids", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-ids/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "ids" + }, + "Iot": { + "language": "php", + "distribution_name": "google/cloud-iot", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-iot/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "cloudiot" + }, + "Kms": { + "language": "php", + "distribution_name": "google/cloud-kms", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-kms/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "cloudkms" + }, + "KmsInventory": { + "language": "php", + "distribution_name": "google/cloud-kms-inventory", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-kms-inventory/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "kmsinventory" + }, + "Language": { + "language": "php", + "distribution_name": "google/cloud-language", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-language/latest", + "library_type": "GAPIC_COMBO", + "api_shortname": "language" + }, + "LifeSciences": { + "language": "php", + "distribution_name": "google/cloud-life-sciences", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-life-sciences/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "lifesciences" + }, + "Logging": { + "language": "php", + "distribution_name": "google/cloud-logging", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-logging/latest", + "library_type": "GAPIC_COMBO", + "api_shortname": "logging" + }, + "LongRunning": { + "language": "php", + "distribution_name": "google/longrunning", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/longrunning/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "longrunning" + }, + "ManagedIdentities": { + "language": "php", + "distribution_name": "google/cloud-managed-identities", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-managed-identities/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "managedidentities" + }, + "MediaTranslation": { + "language": "php", + "distribution_name": "google/cloud-media-translation", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-media-translation/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "mediatranslation" + }, + "Memcache": { + "language": "php", + "distribution_name": "google/cloud-memcache", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-memcache/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "memcache" + }, + "MigrationCenter": { + "language": "php", + "distribution_name": "google/cloud-migrationcenter", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-migrationcenter/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "migrationcenter" + }, + "Monitoring": { + "language": "php", + "distribution_name": "google/cloud-monitoring", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-monitoring/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "monitoring" + }, + "NetApp": { + "language": "php", + "distribution_name": "google/cloud-netapp", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-netapp/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "netapp" + }, + "NetworkConnectivity": { + "language": "php", + "distribution_name": "google/cloud-network-connectivity", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-network-connectivity/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "networkconnectivity" + }, + "NetworkManagement": { + "language": "php", + "distribution_name": "google/cloud-network-management", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-network-management/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "networkmanagement" + }, + "NetworkSecurity": { + "language": "php", + "distribution_name": "google/cloud-network-security", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-network-security/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "networksecurity" + }, + "Notebooks": { + "language": "php", + "distribution_name": "google/cloud-notebooks", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-notebooks/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "notebooks" + }, + "Optimization": { + "language": "php", + "distribution_name": "google/cloud-optimization", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-optimization/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "cloudoptimization" + }, + "OrchestrationAirflow": { + "language": "php", + "distribution_name": "google/cloud-orchestration-airflow", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-orchestration-airflow/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "composer" + }, + "OrgPolicy": { + "language": "php", + "distribution_name": "google/cloud-org-policy", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-org-policy/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "orgpolicy" + }, + "OsConfig": { + "language": "php", + "distribution_name": "google/cloud-osconfig", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-osconfig/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "osconfig" + }, + "OsLogin": { + "language": "php", + "distribution_name": "google/cloud-oslogin", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-oslogin/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "oslogin" + }, + "Parallelstore": { + "language": "php", + "distribution_name": "google/cloud-parallelstore", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-parallelstore/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "parallelstore" + }, + "PolicySimulator": { + "language": "php", + "distribution_name": "google/cloud-policysimulator", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-policysimulator/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "policysimulator" + }, + "PolicyTroubleshooter": { + "language": "php", + "distribution_name": "google/cloud-policy-troubleshooter", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-policy-troubleshooter/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "policytroubleshooter" + }, + "PolicyTroubleshooterIam": { + "language": "php", + "distribution_name": "google/cloud-policytroubleshooter-iam", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-policytroubleshooter-iam/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "policytroubleshooter" + }, + "PrivateCatalog": { + "language": "php", + "distribution_name": "google/cloud-private-catalog", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-private-catalog/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "cloudprivatecatalog" + }, + "Profiler": { + "language": "php", + "distribution_name": "google/cloud-profiler", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-profiler/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "cloudprofiler" + }, + "PubSub": { + "language": "php", + "distribution_name": "google/cloud-pubsub", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-pubsub/latest", + "library_type": "GAPIC_COMBO", + "api_shortname": "pubsub" + }, + "Quotas": { + "language": "php", + "distribution_name": "google/cloud-quotas", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-quotas/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "cloudquotas" + }, + "RapidMigrationAssessment": { + "language": "php", + "distribution_name": "google/cloud-rapidmigrationassessment", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-rapidmigrationassessment/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "rapidmigrationassessment" + }, + "RecaptchaEnterprise": { + "language": "php", + "distribution_name": "google/cloud-recaptcha-enterprise", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "recaptchaenterprise" + }, + "RecommendationEngine": { + "language": "php", + "distribution_name": "google/cloud-recommendations-ai", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-recommendations-ai/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "recommendationengine" + }, + "Recommender": { + "language": "php", + "distribution_name": "google/cloud-recommender", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-recommender/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "recommender" + }, + "Redis": { + "language": "php", + "distribution_name": "google/cloud-redis", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-redis/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "redis" + }, + "RedisCluster": { + "language": "php", + "distribution_name": "google/cloud-redis-cluster", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-redis-cluster/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "redis" + }, + "ResourceManager": { + "language": "php", + "distribution_name": "google/cloud-resource-manager", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-resource-manager/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "cloudresourcemanager" + }, + "ResourceSettings": { + "language": "php", + "distribution_name": "google/cloud-resource-settings", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-resource-settings/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "resourcesettings" + }, + "Retail": { + "language": "php", + "distribution_name": "google/cloud-retail", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-retail/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "retail" + }, + "Run": { + "language": "php", + "distribution_name": "google/cloud-run", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-run/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "run" + }, + "Scheduler": { + "language": "php", + "distribution_name": "google/cloud-scheduler", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-scheduler/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "cloudscheduler" + }, + "SecretManager": { + "language": "php", + "distribution_name": "google/cloud-secret-manager", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-secret-manager/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "secretmanager" + }, + "SecureSourceManager": { + "language": "php", + "distribution_name": "google/cloud-securesourcemanager", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-securesourcemanager/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "securesourcemanager" + }, + "SecurityCenter": { + "language": "php", + "distribution_name": "google/cloud-security-center", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-security-center/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "securitycenter" + }, + "SecurityCenterManagement": { + "language": "php", + "distribution_name": "google/cloud-securitycentermanagement", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-securitycentermanagement/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "securitycentermanagement" + }, + "SecurityPrivateCa": { + "language": "php", + "distribution_name": "google/cloud-security-private-ca", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-security-private-ca/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "privateca" + }, + "SecurityPublicCA": { + "language": "php", + "distribution_name": "google/cloud-security-public-ca", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-security-public-ca/latest", + "library_type": "GAPIC_AUTO", + "product_documentation": "https://cloud.google.com/certificate-manager/docs/public-ca", + "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues", + "api_shortname": "publicca" + }, + "ServiceControl": { + "language": "php", + "distribution_name": "google/cloud-service-control", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-service-control/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "servicecontrol" + }, + "ServiceDirectory": { + "language": "php", + "distribution_name": "google/cloud-service-directory", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-service-directory/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "servicedirectory" + }, + "ServiceHealth": { + "language": "php", + "distribution_name": "google/cloud-servicehealth", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-servicehealth/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "servicehealth" + }, + "ServiceManagement": { + "language": "php", + "distribution_name": "google/cloud-service-management", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-service-management/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "servicemanagement" + }, + "ServiceUsage": { + "language": "php", + "distribution_name": "google/cloud-service-usage", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-service-usage/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "serviceusage" + }, + "Shell": { + "language": "php", + "distribution_name": "google/cloud-shell", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-shell/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "cloudshell" + }, + "ShoppingCommonProtos": { + "distribution_name": "google/shopping-common-protos", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/shopping-common-protos/latest", + "library_type": "CORE" + }, + "ShoppingCss": { + "language": "php", + "distribution_name": "google/shopping-css", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/shopping-css/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "css" + }, + "ShoppingMerchantConversions": { + "language": "php", + "distribution_name": "google/shopping-merchant-conversions", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/shopping-merchant-conversions/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "merchantapi" + }, + "ShoppingMerchantInventories": { + "distribution_name": "google/shopping-merchant-inventories", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/shopping-merchant-inventories/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "merchantapi" + }, + "ShoppingMerchantQuota": { + "language": "php", + "distribution_name": "google/shopping-merchant-quota", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/shopping-merchant-quota/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "merchantapi" + }, + "ShoppingMerchantReports": { + "language": "php", + "distribution_name": "google/shopping-merchant-reports", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/shopping-merchant-reports/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "merchantapi" + }, + "Spanner": { + "language": "php", + "distribution_name": "google/cloud-spanner", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-spanner/latest", + "library_type": "GAPIC_COMBO", + "api_shortname": "spanner" + }, + "Speech": { + "language": "php", + "distribution_name": "google/cloud-speech", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-speech/latest", + "library_type": "GAPIC_COMBO", + "api_shortname": "speech" + }, + "SqlAdmin": { + "language": "php", + "distribution_name": "google/cloud-sql-admin", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-sql-admin/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "sqladmin" + }, + "Storage": { + "language": "php", + "distribution_name": "google/cloud-storage", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-storage/latest", + "library_type": "GAPIC_MANUAL", + "api_shortname": "storage" + }, + "StorageControl": { + "language": "php", + "distribution_name": "google/cloud-storage-control", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-storage-control/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "storage" + }, + "StorageInsights": { + "language": "php", + "distribution_name": "google/cloud-storageinsights", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-storageinsights/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "storageinsights" + }, + "StorageTransfer": { + "language": "php", + "distribution_name": "google/cloud-storage-transfer", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-storage-transfer/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "storagetransfer" + }, + "Support": { + "language": "php", + "distribution_name": "google/cloud-support", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-support/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "cloudsupport" + }, + "Talent": { + "language": "php", + "distribution_name": "google/cloud-talent", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-talent/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "jobs" + }, + "Tasks": { + "language": "php", + "distribution_name": "google/cloud-tasks", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-tasks/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "cloudtasks" + }, + "TelcoAutomation": { + "language": "php", + "distribution_name": "google/cloud-telcoautomation", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-telcoautomation/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "telcoautomation" + }, + "TextToSpeech": { + "language": "php", + "distribution_name": "google/cloud-text-to-speech", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-text-to-speech/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "texttospeech" + }, + "Tpu": { + "language": "php", + "distribution_name": "google/cloud-tpu", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-tpu/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "tpu" + }, + "Trace": { + "language": "php", + "distribution_name": "google/cloud-trace", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-trace/latest", + "library_type": "GAPIC_COMBO", + "api_shortname": "cloudtrace" + }, + "Translate": { + "language": "php", + "distribution_name": "google/cloud-translate", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-translate/latest", + "library_type": "GAPIC_COMBO", + "api_shortname": "translate" + }, + "VideoIntelligence": { + "language": "php", + "distribution_name": "google/cloud-videointelligence", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-videointelligence/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "videointelligence" + }, + "VideoLiveStream": { + "language": "php", + "distribution_name": "google/cloud-video-live-stream", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-video-live-stream/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "livestream" + }, + "VideoStitcher": { + "language": "php", + "distribution_name": "google/cloud-video-stitcher", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-video-stitcher/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "videostitcher" + }, + "VideoTranscoder": { + "language": "php", + "distribution_name": "google/cloud-video-transcoder", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-video-transcoder/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "transcoder" + }, + "Vision": { + "language": "php", + "distribution_name": "google/cloud-vision", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-vision/latest", + "library_type": "GAPIC_COMBO", + "api_shortname": "vision" + }, + "VmMigration": { + "language": "php", + "distribution_name": "google/cloud-vm-migration", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-vm-migration/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "vmmigration" + }, + "VmwareEngine": { + "language": "php", + "distribution_name": "google/cloud-vmware-engine", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-vmware-engine/latest", + "library_type": "GAPIC_AUTO", + "product_documentation": "https://cloud.google.com/vmware-engine/docs", + "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues", + "api_shortname": "vmwareengine" + }, + "VpcAccess": { + "language": "php", + "distribution_name": "google/cloud-vpc-access", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-vpc-access/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "vpcaccess" + }, + "WebRisk": { + "language": "php", + "distribution_name": "google/cloud-web-risk", + "release_level": "stable", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-web-risk/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "webrisk" + }, + "WebSecurityScanner": { + "language": "php", + "distribution_name": "google/cloud-web-security-scanner", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-web-security-scanner/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "websecurityscanner" + }, + "Workflows": { + "language": "php", + "distribution_name": "google/cloud-workflows", + "release_level": "preview", + "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-workflows/latest", + "library_type": "GAPIC_AUTO", + "api_shortname": "workflows" + } +} \ No newline at end of file diff --git a/AccessApproval/.repo-metadata.json b/AccessApproval/.repo-metadata.json deleted file mode 100644 index 3c8f871db972..000000000000 --- a/AccessApproval/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-access-approval", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-access-approval/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "accessapproval" -} diff --git a/AccessContextManager/.repo-metadata.json b/AccessContextManager/.repo-metadata.json deleted file mode 100644 index b35a2d9c1a61..000000000000 --- a/AccessContextManager/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/access-context-manager", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/access-context-manager/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "accesscontextmanager" -} diff --git a/AdvisoryNotifications/.repo-metadata.json b/AdvisoryNotifications/.repo-metadata.json deleted file mode 100644 index a245fd9ec7bb..000000000000 --- a/AdvisoryNotifications/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-advisorynotifications", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-advisorynotifications/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "advisorynotifications" -} diff --git a/AiPlatform/.repo-metadata.json b/AiPlatform/.repo-metadata.json deleted file mode 100644 index 60df41065a87..000000000000 --- a/AiPlatform/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-ai-platform", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-ai-platform/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "aiplatform" -} diff --git a/AlloyDb/.repo-metadata.json b/AlloyDb/.repo-metadata.json deleted file mode 100644 index e5702ebd1776..000000000000 --- a/AlloyDb/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-alloydb", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-alloydb/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "alloydb" -} diff --git a/AnalyticsAdmin/.repo-metadata.json b/AnalyticsAdmin/.repo-metadata.json deleted file mode 100644 index 490f47f52f90..000000000000 --- a/AnalyticsAdmin/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/analytics-admin", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/analytics-admin/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "analyticsadmin" -} diff --git a/AnalyticsData/.repo-metadata.json b/AnalyticsData/.repo-metadata.json deleted file mode 100644 index 16f59f176ede..000000000000 --- a/AnalyticsData/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/analytics-data", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/analytics-data/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "analyticsdata" -} diff --git a/ApiGateway/.repo-metadata.json b/ApiGateway/.repo-metadata.json deleted file mode 100644 index 909cdfa03818..000000000000 --- a/ApiGateway/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-api-gateway", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-api-gateway/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "apigateway" -} diff --git a/ApiKeys/.repo-metadata.json b/ApiKeys/.repo-metadata.json deleted file mode 100644 index 4b445b37c392..000000000000 --- a/ApiKeys/.repo-metadata.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-api-keys", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-api-keys/latest", - "library_type": "GAPIC_AUTO", - "product_documentation": "https://cloud.google.com/api-keys/docs", - "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues", - "api_shortname": "apikeys" -} diff --git a/ApigeeConnect/.repo-metadata.json b/ApigeeConnect/.repo-metadata.json deleted file mode 100644 index e59a1fe9d015..000000000000 --- a/ApigeeConnect/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-apigee-connect", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-apigee-connect/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "apigeeconnect" -} diff --git a/ApigeeRegistry/.repo-metadata.json b/ApigeeRegistry/.repo-metadata.json deleted file mode 100644 index 86b4edc53233..000000000000 --- a/ApigeeRegistry/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-apigee-registry", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-apigee-registry/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "apigeeregistry" -} diff --git a/AppEngineAdmin/.repo-metadata.json b/AppEngineAdmin/.repo-metadata.json deleted file mode 100644 index 46eb7959b782..000000000000 --- a/AppEngineAdmin/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-appengine-admin", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-appengine-admin/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "appengine" -} diff --git a/AppHub/.repo-metadata.json b/AppHub/.repo-metadata.json deleted file mode 100644 index 5ffa2bac8a18..000000000000 --- a/AppHub/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-apphub", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-apphub/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "apphub" -} diff --git a/AppsChat/.repo-metadata.json b/AppsChat/.repo-metadata.json deleted file mode 100644 index 0b70a325cd0a..000000000000 --- a/AppsChat/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/apps-chat", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/apps-chat/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "chat" -} diff --git a/AppsEventsSubscriptions/.repo-metadata.json b/AppsEventsSubscriptions/.repo-metadata.json deleted file mode 100644 index fc82b08f9157..000000000000 --- a/AppsEventsSubscriptions/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/apps-events-subscriptions", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/apps-events-subscriptions/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "workspaceevents" -} diff --git a/AppsMeet/.repo-metadata.json b/AppsMeet/.repo-metadata.json deleted file mode 100644 index 0666ab0d28e5..000000000000 --- a/AppsMeet/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/apps-meet", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/apps-meet/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "meet" -} diff --git a/ArtifactRegistry/.repo-metadata.json b/ArtifactRegistry/.repo-metadata.json deleted file mode 100644 index ceca690daeb6..000000000000 --- a/ArtifactRegistry/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-artifact-registry", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-artifact-registry/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "artifactregistry" -} diff --git a/Asset/.repo-metadata.json b/Asset/.repo-metadata.json deleted file mode 100644 index 8e085a0557f7..000000000000 --- a/Asset/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-asset", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-asset/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "cloudasset" -} diff --git a/AssuredWorkloads/.repo-metadata.json b/AssuredWorkloads/.repo-metadata.json deleted file mode 100644 index 15041b98c52e..000000000000 --- a/AssuredWorkloads/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-assured-workloads", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-assured-workloads/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "assuredworkloads" -} diff --git a/AutoMl/.repo-metadata.json b/AutoMl/.repo-metadata.json deleted file mode 100644 index 8961bcce47f1..000000000000 --- a/AutoMl/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-automl", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-automl/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "automl" -} diff --git a/BareMetalSolution/.repo-metadata.json b/BareMetalSolution/.repo-metadata.json deleted file mode 100644 index 5969abbba09e..000000000000 --- a/BareMetalSolution/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-bare-metal-solution", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "baremetalsolution" -} diff --git a/Batch/.repo-metadata.json b/Batch/.repo-metadata.json deleted file mode 100644 index 8ceaba7a1573..000000000000 --- a/Batch/.repo-metadata.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-batch", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-batch/latest", - "library_type": "GAPIC_AUTO", - "product_documentation": "https://cloud.google.com/batch/docs", - "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues", - "api_shortname": "batch" -} diff --git a/BeyondCorpAppConnections/.repo-metadata.json b/BeyondCorpAppConnections/.repo-metadata.json deleted file mode 100644 index b56df074cbf0..000000000000 --- a/BeyondCorpAppConnections/.repo-metadata.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-beyondcorp-appconnections", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-beyondcorp-appconnections/latest", - "library_type": "GAPIC_AUTO", - "product_documentation": "https://cloud.google.com/beyondcorp-enterprise/docs", - "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues", - "api_shortname": "beyondcorp" -} diff --git a/BeyondCorpAppConnectors/.repo-metadata.json b/BeyondCorpAppConnectors/.repo-metadata.json deleted file mode 100644 index 8f18af52379e..000000000000 --- a/BeyondCorpAppConnectors/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-beyondcorp-appconnectors", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-beyondcorp-appconnectors/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "beyondcorp" -} diff --git a/BeyondCorpAppGateways/.repo-metadata.json b/BeyondCorpAppGateways/.repo-metadata.json deleted file mode 100644 index d42a95905e2e..000000000000 --- a/BeyondCorpAppGateways/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-beyondcorp-appgateways", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-beyondcorp-appgateways/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "beyondcorp" -} diff --git a/BeyondCorpClientConnectorServices/.repo-metadata.json b/BeyondCorpClientConnectorServices/.repo-metadata.json deleted file mode 100644 index 8f847ebc36a3..000000000000 --- a/BeyondCorpClientConnectorServices/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-beyondcorp-clientconnectorservices", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-beyondcorp-clientconnectorservices/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "beyondcorp" -} diff --git a/BeyondCorpClientGateways/.repo-metadata.json b/BeyondCorpClientGateways/.repo-metadata.json deleted file mode 100644 index 50dca3b8a078..000000000000 --- a/BeyondCorpClientGateways/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-beyondcorp-clientgateways", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-beyondcorp-clientgateways/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "beyondcorp" -} diff --git a/BigQuery/.repo-metadata.json b/BigQuery/.repo-metadata.json deleted file mode 100644 index 3e867e8caf82..000000000000 --- a/BigQuery/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-bigquery", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquery/latest", - "library_type": "GAPIC_MANUAL", - "api_shortname": "bigquery" -} diff --git a/BigQueryAnalyticsHub/.repo-metadata.json b/BigQueryAnalyticsHub/.repo-metadata.json deleted file mode 100644 index a19c6995efc8..000000000000 --- a/BigQueryAnalyticsHub/.repo-metadata.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-bigquery-analyticshub", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquery-analyticshub/latest", - "library_type": "GAPIC_AUTO", - "product_documentation": "https://cloud.google.com/analytics-hub", - "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues", - "api_shortname": "analyticshub" -} diff --git a/BigQueryConnection/.repo-metadata.json b/BigQueryConnection/.repo-metadata.json deleted file mode 100644 index 6f27fdd8d0c0..000000000000 --- a/BigQueryConnection/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-bigquery-connection", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquery-connection/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "bigqueryconnection" -} diff --git a/BigQueryDataExchange/.repo-metadata.json b/BigQueryDataExchange/.repo-metadata.json deleted file mode 100644 index 21f4b2ce89e7..000000000000 --- a/BigQueryDataExchange/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-bigquery-data-exchange", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquery-data-exchange/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "analyticshub" -} diff --git a/BigQueryDataPolicies/.repo-metadata.json b/BigQueryDataPolicies/.repo-metadata.json deleted file mode 100644 index 10f0d1a7739e..000000000000 --- a/BigQueryDataPolicies/.repo-metadata.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-bigquery-datapolicies", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquery-datapolicies/latest", - "library_type": "GAPIC_AUTO", - "product_documentation": "https://cloud.google.com/bigquery/docs/reference/bigquerydatapolicy/rest", - "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues", - "api_shortname": "bigquerydatapolicy" -} diff --git a/BigQueryDataTransfer/.repo-metadata.json b/BigQueryDataTransfer/.repo-metadata.json deleted file mode 100644 index 1ed1302ffcd8..000000000000 --- a/BigQueryDataTransfer/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-bigquerydatatransfer", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquerydatatransfer/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "bigquerydatatransfer" -} diff --git a/BigQueryMigration/.repo-metadata.json b/BigQueryMigration/.repo-metadata.json deleted file mode 100644 index cbd910ef0186..000000000000 --- a/BigQueryMigration/.repo-metadata.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-bigquery-migration", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquery-migration/latest", - "library_type": "GAPIC_AUTO", - "product_documentation": "https://cloud.google.com/bigquery/docs/migration-intro/docs", - "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues", - "api_shortname": "bigquerymigration" -} diff --git a/BigQueryReservation/.repo-metadata.json b/BigQueryReservation/.repo-metadata.json deleted file mode 100644 index 7a879cbc2f9c..000000000000 --- a/BigQueryReservation/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-bigquery-reservation", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquery-reservation/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "bigqueryreservation" -} diff --git a/BigQueryStorage/.repo-metadata.json b/BigQueryStorage/.repo-metadata.json deleted file mode 100644 index 5f9a58801700..000000000000 --- a/BigQueryStorage/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-bigquery-storage", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigquery-storage/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "bigquerystorage" -} diff --git a/Bigtable/.repo-metadata.json b/Bigtable/.repo-metadata.json deleted file mode 100644 index 53522cc32b89..000000000000 --- a/Bigtable/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-bigtable", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-bigtable/latest", - "library_type": "GAPIC_COMBO", - "api_shortname": "bigtable" -} diff --git a/Billing/.repo-metadata.json b/Billing/.repo-metadata.json deleted file mode 100644 index 82d195ebf735..000000000000 --- a/Billing/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-billing", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-billing/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "cloudbilling" -} diff --git a/BillingBudgets/.repo-metadata.json b/BillingBudgets/.repo-metadata.json deleted file mode 100644 index b1b9038b258d..000000000000 --- a/BillingBudgets/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-billing-budgets", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-billing-budgets/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "billingbudgets" -} diff --git a/BinaryAuthorization/.repo-metadata.json b/BinaryAuthorization/.repo-metadata.json deleted file mode 100644 index d40c13014270..000000000000 --- a/BinaryAuthorization/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-binary-authorization", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-binary-authorization/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "binaryauthorization" -} diff --git a/Build/.repo-metadata.json b/Build/.repo-metadata.json deleted file mode 100644 index 25996b7cb1d6..000000000000 --- a/Build/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-build", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-build/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "cloudbuild" -} diff --git a/CertificateManager/.repo-metadata.json b/CertificateManager/.repo-metadata.json deleted file mode 100644 index 9aec0a7b61b4..000000000000 --- a/CertificateManager/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-certificate-manager", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-certificate-manager/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "certificatemanager" -} diff --git a/Channel/.repo-metadata.json b/Channel/.repo-metadata.json deleted file mode 100644 index ef0ee1643472..000000000000 --- a/Channel/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-channel", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-channel/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "cloudchannel" -} diff --git a/CommerceConsumerProcurement/.repo-metadata.json b/CommerceConsumerProcurement/.repo-metadata.json deleted file mode 100644 index 422db80fb92d..000000000000 --- a/CommerceConsumerProcurement/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-commerce-consumer-procurement", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-commerce-consumer-procurement/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "cloudcommerceconsumerprocurement" -} diff --git a/CommonProtos/.repo-metadata.json b/CommonProtos/.repo-metadata.json deleted file mode 100644 index 27347d016dc9..000000000000 --- a/CommonProtos/.repo-metadata.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-common-protos", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-common-protos/latest", - "library_type": "CORE" -} diff --git a/Compute/.repo-metadata.json b/Compute/.repo-metadata.json deleted file mode 100644 index e0bf60be695d..000000000000 --- a/Compute/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-compute", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-compute/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "compute" -} diff --git a/ConfidentialComputing/.repo-metadata.json b/ConfidentialComputing/.repo-metadata.json deleted file mode 100644 index c822b09407aa..000000000000 --- a/ConfidentialComputing/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-confidentialcomputing", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-confidentialcomputing/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "confidentialcomputing" -} diff --git a/Config/.repo-metadata.json b/Config/.repo-metadata.json deleted file mode 100644 index 52969d4fe36c..000000000000 --- a/Config/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-config", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-config/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "config" -} diff --git a/ContactCenterInsights/.repo-metadata.json b/ContactCenterInsights/.repo-metadata.json deleted file mode 100644 index 0e3708bbb6ff..000000000000 --- a/ContactCenterInsights/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-contact-center-insights", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-contact-center-insights/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "contactcenterinsights" -} diff --git a/Container/.repo-metadata.json b/Container/.repo-metadata.json deleted file mode 100644 index a8ec44bd63af..000000000000 --- a/Container/.repo-metadata.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-container", - "release_level": "stable", - "codeowner_team": "@googleapis/cicd", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-container/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "container" -} diff --git a/ContainerAnalysis/.repo-metadata.json b/ContainerAnalysis/.repo-metadata.json deleted file mode 100644 index 03bdf31523d5..000000000000 --- a/ContainerAnalysis/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-container-analysis", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-container-analysis/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "containeranalysis" -} diff --git a/ControlsPartner/.repo-metadata.json b/ControlsPartner/.repo-metadata.json deleted file mode 100644 index 4583d66d8043..000000000000 --- a/ControlsPartner/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-cloudcontrolspartner", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-cloudcontrolspartner/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "cloudcontrolspartner" -} diff --git a/Core/.repo-metadata.json b/Core/.repo-metadata.json deleted file mode 100644 index 9f0a1e0ee999..000000000000 --- a/Core/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-core", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-core/latest", - "library_type": "CORE", - "api_shortname": "" -} diff --git a/DataCatalog/.repo-metadata.json b/DataCatalog/.repo-metadata.json deleted file mode 100644 index c45edeff7132..000000000000 --- a/DataCatalog/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-data-catalog", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-data-catalog/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "datacatalog" -} diff --git a/DataCatalogLineage/.repo-metadata.json b/DataCatalogLineage/.repo-metadata.json deleted file mode 100644 index 50eda5f4ab77..000000000000 --- a/DataCatalogLineage/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-datacatalog-lineage", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-datacatalog-lineage/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "datalineage" -} diff --git a/DataFusion/.repo-metadata.json b/DataFusion/.repo-metadata.json deleted file mode 100644 index 8809869971c0..000000000000 --- a/DataFusion/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-data-fusion", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-data-fusion/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "datafusion" -} diff --git a/DataLabeling/.repo-metadata.json b/DataLabeling/.repo-metadata.json deleted file mode 100644 index 03e7212145e2..000000000000 --- a/DataLabeling/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-datalabeling", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-datalabeling/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "datalabeling" -} diff --git a/Dataflow/.repo-metadata.json b/Dataflow/.repo-metadata.json deleted file mode 100644 index 5687ff3882b3..000000000000 --- a/Dataflow/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-dataflow", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dataflow/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "dataflow" -} diff --git a/Dataform/.repo-metadata.json b/Dataform/.repo-metadata.json deleted file mode 100644 index f3f7ad44048a..000000000000 --- a/Dataform/.repo-metadata.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-dataform", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dataform/latest", - "library_type": "GAPIC_AUTO", - "product_documentation": "https://cloud.google.com/dataform/docs", - "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues", - "api_shortname": "dataform" -} diff --git a/Dataplex/.repo-metadata.json b/Dataplex/.repo-metadata.json deleted file mode 100644 index 33578b3f8e93..000000000000 --- a/Dataplex/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-dataplex", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dataplex/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "dataplex" -} diff --git a/Dataproc/.repo-metadata.json b/Dataproc/.repo-metadata.json deleted file mode 100644 index 6826b7072607..000000000000 --- a/Dataproc/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-dataproc", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dataproc/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "dataproc" -} diff --git a/DataprocMetastore/.repo-metadata.json b/DataprocMetastore/.repo-metadata.json deleted file mode 100644 index 054f4de57ac8..000000000000 --- a/DataprocMetastore/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-dataproc-metastore", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dataproc-metastore/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "metastore" -} diff --git a/Datastore/.repo-metadata.json b/Datastore/.repo-metadata.json deleted file mode 100644 index de16111c67ec..000000000000 --- a/Datastore/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-datastore", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-datastore/latest", - "library_type": "GAPIC_COMBO", - "api_shortname": "datastore" -} diff --git a/DatastoreAdmin/.repo-metadata.json b/DatastoreAdmin/.repo-metadata.json deleted file mode 100644 index 8c0aa2718e70..000000000000 --- a/DatastoreAdmin/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-datastore-admin", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-datastore-admin/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "datastore" -} diff --git a/Datastream/.repo-metadata.json b/Datastream/.repo-metadata.json deleted file mode 100644 index 9cac206d613a..000000000000 --- a/Datastream/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-datastream", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-datastream/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "datastream" -} diff --git a/Debugger/.repo-metadata.json b/Debugger/.repo-metadata.json deleted file mode 100644 index 8a3cfa65a596..000000000000 --- a/Debugger/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-debugger", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-debugger/latest", - "library_type": "GAPIC_COMBO", - "api_shortname": "clouddebugger" -} diff --git a/Deploy/.repo-metadata.json b/Deploy/.repo-metadata.json deleted file mode 100644 index 345064d310b5..000000000000 --- a/Deploy/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-deploy", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-deploy/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "clouddeploy" -} diff --git a/Dialogflow/.repo-metadata.json b/Dialogflow/.repo-metadata.json deleted file mode 100644 index 48e8e03f96f9..000000000000 --- a/Dialogflow/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-dialogflow", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dialogflow/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "dialogflow" -} diff --git a/DialogflowCx/.repo-metadata.json b/DialogflowCx/.repo-metadata.json deleted file mode 100644 index 45b32b0b95d3..000000000000 --- a/DialogflowCx/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-dialogflow-cx", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "dialogflow" -} diff --git a/DiscoveryEngine/.repo-metadata.json b/DiscoveryEngine/.repo-metadata.json deleted file mode 100644 index 32e4fb95f2ec..000000000000 --- a/DiscoveryEngine/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-discoveryengine", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-discoveryengine/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "discoveryengine" -} diff --git a/Dlp/.repo-metadata.json b/Dlp/.repo-metadata.json deleted file mode 100644 index 25719c82290e..000000000000 --- a/Dlp/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-dlp", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dlp/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "dlp" -} diff --git a/Dms/.repo-metadata.json b/Dms/.repo-metadata.json deleted file mode 100644 index 54aa50ae2465..000000000000 --- a/Dms/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-dms", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-dms/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "datamigration" -} diff --git a/DocumentAi/.repo-metadata.json b/DocumentAi/.repo-metadata.json deleted file mode 100644 index 9bbe2f363515..000000000000 --- a/DocumentAi/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-document-ai", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-document-ai/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "documentai" -} diff --git a/Domains/.repo-metadata.json b/Domains/.repo-metadata.json deleted file mode 100644 index c69ab8fac391..000000000000 --- a/Domains/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-domains", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-domains/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "domains" -} diff --git a/EdgeNetwork/.repo-metadata.json b/EdgeNetwork/.repo-metadata.json deleted file mode 100644 index a59a390fe889..000000000000 --- a/EdgeNetwork/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-edgenetwork", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-edgenetwork/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "edgenetwork" -} diff --git a/ErrorReporting/.repo-metadata.json b/ErrorReporting/.repo-metadata.json deleted file mode 100644 index d88da01f8369..000000000000 --- a/ErrorReporting/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-error-reporting", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-error-reporting/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "clouderrorreporting" -} diff --git a/EssentialContacts/.repo-metadata.json b/EssentialContacts/.repo-metadata.json deleted file mode 100644 index a1281ebab45e..000000000000 --- a/EssentialContacts/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-essential-contacts", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-essential-contacts/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "essentialcontacts" -} diff --git a/Eventarc/.repo-metadata.json b/Eventarc/.repo-metadata.json deleted file mode 100644 index c49b360f2a23..000000000000 --- a/Eventarc/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-eventarc", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-eventarc/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "eventarc" -} diff --git a/EventarcPublishing/.repo-metadata.json b/EventarcPublishing/.repo-metadata.json deleted file mode 100644 index 5291bccbb753..000000000000 --- a/EventarcPublishing/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-eventarc-publishing", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-eventarc-publishing/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "eventarcpublishing" -} diff --git a/Filestore/.repo-metadata.json b/Filestore/.repo-metadata.json deleted file mode 100644 index 88899ad9387b..000000000000 --- a/Filestore/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-filestore", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-filestore/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "file" -} diff --git a/Firestore/.repo-metadata.json b/Firestore/.repo-metadata.json deleted file mode 100644 index ab00b37342af..000000000000 --- a/Firestore/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-firestore", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-firestore/latest", - "library_type": "GAPIC_COMBO", - "api_shortname": "firestore" -} diff --git a/Functions/.repo-metadata.json b/Functions/.repo-metadata.json deleted file mode 100644 index 39893bf6ea5d..000000000000 --- a/Functions/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-functions", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-functions/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "cloudfunctions" -} diff --git a/GSuiteAddOns/.repo-metadata.json b/GSuiteAddOns/.repo-metadata.json deleted file mode 100644 index 566b331b019b..000000000000 --- a/GSuiteAddOns/.repo-metadata.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-gsuite-addons", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-gsuite-addons/latest", - "library_type": "GAPIC_AUTO", - "product_documentation": "https://developers.google.com/workspace/add-ons/overview", - "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues", - "api_shortname": "gsuiteaddons" -} diff --git a/Gaming/.repo-metadata.json b/Gaming/.repo-metadata.json deleted file mode 100644 index b401343a62fa..000000000000 --- a/Gaming/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-game-servers", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-game-servers/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "gameservices" -} diff --git a/GkeBackup/.repo-metadata.json b/GkeBackup/.repo-metadata.json deleted file mode 100644 index 79a3da503afd..000000000000 --- a/GkeBackup/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-gke-backup", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-gke-backup/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "gkebackup" -} diff --git a/GkeConnectGateway/.repo-metadata.json b/GkeConnectGateway/.repo-metadata.json deleted file mode 100644 index 028b32f9a922..000000000000 --- a/GkeConnectGateway/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-gke-connect-gateway", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-gke-connect-gateway/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "connectgateway" -} diff --git a/GkeHub/.repo-metadata.json b/GkeHub/.repo-metadata.json deleted file mode 100644 index 6794ef2e9a00..000000000000 --- a/GkeHub/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-gke-hub", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-gke-hub/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "gkehub" -} diff --git a/GkeMultiCloud/.repo-metadata.json b/GkeMultiCloud/.repo-metadata.json deleted file mode 100644 index 0dee1906a179..000000000000 --- a/GkeMultiCloud/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-gke-multi-cloud", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-gke-multi-cloud/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "gkemulticloud" -} diff --git a/Grafeas/.repo-metadata.json b/Grafeas/.repo-metadata.json deleted file mode 100644 index 057197d52456..000000000000 --- a/Grafeas/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/grafeas", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/grafeas/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "containeranalysis" -} diff --git a/Iam/.repo-metadata.json b/Iam/.repo-metadata.json deleted file mode 100644 index 3c33990d70f5..000000000000 --- a/Iam/.repo-metadata.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-iam", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-iam/latest", - "library_type": "GAPIC_AUTO", - "product_documentation": "https://cloud.google.com/iam/docs", - "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues", - "api_shortname": "iam" -} diff --git a/IamCredentials/.repo-metadata.json b/IamCredentials/.repo-metadata.json deleted file mode 100644 index 171c56e882ab..000000000000 --- a/IamCredentials/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-iam-credentials", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-iam-credentials/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "iamcredentials" -} diff --git a/Iap/.repo-metadata.json b/Iap/.repo-metadata.json deleted file mode 100644 index d726d22796dc..000000000000 --- a/Iap/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-iap", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-iap/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "iap" -} diff --git a/Ids/.repo-metadata.json b/Ids/.repo-metadata.json deleted file mode 100644 index e5b7111ece68..000000000000 --- a/Ids/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-ids", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-ids/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "ids" -} diff --git a/Iot/.repo-metadata.json b/Iot/.repo-metadata.json deleted file mode 100644 index 5d3d622631bf..000000000000 --- a/Iot/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-iot", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-iot/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "cloudiot" -} diff --git a/Kms/.repo-metadata.json b/Kms/.repo-metadata.json deleted file mode 100644 index e71c5438fc6b..000000000000 --- a/Kms/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-kms", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-kms/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "cloudkms" -} diff --git a/KmsInventory/.repo-metadata.json b/KmsInventory/.repo-metadata.json deleted file mode 100644 index 4f6544136a04..000000000000 --- a/KmsInventory/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-kms-inventory", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-kms-inventory/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "kmsinventory" -} diff --git a/Language/.repo-metadata.json b/Language/.repo-metadata.json deleted file mode 100644 index e762714ee03c..000000000000 --- a/Language/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-language", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-language/latest", - "library_type": "GAPIC_COMBO", - "api_shortname": "language" -} diff --git a/LifeSciences/.repo-metadata.json b/LifeSciences/.repo-metadata.json deleted file mode 100644 index 86afd7e4ad09..000000000000 --- a/LifeSciences/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-life-sciences", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-life-sciences/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "lifesciences" -} diff --git a/Logging/.repo-metadata.json b/Logging/.repo-metadata.json deleted file mode 100644 index dbff1bb285ba..000000000000 --- a/Logging/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-logging", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-logging/latest", - "library_type": "GAPIC_COMBO", - "api_shortname": "logging" -} diff --git a/LongRunning/.repo-metadata.json b/LongRunning/.repo-metadata.json deleted file mode 100644 index 17df35e48efd..000000000000 --- a/LongRunning/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/longrunning", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/longrunning/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "longrunning" -} diff --git a/ManagedIdentities/.repo-metadata.json b/ManagedIdentities/.repo-metadata.json deleted file mode 100644 index 981e954e2579..000000000000 --- a/ManagedIdentities/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-managed-identities", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-managed-identities/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "managedidentities" -} diff --git a/MediaTranslation/.repo-metadata.json b/MediaTranslation/.repo-metadata.json deleted file mode 100644 index 90c6fa45fc91..000000000000 --- a/MediaTranslation/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-media-translation", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-media-translation/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "mediatranslation" -} diff --git a/Memcache/.repo-metadata.json b/Memcache/.repo-metadata.json deleted file mode 100644 index a54596357674..000000000000 --- a/Memcache/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-memcache", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-memcache/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "memcache" -} diff --git a/MigrationCenter/.repo-metadata.json b/MigrationCenter/.repo-metadata.json deleted file mode 100644 index 4de03e4f3e9c..000000000000 --- a/MigrationCenter/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-migrationcenter", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-migrationcenter/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "migrationcenter" -} diff --git a/Monitoring/.repo-metadata.json b/Monitoring/.repo-metadata.json deleted file mode 100644 index 72899863f305..000000000000 --- a/Monitoring/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-monitoring", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-monitoring/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "monitoring" -} diff --git a/NetApp/.repo-metadata.json b/NetApp/.repo-metadata.json deleted file mode 100644 index 4a2ebf1c412f..000000000000 --- a/NetApp/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-netapp", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-netapp/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "netapp" -} diff --git a/NetworkConnectivity/.repo-metadata.json b/NetworkConnectivity/.repo-metadata.json deleted file mode 100644 index 15938e537d21..000000000000 --- a/NetworkConnectivity/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-network-connectivity", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-network-connectivity/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "networkconnectivity" -} diff --git a/NetworkManagement/.repo-metadata.json b/NetworkManagement/.repo-metadata.json deleted file mode 100644 index 2f27e7b71acf..000000000000 --- a/NetworkManagement/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-network-management", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-network-management/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "networkmanagement" -} diff --git a/NetworkSecurity/.repo-metadata.json b/NetworkSecurity/.repo-metadata.json deleted file mode 100644 index 28c127346924..000000000000 --- a/NetworkSecurity/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-network-security", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-network-security/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "networksecurity" -} diff --git a/Notebooks/.repo-metadata.json b/Notebooks/.repo-metadata.json deleted file mode 100644 index a6ad96856704..000000000000 --- a/Notebooks/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-notebooks", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-notebooks/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "notebooks" -} diff --git a/Optimization/.repo-metadata.json b/Optimization/.repo-metadata.json deleted file mode 100644 index 54dbf8b2fb69..000000000000 --- a/Optimization/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-optimization", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-optimization/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "cloudoptimization" -} diff --git a/OrchestrationAirflow/.repo-metadata.json b/OrchestrationAirflow/.repo-metadata.json deleted file mode 100644 index 13389804889f..000000000000 --- a/OrchestrationAirflow/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-orchestration-airflow", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-orchestration-airflow/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "composer" -} diff --git a/OrgPolicy/.repo-metadata.json b/OrgPolicy/.repo-metadata.json deleted file mode 100644 index 733836bd6abd..000000000000 --- a/OrgPolicy/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-org-policy", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-org-policy/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "orgpolicy" -} diff --git a/OsConfig/.repo-metadata.json b/OsConfig/.repo-metadata.json deleted file mode 100644 index b84bcfb95566..000000000000 --- a/OsConfig/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-osconfig", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-osconfig/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "osconfig" -} diff --git a/OsLogin/.repo-metadata.json b/OsLogin/.repo-metadata.json deleted file mode 100644 index b5bf87ef52a0..000000000000 --- a/OsLogin/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-oslogin", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-oslogin/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "oslogin" -} diff --git a/Parallelstore/.repo-metadata.json b/Parallelstore/.repo-metadata.json deleted file mode 100644 index 774a9618bc0c..000000000000 --- a/Parallelstore/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-parallelstore", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-parallelstore/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "parallelstore" -} diff --git a/PolicySimulator/.repo-metadata.json b/PolicySimulator/.repo-metadata.json deleted file mode 100644 index bd8f1aa27eb7..000000000000 --- a/PolicySimulator/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-policysimulator", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-policysimulator/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "policysimulator" -} diff --git a/PolicyTroubleshooter/.repo-metadata.json b/PolicyTroubleshooter/.repo-metadata.json deleted file mode 100644 index e3001a96a465..000000000000 --- a/PolicyTroubleshooter/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-policy-troubleshooter", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-policy-troubleshooter/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "policytroubleshooter" -} diff --git a/PolicyTroubleshooterIam/.repo-metadata.json b/PolicyTroubleshooterIam/.repo-metadata.json deleted file mode 100644 index f2583bbb0bfc..000000000000 --- a/PolicyTroubleshooterIam/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-policytroubleshooter-iam", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-policytroubleshooter-iam/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "policytroubleshooter" -} diff --git a/PrivateCatalog/.repo-metadata.json b/PrivateCatalog/.repo-metadata.json deleted file mode 100644 index 2c63da28b06a..000000000000 --- a/PrivateCatalog/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-private-catalog", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-private-catalog/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "cloudprivatecatalog" -} diff --git a/Profiler/.repo-metadata.json b/Profiler/.repo-metadata.json deleted file mode 100644 index 13410d69008a..000000000000 --- a/Profiler/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-profiler", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-profiler/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "cloudprofiler" -} diff --git a/PubSub/.repo-metadata.json b/PubSub/.repo-metadata.json deleted file mode 100644 index 6b2479cbdca1..000000000000 --- a/PubSub/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-pubsub", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-pubsub/latest", - "library_type": "GAPIC_COMBO", - "api_shortname": "pubsub" -} diff --git a/Quotas/.repo-metadata.json b/Quotas/.repo-metadata.json deleted file mode 100644 index e1199af50324..000000000000 --- a/Quotas/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-quotas", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-quotas/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "cloudquotas" -} diff --git a/RapidMigrationAssessment/.repo-metadata.json b/RapidMigrationAssessment/.repo-metadata.json deleted file mode 100644 index 3b9e9b130fbe..000000000000 --- a/RapidMigrationAssessment/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-rapidmigrationassessment", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-rapidmigrationassessment/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "rapidmigrationassessment" -} diff --git a/RecaptchaEnterprise/.repo-metadata.json b/RecaptchaEnterprise/.repo-metadata.json deleted file mode 100644 index 2030c0fdf695..000000000000 --- a/RecaptchaEnterprise/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-recaptcha-enterprise", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-recaptcha-enterprise/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "recaptchaenterprise" -} diff --git a/RecommendationEngine/.repo-metadata.json b/RecommendationEngine/.repo-metadata.json deleted file mode 100644 index 2de6a729323f..000000000000 --- a/RecommendationEngine/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-recommendations-ai", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-recommendations-ai/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "recommendationengine" -} diff --git a/Recommender/.repo-metadata.json b/Recommender/.repo-metadata.json deleted file mode 100644 index 1790c7675780..000000000000 --- a/Recommender/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-recommender", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-recommender/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "recommender" -} diff --git a/Redis/.repo-metadata.json b/Redis/.repo-metadata.json deleted file mode 100644 index bbe1a402579a..000000000000 --- a/Redis/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-redis", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-redis/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "redis" -} diff --git a/RedisCluster/.repo-metadata.json b/RedisCluster/.repo-metadata.json deleted file mode 100644 index b40ef061be66..000000000000 --- a/RedisCluster/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-redis-cluster", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-redis-cluster/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "redis" -} diff --git a/ResourceManager/.repo-metadata.json b/ResourceManager/.repo-metadata.json deleted file mode 100644 index 1148b5d116c9..000000000000 --- a/ResourceManager/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-resource-manager", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-resource-manager/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "cloudresourcemanager" -} diff --git a/ResourceSettings/.repo-metadata.json b/ResourceSettings/.repo-metadata.json deleted file mode 100644 index efd81f6f0740..000000000000 --- a/ResourceSettings/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-resource-settings", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-resource-settings/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "resourcesettings" -} diff --git a/Retail/.repo-metadata.json b/Retail/.repo-metadata.json deleted file mode 100644 index 254902988047..000000000000 --- a/Retail/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-retail", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-retail/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "retail" -} diff --git a/Run/.repo-metadata.json b/Run/.repo-metadata.json deleted file mode 100644 index 022c308695eb..000000000000 --- a/Run/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-run", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-run/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "run" -} diff --git a/Scheduler/.repo-metadata.json b/Scheduler/.repo-metadata.json deleted file mode 100644 index fe3068a70138..000000000000 --- a/Scheduler/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-scheduler", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-scheduler/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "cloudscheduler" -} diff --git a/SecretManager/.repo-metadata.json b/SecretManager/.repo-metadata.json deleted file mode 100644 index 58379895a86c..000000000000 --- a/SecretManager/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-secret-manager", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-secret-manager/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "secretmanager" -} diff --git a/SecureSourceManager/.repo-metadata.json b/SecureSourceManager/.repo-metadata.json deleted file mode 100644 index f41a49ff176f..000000000000 --- a/SecureSourceManager/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-securesourcemanager", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-securesourcemanager/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "securesourcemanager" -} diff --git a/SecurityCenter/.repo-metadata.json b/SecurityCenter/.repo-metadata.json deleted file mode 100644 index 41cc012724c5..000000000000 --- a/SecurityCenter/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-security-center", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-security-center/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "securitycenter" -} diff --git a/SecurityCenterManagement/.repo-metadata.json b/SecurityCenterManagement/.repo-metadata.json deleted file mode 100644 index 5614c7841fc2..000000000000 --- a/SecurityCenterManagement/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-securitycentermanagement", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-securitycentermanagement/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "securitycentermanagement" -} diff --git a/SecurityPrivateCa/.repo-metadata.json b/SecurityPrivateCa/.repo-metadata.json deleted file mode 100644 index 8477bf729527..000000000000 --- a/SecurityPrivateCa/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-security-private-ca", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-security-private-ca/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "privateca" -} diff --git a/SecurityPublicCA/.repo-metadata.json b/SecurityPublicCA/.repo-metadata.json deleted file mode 100644 index e8146b1ec489..000000000000 --- a/SecurityPublicCA/.repo-metadata.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-security-public-ca", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-security-public-ca/latest", - "library_type": "GAPIC_AUTO", - "product_documentation": "https://cloud.google.com/certificate-manager/docs/public-ca", - "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues", - "api_shortname": "publicca" -} diff --git a/ServiceControl/.repo-metadata.json b/ServiceControl/.repo-metadata.json deleted file mode 100644 index 8909451cf031..000000000000 --- a/ServiceControl/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-service-control", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-service-control/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "servicecontrol" -} diff --git a/ServiceDirectory/.repo-metadata.json b/ServiceDirectory/.repo-metadata.json deleted file mode 100644 index f03524c66a3f..000000000000 --- a/ServiceDirectory/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-service-directory", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-service-directory/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "servicedirectory" -} diff --git a/ServiceHealth/.repo-metadata.json b/ServiceHealth/.repo-metadata.json deleted file mode 100644 index 21336165b796..000000000000 --- a/ServiceHealth/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-servicehealth", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-servicehealth/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "servicehealth" -} diff --git a/ServiceManagement/.repo-metadata.json b/ServiceManagement/.repo-metadata.json deleted file mode 100644 index 4d2fb8ad3b4d..000000000000 --- a/ServiceManagement/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-service-management", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-service-management/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "servicemanagement" -} diff --git a/ServiceUsage/.repo-metadata.json b/ServiceUsage/.repo-metadata.json deleted file mode 100644 index 76a91d5f1b0f..000000000000 --- a/ServiceUsage/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-service-usage", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-service-usage/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "serviceusage" -} diff --git a/Shell/.repo-metadata.json b/Shell/.repo-metadata.json deleted file mode 100644 index 65b9bdaa166d..000000000000 --- a/Shell/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-shell", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-shell/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "cloudshell" -} diff --git a/ShoppingCommonProtos/.repo-metadata.json b/ShoppingCommonProtos/.repo-metadata.json deleted file mode 100644 index 873470389f0f..000000000000 --- a/ShoppingCommonProtos/.repo-metadata.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "distribution_name": "google/shopping-common-protos", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/shopping-common-protos/latest", - "library_type": "CORE" -} diff --git a/ShoppingCss/.repo-metadata.json b/ShoppingCss/.repo-metadata.json deleted file mode 100644 index d9e42ac0e1e3..000000000000 --- a/ShoppingCss/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/shopping-css", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/shopping-css/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "css" -} diff --git a/ShoppingMerchantConversions/.repo-metadata.json b/ShoppingMerchantConversions/.repo-metadata.json deleted file mode 100644 index 13805bce874f..000000000000 --- a/ShoppingMerchantConversions/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/shopping-merchant-conversions", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/shopping-merchant-conversions/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "merchantapi" -} diff --git a/ShoppingMerchantInventories/.repo-metadata.json b/ShoppingMerchantInventories/.repo-metadata.json deleted file mode 100644 index d67750dbd930..000000000000 --- a/ShoppingMerchantInventories/.repo-metadata.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "distribution_name": "google/shopping-merchant-inventories", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/shopping-merchant-inventories/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "merchantapi" -} diff --git a/ShoppingMerchantQuota/.repo-metadata.json b/ShoppingMerchantQuota/.repo-metadata.json deleted file mode 100644 index 9926c4c8c270..000000000000 --- a/ShoppingMerchantQuota/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/shopping-merchant-quota", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/shopping-merchant-quota/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "merchantapi" -} diff --git a/ShoppingMerchantReports/.repo-metadata.json b/ShoppingMerchantReports/.repo-metadata.json deleted file mode 100644 index e217be9c76b4..000000000000 --- a/ShoppingMerchantReports/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/shopping-merchant-reports", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/shopping-merchant-reports/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "merchantapi" -} diff --git a/Spanner/.repo-metadata.json b/Spanner/.repo-metadata.json deleted file mode 100644 index 73a45e4f9560..000000000000 --- a/Spanner/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-spanner", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-spanner/latest", - "library_type": "GAPIC_COMBO", - "api_shortname": "spanner" -} diff --git a/Speech/.repo-metadata.json b/Speech/.repo-metadata.json deleted file mode 100644 index b164a88136a9..000000000000 --- a/Speech/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-speech", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-speech/latest", - "library_type": "GAPIC_COMBO", - "api_shortname": "speech" -} diff --git a/SqlAdmin/.repo-metadata.json b/SqlAdmin/.repo-metadata.json deleted file mode 100644 index 49a65dcbbe5b..000000000000 --- a/SqlAdmin/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-sql-admin", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-sql-admin/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "sqladmin" -} diff --git a/Storage/.repo-metadata.json b/Storage/.repo-metadata.json deleted file mode 100644 index cec1634b2300..000000000000 --- a/Storage/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-storage", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-storage/latest", - "library_type": "GAPIC_MANUAL", - "api_shortname": "storage" -} diff --git a/StorageControl/.repo-metadata.json b/StorageControl/.repo-metadata.json deleted file mode 100644 index 74e764e608ed..000000000000 --- a/StorageControl/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-storage-control", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-storage-control/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "storage" -} diff --git a/StorageInsights/.repo-metadata.json b/StorageInsights/.repo-metadata.json deleted file mode 100644 index 608acbb58882..000000000000 --- a/StorageInsights/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-storageinsights", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-storageinsights/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "storageinsights" -} diff --git a/StorageTransfer/.repo-metadata.json b/StorageTransfer/.repo-metadata.json deleted file mode 100644 index 68eef034b7b0..000000000000 --- a/StorageTransfer/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-storage-transfer", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-storage-transfer/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "storagetransfer" -} diff --git a/Support/.repo-metadata.json b/Support/.repo-metadata.json deleted file mode 100644 index 9313a27b6b5c..000000000000 --- a/Support/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-support", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-support/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "cloudsupport" -} diff --git a/Talent/.repo-metadata.json b/Talent/.repo-metadata.json deleted file mode 100644 index bf0556292629..000000000000 --- a/Talent/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-talent", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-talent/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "jobs" -} diff --git a/Tasks/.repo-metadata.json b/Tasks/.repo-metadata.json deleted file mode 100644 index a062cc0e4e03..000000000000 --- a/Tasks/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-tasks", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-tasks/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "cloudtasks" -} diff --git a/TelcoAutomation/.repo-metadata.json b/TelcoAutomation/.repo-metadata.json deleted file mode 100644 index ee904f499667..000000000000 --- a/TelcoAutomation/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-telcoautomation", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-telcoautomation/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "telcoautomation" -} diff --git a/TextToSpeech/.repo-metadata.json b/TextToSpeech/.repo-metadata.json deleted file mode 100644 index 4c15c7c64e26..000000000000 --- a/TextToSpeech/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-text-to-speech", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-text-to-speech/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "texttospeech" -} diff --git a/Tpu/.repo-metadata.json b/Tpu/.repo-metadata.json deleted file mode 100644 index ed663e48c3b3..000000000000 --- a/Tpu/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-tpu", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-tpu/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "tpu" -} diff --git a/Trace/.repo-metadata.json b/Trace/.repo-metadata.json deleted file mode 100644 index b2cf5ffede92..000000000000 --- a/Trace/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-trace", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-trace/latest", - "library_type": "GAPIC_COMBO", - "api_shortname": "cloudtrace" -} diff --git a/Translate/.repo-metadata.json b/Translate/.repo-metadata.json deleted file mode 100644 index 38bd47deb929..000000000000 --- a/Translate/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-translate", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-translate/latest", - "library_type": "GAPIC_COMBO", - "api_shortname": "translate" -} diff --git a/VideoIntelligence/.repo-metadata.json b/VideoIntelligence/.repo-metadata.json deleted file mode 100644 index 618c9c0868c1..000000000000 --- a/VideoIntelligence/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-videointelligence", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-videointelligence/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "videointelligence" -} diff --git a/VideoLiveStream/.repo-metadata.json b/VideoLiveStream/.repo-metadata.json deleted file mode 100644 index e59b7654892d..000000000000 --- a/VideoLiveStream/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-video-live-stream", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-video-live-stream/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "livestream" -} diff --git a/VideoStitcher/.repo-metadata.json b/VideoStitcher/.repo-metadata.json deleted file mode 100644 index dbff4dcd0fdf..000000000000 --- a/VideoStitcher/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-video-stitcher", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-video-stitcher/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "videostitcher" -} diff --git a/VideoTranscoder/.repo-metadata.json b/VideoTranscoder/.repo-metadata.json deleted file mode 100644 index 9070ebfee901..000000000000 --- a/VideoTranscoder/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-video-transcoder", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-video-transcoder/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "transcoder" -} diff --git a/Vision/.repo-metadata.json b/Vision/.repo-metadata.json deleted file mode 100644 index 72af7b7c9b4d..000000000000 --- a/Vision/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-vision", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-vision/latest", - "library_type": "GAPIC_COMBO", - "api_shortname": "vision" -} diff --git a/VmMigration/.repo-metadata.json b/VmMigration/.repo-metadata.json deleted file mode 100644 index 279ca73a3e61..000000000000 --- a/VmMigration/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-vm-migration", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-vm-migration/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "vmmigration" -} diff --git a/VmwareEngine/.repo-metadata.json b/VmwareEngine/.repo-metadata.json deleted file mode 100644 index 163ab101a198..000000000000 --- a/VmwareEngine/.repo-metadata.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-vmware-engine", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-vmware-engine/latest", - "library_type": "GAPIC_AUTO", - "product_documentation": "https://cloud.google.com/vmware-engine/docs", - "issue_tracker": "https://github.com/googleapis/google-cloud-php/issues", - "api_shortname": "vmwareengine" -} diff --git a/VpcAccess/.repo-metadata.json b/VpcAccess/.repo-metadata.json deleted file mode 100644 index d6cab7a29660..000000000000 --- a/VpcAccess/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-vpc-access", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-vpc-access/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "vpcaccess" -} diff --git a/WebRisk/.repo-metadata.json b/WebRisk/.repo-metadata.json deleted file mode 100644 index f8bc28fd8796..000000000000 --- a/WebRisk/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-web-risk", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-web-risk/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "webrisk" -} diff --git a/WebSecurityScanner/.repo-metadata.json b/WebSecurityScanner/.repo-metadata.json deleted file mode 100644 index 33ccb4a32437..000000000000 --- a/WebSecurityScanner/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-web-security-scanner", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-web-security-scanner/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "websecurityscanner" -} diff --git a/Workflows/.repo-metadata.json b/Workflows/.repo-metadata.json deleted file mode 100644 index 9eeb7a765c88..000000000000 --- a/Workflows/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-workflows", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-workflows/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "workflows" -} diff --git a/dev/src/Command/AddComponentCommand.php b/dev/src/Command/AddComponentCommand.php index f1c26f0baee5..f559046ae62f 100644 --- a/dev/src/Command/AddComponentCommand.php +++ b/dev/src/Command/AddComponentCommand.php @@ -189,7 +189,7 @@ protected function execute(InputInterface $input, OutputInterface $output) } // Write repo metadata JSON - $output->writeln(' Writing .repo-metadata.json'); + $output->writeln(' Writing to .repo-metadata-full.json'); $repoMetadata = [ 'language' => 'php', 'distribution_name' => $new->composerPackage, @@ -198,8 +198,13 @@ protected function execute(InputInterface $input, OutputInterface $output) 'library_type' => 'GAPIC_AUTO', 'api_shortname' => $new->shortName ]; - $contents = json_encode($repoMetadata, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); - $filesystem->dumpFile($componentDir . '/.repo-metadata.json', $contents . PHP_EOL); + $repoMetadataFullPath = $this->rootPath . '/.repo-metadata-full.json'; + $repoMetadataFull = json_decode(file_get_contents($repoMetadataFullPath), true); + $repoMetadataFull[$new->componentName] = $repoMetadata; + file_put_contents( + $repoMetadataFullPath, + json_encode($repoMetadataFull, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) + ); // Write composer file $output->writeln('Composer Updating root composer.json and creating component composer.json'); diff --git a/dev/src/Component.php b/dev/src/Component.php index c38fbaf01ecf..742336d28de3 100644 --- a/dev/src/Component.php +++ b/dev/src/Component.php @@ -182,18 +182,18 @@ private function validateComponentFiles(): void $this->repoName = preg_replace('/\.git$/', '', $repoName); // Strip trailing ".git" $this->description = $composerJson['description']; - $repoMetadataPath = $this->path . '/.repo-metadata.json'; - if (!file_exists($repoMetadataPath)) { - throw new RuntimeException( - sprintf('repo metadata not found for component "%s"', $this->name) - ); + $repoMetadataPath = self::ROOT_DIR . '/.repo-metadata-full.json'; + $repoMetadataFullJson = json_decode(file_get_contents($repoMetadataPath), true); + if (!$repoMetadataFullJson) { + throw new RuntimeException('Invalid .repo-metadata-full.json'); } - $repoMetadataJson = json_decode(file_get_contents($repoMetadataPath), true); - if (!$repoMetadataJson) { - throw new RuntimeException( - sprintf('Invalid .repo-metadata.json for component "%s"', $this->name) - ); + if (!isset($repoMetadataFullJson[$this->name])) { + throw new RuntimeException(sprintf( + 'repo metadata for component "%s" not found in .repo-metadata-full.json', + $this->name + )); } + $repoMetadataJson = $repoMetadataFullJson[$this->name]; if (empty($repoMetadataJson['release_level'])) { throw new RuntimeException(sprintf( 'repo metadata does not contain "release_level" for component "%s"', diff --git a/dev/templates/.repo_metadata.json.twig b/dev/templates/.repo_metadata.json.twig deleted file mode 100644 index dea6f4d85166..000000000000 --- a/dev/templates/.repo_metadata.json.twig +++ /dev/null @@ -1,7 +0,0 @@ -{ - "distribution_name": "google/{packageName}", - "release_level": "pre", - "client_documentation": "{docUrl}", - "library_type": "GAPIC_AUTO", - "api_shortname": "{shortname}" -} \ No newline at end of file diff --git a/dev/tests/Unit/Command/AddComponentCommandTest.php b/dev/tests/Unit/Command/AddComponentCommandTest.php index 3a6e0818ec6e..ccf47b440ffa 100644 --- a/dev/tests/Unit/Command/AddComponentCommandTest.php +++ b/dev/tests/Unit/Command/AddComponentCommandTest.php @@ -38,7 +38,6 @@ class AddComponentCommandTest extends TestCase '.OwlBot.yaml' => '.OwlBot.yaml.test', // so OwlBot doesn't read the test file '.gitattributes' => null, '.github/pull_request_template.md' => null, - '.repo-metadata.json' => null, 'CONTRIBUTING.md' => null, 'LICENSE' => null, 'README.md' => null, @@ -54,6 +53,7 @@ public static function setUpBeforeClass(): void { mkdir($tmpDir = sys_get_temp_dir() . '/add-command-test-' . time()); touch($tmpDir . '/composer.json'); + file_put_contents($tmpDir . '/.repo-metadata-full.json', '{}'); self::$tmpDir = realpath($tmpDir); $application = new Application(); $application->add(new AddComponentCommand($tmpDir)); @@ -97,6 +97,8 @@ public function testAddComponent() ); } + $repoMetadataFull = json_decode(file_get_contents(self::$tmpDir . '/.repo-metadata-full.json'), true); + $this->assertArrayHasKey('SecretManager', $repoMetadataFull); $this->assertComposerJson('SecretManager'); } diff --git a/dev/tests/Unit/Command/ComponentInfoCommandTest.php b/dev/tests/Unit/Command/ComponentInfoCommandTest.php index f1b83f939304..0165d61a4788 100644 --- a/dev/tests/Unit/Command/ComponentInfoCommandTest.php +++ b/dev/tests/Unit/Command/ComponentInfoCommandTest.php @@ -28,19 +28,6 @@ */ class ComponentInfoCommandTest extends TestCase { - private static $expectedFiles = [ - '.OwlBot.yaml', - '.gitattributes', - '.github/pull_request_template.md', - '.repo-metadata.json', - 'CONTRIBUTING.md', - 'LICENSE', - 'README.md', - 'VERSION', - 'owlbot.py', - 'phpunit.xml.dist', - ]; - private static CommandTester $commandTester; public static function setUpBeforeClass(): void diff --git a/dev/tests/fixtures/component/CustomInput/.repo-metadata.json b/dev/tests/fixtures/component/CustomInput/.repo-metadata.json deleted file mode 100644 index a350830d76ad..000000000000 --- a/dev/tests/fixtures/component/CustomInput/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/custom-composer-package-name", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/custom-composer-package-name/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "customshortname" -} diff --git a/dev/tests/fixtures/component/SecretManager/.repo-metadata.json b/dev/tests/fixtures/component/SecretManager/.repo-metadata.json deleted file mode 100644 index 7a2ea25e21ba..000000000000 --- a/dev/tests/fixtures/component/SecretManager/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-secretmanager", - "release_level": "preview", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-secretmanager/latest", - "library_type": "GAPIC_AUTO", - "api_shortname": "secretmanager" -} diff --git a/dev/tests/fixtures/component/Vision/.repo-metadata.json b/dev/tests/fixtures/component/Vision/.repo-metadata.json deleted file mode 100644 index 72af7b7c9b4d..000000000000 --- a/dev/tests/fixtures/component/Vision/.repo-metadata.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "language": "php", - "distribution_name": "google/cloud-vision", - "release_level": "stable", - "client_documentation": "https://cloud.google.com/php/docs/reference/cloud-vision/latest", - "library_type": "GAPIC_COMBO", - "api_shortname": "vision" -} From 9bd36100a76d7d3f0d187e14ad4b2ccc25d3b459 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 3 May 2024 10:01:07 -0700 Subject: [PATCH 83/86] feat: updated client libraries for Dataplex Catalog: removed deprecated fields, updated comments (#7282) fix!: An existing field `entry` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` fix!: An existing field `display_name` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` fix!: An existing field `entry_type` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` fix!: An existing field `modify_time` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` fix!: An existing field `fully_qualified_name` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` fix!: An existing field `description` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` fix!: An existing field `relative_resource` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` docs: A comment for field `aspects` in message `.google.cloud.dataplex.v1.Entry` is changed docs: A comment for field `filter` in message `.google.cloud.dataplex.v1.ListEntriesRequest` is changed PiperOrigin-RevId: 630090353 Source-Link: https://github.com/googleapis/googleapis/commit/7ea9f2c99529458ca1a5c70f28608490bdafd3a9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/7a1cca7982e5ace295aaad194267cc5d05c11d58 Copy-Tag: eyJwIjoiRGF0YXBsZXgvLk93bEJvdC55YW1sIiwiaCI6IjdhMWNjYTc5ODJlNWFjZTI5NWFhYWQxOTQyNjdjYzVkMDVjMTFkNTgifQ== --- Dataplex/metadata/V1/Catalog.php | 14 +- Dataplex/metadata/V1/DataQuality.php | Bin 5177 -> 5337 bytes Dataplex/metadata/V1/Logs.php | Bin 7895 -> 7943 bytes Dataplex/src/V1/DataQualityRule.php | 36 +++ .../src/V1/DataQualityRule/SqlAssertion.php | 75 +++++ Dataplex/src/V1/DataQualityRuleResult.php | 42 +++ Dataplex/src/V1/DataQualityScanRuleResult.php | 38 +++ .../V1/DataQualityScanRuleResult/RuleType.php | 8 + Dataplex/src/V1/Entry.php | 36 ++- .../V1/Gapic/CatalogServiceGapicClient.php | 12 +- Dataplex/src/V1/ListEntriesRequest.php | 48 +-- Dataplex/src/V1/SearchEntriesResult.php | 285 ------------------ 12 files changed, 261 insertions(+), 333 deletions(-) create mode 100644 Dataplex/src/V1/DataQualityRule/SqlAssertion.php diff --git a/Dataplex/metadata/V1/Catalog.php b/Dataplex/metadata/V1/Catalog.php index 1f1ca35e5621..cf7ececbce98 100644 --- a/Dataplex/metadata/V1/Catalog.php +++ b/Dataplex/metadata/V1/Catalog.php @@ -26,7 +26,7 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); $pool->internalAddGeneratedFile( ' -¢p +În &google/cloud/dataplex/v1/catalog.protogoogle.cloud.dataplex.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto&google/cloud/dataplex/v1/service.proto#google/longrunning/operations.protogoogle/protobuf/empty.proto google/protobuf/field_mask.protogoogle/protobuf/struct.protogoogle/protobuf/timestamp.proto"Ó AspectType8 @@ -297,16 +297,8 @@ public static function initOnce() { page_token ( BàA order_by ( BàA -scope ( BàA"Ê -SearchEntriesResult -entry ( B - display_name ( B - -entry_type ( B3 - modify_time ( 2.google.protobuf.TimestampB -fully_qualified_name ( B - description ( B -relative_resource ( B +scope ( BàA"ö +SearchEntriesResult linked_resource ( 7 dataplex_entry ( 2.google.cloud.dataplex.v1.EntryH snippets ( 26.google.cloud.dataplex.v1.SearchEntriesResult.SnippetsC diff --git a/Dataplex/metadata/V1/DataQuality.php b/Dataplex/metadata/V1/DataQuality.php index b56b8520e8f38a8ab5117ec24a0d99884c5e2197..a0ce2465cea50134879bb5a477c98a8eacb3e842 100644 GIT binary patch delta 156 zcmdm~aZ_`{OeU7^%3Ru$|1(K$-p0hs!T5FZ5w0srLJC~MiN(dKMJ1W}dGSU0K9y8;4)IJ3P1`xgS42eY~w-T@#I8wwL)b8}^KbZKvHUvh7EUt@1| rZgdz8AOR=?B9a1=n;icW5)ldwQ&CJ`K~qyjQdCJ#P7n#RnjJj>5fmGj delta 36 ucmV+<0NekEKG!|4y8;5#H?zG0`xgS~2D7>v-T?z5{{fS@9RIV*9X$aj)(?^Z diff --git a/Dataplex/src/V1/DataQualityRule.php b/Dataplex/src/V1/DataQualityRule.php index 2bdc8fcf9ab3..9c578a57ff45 100644 --- a/Dataplex/src/V1/DataQualityRule.php +++ b/Dataplex/src/V1/DataQualityRule.php @@ -99,6 +99,9 @@ class DataQualityRule extends \Google\Protobuf\Internal\Message * @type \Google\Cloud\Dataplex\V1\DataQualityRule\TableConditionExpectation $table_condition_expectation * Aggregate rule which evaluates whether the provided expression is true * for a table. + * @type \Google\Cloud\Dataplex\V1\DataQualityRule\SqlAssertion $sql_assertion + * Aggregate rule which evaluates the number of rows returned for the + * provided statement. * @type string $column * Optional. The unnested column which this rule is evaluated against. * @type bool $ignore_null @@ -396,6 +399,39 @@ public function setTableConditionExpectation($var) return $this; } + /** + * Aggregate rule which evaluates the number of rows returned for the + * provided statement. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.SqlAssertion sql_assertion = 202; + * @return \Google\Cloud\Dataplex\V1\DataQualityRule\SqlAssertion|null + */ + public function getSqlAssertion() + { + return $this->readOneof(202); + } + + public function hasSqlAssertion() + { + return $this->hasOneof(202); + } + + /** + * Aggregate rule which evaluates the number of rows returned for the + * provided statement. + * + * Generated from protobuf field .google.cloud.dataplex.v1.DataQualityRule.SqlAssertion sql_assertion = 202; + * @param \Google\Cloud\Dataplex\V1\DataQualityRule\SqlAssertion $var + * @return $this + */ + public function setSqlAssertion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\DataQualityRule\SqlAssertion::class); + $this->writeOneof(202, $var); + + return $this; + } + /** * Optional. The unnested column which this rule is evaluated against. * diff --git a/Dataplex/src/V1/DataQualityRule/SqlAssertion.php b/Dataplex/src/V1/DataQualityRule/SqlAssertion.php new file mode 100644 index 000000000000..5c25ce0b008d --- /dev/null +++ b/Dataplex/src/V1/DataQualityRule/SqlAssertion.php @@ -0,0 +1,75 @@ +google.cloud.dataplex.v1.DataQualityRule.SqlAssertion + */ +class SqlAssertion extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The SQL statement. + * + * Generated from protobuf field string sql_statement = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $sql_statement = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $sql_statement + * Optional. The SQL statement. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Dataplex\V1\DataQuality::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The SQL statement. + * + * Generated from protobuf field string sql_statement = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSqlStatement() + { + return $this->sql_statement; + } + + /** + * Optional. The SQL statement. + * + * Generated from protobuf field string sql_statement = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSqlStatement($var) + { + GPBUtil::checkString($var, True); + $this->sql_statement = $var; + + return $this; + } + +} + + diff --git a/Dataplex/src/V1/DataQualityRuleResult.php b/Dataplex/src/V1/DataQualityRuleResult.php index c9d438e3b7f4..5fac421ec514 100644 --- a/Dataplex/src/V1/DataQualityRuleResult.php +++ b/Dataplex/src/V1/DataQualityRuleResult.php @@ -66,6 +66,14 @@ class DataQualityRuleResult extends \Google\Protobuf\Internal\Message * Generated from protobuf field string failing_rows_query = 10; */ private $failing_rows_query = ''; + /** + * Output only. The number of rows returned by the sql statement in the + * SqlAssertion rule. + * This field is only valid for SqlAssertion rules. + * + * Generated from protobuf field int64 assertion_row_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $assertion_row_count = 0; /** * Constructor. @@ -96,6 +104,10 @@ class DataQualityRuleResult extends \Google\Protobuf\Internal\Message * @type string $failing_rows_query * The query to find rows that did not pass this rule. * This field is only valid for row-level type rules. + * @type int|string $assertion_row_count + * Output only. The number of rows returned by the sql statement in the + * SqlAssertion rule. + * This field is only valid for SqlAssertion rules. * } */ public function __construct($data = NULL) { @@ -313,5 +325,35 @@ public function setFailingRowsQuery($var) return $this; } + /** + * Output only. The number of rows returned by the sql statement in the + * SqlAssertion rule. + * This field is only valid for SqlAssertion rules. + * + * Generated from protobuf field int64 assertion_row_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getAssertionRowCount() + { + return $this->assertion_row_count; + } + + /** + * Output only. The number of rows returned by the sql statement in the + * SqlAssertion rule. + * This field is only valid for SqlAssertion rules. + * + * Generated from protobuf field int64 assertion_row_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setAssertionRowCount($var) + { + GPBUtil::checkInt64($var); + $this->assertion_row_count = $var; + + return $this; + } + } diff --git a/Dataplex/src/V1/DataQualityScanRuleResult.php b/Dataplex/src/V1/DataQualityScanRuleResult.php index e59fb96f94a9..fb49f3af175a 100644 --- a/Dataplex/src/V1/DataQualityScanRuleResult.php +++ b/Dataplex/src/V1/DataQualityScanRuleResult.php @@ -90,6 +90,13 @@ class DataQualityScanRuleResult extends \Google\Protobuf\Internal\Message * Generated from protobuf field int64 null_row_count = 12; */ private $null_row_count = 0; + /** + * The number of rows returned by the sql statement in the SqlAssertion rule. + * This field is only valid for SqlAssertion rules. + * + * Generated from protobuf field int64 assertion_row_count = 13; + */ + private $assertion_row_count = 0; /** * Constructor. @@ -123,6 +130,9 @@ class DataQualityScanRuleResult extends \Google\Protobuf\Internal\Message * This field is only valid for rules of PER_ROW evaluation type. * @type int|string $null_row_count * The number of rows with null values in the specified column. + * @type int|string $assertion_row_count + * The number of rows returned by the sql statement in the SqlAssertion rule. + * This field is only valid for SqlAssertion rules. * } */ public function __construct($data = NULL) { @@ -446,5 +456,33 @@ public function setNullRowCount($var) return $this; } + /** + * The number of rows returned by the sql statement in the SqlAssertion rule. + * This field is only valid for SqlAssertion rules. + * + * Generated from protobuf field int64 assertion_row_count = 13; + * @return int|string + */ + public function getAssertionRowCount() + { + return $this->assertion_row_count; + } + + /** + * The number of rows returned by the sql statement in the SqlAssertion rule. + * This field is only valid for SqlAssertion rules. + * + * Generated from protobuf field int64 assertion_row_count = 13; + * @param int|string $var + * @return $this + */ + public function setAssertionRowCount($var) + { + GPBUtil::checkInt64($var); + $this->assertion_row_count = $var; + + return $this; + } + } diff --git a/Dataplex/src/V1/DataQualityScanRuleResult/RuleType.php b/Dataplex/src/V1/DataQualityScanRuleResult/RuleType.php index bc63f6c601a9..51434ffb5c35 100644 --- a/Dataplex/src/V1/DataQualityScanRuleResult/RuleType.php +++ b/Dataplex/src/V1/DataQualityScanRuleResult/RuleType.php @@ -75,6 +75,13 @@ class RuleType * Generated from protobuf enum UNIQUENESS_EXPECTATION = 8; */ const UNIQUENESS_EXPECTATION = 8; + /** + * Please see + * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#sqlAssertion. + * + * Generated from protobuf enum SQL_ASSERTION = 9; + */ + const SQL_ASSERTION = 9; private static $valueToName = [ self::RULE_TYPE_UNSPECIFIED => 'RULE_TYPE_UNSPECIFIED', @@ -86,6 +93,7 @@ class RuleType self::STATISTIC_RANGE_EXPECTATION => 'STATISTIC_RANGE_EXPECTATION', self::TABLE_CONDITION_EXPECTATION => 'TABLE_CONDITION_EXPECTATION', self::UNIQUENESS_EXPECTATION => 'UNIQUENESS_EXPECTATION', + self::SQL_ASSERTION => 'SQL_ASSERTION', ]; public static function name($value) diff --git a/Dataplex/src/V1/Entry.php b/Dataplex/src/V1/Entry.php index 4880792df5f1..33e3351824f3 100644 --- a/Dataplex/src/V1/Entry.php +++ b/Dataplex/src/V1/Entry.php @@ -43,9 +43,12 @@ class Entry extends \Google\Protobuf\Internal\Message */ private $update_time = null; /** - * Optional. The Aspects attached to the Entry. The key is either the resource - * name of the aspect type (if the aspect is attached directly to the entry) - * or "aspectType@path" if the aspect is attached to an entry's path. + * Optional. The Aspects attached to the Entry. + * The format for the key can be one of the following: + * 1. {projectId}.{locationId}.{aspectTypeId} (if the aspect is attached + * directly to the entry) + * 2. {projectId}.{locationId}.{aspectTypeId}@{path} (if the aspect is + * attached to an entry's path) * * Generated from protobuf field map aspects = 9 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -87,9 +90,12 @@ class Entry extends \Google\Protobuf\Internal\Message * @type \Google\Protobuf\Timestamp $update_time * Output only. The time when the Entry was last updated. * @type array|\Google\Protobuf\Internal\MapField $aspects - * Optional. The Aspects attached to the Entry. The key is either the resource - * name of the aspect type (if the aspect is attached directly to the entry) - * or "aspectType@path" if the aspect is attached to an entry's path. + * Optional. The Aspects attached to the Entry. + * The format for the key can be one of the following: + * 1. {projectId}.{locationId}.{aspectTypeId} (if the aspect is attached + * directly to the entry) + * 2. {projectId}.{locationId}.{aspectTypeId}@{path} (if the aspect is + * attached to an entry's path) * @type string $parent_entry * Optional. Immutable. The resource name of the parent entry. * @type string $fully_qualified_name @@ -233,9 +239,12 @@ public function setUpdateTime($var) } /** - * Optional. The Aspects attached to the Entry. The key is either the resource - * name of the aspect type (if the aspect is attached directly to the entry) - * or "aspectType@path" if the aspect is attached to an entry's path. + * Optional. The Aspects attached to the Entry. + * The format for the key can be one of the following: + * 1. {projectId}.{locationId}.{aspectTypeId} (if the aspect is attached + * directly to the entry) + * 2. {projectId}.{locationId}.{aspectTypeId}@{path} (if the aspect is + * attached to an entry's path) * * Generated from protobuf field map aspects = 9 [(.google.api.field_behavior) = OPTIONAL]; * @return \Google\Protobuf\Internal\MapField @@ -246,9 +255,12 @@ public function getAspects() } /** - * Optional. The Aspects attached to the Entry. The key is either the resource - * name of the aspect type (if the aspect is attached directly to the entry) - * or "aspectType@path" if the aspect is attached to an entry's path. + * Optional. The Aspects attached to the Entry. + * The format for the key can be one of the following: + * 1. {projectId}.{locationId}.{aspectTypeId} (if the aspect is attached + * directly to the entry) + * 2. {projectId}.{locationId}.{aspectTypeId}@{path} (if the aspect is + * attached to an entry's path) * * Generated from protobuf field map aspects = 9 [(.google.api.field_behavior) = OPTIONAL]; * @param array|\Google\Protobuf\Internal\MapField $var diff --git a/Dataplex/src/V1/Gapic/CatalogServiceGapicClient.php b/Dataplex/src/V1/Gapic/CatalogServiceGapicClient.php index ecd726ce8d78..3407700b8e35 100644 --- a/Dataplex/src/V1/Gapic/CatalogServiceGapicClient.php +++ b/Dataplex/src/V1/Gapic/CatalogServiceGapicClient.php @@ -1509,15 +1509,17 @@ public function listAspectTypes($parent, array $optionalArgs = []) * Optional. A filter on the entries to return. * Filters are case-sensitive. * The request can be filtered by the following fields: - * entry_type, display_name. + * entry_type, entry_source.display_name. * The comparison operators are =, !=, <, >, <=, >= (strings are compared * according to lexical order) * The logical operators AND, OR, NOT can be used - * in the filter. Example filter expressions: - * "display_name=AnExampleDisplayName" + * in the filter. Wildcard "*" can be used, but for entry_type the full + * project id or number needs to be provided. Example filter expressions: + * "entry_source.display_name=AnExampleDisplayName" * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - * "entry_type=projects/a* OR "entry_type=projects/k*" - * "NOT display_name=AnotherExampleDisplayName" + * "entry_type=projects/example-project/locations/us/entryTypes/a* OR + * entry_type=projects/another-project/locations/*" + * "NOT entry_source.display_name=AnotherExampleDisplayName" * @type RetrySettings|array $retrySettings * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an * associative array of retry settings parameters. See the documentation on diff --git a/Dataplex/src/V1/ListEntriesRequest.php b/Dataplex/src/V1/ListEntriesRequest.php index a6e10d77dd62..1d7a191eb49d 100644 --- a/Dataplex/src/V1/ListEntriesRequest.php +++ b/Dataplex/src/V1/ListEntriesRequest.php @@ -34,15 +34,17 @@ class ListEntriesRequest extends \Google\Protobuf\Internal\Message * Optional. A filter on the entries to return. * Filters are case-sensitive. * The request can be filtered by the following fields: - * entry_type, display_name. + * entry_type, entry_source.display_name. * The comparison operators are =, !=, <, >, <=, >= (strings are compared * according to lexical order) * The logical operators AND, OR, NOT can be used - * in the filter. Example filter expressions: - * "display_name=AnExampleDisplayName" + * in the filter. Wildcard "*" can be used, but for entry_type the full + * project id or number needs to be provided. Example filter expressions: + * "entry_source.display_name=AnExampleDisplayName" * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - * "entry_type=projects/a* OR "entry_type=projects/k*" - * "NOT display_name=AnotherExampleDisplayName" + * "entry_type=projects/example-project/locations/us/entryTypes/a* OR + * entry_type=projects/another-project/locations/*" + * "NOT entry_source.display_name=AnotherExampleDisplayName" * * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -79,15 +81,17 @@ public static function build(string $parent): self * Optional. A filter on the entries to return. * Filters are case-sensitive. * The request can be filtered by the following fields: - * entry_type, display_name. + * entry_type, entry_source.display_name. * The comparison operators are =, !=, <, >, <=, >= (strings are compared * according to lexical order) * The logical operators AND, OR, NOT can be used - * in the filter. Example filter expressions: - * "display_name=AnExampleDisplayName" + * in the filter. Wildcard "*" can be used, but for entry_type the full + * project id or number needs to be provided. Example filter expressions: + * "entry_source.display_name=AnExampleDisplayName" * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - * "entry_type=projects/a* OR "entry_type=projects/k*" - * "NOT display_name=AnotherExampleDisplayName" + * "entry_type=projects/example-project/locations/us/entryTypes/a* OR + * entry_type=projects/another-project/locations/*" + * "NOT entry_source.display_name=AnotherExampleDisplayName" * } */ public function __construct($data = NULL) { @@ -175,15 +179,17 @@ public function setPageToken($var) * Optional. A filter on the entries to return. * Filters are case-sensitive. * The request can be filtered by the following fields: - * entry_type, display_name. + * entry_type, entry_source.display_name. * The comparison operators are =, !=, <, >, <=, >= (strings are compared * according to lexical order) * The logical operators AND, OR, NOT can be used - * in the filter. Example filter expressions: - * "display_name=AnExampleDisplayName" + * in the filter. Wildcard "*" can be used, but for entry_type the full + * project id or number needs to be provided. Example filter expressions: + * "entry_source.display_name=AnExampleDisplayName" * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - * "entry_type=projects/a* OR "entry_type=projects/k*" - * "NOT display_name=AnotherExampleDisplayName" + * "entry_type=projects/example-project/locations/us/entryTypes/a* OR + * entry_type=projects/another-project/locations/*" + * "NOT entry_source.display_name=AnotherExampleDisplayName" * * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -197,15 +203,17 @@ public function getFilter() * Optional. A filter on the entries to return. * Filters are case-sensitive. * The request can be filtered by the following fields: - * entry_type, display_name. + * entry_type, entry_source.display_name. * The comparison operators are =, !=, <, >, <=, >= (strings are compared * according to lexical order) * The logical operators AND, OR, NOT can be used - * in the filter. Example filter expressions: - * "display_name=AnExampleDisplayName" + * in the filter. Wildcard "*" can be used, but for entry_type the full + * project id or number needs to be provided. Example filter expressions: + * "entry_source.display_name=AnExampleDisplayName" * "entry_type=projects/example-project/locations/global/entryTypes/example-entry_type" - * "entry_type=projects/a* OR "entry_type=projects/k*" - * "NOT display_name=AnotherExampleDisplayName" + * "entry_type=projects/example-project/locations/us/entryTypes/a* OR + * entry_type=projects/another-project/locations/*" + * "NOT entry_source.display_name=AnotherExampleDisplayName" * * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var diff --git a/Dataplex/src/V1/SearchEntriesResult.php b/Dataplex/src/V1/SearchEntriesResult.php index cb03bb6f617e..9bc74df9e5b0 100644 --- a/Dataplex/src/V1/SearchEntriesResult.php +++ b/Dataplex/src/V1/SearchEntriesResult.php @@ -15,55 +15,6 @@ */ class SearchEntriesResult extends \Google\Protobuf\Internal\Message { - /** - * Resource name of the entry. - * - * Generated from protobuf field string entry = 1 [deprecated = true]; - * @deprecated - */ - protected $entry = ''; - /** - * Display name. - * - * Generated from protobuf field string display_name = 2 [deprecated = true]; - * @deprecated - */ - protected $display_name = ''; - /** - * The entry type. - * - * Generated from protobuf field string entry_type = 3 [deprecated = true]; - * @deprecated - */ - protected $entry_type = ''; - /** - * The last modification timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp modify_time = 4 [deprecated = true]; - * @deprecated - */ - protected $modify_time = null; - /** - * Fully qualified name. - * - * Generated from protobuf field string fully_qualified_name = 5 [deprecated = true]; - * @deprecated - */ - protected $fully_qualified_name = ''; - /** - * Entry description. - * - * Generated from protobuf field string description = 6 [deprecated = true]; - * @deprecated - */ - protected $description = ''; - /** - * Relative resource name. - * - * Generated from protobuf field string relative_resource = 7 [deprecated = true]; - * @deprecated - */ - protected $relative_resource = ''; /** * Linked resource name. * @@ -89,20 +40,6 @@ class SearchEntriesResult extends \Google\Protobuf\Internal\Message * @param array $data { * Optional. Data for populating the Message object. * - * @type string $entry - * Resource name of the entry. - * @type string $display_name - * Display name. - * @type string $entry_type - * The entry type. - * @type \Google\Protobuf\Timestamp $modify_time - * The last modification timestamp. - * @type string $fully_qualified_name - * Fully qualified name. - * @type string $description - * Entry description. - * @type string $relative_resource - * Relative resource name. * @type string $linked_resource * Linked resource name. * @type \Google\Cloud\Dataplex\V1\Entry $dataplex_entry @@ -116,228 +53,6 @@ public function __construct($data = NULL) { parent::__construct($data); } - /** - * Resource name of the entry. - * - * Generated from protobuf field string entry = 1 [deprecated = true]; - * @return string - * @deprecated - */ - public function getEntry() - { - @trigger_error('entry is deprecated.', E_USER_DEPRECATED); - return $this->entry; - } - - /** - * Resource name of the entry. - * - * Generated from protobuf field string entry = 1 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setEntry($var) - { - @trigger_error('entry is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->entry = $var; - - return $this; - } - - /** - * Display name. - * - * Generated from protobuf field string display_name = 2 [deprecated = true]; - * @return string - * @deprecated - */ - public function getDisplayName() - { - @trigger_error('display_name is deprecated.', E_USER_DEPRECATED); - return $this->display_name; - } - - /** - * Display name. - * - * Generated from protobuf field string display_name = 2 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setDisplayName($var) - { - @trigger_error('display_name is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The entry type. - * - * Generated from protobuf field string entry_type = 3 [deprecated = true]; - * @return string - * @deprecated - */ - public function getEntryType() - { - @trigger_error('entry_type is deprecated.', E_USER_DEPRECATED); - return $this->entry_type; - } - - /** - * The entry type. - * - * Generated from protobuf field string entry_type = 3 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setEntryType($var) - { - @trigger_error('entry_type is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->entry_type = $var; - - return $this; - } - - /** - * The last modification timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp modify_time = 4 [deprecated = true]; - * @return \Google\Protobuf\Timestamp|null - * @deprecated - */ - public function getModifyTime() - { - @trigger_error('modify_time is deprecated.', E_USER_DEPRECATED); - return $this->modify_time; - } - - public function hasModifyTime() - { - @trigger_error('modify_time is deprecated.', E_USER_DEPRECATED); - return isset($this->modify_time); - } - - public function clearModifyTime() - { - @trigger_error('modify_time is deprecated.', E_USER_DEPRECATED); - unset($this->modify_time); - } - - /** - * The last modification timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp modify_time = 4 [deprecated = true]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - * @deprecated - */ - public function setModifyTime($var) - { - @trigger_error('modify_time is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->modify_time = $var; - - return $this; - } - - /** - * Fully qualified name. - * - * Generated from protobuf field string fully_qualified_name = 5 [deprecated = true]; - * @return string - * @deprecated - */ - public function getFullyQualifiedName() - { - @trigger_error('fully_qualified_name is deprecated.', E_USER_DEPRECATED); - return $this->fully_qualified_name; - } - - /** - * Fully qualified name. - * - * Generated from protobuf field string fully_qualified_name = 5 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setFullyQualifiedName($var) - { - @trigger_error('fully_qualified_name is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->fully_qualified_name = $var; - - return $this; - } - - /** - * Entry description. - * - * Generated from protobuf field string description = 6 [deprecated = true]; - * @return string - * @deprecated - */ - public function getDescription() - { - @trigger_error('description is deprecated.', E_USER_DEPRECATED); - return $this->description; - } - - /** - * Entry description. - * - * Generated from protobuf field string description = 6 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setDescription($var) - { - @trigger_error('description is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Relative resource name. - * - * Generated from protobuf field string relative_resource = 7 [deprecated = true]; - * @return string - * @deprecated - */ - public function getRelativeResource() - { - @trigger_error('relative_resource is deprecated.', E_USER_DEPRECATED); - return $this->relative_resource; - } - - /** - * Relative resource name. - * - * Generated from protobuf field string relative_resource = 7 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setRelativeResource($var) - { - @trigger_error('relative_resource is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->relative_resource = $var; - - return $this; - } - /** * Linked resource name. * From e71ee2264e02cb98ecd0d10d1aa58b691bd15c81 Mon Sep 17 00:00:00 2001 From: Saransh Dhingra Date: Fri, 3 May 2024 22:34:46 +0530 Subject: [PATCH 84/86] fix(Spanner): Cast fields in the ResultStats object back to int (#7284) --- Spanner/src/Connection/Grpc.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Spanner/src/Connection/Grpc.php b/Spanner/src/Connection/Grpc.php index a3563b882e3a..6de555384baf 100644 --- a/Spanner/src/Connection/Grpc.php +++ b/Spanner/src/Connection/Grpc.php @@ -253,6 +253,14 @@ public function __construct(array $config = []) $fields = $msg->getMetadata()?->getRowType()?->getFields(); $data['metadata']['rowType']['fields'] = $this->getFieldDataFromRepeatedFields($fields); + // These fields in stats should be an int + if (isset($data['stats']['rowCountLowerBound'])) { + $data['stats']['rowCountLowerBound'] = (int) $data['stats']['rowCountLowerBound']; + } + if (isset($data['stats']['rowCountExact'])) { + $data['stats']['rowCountExact'] = (int) $data['stats']['rowCountExact']; + } + return $data; } ]); From 602ca9fe017fdde5c9e70fc8ac4694967dc0124c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Sat, 4 May 2024 00:02:44 +0530 Subject: [PATCH 85/86] chore(main): release 0.244.0 (#7265) --- AccessApproval/VERSION | 2 +- AccessContextManager/VERSION | 2 +- AdvisoryNotifications/VERSION | 2 +- AiPlatform/VERSION | 2 +- AlloyDb/VERSION | 2 +- AnalyticsAdmin/VERSION | 2 +- AnalyticsData/VERSION | 2 +- ApiGateway/VERSION | 2 +- ApiKeys/VERSION | 2 +- ApigeeConnect/VERSION | 2 +- ApigeeRegistry/VERSION | 2 +- AppEngineAdmin/VERSION | 2 +- AppHub/VERSION | 2 +- AppsChat/VERSION | 2 +- AppsEventsSubscriptions/VERSION | 2 +- AppsMeet/VERSION | 2 +- ArtifactRegistry/VERSION | 2 +- Asset/VERSION | 2 +- AssuredWorkloads/VERSION | 2 +- AutoMl/VERSION | 2 +- BareMetalSolution/VERSION | 2 +- Batch/VERSION | 2 +- BeyondCorpAppConnections/VERSION | 2 +- BeyondCorpAppConnectors/VERSION | 2 +- BeyondCorpAppGateways/VERSION | 2 +- BeyondCorpClientConnectorServices/VERSION | 2 +- BeyondCorpClientGateways/VERSION | 2 +- BigQuery/VERSION | 2 +- BigQuery/src/BigQueryClient.php | 2 +- BigQueryAnalyticsHub/VERSION | 2 +- BigQueryConnection/VERSION | 2 +- BigQueryDataExchange/VERSION | 2 +- BigQueryDataPolicies/VERSION | 2 +- BigQueryDataTransfer/VERSION | 2 +- BigQueryMigration/VERSION | 2 +- BigQueryReservation/VERSION | 2 +- BigQueryStorage/VERSION | 2 +- Bigtable/VERSION | 2 +- Bigtable/src/BigtableClient.php | 2 +- Billing/VERSION | 2 +- BillingBudgets/VERSION | 2 +- BinaryAuthorization/VERSION | 2 +- Build/VERSION | 2 +- CHANGELOG.md | 1179 +++++++++++++++++++++ CertificateManager/VERSION | 2 +- Channel/VERSION | 2 +- CommerceConsumerProcurement/VERSION | 2 +- CommonProtos/VERSION | 2 +- Compute/VERSION | 2 +- ConfidentialComputing/VERSION | 2 +- Config/VERSION | 2 +- ContactCenterInsights/VERSION | 2 +- Container/VERSION | 2 +- ContainerAnalysis/VERSION | 2 +- ControlsPartner/VERSION | 2 +- Core/VERSION | 2 +- DataCatalog/VERSION | 2 +- DataCatalogLineage/VERSION | 2 +- DataFusion/VERSION | 2 +- DataLabeling/VERSION | 2 +- Dataflow/VERSION | 2 +- Dataform/VERSION | 2 +- Dataplex/VERSION | 2 +- Dataproc/VERSION | 2 +- DataprocMetastore/VERSION | 2 +- Datastore/VERSION | 2 +- Datastore/src/DatastoreClient.php | 2 +- DatastoreAdmin/VERSION | 2 +- Datastream/VERSION | 2 +- Debugger/VERSION | 2 +- Debugger/src/DebuggerClient.php | 2 +- Deploy/VERSION | 2 +- Dialogflow/VERSION | 2 +- DialogflowCx/VERSION | 2 +- DiscoveryEngine/VERSION | 2 +- Dlp/VERSION | 2 +- Dms/VERSION | 2 +- DocumentAi/VERSION | 2 +- Domains/VERSION | 2 +- EdgeNetwork/VERSION | 2 +- ErrorReporting/VERSION | 2 +- EssentialContacts/VERSION | 2 +- Eventarc/VERSION | 2 +- EventarcPublishing/VERSION | 2 +- Filestore/VERSION | 2 +- Firestore/VERSION | 2 +- Firestore/src/FirestoreClient.php | 2 +- Functions/VERSION | 2 +- GSuiteAddOns/VERSION | 2 +- Gaming/VERSION | 2 +- GkeBackup/VERSION | 2 +- GkeConnectGateway/VERSION | 2 +- GkeHub/VERSION | 2 +- GkeMultiCloud/VERSION | 2 +- Grafeas/VERSION | 2 +- Iam/VERSION | 2 +- IamCredentials/VERSION | 2 +- Iap/VERSION | 2 +- Ids/VERSION | 2 +- Iot/VERSION | 2 +- Kms/VERSION | 2 +- KmsInventory/VERSION | 2 +- Language/VERSION | 2 +- Language/src/LanguageClient.php | 2 +- LifeSciences/VERSION | 2 +- Logging/VERSION | 2 +- Logging/src/LoggingClient.php | 2 +- LongRunning/VERSION | 2 +- LongRunning/composer.json | 2 +- ManagedIdentities/VERSION | 2 +- MediaTranslation/VERSION | 2 +- Memcache/VERSION | 2 +- MigrationCenter/VERSION | 2 +- Monitoring/VERSION | 2 +- NetApp/VERSION | 2 +- NetworkConnectivity/VERSION | 2 +- NetworkManagement/VERSION | 2 +- NetworkSecurity/VERSION | 2 +- Notebooks/VERSION | 2 +- Optimization/VERSION | 2 +- OrchestrationAirflow/VERSION | 2 +- OrgPolicy/VERSION | 2 +- OsConfig/VERSION | 2 +- OsLogin/VERSION | 2 +- Parallelstore/VERSION | 2 +- PolicySimulator/VERSION | 2 +- PolicyTroubleshooter/VERSION | 2 +- PolicyTroubleshooterIam/VERSION | 2 +- PrivateCatalog/VERSION | 2 +- Profiler/VERSION | 2 +- PubSub/VERSION | 2 +- Quotas/VERSION | 2 +- RapidMigrationAssessment/VERSION | 2 +- RecaptchaEnterprise/VERSION | 2 +- RecommendationEngine/VERSION | 2 +- Recommender/VERSION | 2 +- Redis/VERSION | 2 +- RedisCluster/VERSION | 2 +- ResourceManager/VERSION | 2 +- ResourceSettings/VERSION | 2 +- Retail/VERSION | 2 +- Run/VERSION | 2 +- Scheduler/VERSION | 2 +- SecretManager/VERSION | 2 +- SecureSourceManager/VERSION | 2 +- SecurityCenter/VERSION | 2 +- SecurityCenterManagement/VERSION | 2 +- SecurityPrivateCa/VERSION | 2 +- SecurityPublicCA/VERSION | 2 +- ServiceControl/VERSION | 2 +- ServiceDirectory/VERSION | 2 +- ServiceHealth/VERSION | 2 +- ServiceManagement/VERSION | 2 +- ServiceUsage/VERSION | 2 +- Shell/VERSION | 2 +- ShoppingCommonProtos/VERSION | 2 +- ShoppingCss/VERSION | 2 +- ShoppingMerchantConversions/VERSION | 2 +- ShoppingMerchantInventories/VERSION | 2 +- ShoppingMerchantQuota/VERSION | 2 +- ShoppingMerchantReports/VERSION | 2 +- Spanner/VERSION | 2 +- Spanner/src/SpannerClient.php | 2 +- Speech/VERSION | 2 +- Speech/src/SpeechClient.php | 2 +- SqlAdmin/VERSION | 2 +- Storage/VERSION | 2 +- Storage/src/StorageClient.php | 2 +- StorageControl/VERSION | 2 +- StorageInsights/VERSION | 2 +- StorageTransfer/VERSION | 2 +- Support/VERSION | 2 +- Talent/VERSION | 2 +- Tasks/VERSION | 2 +- TelcoAutomation/VERSION | 2 +- TextToSpeech/VERSION | 2 +- Tpu/VERSION | 2 +- Trace/VERSION | 2 +- Trace/src/TraceClient.php | 2 +- Translate/VERSION | 2 +- VideoIntelligence/VERSION | 2 +- VideoLiveStream/VERSION | 2 +- VideoStitcher/VERSION | 2 +- VideoTranscoder/VERSION | 2 +- Vision/VERSION | 2 +- Vision/src/VisionClient.php | 2 +- VmMigration/VERSION | 2 +- VmwareEngine/VERSION | 2 +- VpcAccess/VERSION | 2 +- WebRisk/VERSION | 2 +- WebSecurityScanner/VERSION | 2 +- Workflows/VERSION | 2 +- composer.json | 356 +++---- 193 files changed, 1548 insertions(+), 369 deletions(-) diff --git a/AccessApproval/VERSION b/AccessApproval/VERSION index 0495c4a88cae..e8ea05db8142 100644 --- a/AccessApproval/VERSION +++ b/AccessApproval/VERSION @@ -1 +1 @@ -1.2.3 +1.2.4 diff --git a/AccessContextManager/VERSION b/AccessContextManager/VERSION index be14282b7fff..7d8568351b4f 100644 --- a/AccessContextManager/VERSION +++ b/AccessContextManager/VERSION @@ -1 +1 @@ -0.5.3 +0.5.4 diff --git a/AdvisoryNotifications/VERSION b/AdvisoryNotifications/VERSION index 6f4eebdf6f68..100435be135a 100644 --- a/AdvisoryNotifications/VERSION +++ b/AdvisoryNotifications/VERSION @@ -1 +1 @@ -0.8.1 +0.8.2 diff --git a/AiPlatform/VERSION b/AiPlatform/VERSION index 9b1bb8512396..ca75280b09b2 100644 --- a/AiPlatform/VERSION +++ b/AiPlatform/VERSION @@ -1 +1 @@ -0.37.1 +0.38.0 diff --git a/AlloyDb/VERSION b/AlloyDb/VERSION index 571215736a66..5eef0f10e8cd 100644 --- a/AlloyDb/VERSION +++ b/AlloyDb/VERSION @@ -1 +1 @@ -0.10.1 +0.10.2 diff --git a/AnalyticsAdmin/VERSION b/AnalyticsAdmin/VERSION index d90746a79af3..4240544f330c 100644 --- a/AnalyticsAdmin/VERSION +++ b/AnalyticsAdmin/VERSION @@ -1 +1 @@ -0.22.3 +0.22.4 diff --git a/AnalyticsData/VERSION b/AnalyticsData/VERSION index 7eb3095a3295..5f2491c5adca 100644 --- a/AnalyticsData/VERSION +++ b/AnalyticsData/VERSION @@ -1 +1 @@ -0.16.3 +0.16.4 diff --git a/ApiGateway/VERSION b/ApiGateway/VERSION index 31e5c843497c..d0149fef743a 100644 --- a/ApiGateway/VERSION +++ b/ApiGateway/VERSION @@ -1 +1 @@ -1.3.3 +1.3.4 diff --git a/ApiKeys/VERSION b/ApiKeys/VERSION index 17b2ccd9bf90..6f2743d65dc0 100644 --- a/ApiKeys/VERSION +++ b/ApiKeys/VERSION @@ -1 +1 @@ -0.4.3 +0.4.4 diff --git a/ApigeeConnect/VERSION b/ApigeeConnect/VERSION index 0495c4a88cae..e8ea05db8142 100644 --- a/ApigeeConnect/VERSION +++ b/ApigeeConnect/VERSION @@ -1 +1 @@ -1.2.3 +1.2.4 diff --git a/ApigeeRegistry/VERSION b/ApigeeRegistry/VERSION index be14282b7fff..7d8568351b4f 100644 --- a/ApigeeRegistry/VERSION +++ b/ApigeeRegistry/VERSION @@ -1 +1 @@ -0.5.3 +0.5.4 diff --git a/AppEngineAdmin/VERSION b/AppEngineAdmin/VERSION index 31e5c843497c..d0149fef743a 100644 --- a/AppEngineAdmin/VERSION +++ b/AppEngineAdmin/VERSION @@ -1 +1 @@ -1.3.3 +1.3.4 diff --git a/AppHub/VERSION b/AppHub/VERSION index 17e51c385ea3..d917d3e26adc 100644 --- a/AppHub/VERSION +++ b/AppHub/VERSION @@ -1 +1 @@ -0.1.1 +0.1.2 diff --git a/AppsChat/VERSION b/AppsChat/VERSION index 6e8bf73aa550..17e51c385ea3 100644 --- a/AppsChat/VERSION +++ b/AppsChat/VERSION @@ -1 +1 @@ -0.1.0 +0.1.1 diff --git a/AppsEventsSubscriptions/VERSION b/AppsEventsSubscriptions/VERSION index 17e51c385ea3..d917d3e26adc 100644 --- a/AppsEventsSubscriptions/VERSION +++ b/AppsEventsSubscriptions/VERSION @@ -1 +1 @@ -0.1.1 +0.1.2 diff --git a/AppsMeet/VERSION b/AppsMeet/VERSION index 0c62199f16ac..ee1372d33a29 100644 --- a/AppsMeet/VERSION +++ b/AppsMeet/VERSION @@ -1 +1 @@ -0.2.1 +0.2.2 diff --git a/ArtifactRegistry/VERSION b/ArtifactRegistry/VERSION index 844f6a91acb9..d2b13eb644d6 100644 --- a/ArtifactRegistry/VERSION +++ b/ArtifactRegistry/VERSION @@ -1 +1 @@ -0.6.3 +0.6.4 diff --git a/Asset/VERSION b/Asset/VERSION index 41c11ffb730c..4a02d2c3170b 100644 --- a/Asset/VERSION +++ b/Asset/VERSION @@ -1 +1 @@ -1.16.1 +1.16.2 diff --git a/AssuredWorkloads/VERSION b/AssuredWorkloads/VERSION index 1a96df19c09a..35ad34429bef 100644 --- a/AssuredWorkloads/VERSION +++ b/AssuredWorkloads/VERSION @@ -1 +1 @@ -0.11.3 +0.11.4 diff --git a/AutoMl/VERSION b/AutoMl/VERSION index 266146b87cbc..9edc58bb1dd8 100644 --- a/AutoMl/VERSION +++ b/AutoMl/VERSION @@ -1 +1 @@ -1.6.3 +1.6.4 diff --git a/BareMetalSolution/VERSION b/BareMetalSolution/VERSION index 844f6a91acb9..d2b13eb644d6 100644 --- a/BareMetalSolution/VERSION +++ b/BareMetalSolution/VERSION @@ -1 +1 @@ -0.6.3 +0.6.4 diff --git a/Batch/VERSION b/Batch/VERSION index c3f65805f7b7..427cda05dcde 100644 --- a/Batch/VERSION +++ b/Batch/VERSION @@ -1 +1 @@ -0.16.6 +0.16.7 diff --git a/BeyondCorpAppConnections/VERSION b/BeyondCorpAppConnections/VERSION index 17b2ccd9bf90..6f2743d65dc0 100644 --- a/BeyondCorpAppConnections/VERSION +++ b/BeyondCorpAppConnections/VERSION @@ -1 +1 @@ -0.4.3 +0.4.4 diff --git a/BeyondCorpAppConnectors/VERSION b/BeyondCorpAppConnectors/VERSION index 17b2ccd9bf90..6f2743d65dc0 100644 --- a/BeyondCorpAppConnectors/VERSION +++ b/BeyondCorpAppConnectors/VERSION @@ -1 +1 @@ -0.4.3 +0.4.4 diff --git a/BeyondCorpAppGateways/VERSION b/BeyondCorpAppGateways/VERSION index 17b2ccd9bf90..6f2743d65dc0 100644 --- a/BeyondCorpAppGateways/VERSION +++ b/BeyondCorpAppGateways/VERSION @@ -1 +1 @@ -0.4.3 +0.4.4 diff --git a/BeyondCorpClientConnectorServices/VERSION b/BeyondCorpClientConnectorServices/VERSION index 17b2ccd9bf90..6f2743d65dc0 100644 --- a/BeyondCorpClientConnectorServices/VERSION +++ b/BeyondCorpClientConnectorServices/VERSION @@ -1 +1 @@ -0.4.3 +0.4.4 diff --git a/BeyondCorpClientGateways/VERSION b/BeyondCorpClientGateways/VERSION index 17b2ccd9bf90..6f2743d65dc0 100644 --- a/BeyondCorpClientGateways/VERSION +++ b/BeyondCorpClientGateways/VERSION @@ -1 +1 @@ -0.4.3 +0.4.4 diff --git a/BigQuery/VERSION b/BigQuery/VERSION index 7f3c3affd72c..d1eaa3ba0b8c 100644 --- a/BigQuery/VERSION +++ b/BigQuery/VERSION @@ -1 +1 @@ -1.30.1 +1.30.2 diff --git a/BigQuery/src/BigQueryClient.php b/BigQuery/src/BigQueryClient.php index db8e78c2d633..2e7fcbe15c6f 100644 --- a/BigQuery/src/BigQueryClient.php +++ b/BigQuery/src/BigQueryClient.php @@ -50,7 +50,7 @@ class BigQueryClient ClientTrait::jsonDecode insteadof RetryDeciderTrait; } - const VERSION = '1.30.1'; + const VERSION = '1.30.2'; const MAX_DELAY_MICROSECONDS = 32000000; diff --git a/BigQueryAnalyticsHub/VERSION b/BigQueryAnalyticsHub/VERSION index 4b9fcbec101a..cb0c939a936f 100644 --- a/BigQueryAnalyticsHub/VERSION +++ b/BigQueryAnalyticsHub/VERSION @@ -1 +1 @@ -0.5.1 +0.5.2 diff --git a/BigQueryConnection/VERSION b/BigQueryConnection/VERSION index 8af85beb5159..94fe62c2740f 100644 --- a/BigQueryConnection/VERSION +++ b/BigQueryConnection/VERSION @@ -1 +1 @@ -1.5.3 +1.5.4 diff --git a/BigQueryDataExchange/VERSION b/BigQueryDataExchange/VERSION index 17b2ccd9bf90..6f2743d65dc0 100644 --- a/BigQueryDataExchange/VERSION +++ b/BigQueryDataExchange/VERSION @@ -1 +1 @@ -0.4.3 +0.4.4 diff --git a/BigQueryDataPolicies/VERSION b/BigQueryDataPolicies/VERSION index be14282b7fff..7d8568351b4f 100644 --- a/BigQueryDataPolicies/VERSION +++ b/BigQueryDataPolicies/VERSION @@ -1 +1 @@ -0.5.3 +0.5.4 diff --git a/BigQueryDataTransfer/VERSION b/BigQueryDataTransfer/VERSION index a7ee35a3ea70..bfa363e76ed7 100644 --- a/BigQueryDataTransfer/VERSION +++ b/BigQueryDataTransfer/VERSION @@ -1 +1 @@ -1.8.3 +1.8.4 diff --git a/BigQueryMigration/VERSION b/BigQueryMigration/VERSION index 17b2ccd9bf90..6f2743d65dc0 100644 --- a/BigQueryMigration/VERSION +++ b/BigQueryMigration/VERSION @@ -1 +1 @@ -0.4.3 +0.4.4 diff --git a/BigQueryReservation/VERSION b/BigQueryReservation/VERSION index 31e5c843497c..d0149fef743a 100644 --- a/BigQueryReservation/VERSION +++ b/BigQueryReservation/VERSION @@ -1 +1 @@ -1.3.3 +1.3.4 diff --git a/BigQueryStorage/VERSION b/BigQueryStorage/VERSION index 5ad2491cf880..587c5f0c7309 100644 --- a/BigQueryStorage/VERSION +++ b/BigQueryStorage/VERSION @@ -1 +1 @@ -1.10.2 +1.10.3 diff --git a/Bigtable/VERSION b/Bigtable/VERSION index 34aae156b192..6bae540243f6 100644 --- a/Bigtable/VERSION +++ b/Bigtable/VERSION @@ -1 +1 @@ -1.31.0 +1.31.1 diff --git a/Bigtable/src/BigtableClient.php b/Bigtable/src/BigtableClient.php index 306fb40bcfee..2ca952e47c8b 100644 --- a/Bigtable/src/BigtableClient.php +++ b/Bigtable/src/BigtableClient.php @@ -40,7 +40,7 @@ class BigtableClient { use ArrayTrait; - const VERSION = '1.31.0'; + const VERSION = '1.31.1'; /** * @var GapicClient diff --git a/Billing/VERSION b/Billing/VERSION index 158c74729336..7bc1c40470fd 100644 --- a/Billing/VERSION +++ b/Billing/VERSION @@ -1 +1 @@ -1.9.5 +1.9.6 diff --git a/BillingBudgets/VERSION b/BillingBudgets/VERSION index 428b770e3e23..1c99cf0e8093 100644 --- a/BillingBudgets/VERSION +++ b/BillingBudgets/VERSION @@ -1 +1 @@ -1.4.3 +1.4.4 diff --git a/BinaryAuthorization/VERSION b/BinaryAuthorization/VERSION index 7ada0d303f3e..7fc2521fd745 100644 --- a/BinaryAuthorization/VERSION +++ b/BinaryAuthorization/VERSION @@ -1 +1 @@ -0.8.5 +0.8.6 diff --git a/Build/VERSION b/Build/VERSION index 2a0970ca757c..201a22c8fa5c 100644 --- a/Build/VERSION +++ b/Build/VERSION @@ -1 +1 @@ -0.16.1 +0.16.2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 751aceb2c074..9f400ad821ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,1184 @@ # Changelog +## 0.244.0 + +
google/cloud-access-approval 1.2.4 + + + +
+ +
google/access-context-manager 0.5.4 + + + +
+ +
google/cloud-advisorynotifications 0.8.2 + + + +
+ +
google/cloud-ai-platform 0.38.0 + + + +### Features + +* A new field `deploy_task_name` is added to message `.google.cloud.aiplatform.v1.PublisherModel` ([63ace28](https://github.com/googleapis/google-cloud-php/commit/63ace28b2b1e86203c6ca376c0467ffa5ac975cd)) +* A new field `private_service_connect_config` is added to message `.google.cloud.aiplatform.v1.Endpoint` ([63ace28](https://github.com/googleapis/google-cloud-php/commit/63ace28b2b1e86203c6ca376c0467ffa5ac975cd)) +* A new field `search_entry_point` is added to message `.google.cloud.aiplatform.v1.GroundingMetadata` ([63ace28](https://github.com/googleapis/google-cloud-php/commit/63ace28b2b1e86203c6ca376c0467ffa5ac975cd)) +* A new message `SearchEntryPoint` is added ([63ace28](https://github.com/googleapis/google-cloud-php/commit/63ace28b2b1e86203c6ca376c0467ffa5ac975cd)) +* A new value `INVALID_TOKEN_VALUE` is added to enum `RecordErrorType` ([63ace28](https://github.com/googleapis/google-cloud-php/commit/63ace28b2b1e86203c6ca376c0467ffa5ac975cd)) +* A new value `TPU_V5_LITEPOD` is added to enum `AcceleratorType` ([#7275](https://github.com/googleapis/google-cloud-php/issues/7275)) ([63ace28](https://github.com/googleapis/google-cloud-php/commit/63ace28b2b1e86203c6ca376c0467ffa5ac975cd)) + + +### Documentation + +* A comment for field `base_model` in message `.google.cloud.aiplatform.v1.TuningJob` is changed ([63ace28](https://github.com/googleapis/google-cloud-php/commit/63ace28b2b1e86203c6ca376c0467ffa5ac975cd)) +* A comment for field `epoch_count` in message `.google.cloud.aiplatform.v1.SupervisedHyperParameters` is changed ([63ace28](https://github.com/googleapis/google-cloud-php/commit/63ace28b2b1e86203c6ca376c0467ffa5ac975cd)) +* A comment for field `learning_rate_multiplier` in message `.google.cloud.aiplatform.v1.SupervisedHyperParameters` is changed ([63ace28](https://github.com/googleapis/google-cloud-php/commit/63ace28b2b1e86203c6ca376c0467ffa5ac975cd)) +* A comment for field `name` in message `.google.cloud.aiplatform.v1.NotebookRuntimeTemplate` is changed ([63ace28](https://github.com/googleapis/google-cloud-php/commit/63ace28b2b1e86203c6ca376c0467ffa5ac975cd)) +* A comment for field `parent` in message `.google.cloud.aiplatform.v1.CreateFeatureGroupRequest` is changed ([63ace28](https://github.com/googleapis/google-cloud-php/commit/63ace28b2b1e86203c6ca376c0467ffa5ac975cd)) +* A comment for field `training_dataset_uri` in message `.google.cloud.aiplatform.v1.SupervisedTuningSpec` is changed ([63ace28](https://github.com/googleapis/google-cloud-php/commit/63ace28b2b1e86203c6ca376c0467ffa5ac975cd)) +* A comment for field `tuned_model_display_name` in message `.google.cloud.aiplatform.v1.TuningJob` is changed ([63ace28](https://github.com/googleapis/google-cloud-php/commit/63ace28b2b1e86203c6ca376c0467ffa5ac975cd)) +* A comment for field `validation_dataset_uri` in message `.google.cloud.aiplatform.v1.SupervisedTuningSpec` is changed ([63ace28](https://github.com/googleapis/google-cloud-php/commit/63ace28b2b1e86203c6ca376c0467ffa5ac975cd)) + +
+ +
google/cloud-alloydb 0.10.2 + + + +
+ +
google/analytics-admin 0.22.4 + + + +
+ +
google/analytics-data 0.16.4 + + + +
+ +
google/cloud-api-gateway 1.3.4 + + + +
+ +
google/cloud-api-keys 0.4.4 + + + +
+ +
google/cloud-apigee-connect 1.2.4 + + + +
+ +
google/cloud-apigee-registry 0.5.4 + + + +
+ +
google/cloud-appengine-admin 1.3.4 + + + +
+ +
google/cloud-apphub 0.1.2 + + + +
+ +
google/apps-chat 0.1.1 + + + +
+ +
google/apps-events-subscriptions 0.1.2 + + + +
+ +
google/apps-meet 0.2.2 + + + +
+ +
google/cloud-artifact-registry 0.6.4 + + + +
+ +
google/cloud-asset 1.16.2 + + + +
+ +
google/cloud-assured-workloads 0.11.4 + + + +
+ +
google/cloud-automl 1.6.4 + + + +
+ +
google/cloud-bare-metal-solution 0.6.4 + + + +
+ +
google/cloud-batch 0.16.7 + + + +### Documentation + +* Update description on allowed_locations in LocationPolicy field ([#7270](https://github.com/googleapis/google-cloud-php/issues/7270)) ([f7c3fd6](https://github.com/googleapis/google-cloud-php/commit/f7c3fd6dac581b5a91f54d2e66fcbc5c8bef5812)) + +
+ +
google/cloud-beyondcorp-appconnections 0.4.4 + + + +
+ +
google/cloud-beyondcorp-appconnectors 0.4.4 + + + +
+ +
google/cloud-beyondcorp-appgateways 0.4.4 + + + +
+ +
google/cloud-beyondcorp-clientconnectorservices 0.4.4 + + + +
+ +
google/cloud-beyondcorp-clientgateways 0.4.4 + + + +
+ +
google/cloud-bigquery 1.30.2 + + + +
+ +
google/cloud-bigquery-analyticshub 0.5.2 + + + +
+ +
google/cloud-bigquery-connection 1.5.4 + + + +
+ +
google/cloud-bigquery-data-exchange 0.4.4 + + + +
+ +
google/cloud-bigquery-datapolicies 0.5.4 + + + +
+ +
google/cloud-bigquerydatatransfer 1.8.4 + + + +
+ +
google/cloud-bigquery-migration 0.4.4 + + + +
+ +
google/cloud-bigquery-reservation 1.3.4 + + + +
+ +
google/cloud-bigquery-storage 1.10.3 + + + +
+ +
google/cloud-bigtable 1.31.1 + + + +
+ +
google/cloud-billing 1.9.6 + + + +
+ +
google/cloud-billing-budgets 1.4.4 + + + +
+ +
google/cloud-binary-authorization 0.8.6 + + + +
+ +
google/cloud-build 0.16.2 + + + +
+ +
google/cloud-certificate-manager 0.7.2 + + + +
+ +
google/cloud-channel 1.9.4 + + + +
+ +
google/cloud-commerce-consumer-procurement 0.2.4 + + + +
+ +
google/cloud-common-protos 0.5.2 + + + +
+ +
google/cloud-compute 1.17.0 + + + +### Features + +* Update Compute Engine API to revision 20240421 ([#899](https://github.com/googleapis/google-cloud-php/issues/899)) ([#7268](https://github.com/googleapis/google-cloud-php/issues/7268)) ([1841c79](https://github.com/googleapis/google-cloud-php/commit/1841c79f63399cc8270b8c77f65a36d754801db1)) + +
+ +
google/cloud-confidentialcomputing 0.8.2 + + + +
+ +
google/cloud-config 0.5.1 + + + +
+ +
google/cloud-contact-center-insights 1.9.4 + + + +
+ +
google/cloud-container 1.30.2 + + + +
+ +
google/cloud-container-analysis 0.5.6 + + + +
+ +
google/cloud-cloudcontrolspartner 0.1.2 + + + +
+ +
google/cloud-core 1.58.1 + + + +
+ +
google/cloud-data-catalog 1.10.2 + + + +
+ +
google/cloud-datacatalog-lineage 0.5.4 + + + +
+ +
google/cloud-data-fusion 0.6.4 + + + +
+ +
google/cloud-datalabeling 0.5.4 + + + +
+ +
google/cloud-dataflow 0.6.3 + + + +
+ +
google/cloud-dataform 0.4.4 + + + +
+ +
google/cloud-dataplex 0.16.0 + + + +### âš  BREAKING CHANGES + +* An existing field `entry` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` +* An existing field `display_name` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` +* An existing field `entry_type` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` +* An existing field `modify_time` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` +* An existing field `fully_qualified_name` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` +* An existing field `description` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` +* An existing field `relative_resource` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` + +### Features + +* Updated client libraries for Dataplex Catalog: removed deprecated fields, updated comments ([#7282](https://github.com/googleapis/google-cloud-php/issues/7282)) ([9bd3610](https://github.com/googleapis/google-cloud-php/commit/9bd36100a76d7d3f0d187e14ad4b2ccc25d3b459)) + + +### Bug Fixes + +* An existing field `description` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` ([9bd3610](https://github.com/googleapis/google-cloud-php/commit/9bd36100a76d7d3f0d187e14ad4b2ccc25d3b459)) +* An existing field `display_name` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` ([9bd3610](https://github.com/googleapis/google-cloud-php/commit/9bd36100a76d7d3f0d187e14ad4b2ccc25d3b459)) +* An existing field `entry_type` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` ([9bd3610](https://github.com/googleapis/google-cloud-php/commit/9bd36100a76d7d3f0d187e14ad4b2ccc25d3b459)) +* An existing field `entry` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` ([9bd3610](https://github.com/googleapis/google-cloud-php/commit/9bd36100a76d7d3f0d187e14ad4b2ccc25d3b459)) +* An existing field `fully_qualified_name` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` ([9bd3610](https://github.com/googleapis/google-cloud-php/commit/9bd36100a76d7d3f0d187e14ad4b2ccc25d3b459)) +* An existing field `modify_time` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` ([9bd3610](https://github.com/googleapis/google-cloud-php/commit/9bd36100a76d7d3f0d187e14ad4b2ccc25d3b459)) +* An existing field `relative_resource` is removed from message `.google.cloud.dataplex.v1.SearchEntriesResult` ([9bd3610](https://github.com/googleapis/google-cloud-php/commit/9bd36100a76d7d3f0d187e14ad4b2ccc25d3b459)) + + +### Documentation + +* A comment for field `aspects` in message `.google.cloud.dataplex.v1.Entry` is changed ([9bd3610](https://github.com/googleapis/google-cloud-php/commit/9bd36100a76d7d3f0d187e14ad4b2ccc25d3b459)) +* A comment for field `filter` in message `.google.cloud.dataplex.v1.ListEntriesRequest` is changed ([9bd3610](https://github.com/googleapis/google-cloud-php/commit/9bd36100a76d7d3f0d187e14ad4b2ccc25d3b459)) + +
+ +
google/cloud-dataproc 3.13.3 + + + +
+ +
google/cloud-dataproc-metastore 0.11.4 + + + +
+ +
google/cloud-datastore 1.28.2 + + + +
+ +
google/cloud-datastore-admin 0.8.4 + + + +
+ +
google/cloud-datastream 1.5.4 + + + +
+ +
google/cloud-debugger 1.8.6 + + + +
+ +
google/cloud-deploy 0.18.1 + + + +### Documentation + +* Small corrections to Cloud Deploy API documentation ([#7278](https://github.com/googleapis/google-cloud-php/issues/7278)) ([1c9455b](https://github.com/googleapis/google-cloud-php/commit/1c9455b413e25660122fceab2da35d3bf9b50483)) + +
+ +
google/cloud-dialogflow 1.12.2 + + + +
+ +
google/cloud-dialogflow-cx 0.3.3 + + + +
+ +
google/cloud-discoveryengine 0.11.2 + + + +
+ +
google/cloud-dlp 1.13.2 + + + +
+ +
google/cloud-dms 1.5.4 + + + +
+ +
google/cloud-document-ai 1.12.1 + + + +
+ +
google/cloud-domains 0.5.4 + + + +
+ +
google/cloud-edgenetwork 0.3.5 + + + +
+ +
google/cloud-error-reporting 0.22.5 + + + +
+ +
google/cloud-essential-contacts 0.4.4 + + + +
+ +
google/cloud-eventarc 1.3.4 + + + +
+ +
google/cloud-eventarc-publishing 0.6.3 + + + +
+ +
google/cloud-filestore 1.5.6 + + + +
+ +
google/cloud-firestore 1.43.2 + + + +
+ +
google/cloud-functions 1.6.4 + + + +
+ +
google/cloud-gsuite-addons 0.3.4 + + + +
+ +
google/cloud-game-servers 1.2.5 + + + +
+ +
google/cloud-gke-backup 0.7.2 + + + +
+ +
google/cloud-gke-connect-gateway 0.4.3 + + + +
+ +
google/cloud-gke-hub 0.9.4 + + + +
+ +
google/cloud-gke-multi-cloud 0.5.4 + + + +
+ +
google/grafeas 0.10.2 + + + +
+ +
google/cloud-iam 0.5.4 + + + +
+ +
google/cloud-iam-credentials 1.2.4 + + + +
+ +
google/cloud-iap 1.4.4 + + + +
+ +
google/cloud-ids 0.5.4 + + + +
+ +
google/cloud-iot 1.7.4 + + + +
+ +
google/cloud-kms 1.21.4 + + + +
+ +
google/cloud-kms-inventory 0.4.4 + + + +
+ +
google/cloud-language 0.32.5 + + + +
+ +
google/cloud-life-sciences 0.6.4 + + + +
+ +
google/cloud-logging 1.30.1 + + + +
+ +
google/longrunning 0.4.2 + + + +
+ +
google/cloud-managed-identities 1.3.4 + + + +
+ +
google/cloud-media-translation 0.4.3 + + + +
+ +
google/cloud-memcache 1.3.4 + + + +
+ +
google/cloud-migrationcenter 0.4.4 + + + +
+ +
google/cloud-monitoring 1.10.2 + + + +
+ +
google/cloud-netapp 0.2.6 + + + +
+ +
google/cloud-network-connectivity 1.5.4 + + + +
+ +
google/cloud-network-management 1.7.2 + + + +
+ +
google/cloud-network-security 0.6.4 + + + +
+ +
google/cloud-notebooks 0.7.4 + + + +
+ +
google/cloud-optimization 0.6.4 + + + +
+ +
google/cloud-orchestration-airflow 1.6.3 + + + +
+ +
google/cloud-org-policy 0.6.4 + + + +
+ +
google/cloud-osconfig 1.3.4 + + + +
+ +
google/cloud-oslogin 1.9.4 + + + +
+ +
google/cloud-parallelstore 0.2.0 + + + +### Features + +* **parallelstore/v1beta:** Add ImportData and ExportData RPCs ([#7267](https://github.com/googleapis/google-cloud-php/issues/7267)) ([6c54a89](https://github.com/googleapis/google-cloud-php/commit/6c54a89e5107311b8c375c8699dee92f95fae09d)) + + +### Documentation + +* Fix typo in Instance.reserved_ip_range field doc ([6c54a89](https://github.com/googleapis/google-cloud-php/commit/6c54a89e5107311b8c375c8699dee92f95fae09d)) + +
+ +
google/cloud-policysimulator 0.2.4 + + + +
+ +
google/cloud-policy-troubleshooter 1.3.3 + + + +
+ +
google/cloud-policytroubleshooter-iam 0.2.4 + + + +
+ +
google/cloud-private-catalog 0.4.3 + + + +
+ +
google/cloud-profiler 1.4.2 + + + +
+ +
google/cloud-pubsub 2.1.2 + + + +
+ +
google/cloud-quotas 0.2.2 + + + +
+ +
google/cloud-rapidmigrationassessment 0.3.4 + + + +
+ +
google/cloud-recaptcha-enterprise 1.12.1 + + + +
+ +
google/cloud-recommendations-ai 0.7.4 + + + +
+ +
google/cloud-recommender 1.11.4 + + + +
+ +
google/cloud-redis 1.9.4 + + + +
+ +
google/cloud-redis-cluster 0.2.4 + + + +
+ +
google/cloud-resource-manager 0.8.4 + + + +
+ +
google/cloud-resource-settings 1.2.4 + + + +
+ +
google/cloud-retail 1.6.3 + + + +
+ +
google/cloud-run 0.9.2 + + + +
+ +
google/cloud-scheduler 1.10.4 + + + +
+ +
google/cloud-secret-manager 1.15.1 + + + +
+ +
google/cloud-securesourcemanager 0.2.4 + + + +
+ +
google/cloud-security-center 1.28.1 + + + +
+ +
google/cloud-securitycentermanagement 0.2.7 + + + +
+ +
google/cloud-security-private-ca 1.7.2 + + + +
+ +
google/cloud-security-public-ca 0.3.4 + + + +
+ +
google/cloud-service-control 1.4.3 + + + +
+ +
google/cloud-service-directory 1.3.4 + + + +
+ +
google/cloud-servicehealth 0.1.5 + + + +
+ +
google/cloud-service-management 1.3.4 + + + +
+ +
google/cloud-service-usage 1.3.3 + + + +
+ +
google/cloud-shell 1.3.4 + + + +
+ +
google/shopping-common-protos 0.4.0 + + + +### Features + +* Add `Weight` to common types for Shopping APIs to be used for accounts bundle ([#7266](https://github.com/googleapis/google-cloud-php/issues/7266)) ([45225ba](https://github.com/googleapis/google-cloud-php/commit/45225ba9261d735d8d8f271d0ae07e79afee845d)) + + +### Documentation + +* A comment for field `amount_micros` in message `.google.shopping.type.Price` is changed ([45225ba](https://github.com/googleapis/google-cloud-php/commit/45225ba9261d735d8d8f271d0ae07e79afee845d)) + +
+ +
google/shopping-css 0.2.5 + + + +
+ +
google/shopping-merchant-conversions 0.1.0 + + + +### Features + +* Introduce ShoppingMerchantConversions ([#7269](https://github.com/googleapis/google-cloud-php/issues/7269)) ([4a435ea](https://github.com/googleapis/google-cloud-php/commit/4a435ea14eef0314511ff03ba26ae21139f6da1a)) + +
+ +
google/shopping-merchant-inventories 0.4.2 + + + +
+ +
google/shopping-merchant-quota 0.1.2 + + + +
+ +
google/shopping-merchant-reports 0.7.2 + + + +
+ +
google/cloud-spanner 1.76.1 + + + +### Bug Fixes + +* **Spanner:** Cast fields in the ResultStats object back to int ([#7284](https://github.com/googleapis/google-cloud-php/issues/7284)) ([e71ee22](https://github.com/googleapis/google-cloud-php/commit/e71ee2264e02cb98ecd0d10d1aa58b691bd15c81)) + +
+ +
google/cloud-speech 1.18.2 + + + +
+ +
google/cloud-sql-admin 0.17.0 + + + +### Features + +* BackupConfiguration resource now includes transactional log storage location ([e48698d](https://github.com/googleapis/google-cloud-php/commit/e48698dd2626b37f55be4ef674636326754a980c)) +* DatabaseInstance resource now includes disaster recovery replica information and Gemini configuration ([e48698d](https://github.com/googleapis/google-cloud-php/commit/e48698dd2626b37f55be4ef674636326754a980c)) +* Databsae instance settings now includes a flag to enable Vertex AI integration ([e48698d](https://github.com/googleapis/google-cloud-php/commit/e48698dd2626b37f55be4ef674636326754a980c)) +* ImportContext now includes options for importing data from SQL statements ([e48698d](https://github.com/googleapis/google-cloud-php/commit/e48698dd2626b37f55be4ef674636326754a980c)) +* Operation resource now includes context for acquire SSRS lease operations ([e48698d](https://github.com/googleapis/google-cloud-php/commit/e48698dd2626b37f55be4ef674636326754a980c)) +* Support for additional error types in external sync settings ([e48698d](https://github.com/googleapis/google-cloud-php/commit/e48698dd2626b37f55be4ef674636326754a980c)) +* Support for additional SQL operations related to SSRS leases and old primary reconfiguration ([e48698d](https://github.com/googleapis/google-cloud-php/commit/e48698dd2626b37f55be4ef674636326754a980c)) +* Support for migration type and PostgreSQL parallel level in the VerifyExternalSyncSettings call ([e48698d](https://github.com/googleapis/google-cloud-php/commit/e48698dd2626b37f55be4ef674636326754a980c)) +* Support for setting the migration type when starting an external sync ([e48698d](https://github.com/googleapis/google-cloud-php/commit/e48698dd2626b37f55be4ef674636326754a980c)) +* Support for several newer releases of MySQL 8.0 ([e48698d](https://github.com/googleapis/google-cloud-php/commit/e48698dd2626b37f55be4ef674636326754a980c)) +* Support for the AcquireSsrsLease and ReleaseSsrsLease RPCs ([#7273](https://github.com/googleapis/google-cloud-php/issues/7273)) ([e48698d](https://github.com/googleapis/google-cloud-php/commit/e48698dd2626b37f55be4ef674636326754a980c)) + + +### Documentation + +* Note that `ssl_mode` is now used by all databases including SQL Server ([e48698d](https://github.com/googleapis/google-cloud-php/commit/e48698dd2626b37f55be4ef674636326754a980c)) + +
+ +
google/cloud-storage 1.41.4 + + + +
+ +
google/cloud-storage-control 0.1.1 + + + +
+ +
google/cloud-storageinsights 0.3.4 + + + +
+ +
google/cloud-storage-transfer 1.4.4 + + + +
+ +
google/cloud-support 0.2.4 + + + +
+ +
google/cloud-talent 1.3.4 + + + +
+ +
google/cloud-tasks 1.14.5 + + + +
+ +
google/cloud-telcoautomation 0.2.4 + + + +
+ +
google/cloud-text-to-speech 1.8.4 + + + +
+ +
google/cloud-tpu 1.4.4 + + + +
+ +
google/cloud-trace 1.8.5 + + + +
+ +
google/cloud-translate 1.17.6 + + + +
+ +
google/cloud-videointelligence 1.15.4 + + + +
+ +
google/cloud-video-live-stream 0.7.4 + + + +
+ +
google/cloud-video-stitcher 0.8.4 + + + +
+ +
google/cloud-video-transcoder 0.10.4 + + + +
+ +
google/cloud-vision 1.9.3 + + + +
+ +
google/cloud-vm-migration 0.6.4 + + + +
+ +
google/cloud-vmware-engine 0.5.5 + + + +
+ +
google/cloud-vpc-access 1.3.4 + + + +
+ +
google/cloud-web-risk 1.5.4 + + + +
+ +
google/cloud-web-security-scanner 0.8.4 + + + +
+ +
google/cloud-workflows 0.5.4 + + + +
+ ## 0.243.0
google/cloud-compute 1.16.2 diff --git a/CertificateManager/VERSION b/CertificateManager/VERSION index 39e898a4f952..7486fdbc50b3 100644 --- a/CertificateManager/VERSION +++ b/CertificateManager/VERSION @@ -1 +1 @@ -0.7.1 +0.7.2 diff --git a/Channel/VERSION b/Channel/VERSION index 77fee73a8cf9..d615fd0c04ab 100644 --- a/Channel/VERSION +++ b/Channel/VERSION @@ -1 +1 @@ -1.9.3 +1.9.4 diff --git a/CommerceConsumerProcurement/VERSION b/CommerceConsumerProcurement/VERSION index 7179039691ce..abd410582dea 100644 --- a/CommerceConsumerProcurement/VERSION +++ b/CommerceConsumerProcurement/VERSION @@ -1 +1 @@ -0.2.3 +0.2.4 diff --git a/CommonProtos/VERSION b/CommonProtos/VERSION index 4b9fcbec101a..cb0c939a936f 100644 --- a/CommonProtos/VERSION +++ b/CommonProtos/VERSION @@ -1 +1 @@ -0.5.1 +0.5.2 diff --git a/Compute/VERSION b/Compute/VERSION index 4a02d2c3170b..092afa15df4d 100644 --- a/Compute/VERSION +++ b/Compute/VERSION @@ -1 +1 @@ -1.16.2 +1.17.0 diff --git a/ConfidentialComputing/VERSION b/ConfidentialComputing/VERSION index 6f4eebdf6f68..100435be135a 100644 --- a/ConfidentialComputing/VERSION +++ b/ConfidentialComputing/VERSION @@ -1 +1 @@ -0.8.1 +0.8.2 diff --git a/Config/VERSION b/Config/VERSION index 8f0916f768f0..4b9fcbec101a 100644 --- a/Config/VERSION +++ b/Config/VERSION @@ -1 +1 @@ -0.5.0 +0.5.1 diff --git a/ContactCenterInsights/VERSION b/ContactCenterInsights/VERSION index 77fee73a8cf9..d615fd0c04ab 100644 --- a/ContactCenterInsights/VERSION +++ b/ContactCenterInsights/VERSION @@ -1 +1 @@ -1.9.3 +1.9.4 diff --git a/Container/VERSION b/Container/VERSION index 7f3c3affd72c..d1eaa3ba0b8c 100644 --- a/Container/VERSION +++ b/Container/VERSION @@ -1 +1 @@ -1.30.1 +1.30.2 diff --git a/ContainerAnalysis/VERSION b/ContainerAnalysis/VERSION index d1d899fa33a0..b49b25336d47 100644 --- a/ContainerAnalysis/VERSION +++ b/ContainerAnalysis/VERSION @@ -1 +1 @@ -0.5.5 +0.5.6 diff --git a/ControlsPartner/VERSION b/ControlsPartner/VERSION index 17e51c385ea3..d917d3e26adc 100644 --- a/ControlsPartner/VERSION +++ b/ControlsPartner/VERSION @@ -1 +1 @@ -0.1.1 +0.1.2 diff --git a/Core/VERSION b/Core/VERSION index 79f82f6b8e0c..69478d187bd3 100644 --- a/Core/VERSION +++ b/Core/VERSION @@ -1 +1 @@ -1.58.0 +1.58.1 diff --git a/DataCatalog/VERSION b/DataCatalog/VERSION index 4dae2985b58c..5ad2491cf880 100644 --- a/DataCatalog/VERSION +++ b/DataCatalog/VERSION @@ -1 +1 @@ -1.10.1 +1.10.2 diff --git a/DataCatalogLineage/VERSION b/DataCatalogLineage/VERSION index be14282b7fff..7d8568351b4f 100644 --- a/DataCatalogLineage/VERSION +++ b/DataCatalogLineage/VERSION @@ -1 +1 @@ -0.5.3 +0.5.4 diff --git a/DataFusion/VERSION b/DataFusion/VERSION index 844f6a91acb9..d2b13eb644d6 100644 --- a/DataFusion/VERSION +++ b/DataFusion/VERSION @@ -1 +1 @@ -0.6.3 +0.6.4 diff --git a/DataLabeling/VERSION b/DataLabeling/VERSION index be14282b7fff..7d8568351b4f 100644 --- a/DataLabeling/VERSION +++ b/DataLabeling/VERSION @@ -1 +1 @@ -0.5.3 +0.5.4 diff --git a/Dataflow/VERSION b/Dataflow/VERSION index b6160487433b..844f6a91acb9 100644 --- a/Dataflow/VERSION +++ b/Dataflow/VERSION @@ -1 +1 @@ -0.6.2 +0.6.3 diff --git a/Dataform/VERSION b/Dataform/VERSION index 17b2ccd9bf90..6f2743d65dc0 100644 --- a/Dataform/VERSION +++ b/Dataform/VERSION @@ -1 +1 @@ -0.4.3 +0.4.4 diff --git a/Dataplex/VERSION b/Dataplex/VERSION index e815b861f023..04a373efe6ba 100644 --- a/Dataplex/VERSION +++ b/Dataplex/VERSION @@ -1 +1 @@ -0.15.1 +0.16.0 diff --git a/Dataproc/VERSION b/Dataproc/VERSION index 3e388a4ac94a..2c20ac9bea3a 100644 --- a/Dataproc/VERSION +++ b/Dataproc/VERSION @@ -1 +1 @@ -3.13.2 +3.13.3 diff --git a/DataprocMetastore/VERSION b/DataprocMetastore/VERSION index 1a96df19c09a..35ad34429bef 100644 --- a/DataprocMetastore/VERSION +++ b/DataprocMetastore/VERSION @@ -1 +1 @@ -0.11.3 +0.11.4 diff --git a/Datastore/VERSION b/Datastore/VERSION index 450a687b2dae..bf4df28efca7 100644 --- a/Datastore/VERSION +++ b/Datastore/VERSION @@ -1 +1 @@ -1.28.1 +1.28.2 diff --git a/Datastore/src/DatastoreClient.php b/Datastore/src/DatastoreClient.php index 45b3e055c4d8..4580d1660fac 100644 --- a/Datastore/src/DatastoreClient.php +++ b/Datastore/src/DatastoreClient.php @@ -92,7 +92,7 @@ class DatastoreClient use ClientTrait; use DatastoreTrait; - const VERSION = '1.28.1'; + const VERSION = '1.28.2'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/datastore'; diff --git a/DatastoreAdmin/VERSION b/DatastoreAdmin/VERSION index ee94dd834b53..b60d71966ae9 100644 --- a/DatastoreAdmin/VERSION +++ b/DatastoreAdmin/VERSION @@ -1 +1 @@ -0.8.3 +0.8.4 diff --git a/Datastream/VERSION b/Datastream/VERSION index 8af85beb5159..94fe62c2740f 100644 --- a/Datastream/VERSION +++ b/Datastream/VERSION @@ -1 +1 @@ -1.5.3 +1.5.4 diff --git a/Debugger/VERSION b/Debugger/VERSION index 8decb929b986..f263cd11b42d 100644 --- a/Debugger/VERSION +++ b/Debugger/VERSION @@ -1 +1 @@ -1.8.5 +1.8.6 diff --git a/Debugger/src/DebuggerClient.php b/Debugger/src/DebuggerClient.php index 54db26e5d2ce..bf16d005030c 100644 --- a/Debugger/src/DebuggerClient.php +++ b/Debugger/src/DebuggerClient.php @@ -40,7 +40,7 @@ class DebuggerClient { use ClientTrait; - const VERSION = '1.8.5'; + const VERSION = '1.8.6'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/cloud-platform'; const READ_ONLY_SCOPE = 'https://www.googleapis.com/auth/debugger.readonly'; diff --git a/Deploy/VERSION b/Deploy/VERSION index 66333910a4be..249afd517d9d 100644 --- a/Deploy/VERSION +++ b/Deploy/VERSION @@ -1 +1 @@ -0.18.0 +0.18.1 diff --git a/Dialogflow/VERSION b/Dialogflow/VERSION index f8f4f03b3dcc..6b89d58f861a 100644 --- a/Dialogflow/VERSION +++ b/Dialogflow/VERSION @@ -1 +1 @@ -1.12.1 +1.12.2 diff --git a/DialogflowCx/VERSION b/DialogflowCx/VERSION index d15723fbe8de..1c09c74e221c 100644 --- a/DialogflowCx/VERSION +++ b/DialogflowCx/VERSION @@ -1 +1 @@ -0.3.2 +0.3.3 diff --git a/DiscoveryEngine/VERSION b/DiscoveryEngine/VERSION index af88ba824866..bc859cbd6d99 100644 --- a/DiscoveryEngine/VERSION +++ b/DiscoveryEngine/VERSION @@ -1 +1 @@ -0.11.1 +0.11.2 diff --git a/Dlp/VERSION b/Dlp/VERSION index b50dd27dd92e..61ce01b30118 100644 --- a/Dlp/VERSION +++ b/Dlp/VERSION @@ -1 +1 @@ -1.13.1 +1.13.2 diff --git a/Dms/VERSION b/Dms/VERSION index 8af85beb5159..94fe62c2740f 100644 --- a/Dms/VERSION +++ b/Dms/VERSION @@ -1 +1 @@ -1.5.3 +1.5.4 diff --git a/DocumentAi/VERSION b/DocumentAi/VERSION index 0eed1a29efd6..f8f4f03b3dcc 100644 --- a/DocumentAi/VERSION +++ b/DocumentAi/VERSION @@ -1 +1 @@ -1.12.0 +1.12.1 diff --git a/Domains/VERSION b/Domains/VERSION index be14282b7fff..7d8568351b4f 100644 --- a/Domains/VERSION +++ b/Domains/VERSION @@ -1 +1 @@ -0.5.3 +0.5.4 diff --git a/EdgeNetwork/VERSION b/EdgeNetwork/VERSION index 42045acae20f..c2c0004f0e2a 100644 --- a/EdgeNetwork/VERSION +++ b/EdgeNetwork/VERSION @@ -1 +1 @@ -0.3.4 +0.3.5 diff --git a/ErrorReporting/VERSION b/ErrorReporting/VERSION index 4240544f330c..03035cdde5be 100644 --- a/ErrorReporting/VERSION +++ b/ErrorReporting/VERSION @@ -1 +1 @@ -0.22.4 +0.22.5 diff --git a/EssentialContacts/VERSION b/EssentialContacts/VERSION index 17b2ccd9bf90..6f2743d65dc0 100644 --- a/EssentialContacts/VERSION +++ b/EssentialContacts/VERSION @@ -1 +1 @@ -0.4.3 +0.4.4 diff --git a/Eventarc/VERSION b/Eventarc/VERSION index 31e5c843497c..d0149fef743a 100644 --- a/Eventarc/VERSION +++ b/Eventarc/VERSION @@ -1 +1 @@ -1.3.3 +1.3.4 diff --git a/EventarcPublishing/VERSION b/EventarcPublishing/VERSION index b6160487433b..844f6a91acb9 100644 --- a/EventarcPublishing/VERSION +++ b/EventarcPublishing/VERSION @@ -1 +1 @@ -0.6.2 +0.6.3 diff --git a/Filestore/VERSION b/Filestore/VERSION index 9075be495155..eac1e0ada6d8 100644 --- a/Filestore/VERSION +++ b/Filestore/VERSION @@ -1 +1 @@ -1.5.5 +1.5.6 diff --git a/Firestore/VERSION b/Firestore/VERSION index 3987c472943e..6426a6554bc6 100644 --- a/Firestore/VERSION +++ b/Firestore/VERSION @@ -1 +1 @@ -1.43.1 +1.43.2 diff --git a/Firestore/src/FirestoreClient.php b/Firestore/src/FirestoreClient.php index 6a40f213eaa7..e962f0e4769e 100644 --- a/Firestore/src/FirestoreClient.php +++ b/Firestore/src/FirestoreClient.php @@ -75,7 +75,7 @@ class FirestoreClient use SnapshotTrait; use ValidateTrait; - const VERSION = '1.43.1'; + const VERSION = '1.43.2'; const DEFAULT_DATABASE = '(default)'; diff --git a/Functions/VERSION b/Functions/VERSION index 266146b87cbc..9edc58bb1dd8 100644 --- a/Functions/VERSION +++ b/Functions/VERSION @@ -1 +1 @@ -1.6.3 +1.6.4 diff --git a/GSuiteAddOns/VERSION b/GSuiteAddOns/VERSION index 1c09c74e221c..42045acae20f 100644 --- a/GSuiteAddOns/VERSION +++ b/GSuiteAddOns/VERSION @@ -1 +1 @@ -0.3.3 +0.3.4 diff --git a/Gaming/VERSION b/Gaming/VERSION index e8ea05db8142..c813fe116c9f 100644 --- a/Gaming/VERSION +++ b/Gaming/VERSION @@ -1 +1 @@ -1.2.4 +1.2.5 diff --git a/GkeBackup/VERSION b/GkeBackup/VERSION index 39e898a4f952..7486fdbc50b3 100644 --- a/GkeBackup/VERSION +++ b/GkeBackup/VERSION @@ -1 +1 @@ -0.7.1 +0.7.2 diff --git a/GkeConnectGateway/VERSION b/GkeConnectGateway/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/GkeConnectGateway/VERSION +++ b/GkeConnectGateway/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/GkeHub/VERSION b/GkeHub/VERSION index 965065db5b84..a602fc9e2833 100644 --- a/GkeHub/VERSION +++ b/GkeHub/VERSION @@ -1 +1 @@ -0.9.3 +0.9.4 diff --git a/GkeMultiCloud/VERSION b/GkeMultiCloud/VERSION index be14282b7fff..7d8568351b4f 100644 --- a/GkeMultiCloud/VERSION +++ b/GkeMultiCloud/VERSION @@ -1 +1 @@ -0.5.3 +0.5.4 diff --git a/Grafeas/VERSION b/Grafeas/VERSION index 571215736a66..5eef0f10e8cd 100644 --- a/Grafeas/VERSION +++ b/Grafeas/VERSION @@ -1 +1 @@ -0.10.1 +0.10.2 diff --git a/Iam/VERSION b/Iam/VERSION index be14282b7fff..7d8568351b4f 100644 --- a/Iam/VERSION +++ b/Iam/VERSION @@ -1 +1 @@ -0.5.3 +0.5.4 diff --git a/IamCredentials/VERSION b/IamCredentials/VERSION index 0495c4a88cae..e8ea05db8142 100644 --- a/IamCredentials/VERSION +++ b/IamCredentials/VERSION @@ -1 +1 @@ -1.2.3 +1.2.4 diff --git a/Iap/VERSION b/Iap/VERSION index 428b770e3e23..1c99cf0e8093 100644 --- a/Iap/VERSION +++ b/Iap/VERSION @@ -1 +1 @@ -1.4.3 +1.4.4 diff --git a/Ids/VERSION b/Ids/VERSION index be14282b7fff..7d8568351b4f 100644 --- a/Ids/VERSION +++ b/Ids/VERSION @@ -1 +1 @@ -0.5.3 +0.5.4 diff --git a/Iot/VERSION b/Iot/VERSION index 661e7aeadf36..10c088013f87 100644 --- a/Iot/VERSION +++ b/Iot/VERSION @@ -1 +1 @@ -1.7.3 +1.7.4 diff --git a/Kms/VERSION b/Kms/VERSION index bae5c7f667c9..20a1265cf395 100644 --- a/Kms/VERSION +++ b/Kms/VERSION @@ -1 +1 @@ -1.21.3 +1.21.4 diff --git a/KmsInventory/VERSION b/KmsInventory/VERSION index 17b2ccd9bf90..6f2743d65dc0 100644 --- a/KmsInventory/VERSION +++ b/KmsInventory/VERSION @@ -1 +1 @@ -0.4.3 +0.4.4 diff --git a/Language/VERSION b/Language/VERSION index eb7713622c21..366b834ce0a2 100644 --- a/Language/VERSION +++ b/Language/VERSION @@ -1 +1 @@ -0.32.4 +0.32.5 diff --git a/Language/src/LanguageClient.php b/Language/src/LanguageClient.php index da5050b90376..3a4d35b0bb6b 100644 --- a/Language/src/LanguageClient.php +++ b/Language/src/LanguageClient.php @@ -46,7 +46,7 @@ class LanguageClient ClientTrait::jsonDecode insteadof RetryDeciderTrait; } - const VERSION = '0.32.4'; + const VERSION = '0.32.5'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/cloud-platform'; diff --git a/LifeSciences/VERSION b/LifeSciences/VERSION index 844f6a91acb9..d2b13eb644d6 100644 --- a/LifeSciences/VERSION +++ b/LifeSciences/VERSION @@ -1 +1 @@ -0.6.3 +0.6.4 diff --git a/Logging/VERSION b/Logging/VERSION index 034552a83eeb..7f3c3affd72c 100644 --- a/Logging/VERSION +++ b/Logging/VERSION @@ -1 +1 @@ -1.30.0 +1.30.1 diff --git a/Logging/src/LoggingClient.php b/Logging/src/LoggingClient.php index 4279511b1168..c1ab921e8382 100644 --- a/Logging/src/LoggingClient.php +++ b/Logging/src/LoggingClient.php @@ -70,7 +70,7 @@ class LoggingClient use ArrayTrait; use ClientTrait; - const VERSION = '1.30.0'; + const VERSION = '1.30.1'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/logging.admin'; const READ_ONLY_SCOPE = 'https://www.googleapis.com/auth/logging.read'; diff --git a/LongRunning/VERSION b/LongRunning/VERSION index 267577d47e49..2b7c5ae01848 100644 --- a/LongRunning/VERSION +++ b/LongRunning/VERSION @@ -1 +1 @@ -0.4.1 +0.4.2 diff --git a/LongRunning/composer.json b/LongRunning/composer.json index 55971d8a6ab3..3c412a947c26 100644 --- a/LongRunning/composer.json +++ b/LongRunning/composer.json @@ -3,7 +3,7 @@ "description": "Google LongRunning Client for PHP", "license": "Apache-2.0", "minimum-stability": "stable", - "version": "0.4.1", + "version": "0.4.2", "autoload": { "psr-4": { "Google\\ApiCore\\LongRunning\\": "src/ApiCore/LongRunning", diff --git a/ManagedIdentities/VERSION b/ManagedIdentities/VERSION index 31e5c843497c..d0149fef743a 100644 --- a/ManagedIdentities/VERSION +++ b/ManagedIdentities/VERSION @@ -1 +1 @@ -1.3.3 +1.3.4 diff --git a/MediaTranslation/VERSION b/MediaTranslation/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/MediaTranslation/VERSION +++ b/MediaTranslation/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/Memcache/VERSION b/Memcache/VERSION index 31e5c843497c..d0149fef743a 100644 --- a/Memcache/VERSION +++ b/Memcache/VERSION @@ -1 +1 @@ -1.3.3 +1.3.4 diff --git a/MigrationCenter/VERSION b/MigrationCenter/VERSION index 17b2ccd9bf90..6f2743d65dc0 100644 --- a/MigrationCenter/VERSION +++ b/MigrationCenter/VERSION @@ -1 +1 @@ -0.4.3 +0.4.4 diff --git a/Monitoring/VERSION b/Monitoring/VERSION index 4dae2985b58c..5ad2491cf880 100644 --- a/Monitoring/VERSION +++ b/Monitoring/VERSION @@ -1 +1 @@ -1.10.1 +1.10.2 diff --git a/NetApp/VERSION b/NetApp/VERSION index 3a4036fb450f..53a75d673557 100644 --- a/NetApp/VERSION +++ b/NetApp/VERSION @@ -1 +1 @@ -0.2.5 +0.2.6 diff --git a/NetworkConnectivity/VERSION b/NetworkConnectivity/VERSION index 8af85beb5159..94fe62c2740f 100644 --- a/NetworkConnectivity/VERSION +++ b/NetworkConnectivity/VERSION @@ -1 +1 @@ -1.5.3 +1.5.4 diff --git a/NetworkManagement/VERSION b/NetworkManagement/VERSION index 943f9cbc4ec7..f8a696c8dc56 100644 --- a/NetworkManagement/VERSION +++ b/NetworkManagement/VERSION @@ -1 +1 @@ -1.7.1 +1.7.2 diff --git a/NetworkSecurity/VERSION b/NetworkSecurity/VERSION index 844f6a91acb9..d2b13eb644d6 100644 --- a/NetworkSecurity/VERSION +++ b/NetworkSecurity/VERSION @@ -1 +1 @@ -0.6.3 +0.6.4 diff --git a/Notebooks/VERSION b/Notebooks/VERSION index f38fc5393ff6..0a1ffad4b4df 100644 --- a/Notebooks/VERSION +++ b/Notebooks/VERSION @@ -1 +1 @@ -0.7.3 +0.7.4 diff --git a/Optimization/VERSION b/Optimization/VERSION index 844f6a91acb9..d2b13eb644d6 100644 --- a/Optimization/VERSION +++ b/Optimization/VERSION @@ -1 +1 @@ -0.6.3 +0.6.4 diff --git a/OrchestrationAirflow/VERSION b/OrchestrationAirflow/VERSION index fdd3be6df54a..266146b87cbc 100644 --- a/OrchestrationAirflow/VERSION +++ b/OrchestrationAirflow/VERSION @@ -1 +1 @@ -1.6.2 +1.6.3 diff --git a/OrgPolicy/VERSION b/OrgPolicy/VERSION index 844f6a91acb9..d2b13eb644d6 100644 --- a/OrgPolicy/VERSION +++ b/OrgPolicy/VERSION @@ -1 +1 @@ -0.6.3 +0.6.4 diff --git a/OsConfig/VERSION b/OsConfig/VERSION index 31e5c843497c..d0149fef743a 100644 --- a/OsConfig/VERSION +++ b/OsConfig/VERSION @@ -1 +1 @@ -1.3.3 +1.3.4 diff --git a/OsLogin/VERSION b/OsLogin/VERSION index 77fee73a8cf9..d615fd0c04ab 100644 --- a/OsLogin/VERSION +++ b/OsLogin/VERSION @@ -1 +1 @@ -1.9.3 +1.9.4 diff --git a/Parallelstore/VERSION b/Parallelstore/VERSION index 17e51c385ea3..0ea3a944b399 100644 --- a/Parallelstore/VERSION +++ b/Parallelstore/VERSION @@ -1 +1 @@ -0.1.1 +0.2.0 diff --git a/PolicySimulator/VERSION b/PolicySimulator/VERSION index 7179039691ce..abd410582dea 100644 --- a/PolicySimulator/VERSION +++ b/PolicySimulator/VERSION @@ -1 +1 @@ -0.2.3 +0.2.4 diff --git a/PolicyTroubleshooter/VERSION b/PolicyTroubleshooter/VERSION index 1892b9267677..31e5c843497c 100644 --- a/PolicyTroubleshooter/VERSION +++ b/PolicyTroubleshooter/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/PolicyTroubleshooterIam/VERSION b/PolicyTroubleshooterIam/VERSION index 7179039691ce..abd410582dea 100644 --- a/PolicyTroubleshooterIam/VERSION +++ b/PolicyTroubleshooterIam/VERSION @@ -1 +1 @@ -0.2.3 +0.2.4 diff --git a/PrivateCatalog/VERSION b/PrivateCatalog/VERSION index 2b7c5ae01848..17b2ccd9bf90 100644 --- a/PrivateCatalog/VERSION +++ b/PrivateCatalog/VERSION @@ -1 +1 @@ -0.4.2 +0.4.3 diff --git a/Profiler/VERSION b/Profiler/VERSION index 347f5833ee6d..9df886c42a1e 100644 --- a/Profiler/VERSION +++ b/Profiler/VERSION @@ -1 +1 @@ -1.4.1 +1.4.2 diff --git a/PubSub/VERSION b/PubSub/VERSION index 3e3c2f1e5edb..eca07e4c1a8c 100644 --- a/PubSub/VERSION +++ b/PubSub/VERSION @@ -1 +1 @@ -2.1.1 +2.1.2 diff --git a/Quotas/VERSION b/Quotas/VERSION index 0c62199f16ac..ee1372d33a29 100644 --- a/Quotas/VERSION +++ b/Quotas/VERSION @@ -1 +1 @@ -0.2.1 +0.2.2 diff --git a/RapidMigrationAssessment/VERSION b/RapidMigrationAssessment/VERSION index 1c09c74e221c..42045acae20f 100644 --- a/RapidMigrationAssessment/VERSION +++ b/RapidMigrationAssessment/VERSION @@ -1 +1 @@ -0.3.3 +0.3.4 diff --git a/RecaptchaEnterprise/VERSION b/RecaptchaEnterprise/VERSION index 0eed1a29efd6..f8f4f03b3dcc 100644 --- a/RecaptchaEnterprise/VERSION +++ b/RecaptchaEnterprise/VERSION @@ -1 +1 @@ -1.12.0 +1.12.1 diff --git a/RecommendationEngine/VERSION b/RecommendationEngine/VERSION index f38fc5393ff6..0a1ffad4b4df 100644 --- a/RecommendationEngine/VERSION +++ b/RecommendationEngine/VERSION @@ -1 +1 @@ -0.7.3 +0.7.4 diff --git a/Recommender/VERSION b/Recommender/VERSION index 0a5af26df3fd..3d0e62313ced 100644 --- a/Recommender/VERSION +++ b/Recommender/VERSION @@ -1 +1 @@ -1.11.3 +1.11.4 diff --git a/Redis/VERSION b/Redis/VERSION index 77fee73a8cf9..d615fd0c04ab 100644 --- a/Redis/VERSION +++ b/Redis/VERSION @@ -1 +1 @@ -1.9.3 +1.9.4 diff --git a/RedisCluster/VERSION b/RedisCluster/VERSION index 7179039691ce..abd410582dea 100644 --- a/RedisCluster/VERSION +++ b/RedisCluster/VERSION @@ -1 +1 @@ -0.2.3 +0.2.4 diff --git a/ResourceManager/VERSION b/ResourceManager/VERSION index ee94dd834b53..b60d71966ae9 100644 --- a/ResourceManager/VERSION +++ b/ResourceManager/VERSION @@ -1 +1 @@ -0.8.3 +0.8.4 diff --git a/ResourceSettings/VERSION b/ResourceSettings/VERSION index 0495c4a88cae..e8ea05db8142 100644 --- a/ResourceSettings/VERSION +++ b/ResourceSettings/VERSION @@ -1 +1 @@ -1.2.3 +1.2.4 diff --git a/Retail/VERSION b/Retail/VERSION index fdd3be6df54a..266146b87cbc 100644 --- a/Retail/VERSION +++ b/Retail/VERSION @@ -1 +1 @@ -1.6.2 +1.6.3 diff --git a/Run/VERSION b/Run/VERSION index f374f6662e9a..2003b639c400 100644 --- a/Run/VERSION +++ b/Run/VERSION @@ -1 +1 @@ -0.9.1 +0.9.2 diff --git a/Scheduler/VERSION b/Scheduler/VERSION index 587c5f0c7309..18b311420650 100644 --- a/Scheduler/VERSION +++ b/Scheduler/VERSION @@ -1 +1 @@ -1.10.3 +1.10.4 diff --git a/SecretManager/VERSION b/SecretManager/VERSION index 141f2e805beb..ace44233b4aa 100644 --- a/SecretManager/VERSION +++ b/SecretManager/VERSION @@ -1 +1 @@ -1.15.0 +1.15.1 diff --git a/SecureSourceManager/VERSION b/SecureSourceManager/VERSION index 7179039691ce..abd410582dea 100644 --- a/SecureSourceManager/VERSION +++ b/SecureSourceManager/VERSION @@ -1 +1 @@ -0.2.3 +0.2.4 diff --git a/SecurityCenter/VERSION b/SecurityCenter/VERSION index cfc730712d5d..450a687b2dae 100644 --- a/SecurityCenter/VERSION +++ b/SecurityCenter/VERSION @@ -1 +1 @@ -1.28.0 +1.28.1 diff --git a/SecurityCenterManagement/VERSION b/SecurityCenterManagement/VERSION index 53a75d673557..b0032849c80b 100644 --- a/SecurityCenterManagement/VERSION +++ b/SecurityCenterManagement/VERSION @@ -1 +1 @@ -0.2.6 +0.2.7 diff --git a/SecurityPrivateCa/VERSION b/SecurityPrivateCa/VERSION index 943f9cbc4ec7..f8a696c8dc56 100644 --- a/SecurityPrivateCa/VERSION +++ b/SecurityPrivateCa/VERSION @@ -1 +1 @@ -1.7.1 +1.7.2 diff --git a/SecurityPublicCA/VERSION b/SecurityPublicCA/VERSION index 1c09c74e221c..42045acae20f 100644 --- a/SecurityPublicCA/VERSION +++ b/SecurityPublicCA/VERSION @@ -1 +1 @@ -0.3.3 +0.3.4 diff --git a/ServiceControl/VERSION b/ServiceControl/VERSION index 9df886c42a1e..428b770e3e23 100644 --- a/ServiceControl/VERSION +++ b/ServiceControl/VERSION @@ -1 +1 @@ -1.4.2 +1.4.3 diff --git a/ServiceDirectory/VERSION b/ServiceDirectory/VERSION index 31e5c843497c..d0149fef743a 100644 --- a/ServiceDirectory/VERSION +++ b/ServiceDirectory/VERSION @@ -1 +1 @@ -1.3.3 +1.3.4 diff --git a/ServiceHealth/VERSION b/ServiceHealth/VERSION index 845639eef26c..9faa1b7a7339 100644 --- a/ServiceHealth/VERSION +++ b/ServiceHealth/VERSION @@ -1 +1 @@ -0.1.4 +0.1.5 diff --git a/ServiceManagement/VERSION b/ServiceManagement/VERSION index 31e5c843497c..d0149fef743a 100644 --- a/ServiceManagement/VERSION +++ b/ServiceManagement/VERSION @@ -1 +1 @@ -1.3.3 +1.3.4 diff --git a/ServiceUsage/VERSION b/ServiceUsage/VERSION index 1892b9267677..31e5c843497c 100644 --- a/ServiceUsage/VERSION +++ b/ServiceUsage/VERSION @@ -1 +1 @@ -1.3.2 +1.3.3 diff --git a/Shell/VERSION b/Shell/VERSION index 31e5c843497c..d0149fef743a 100644 --- a/Shell/VERSION +++ b/Shell/VERSION @@ -1 +1 @@ -1.3.3 +1.3.4 diff --git a/ShoppingCommonProtos/VERSION b/ShoppingCommonProtos/VERSION index 0d91a54c7d43..1d0ba9ea182b 100644 --- a/ShoppingCommonProtos/VERSION +++ b/ShoppingCommonProtos/VERSION @@ -1 +1 @@ -0.3.0 +0.4.0 diff --git a/ShoppingCss/VERSION b/ShoppingCss/VERSION index abd410582dea..3a4036fb450f 100644 --- a/ShoppingCss/VERSION +++ b/ShoppingCss/VERSION @@ -1 +1 @@ -0.2.4 +0.2.5 diff --git a/ShoppingMerchantConversions/VERSION b/ShoppingMerchantConversions/VERSION index 77d6f4ca2371..6e8bf73aa550 100644 --- a/ShoppingMerchantConversions/VERSION +++ b/ShoppingMerchantConversions/VERSION @@ -1 +1 @@ -0.0.0 +0.1.0 diff --git a/ShoppingMerchantInventories/VERSION b/ShoppingMerchantInventories/VERSION index 267577d47e49..2b7c5ae01848 100644 --- a/ShoppingMerchantInventories/VERSION +++ b/ShoppingMerchantInventories/VERSION @@ -1 +1 @@ -0.4.1 +0.4.2 diff --git a/ShoppingMerchantQuota/VERSION b/ShoppingMerchantQuota/VERSION index 17e51c385ea3..d917d3e26adc 100644 --- a/ShoppingMerchantQuota/VERSION +++ b/ShoppingMerchantQuota/VERSION @@ -1 +1 @@ -0.1.1 +0.1.2 diff --git a/ShoppingMerchantReports/VERSION b/ShoppingMerchantReports/VERSION index 39e898a4f952..7486fdbc50b3 100644 --- a/ShoppingMerchantReports/VERSION +++ b/ShoppingMerchantReports/VERSION @@ -1 +1 @@ -0.7.1 +0.7.2 diff --git a/Spanner/VERSION b/Spanner/VERSION index 32a6ce3c719b..9ca8438b775f 100644 --- a/Spanner/VERSION +++ b/Spanner/VERSION @@ -1 +1 @@ -1.76.0 +1.76.1 diff --git a/Spanner/src/SpannerClient.php b/Spanner/src/SpannerClient.php index eafe3220ec71..c83bf9a76001 100644 --- a/Spanner/src/SpannerClient.php +++ b/Spanner/src/SpannerClient.php @@ -120,7 +120,7 @@ class SpannerClient use LROTrait; use ValidateTrait; - const VERSION = '1.76.0'; + const VERSION = '1.76.1'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/spanner.data'; const ADMIN_SCOPE = 'https://www.googleapis.com/auth/spanner.admin'; diff --git a/Speech/VERSION b/Speech/VERSION index ec6d649be650..b57fc7228b62 100644 --- a/Speech/VERSION +++ b/Speech/VERSION @@ -1 +1 @@ -1.18.1 +1.18.2 diff --git a/Speech/src/SpeechClient.php b/Speech/src/SpeechClient.php index 45bbf27da601..9baf5533653c 100644 --- a/Speech/src/SpeechClient.php +++ b/Speech/src/SpeechClient.php @@ -50,7 +50,7 @@ class SpeechClient { use ClientTrait; - const VERSION = '1.18.1'; + const VERSION = '1.18.2'; const SCOPE = 'https://www.googleapis.com/auth/cloud-platform'; diff --git a/SqlAdmin/VERSION b/SqlAdmin/VERSION index 2a0970ca757c..c5523bd09b18 100644 --- a/SqlAdmin/VERSION +++ b/SqlAdmin/VERSION @@ -1 +1 @@ -0.16.1 +0.17.0 diff --git a/Storage/VERSION b/Storage/VERSION index 021b2b85fea5..6e567fa56aa5 100644 --- a/Storage/VERSION +++ b/Storage/VERSION @@ -1 +1 @@ -1.41.3 +1.41.4 diff --git a/Storage/src/StorageClient.php b/Storage/src/StorageClient.php index b4945a63b26d..b08d0796416e 100644 --- a/Storage/src/StorageClient.php +++ b/Storage/src/StorageClient.php @@ -47,7 +47,7 @@ class StorageClient use ArrayTrait; use ClientTrait; - const VERSION = '1.41.3'; + const VERSION = '1.41.4'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/devstorage.full_control'; const READ_ONLY_SCOPE = 'https://www.googleapis.com/auth/devstorage.read_only'; diff --git a/StorageControl/VERSION b/StorageControl/VERSION index 6e8bf73aa550..17e51c385ea3 100644 --- a/StorageControl/VERSION +++ b/StorageControl/VERSION @@ -1 +1 @@ -0.1.0 +0.1.1 diff --git a/StorageInsights/VERSION b/StorageInsights/VERSION index 1c09c74e221c..42045acae20f 100644 --- a/StorageInsights/VERSION +++ b/StorageInsights/VERSION @@ -1 +1 @@ -0.3.3 +0.3.4 diff --git a/StorageTransfer/VERSION b/StorageTransfer/VERSION index 428b770e3e23..1c99cf0e8093 100644 --- a/StorageTransfer/VERSION +++ b/StorageTransfer/VERSION @@ -1 +1 @@ -1.4.3 +1.4.4 diff --git a/Support/VERSION b/Support/VERSION index 7179039691ce..abd410582dea 100644 --- a/Support/VERSION +++ b/Support/VERSION @@ -1 +1 @@ -0.2.3 +0.2.4 diff --git a/Talent/VERSION b/Talent/VERSION index 31e5c843497c..d0149fef743a 100644 --- a/Talent/VERSION +++ b/Talent/VERSION @@ -1 +1 @@ -1.3.3 +1.3.4 diff --git a/Tasks/VERSION b/Tasks/VERSION index 4e00d0ac0791..24a57f28a415 100644 --- a/Tasks/VERSION +++ b/Tasks/VERSION @@ -1 +1 @@ -1.14.4 +1.14.5 diff --git a/TelcoAutomation/VERSION b/TelcoAutomation/VERSION index 7179039691ce..abd410582dea 100644 --- a/TelcoAutomation/VERSION +++ b/TelcoAutomation/VERSION @@ -1 +1 @@ -0.2.3 +0.2.4 diff --git a/TextToSpeech/VERSION b/TextToSpeech/VERSION index a7ee35a3ea70..bfa363e76ed7 100644 --- a/TextToSpeech/VERSION +++ b/TextToSpeech/VERSION @@ -1 +1 @@ -1.8.3 +1.8.4 diff --git a/Tpu/VERSION b/Tpu/VERSION index 428b770e3e23..1c99cf0e8093 100644 --- a/Tpu/VERSION +++ b/Tpu/VERSION @@ -1 +1 @@ -1.4.3 +1.4.4 diff --git a/Trace/VERSION b/Trace/VERSION index bfa363e76ed7..8decb929b986 100644 --- a/Trace/VERSION +++ b/Trace/VERSION @@ -1 +1 @@ -1.8.4 +1.8.5 diff --git a/Trace/src/TraceClient.php b/Trace/src/TraceClient.php index fb4fac5f3ec2..a5980894580f 100644 --- a/Trace/src/TraceClient.php +++ b/Trace/src/TraceClient.php @@ -40,7 +40,7 @@ class TraceClient { use ClientTrait; - const VERSION = '1.8.4'; + const VERSION = '1.8.5'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/cloud-platform'; diff --git a/Translate/VERSION b/Translate/VERSION index ff278344b339..622f042fdce5 100644 --- a/Translate/VERSION +++ b/Translate/VERSION @@ -1 +1 @@ -1.17.5 +1.17.6 diff --git a/VideoIntelligence/VERSION b/VideoIntelligence/VERSION index f2380cc7aefe..e34208c9371c 100644 --- a/VideoIntelligence/VERSION +++ b/VideoIntelligence/VERSION @@ -1 +1 @@ -1.15.3 +1.15.4 diff --git a/VideoLiveStream/VERSION b/VideoLiveStream/VERSION index f38fc5393ff6..0a1ffad4b4df 100644 --- a/VideoLiveStream/VERSION +++ b/VideoLiveStream/VERSION @@ -1 +1 @@ -0.7.3 +0.7.4 diff --git a/VideoStitcher/VERSION b/VideoStitcher/VERSION index ee94dd834b53..b60d71966ae9 100644 --- a/VideoStitcher/VERSION +++ b/VideoStitcher/VERSION @@ -1 +1 @@ -0.8.3 +0.8.4 diff --git a/VideoTranscoder/VERSION b/VideoTranscoder/VERSION index a3f5a8ed4d60..9b40aa6c214f 100644 --- a/VideoTranscoder/VERSION +++ b/VideoTranscoder/VERSION @@ -1 +1 @@ -0.10.3 +0.10.4 diff --git a/Vision/VERSION b/Vision/VERSION index 8fdcf3869464..77fee73a8cf9 100644 --- a/Vision/VERSION +++ b/Vision/VERSION @@ -1 +1 @@ -1.9.2 +1.9.3 diff --git a/Vision/src/VisionClient.php b/Vision/src/VisionClient.php index 7976f3547a04..37bbcfcf2b58 100644 --- a/Vision/src/VisionClient.php +++ b/Vision/src/VisionClient.php @@ -50,7 +50,7 @@ class VisionClient use ClientTrait; use ValidateTrait; - const VERSION = '1.9.2'; + const VERSION = '1.9.3'; const FULL_CONTROL_SCOPE = 'https://www.googleapis.com/auth/cloud-platform'; diff --git a/VmMigration/VERSION b/VmMigration/VERSION index 844f6a91acb9..d2b13eb644d6 100644 --- a/VmMigration/VERSION +++ b/VmMigration/VERSION @@ -1 +1 @@ -0.6.3 +0.6.4 diff --git a/VmwareEngine/VERSION b/VmwareEngine/VERSION index 7d8568351b4f..d1d899fa33a0 100644 --- a/VmwareEngine/VERSION +++ b/VmwareEngine/VERSION @@ -1 +1 @@ -0.5.4 +0.5.5 diff --git a/VpcAccess/VERSION b/VpcAccess/VERSION index 31e5c843497c..d0149fef743a 100644 --- a/VpcAccess/VERSION +++ b/VpcAccess/VERSION @@ -1 +1 @@ -1.3.3 +1.3.4 diff --git a/WebRisk/VERSION b/WebRisk/VERSION index 8af85beb5159..94fe62c2740f 100644 --- a/WebRisk/VERSION +++ b/WebRisk/VERSION @@ -1 +1 @@ -1.5.3 +1.5.4 diff --git a/WebSecurityScanner/VERSION b/WebSecurityScanner/VERSION index ee94dd834b53..b60d71966ae9 100644 --- a/WebSecurityScanner/VERSION +++ b/WebSecurityScanner/VERSION @@ -1 +1 @@ -0.8.3 +0.8.4 diff --git a/Workflows/VERSION b/Workflows/VERSION index be14282b7fff..7d8568351b4f 100644 --- a/Workflows/VERSION +++ b/Workflows/VERSION @@ -1 +1 @@ -0.5.3 +0.5.4 diff --git a/composer.json b/composer.json index 3a04d2bb630b..40761d2c8878 100644 --- a/composer.json +++ b/composer.json @@ -70,184 +70,184 @@ "psr/log": ">=3" }, "replace": { - "google/access-context-manager": "0.5.3", - "google/analytics-admin": "0.22.3", - "google/analytics-data": "0.16.3", - "google/apps-chat": "0.1.0", - "google/apps-events-subscriptions": "0.1.1", - "google/apps-meet": "0.2.1", - "google/cloud-access-approval": "1.2.3", - "google/cloud-advisorynotifications": "0.8.1", - "google/cloud-ai-platform": "0.37.1", - "google/cloud-alloydb": "0.10.1", - "google/cloud-api-gateway": "1.3.3", - "google/cloud-api-keys": "0.4.3", - "google/cloud-apigee-connect": "1.2.3", - "google/cloud-apigee-registry": "0.5.3", - "google/cloud-appengine-admin": "1.3.3", - "google/cloud-apphub": "0.1.1", - "google/cloud-artifact-registry": "0.6.3", - "google/cloud-asset": "1.16.1", - "google/cloud-assured-workloads": "0.11.3", - "google/cloud-automl": "1.6.3", - "google/cloud-bare-metal-solution": "0.6.3", - "google/cloud-batch": "0.16.6", - "google/cloud-beyondcorp-appconnections": "0.4.3", - "google/cloud-beyondcorp-appconnectors": "0.4.3", - "google/cloud-beyondcorp-appgateways": "0.4.3", - "google/cloud-beyondcorp-clientconnectorservices": "0.4.3", - "google/cloud-beyondcorp-clientgateways": "0.4.3", - "google/cloud-bigquery": "1.30.1", - "google/cloud-bigquery-analyticshub": "0.5.1", - "google/cloud-bigquery-connection": "1.5.3", - "google/cloud-bigquery-data-exchange": "0.4.3", - "google/cloud-bigquery-datapolicies": "0.5.3", - "google/cloud-bigquery-migration": "0.4.3", - "google/cloud-bigquery-reservation": "1.3.3", - "google/cloud-bigquery-storage": "1.10.2", - "google/cloud-bigquerydatatransfer": "1.8.3", - "google/cloud-bigtable": "1.31.0", - "google/cloud-billing": "1.9.5", - "google/cloud-billing-budgets": "1.4.3", - "google/cloud-binary-authorization": "0.8.5", - "google/cloud-build": "0.16.1", - "google/cloud-certificate-manager": "0.7.1", - "google/cloud-channel": "1.9.3", - "google/cloud-cloudcontrolspartner": "0.1.1", - "google/cloud-commerce-consumer-procurement": "0.2.3", - "google/cloud-common-protos": "0.5.1", - "google/cloud-compute": "1.16.2", - "google/cloud-confidentialcomputing": "0.8.1", - "google/cloud-config": "0.5.0", - "google/cloud-contact-center-insights": "1.9.3", - "google/cloud-container": "1.30.1", - "google/cloud-container-analysis": "0.5.5", - "google/cloud-core": "1.58.0", - "google/cloud-data-catalog": "1.10.1", - "google/cloud-data-fusion": "0.6.3", - "google/cloud-datacatalog-lineage": "0.5.3", - "google/cloud-dataflow": "0.6.2", - "google/cloud-dataform": "0.4.3", - "google/cloud-datalabeling": "0.5.3", - "google/cloud-dataplex": "0.15.1", - "google/cloud-dataproc": "3.13.2", - "google/cloud-dataproc-metastore": "0.11.3", - "google/cloud-datastore": "1.28.1", - "google/cloud-datastore-admin": "0.8.3", - "google/cloud-datastream": "1.5.3", - "google/cloud-debugger": "1.8.5", - "google/cloud-deploy": "0.18.0", - "google/cloud-dialogflow": "1.12.1", - "google/cloud-dialogflow-cx": "0.3.2", - "google/cloud-discoveryengine": "0.11.1", - "google/cloud-dlp": "1.13.1", - "google/cloud-dms": "1.5.3", - "google/cloud-document-ai": "1.12.0", - "google/cloud-domains": "0.5.3", - "google/cloud-edgenetwork": "0.3.4", - "google/cloud-error-reporting": "0.22.4", - "google/cloud-essential-contacts": "0.4.3", - "google/cloud-eventarc": "1.3.3", - "google/cloud-eventarc-publishing": "0.6.2", - "google/cloud-filestore": "1.5.5", - "google/cloud-firestore": "1.43.1", - "google/cloud-functions": "1.6.3", - "google/cloud-game-servers": "1.2.4", - "google/cloud-gke-backup": "0.7.1", - "google/cloud-gke-connect-gateway": "0.4.2", - "google/cloud-gke-hub": "0.9.3", - "google/cloud-gke-multi-cloud": "0.5.3", - "google/cloud-gsuite-addons": "0.3.3", - "google/cloud-iam": "0.5.3", - "google/cloud-iam-credentials": "1.2.3", - "google/cloud-iap": "1.4.3", - "google/cloud-ids": "0.5.3", - "google/cloud-iot": "1.7.3", - "google/cloud-kms": "1.21.3", - "google/cloud-kms-inventory": "0.4.3", - "google/cloud-language": "0.32.4", - "google/cloud-life-sciences": "0.6.3", - "google/cloud-logging": "1.30.0", - "google/cloud-managed-identities": "1.3.3", - "google/cloud-media-translation": "0.4.2", - "google/cloud-memcache": "1.3.3", - "google/cloud-migrationcenter": "0.4.3", - "google/cloud-monitoring": "1.10.1", - "google/cloud-netapp": "0.2.5", - "google/cloud-network-connectivity": "1.5.3", - "google/cloud-network-management": "1.7.1", - "google/cloud-network-security": "0.6.3", - "google/cloud-notebooks": "0.7.3", - "google/cloud-optimization": "0.6.3", - "google/cloud-orchestration-airflow": "1.6.2", - "google/cloud-org-policy": "0.6.3", - "google/cloud-osconfig": "1.3.3", - "google/cloud-oslogin": "1.9.3", - "google/cloud-parallelstore": "0.1.1", - "google/cloud-policy-troubleshooter": "1.3.2", - "google/cloud-policysimulator": "0.2.3", - "google/cloud-policytroubleshooter-iam": "0.2.3", - "google/cloud-private-catalog": "0.4.2", - "google/cloud-profiler": "1.4.1", - "google/cloud-pubsub": "2.1.1", - "google/cloud-quotas": "0.2.1", - "google/cloud-rapidmigrationassessment": "0.3.3", - "google/cloud-recaptcha-enterprise": "1.12.0", - "google/cloud-recommendations-ai": "0.7.3", - "google/cloud-recommender": "1.11.3", - "google/cloud-redis": "1.9.3", - "google/cloud-redis-cluster": "0.2.3", - "google/cloud-resource-manager": "0.8.3", - "google/cloud-resource-settings": "1.2.3", - "google/cloud-retail": "1.6.2", - "google/cloud-run": "0.9.1", - "google/cloud-scheduler": "1.10.3", - "google/cloud-secret-manager": "1.15.0", - "google/cloud-securesourcemanager": "0.2.3", - "google/cloud-security-center": "1.28.0", - "google/cloud-security-private-ca": "1.7.1", - "google/cloud-security-public-ca": "0.3.3", - "google/cloud-securitycentermanagement": "0.2.6", - "google/cloud-service-control": "1.4.2", - "google/cloud-service-directory": "1.3.3", - "google/cloud-service-management": "1.3.3", - "google/cloud-service-usage": "1.3.2", - "google/cloud-servicehealth": "0.1.4", - "google/cloud-shell": "1.3.3", - "google/cloud-spanner": "1.76.0", - "google/cloud-speech": "1.18.1", - "google/cloud-sql-admin": "0.16.1", - "google/cloud-storage": "1.41.3", - "google/cloud-storage-control": "0.1.0", - "google/cloud-storage-transfer": "1.4.3", - "google/cloud-storageinsights": "0.3.3", - "google/cloud-support": "0.2.3", - "google/cloud-talent": "1.3.3", - "google/cloud-tasks": "1.14.4", - "google/cloud-telcoautomation": "0.2.3", - "google/cloud-text-to-speech": "1.8.3", - "google/cloud-tpu": "1.4.3", - "google/cloud-trace": "1.8.4", - "google/cloud-translate": "1.17.5", - "google/cloud-video-live-stream": "0.7.3", - "google/cloud-video-stitcher": "0.8.3", - "google/cloud-video-transcoder": "0.10.3", - "google/cloud-videointelligence": "1.15.3", - "google/cloud-vision": "1.9.2", - "google/cloud-vm-migration": "0.6.3", - "google/cloud-vmware-engine": "0.5.4", - "google/cloud-vpc-access": "1.3.3", - "google/cloud-web-risk": "1.5.3", - "google/cloud-web-security-scanner": "0.8.3", - "google/cloud-workflows": "0.5.3", - "google/grafeas": "0.10.1", - "google/longrunning": "0.4.1", - "google/shopping-common-protos": "0.3.0", - "google/shopping-css": "0.2.4", - "google/shopping-merchant-conversions": "0.0.0", - "google/shopping-merchant-inventories": "0.4.1", - "google/shopping-merchant-quota": "0.1.1", - "google/shopping-merchant-reports": "0.7.1" + "google/access-context-manager": "0.5.4", + "google/analytics-admin": "0.22.4", + "google/analytics-data": "0.16.4", + "google/apps-chat": "0.1.1", + "google/apps-events-subscriptions": "0.1.2", + "google/apps-meet": "0.2.2", + "google/cloud-access-approval": "1.2.4", + "google/cloud-advisorynotifications": "0.8.2", + "google/cloud-ai-platform": "0.38.0", + "google/cloud-alloydb": "0.10.2", + "google/cloud-api-gateway": "1.3.4", + "google/cloud-api-keys": "0.4.4", + "google/cloud-apigee-connect": "1.2.4", + "google/cloud-apigee-registry": "0.5.4", + "google/cloud-appengine-admin": "1.3.4", + "google/cloud-apphub": "0.1.2", + "google/cloud-artifact-registry": "0.6.4", + "google/cloud-asset": "1.16.2", + "google/cloud-assured-workloads": "0.11.4", + "google/cloud-automl": "1.6.4", + "google/cloud-bare-metal-solution": "0.6.4", + "google/cloud-batch": "0.16.7", + "google/cloud-beyondcorp-appconnections": "0.4.4", + "google/cloud-beyondcorp-appconnectors": "0.4.4", + "google/cloud-beyondcorp-appgateways": "0.4.4", + "google/cloud-beyondcorp-clientconnectorservices": "0.4.4", + "google/cloud-beyondcorp-clientgateways": "0.4.4", + "google/cloud-bigquery": "1.30.2", + "google/cloud-bigquery-analyticshub": "0.5.2", + "google/cloud-bigquery-connection": "1.5.4", + "google/cloud-bigquery-data-exchange": "0.4.4", + "google/cloud-bigquery-datapolicies": "0.5.4", + "google/cloud-bigquery-migration": "0.4.4", + "google/cloud-bigquery-reservation": "1.3.4", + "google/cloud-bigquery-storage": "1.10.3", + "google/cloud-bigquerydatatransfer": "1.8.4", + "google/cloud-bigtable": "1.31.1", + "google/cloud-billing": "1.9.6", + "google/cloud-billing-budgets": "1.4.4", + "google/cloud-binary-authorization": "0.8.6", + "google/cloud-build": "0.16.2", + "google/cloud-certificate-manager": "0.7.2", + "google/cloud-channel": "1.9.4", + "google/cloud-cloudcontrolspartner": "0.1.2", + "google/cloud-commerce-consumer-procurement": "0.2.4", + "google/cloud-common-protos": "0.5.2", + "google/cloud-compute": "1.17.0", + "google/cloud-confidentialcomputing": "0.8.2", + "google/cloud-config": "0.5.1", + "google/cloud-contact-center-insights": "1.9.4", + "google/cloud-container": "1.30.2", + "google/cloud-container-analysis": "0.5.6", + "google/cloud-core": "1.58.1", + "google/cloud-data-catalog": "1.10.2", + "google/cloud-data-fusion": "0.6.4", + "google/cloud-datacatalog-lineage": "0.5.4", + "google/cloud-dataflow": "0.6.3", + "google/cloud-dataform": "0.4.4", + "google/cloud-datalabeling": "0.5.4", + "google/cloud-dataplex": "0.16.0", + "google/cloud-dataproc": "3.13.3", + "google/cloud-dataproc-metastore": "0.11.4", + "google/cloud-datastore": "1.28.2", + "google/cloud-datastore-admin": "0.8.4", + "google/cloud-datastream": "1.5.4", + "google/cloud-debugger": "1.8.6", + "google/cloud-deploy": "0.18.1", + "google/cloud-dialogflow": "1.12.2", + "google/cloud-dialogflow-cx": "0.3.3", + "google/cloud-discoveryengine": "0.11.2", + "google/cloud-dlp": "1.13.2", + "google/cloud-dms": "1.5.4", + "google/cloud-document-ai": "1.12.1", + "google/cloud-domains": "0.5.4", + "google/cloud-edgenetwork": "0.3.5", + "google/cloud-error-reporting": "0.22.5", + "google/cloud-essential-contacts": "0.4.4", + "google/cloud-eventarc": "1.3.4", + "google/cloud-eventarc-publishing": "0.6.3", + "google/cloud-filestore": "1.5.6", + "google/cloud-firestore": "1.43.2", + "google/cloud-functions": "1.6.4", + "google/cloud-game-servers": "1.2.5", + "google/cloud-gke-backup": "0.7.2", + "google/cloud-gke-connect-gateway": "0.4.3", + "google/cloud-gke-hub": "0.9.4", + "google/cloud-gke-multi-cloud": "0.5.4", + "google/cloud-gsuite-addons": "0.3.4", + "google/cloud-iam": "0.5.4", + "google/cloud-iam-credentials": "1.2.4", + "google/cloud-iap": "1.4.4", + "google/cloud-ids": "0.5.4", + "google/cloud-iot": "1.7.4", + "google/cloud-kms": "1.21.4", + "google/cloud-kms-inventory": "0.4.4", + "google/cloud-language": "0.32.5", + "google/cloud-life-sciences": "0.6.4", + "google/cloud-logging": "1.30.1", + "google/cloud-managed-identities": "1.3.4", + "google/cloud-media-translation": "0.4.3", + "google/cloud-memcache": "1.3.4", + "google/cloud-migrationcenter": "0.4.4", + "google/cloud-monitoring": "1.10.2", + "google/cloud-netapp": "0.2.6", + "google/cloud-network-connectivity": "1.5.4", + "google/cloud-network-management": "1.7.2", + "google/cloud-network-security": "0.6.4", + "google/cloud-notebooks": "0.7.4", + "google/cloud-optimization": "0.6.4", + "google/cloud-orchestration-airflow": "1.6.3", + "google/cloud-org-policy": "0.6.4", + "google/cloud-osconfig": "1.3.4", + "google/cloud-oslogin": "1.9.4", + "google/cloud-parallelstore": "0.2.0", + "google/cloud-policy-troubleshooter": "1.3.3", + "google/cloud-policysimulator": "0.2.4", + "google/cloud-policytroubleshooter-iam": "0.2.4", + "google/cloud-private-catalog": "0.4.3", + "google/cloud-profiler": "1.4.2", + "google/cloud-pubsub": "2.1.2", + "google/cloud-quotas": "0.2.2", + "google/cloud-rapidmigrationassessment": "0.3.4", + "google/cloud-recaptcha-enterprise": "1.12.1", + "google/cloud-recommendations-ai": "0.7.4", + "google/cloud-recommender": "1.11.4", + "google/cloud-redis": "1.9.4", + "google/cloud-redis-cluster": "0.2.4", + "google/cloud-resource-manager": "0.8.4", + "google/cloud-resource-settings": "1.2.4", + "google/cloud-retail": "1.6.3", + "google/cloud-run": "0.9.2", + "google/cloud-scheduler": "1.10.4", + "google/cloud-secret-manager": "1.15.1", + "google/cloud-securesourcemanager": "0.2.4", + "google/cloud-security-center": "1.28.1", + "google/cloud-security-private-ca": "1.7.2", + "google/cloud-security-public-ca": "0.3.4", + "google/cloud-securitycentermanagement": "0.2.7", + "google/cloud-service-control": "1.4.3", + "google/cloud-service-directory": "1.3.4", + "google/cloud-service-management": "1.3.4", + "google/cloud-service-usage": "1.3.3", + "google/cloud-servicehealth": "0.1.5", + "google/cloud-shell": "1.3.4", + "google/cloud-spanner": "1.76.1", + "google/cloud-speech": "1.18.2", + "google/cloud-sql-admin": "0.17.0", + "google/cloud-storage": "1.41.4", + "google/cloud-storage-control": "0.1.1", + "google/cloud-storage-transfer": "1.4.4", + "google/cloud-storageinsights": "0.3.4", + "google/cloud-support": "0.2.4", + "google/cloud-talent": "1.3.4", + "google/cloud-tasks": "1.14.5", + "google/cloud-telcoautomation": "0.2.4", + "google/cloud-text-to-speech": "1.8.4", + "google/cloud-tpu": "1.4.4", + "google/cloud-trace": "1.8.5", + "google/cloud-translate": "1.17.6", + "google/cloud-video-live-stream": "0.7.4", + "google/cloud-video-stitcher": "0.8.4", + "google/cloud-video-transcoder": "0.10.4", + "google/cloud-videointelligence": "1.15.4", + "google/cloud-vision": "1.9.3", + "google/cloud-vm-migration": "0.6.4", + "google/cloud-vmware-engine": "0.5.5", + "google/cloud-vpc-access": "1.3.4", + "google/cloud-web-risk": "1.5.4", + "google/cloud-web-security-scanner": "0.8.4", + "google/cloud-workflows": "0.5.4", + "google/grafeas": "0.10.2", + "google/longrunning": "0.4.2", + "google/shopping-common-protos": "0.4.0", + "google/shopping-css": "0.2.5", + "google/shopping-merchant-conversions": "0.1.0", + "google/shopping-merchant-inventories": "0.4.2", + "google/shopping-merchant-quota": "0.1.2", + "google/shopping-merchant-reports": "0.7.2" }, "suggest": { "opis/closure": "May be used to serialize closures to process jobs in the batch daemon. Please require version ^3.", From 9ad2e3d7fd8358ef7f9d8ca9c6c4db68dbcadb78 Mon Sep 17 00:00:00 2001 From: Vishwaraj Anand Date: Mon, 6 May 2024 07:42:44 +0000 Subject: [PATCH 86/86] feat(Storage): Update Service Definition to enable hierarchical namespace (#7291) --- .../ServiceDefinition/storage-v1.json | 10614 ++++++++-------- 1 file changed, 5474 insertions(+), 5140 deletions(-) diff --git a/Storage/src/Connection/ServiceDefinition/storage-v1.json b/Storage/src/Connection/ServiceDefinition/storage-v1.json index 25303d3bf767..76ce2ce9d8bf 100644 --- a/Storage/src/Connection/ServiceDefinition/storage-v1.json +++ b/Storage/src/Connection/ServiceDefinition/storage-v1.json @@ -1,5391 +1,5725 @@ { - "kind": "discovery#restDescription", - "version": "v1", - "id": "storage:v1", - "rootUrl": "https://storage.googleapis.com/", - "mtlsRootUrl": "https://storage.mtls.googleapis.com/", - "baseUrl": "https://storage.googleapis.com/storage/v1/", - "basePath": "/storage/v1/", - "servicePath": "storage/v1/", - "batchPath": "batch/storage/v1", - "discoveryVersion": "v1", - "name": "storage", - "title": "Cloud Storage JSON API", - "description": "Stores and retrieves potentially large, immutable data objects.", - "ownerDomain": "google.com", - "ownerName": "Google", - "icons": { - "x16": "https://www.google.com/images/icons/product/cloud_storage-16.png", - "x32": "https://www.google.com/images/icons/product/cloud_storage-32.png" - }, - "documentationLink": "https://developers.google.com/storage/docs/json_api/", - "labels": [ - "labs" - ], - "protocol": "rest", - "parameters": { - "alt": { - "type": "string", - "description": "Data format for the response.", - "default": "json", - "enum": [ - "json" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json" - ], - "location": "query" - }, - "fields": { - "type": "string", - "description": "Selector specifying which fields to include in a partial response.", - "location": "query" - }, - "key": { - "type": "string", - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "location": "query" - }, - "oauth_token": { - "type": "string", - "description": "OAuth 2.0 token for the current user.", - "location": "query" - }, - "prettyPrint": { - "type": "boolean", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "location": "query" - }, - "quotaUser": { - "type": "string", - "description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.", - "location": "query" - }, - "userIp": { - "type": "string", - "description": "Deprecated. Please use quotaUser instead.", - "location": "query" - }, - "uploadType": { - "type": "string", - "description": "Upload protocol for media (e.g. \"media\", \"multipart\", \"resumable\").", - "location": "query" - } - }, - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud-platform.read-only": { - "description": "View your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/devstorage.full_control": { - "description": "Manage your data and permissions in Google Cloud Storage" - }, - "https://www.googleapis.com/auth/devstorage.read_only": { - "description": "View your data in Google Cloud Storage" - }, - "https://www.googleapis.com/auth/devstorage.read_write": { - "description": "Manage your data in Google Cloud Storage" - } - } - } - }, - "schemas": { - "Bucket": { - "id": "Bucket", - "type": "object", - "description": "A bucket.", - "properties": { - "acl": { - "type": "array", - "description": "Access controls on the bucket.", - "items": { - "$ref": "BucketAccessControl" - }, - "annotations": { - "required": [ - "storage.buckets.update" - ] - } - }, - "billing": { - "type": "object", - "description": "The bucket's billing configuration.", - "properties": { - "requesterPays": { - "type": "boolean", - "description": "When set to true, Requester Pays is enabled for this bucket." - } - } - }, - "cors": { - "type": "array", - "description": "The bucket's Cross-Origin Resource Sharing (CORS) configuration.", - "items": { - "type": "object", - "properties": { - "maxAgeSeconds": { - "type": "integer", - "description": "The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses.", - "format": "int32" - }, - "method": { - "type": "array", - "description": "The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: \"*\" is permitted in the list of methods, and means \"any method\".", - "items": { - "type": "string" + "kind": "discovery#restDescription", + "version": "v1", + "id": "storage:v1", + "rootUrl": "https://storage.googleapis.com/", + "mtlsRootUrl": "https://storage.mtls.googleapis.com/", + "baseUrl": "https://storage.googleapis.com/storage/v1/", + "basePath": "/storage/v1/", + "servicePath": "storage/v1/", + "batchPath": "batch/storage/v1", + "discoveryVersion": "v1", + "name": "storage", + "title": "Cloud Storage JSON API", + "description": "Stores and retrieves potentially large, immutable data objects.", + "ownerDomain": "google.com", + "ownerName": "Google", + "icons": { + "x16": "https://www.google.com/images/icons/product/cloud_storage-16.png", + "x32": "https://www.google.com/images/icons/product/cloud_storage-32.png" + }, + "documentationLink": "https://developers.google.com/storage/docs/json_api/", + "labels": [ + "labs" + ], + "endpoints": [ + { + "endpointUrl": "https://storage.me-central2.rep.googleapis.com/", + "location": "me-central2", + "description": "Regional Endpoint" } - }, - "origin": { - "type": "array", - "description": "The list of Origins eligible to receive CORS response headers. Note: \"*\" is permitted in the list of origins, and means \"any Origin\".", - "items": { - "type": "string" + ], + "protocol": "rest", + "parameters": { + "alt": { + "type": "string", + "description": "Data format for the response.", + "default": "json", + "enum": [ + "json" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json" + ], + "location": "query" + }, + "fields": { + "type": "string", + "description": "Selector specifying which fields to include in a partial response.", + "location": "query" + }, + "key": { + "type": "string", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query" + }, + "oauth_token": { + "type": "string", + "description": "OAuth 2.0 token for the current user.", + "location": "query" + }, + "prettyPrint": { + "type": "boolean", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "location": "query" + }, + "quotaUser": { + "type": "string", + "description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.", + "location": "query" + }, + "userIp": { + "type": "string", + "description": "Deprecated. Please use quotaUser instead.", + "location": "query" + }, + "uploadType": { + "type": "string", + "description": "Upload protocol for media (e.g. \"media\", \"multipart\", \"resumable\").", + "location": "query" } - }, - "responseHeader": { - "type": "array", - "description": "The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains.", - "items": { - "type": "string" + }, + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/cloud-platform.read-only": { + "description": "View your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/devstorage.full_control": { + "description": "Manage your data and permissions in Google Cloud Storage" + }, + "https://www.googleapis.com/auth/devstorage.read_only": { + "description": "View your data in Google Cloud Storage" + }, + "https://www.googleapis.com/auth/devstorage.read_write": { + "description": "Manage your data in Google Cloud Storage" + } + } } - } - } - } - }, - "customPlacementConfig": { - "type": "object", - "description": "The bucket's custom placement configuration for Custom Dual Regions.", - "properties": { - "dataLocations": { - "type": "array", - "description": "The list of regional locations in which data is placed.", - "items": { - "type": "string" - } - } - } - }, - "defaultEventBasedHold": { - "type": "boolean", - "description": "The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false. Objects under event-based hold cannot be deleted, overwritten or archived until the hold is removed." - }, - "defaultObjectAcl": { - "type": "array", - "description": "Default access controls to apply to new objects when no ACL is provided.", - "items": { - "$ref": "ObjectAccessControl" - } - }, - "encryption": { - "type": "object", - "description": "Encryption configuration for a bucket.", - "properties": { - "defaultKmsKeyName": { - "type": "string", - "description": "A Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified." - } - } }, - "etag": { - "type": "string", - "description": "HTTP 1.1 Entity tag for the bucket." + "schemas": { + "Bucket": { + "id": "Bucket", + "type": "object", + "description": "A bucket.", + "properties": { + "acl": { + "type": "array", + "description": "Access controls on the bucket.", + "items": { + "$ref": "BucketAccessControl" + }, + "annotations": { + "required": [ + "storage.buckets.update" + ] + } + }, + "billing": { + "type": "object", + "description": "The bucket's billing configuration.", + "properties": { + "requesterPays": { + "type": "boolean", + "description": "When set to true, Requester Pays is enabled for this bucket." + } + } + }, + "cors": { + "type": "array", + "description": "The bucket's Cross-Origin Resource Sharing (CORS) configuration.", + "items": { + "type": "object", + "properties": { + "maxAgeSeconds": { + "type": "integer", + "description": "The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses.", + "format": "int32" + }, + "method": { + "type": "array", + "description": "The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: \"*\" is permitted in the list of methods, and means \"any method\".", + "items": { + "type": "string" + } + }, + "origin": { + "type": "array", + "description": "The list of Origins eligible to receive CORS response headers. Note: \"*\" is permitted in the list of origins, and means \"any Origin\".", + "items": { + "type": "string" + } + }, + "responseHeader": { + "type": "array", + "description": "The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains.", + "items": { + "type": "string" + } + } + } + } + }, + "customPlacementConfig": { + "type": "object", + "description": "The bucket's custom placement configuration for Custom Dual Regions.", + "properties": { + "dataLocations": { + "type": "array", + "description": "The list of regional locations in which data is placed.", + "items": { + "type": "string" + } + } + } + }, + "defaultEventBasedHold": { + "type": "boolean", + "description": "The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false. Objects under event-based hold cannot be deleted, overwritten or archived until the hold is removed." + }, + "defaultObjectAcl": { + "type": "array", + "description": "Default access controls to apply to new objects when no ACL is provided.", + "items": { + "$ref": "ObjectAccessControl" + } + }, + "encryption": { + "type": "object", + "description": "Encryption configuration for a bucket.", + "properties": { + "defaultKmsKeyName": { + "type": "string", + "description": "A Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified." + } + } + }, + "etag": { + "type": "string", + "description": "HTTP 1.1 Entity tag for the bucket." + }, + "hierarchicalNamespace": { + "type": "object", + "description": "The bucket's hierarchical namespace configuration.", + "properties": { + "enabled": { + "type": "boolean", + "description": "When set to true, hierarchical namespace is enabled for this bucket." + } + } }, "iamConfiguration": { - "type": "object", - "description": "The bucket's IAM configuration.", - "properties": { - "bucketPolicyOnly": { - "type": "object", - "description": "The bucket's uniform bucket-level access configuration. The feature was formerly known as Bucket Policy Only. For backward compatibility, this field will be populated with identical information as the uniformBucketLevelAccess field. We recommend using the uniformBucketLevelAccess field to enable and disable the feature.", - "properties": { - "enabled": { - "type": "boolean", - "description": "If set, access is controlled only by bucket-level or above IAM policies." - }, - "lockedTime": { - "type": "string", - "description": "The deadline for changing iamConfiguration.bucketPolicyOnly.enabled from true to false in RFC 3339 format. iamConfiguration.bucketPolicyOnly.enabled may be changed from true to false until the locked time, after which the field is immutable.", - "format": "date-time" - } - } - }, - "uniformBucketLevelAccess": { - "type": "object", - "description": "The bucket's uniform bucket-level access configuration.", - "properties": { - "enabled": { - "type": "boolean", - "description": "If set, access is controlled only by bucket-level or above IAM policies." - }, - "lockedTime": { - "type": "string", - "description": "The deadline for changing iamConfiguration.uniformBucketLevelAccess.enabled from true to false in RFC 3339 format. iamConfiguration.uniformBucketLevelAccess.enabled may be changed from true to false until the locked time, after which the field is immutable.", - "format": "date-time" + "type": "object", + "description": "The bucket's IAM configuration.", + "properties": { + "bucketPolicyOnly": { + "type": "object", + "description": "The bucket's uniform bucket-level access configuration. The feature was formerly known as Bucket Policy Only. For backward compatibility, this field will be populated with identical information as the uniformBucketLevelAccess field. We recommend using the uniformBucketLevelAccess field to enable and disable the feature.", + "properties": { + "enabled": { + "type": "boolean", + "description": "If set, access is controlled only by bucket-level or above IAM policies." + }, + "lockedTime": { + "type": "string", + "description": "The deadline for changing iamConfiguration.bucketPolicyOnly.enabled from true to false in RFC 3339 format. iamConfiguration.bucketPolicyOnly.enabled may be changed from true to false until the locked time, after which the field is immutable.", + "format": "date-time" + } + } + }, + "uniformBucketLevelAccess": { + "type": "object", + "description": "The bucket's uniform bucket-level access configuration.", + "properties": { + "enabled": { + "type": "boolean", + "description": "If set, access is controlled only by bucket-level or above IAM policies." + }, + "lockedTime": { + "type": "string", + "description": "The deadline for changing iamConfiguration.uniformBucketLevelAccess.enabled from true to false in RFC 3339 format. iamConfiguration.uniformBucketLevelAccess.enabled may be changed from true to false until the locked time, after which the field is immutable.", + "format": "date-time" + } + } + }, + "publicAccessPrevention": { + "type": "string", + "description": "The bucket's Public Access Prevention configuration. Currently, 'inherited' and 'enforced' are supported." + } } - } - }, - "publicAccessPrevention": { - "type": "string", - "description": "The bucket's Public Access Prevention configuration. Currently, 'inherited' and 'enforced' are supported." - } - } }, "id": { - "type": "string", - "description": "The ID of the bucket. For buckets, the id and name properties are the same." + "type": "string", + "description": "The ID of the bucket. For buckets, the id and name properties are the same." }, "kind": { - "type": "string", - "description": "The kind of item this is. For buckets, this is always storage#bucket.", - "default": "storage#bucket" + "type": "string", + "description": "The kind of item this is. For buckets, this is always storage#bucket.", + "default": "storage#bucket" }, "labels": { - "type": "object", - "description": "User-provided labels, in key/value pairs.", - "additionalProperties": { - "type": "string", - "description": "An individual label entry." - } + "type": "object", + "description": "User-provided labels, in key/value pairs.", + "additionalProperties": { + "type": "string", + "description": "An individual label entry." + } }, "lifecycle": { - "type": "object", - "description": "The bucket's lifecycle configuration. See lifecycle management for more information.", - "properties": { - "rule": { - "type": "array", - "description": "A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken.", - "items": { "type": "object", + "description": "The bucket's lifecycle configuration. See lifecycle management for more information.", "properties": { - "action": { - "type": "object", - "description": "The action to take.", - "properties": { - "storageClass": { - "type": "string", - "description": "Target storage class. Required iff the type of the action is SetStorageClass." - }, - "type": { - "type": "string", - "description": "Type of the action. Currently, only Delete, SetStorageClass, and AbortIncompleteMultipartUpload are supported." - } - } - }, - "condition": { - "type": "object", - "description": "The condition(s) under which the action will be taken.", - "properties": { - "age": { - "type": "integer", - "description": "Age of an object (in days). This condition is satisfied when an object reaches the specified age.", - "format": "int32" - }, - "createdBefore": { - "type": "string", - "description": "A date in RFC 3339 format with only the date part (for instance, \"2013-01-15\"). This condition is satisfied when an object is created before midnight of the specified date in UTC.", - "format": "date" - }, - "customTimeBefore": { - "type": "string", - "description": "A date in RFC 3339 format with only the date part (for instance, \"2013-01-15\"). This condition is satisfied when the custom time on an object is before this date in UTC.", - "format": "date" - }, - "daysSinceCustomTime": { - "type": "integer", - "description": "Number of days elapsed since the user-specified timestamp set on an object. The condition is satisfied if the days elapsed is at least this number. If no custom timestamp is specified on an object, the condition does not apply.", - "format": "int32" - }, - "daysSinceNoncurrentTime": { - "type": "integer", - "description": "Number of days elapsed since the noncurrent timestamp of an object. The condition is satisfied if the days elapsed is at least this number. This condition is relevant only for versioned objects. The value of the field must be a nonnegative integer. If it's zero, the object version will become eligible for Lifecycle action as soon as it becomes noncurrent.", - "format": "int32" - }, - "isLive": { - "type": "boolean", - "description": "Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects." - }, - "matchesPattern": { - "type": "string", - "description": "A regular expression that satisfies the RE2 syntax. This condition is satisfied when the name of the object matches the RE2 pattern. Note: This feature is currently in the \"Early Access\" launch stage and is only available to a whitelisted set of users; that means that this feature may be changed in backward-incompatible ways and that it is not guaranteed to be released." - }, - "matchesPrefix": { - "type": "array", - "description": "List of object name prefixes. This condition will be satisfied when at least one of the prefixes exactly matches the beginning of the object name.", - "items": { - "type": "string" - } - }, - "matchesSuffix": { - "type": "array", - "description": "List of object name suffixes. This condition will be satisfied when at least one of the suffixes exactly matches the end of the object name.", - "items": { - "type": "string" - } - }, - "matchesStorageClass": { - "type": "array", - "description": "Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, and DURABLE_REDUCED_AVAILABILITY.", - "items": { - "type": "string" + "rule": { + "type": "array", + "description": "A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken.", + "items": { + "type": "object", + "properties": { + "action": { + "type": "object", + "description": "The action to take.", + "properties": { + "storageClass": { + "type": "string", + "description": "Target storage class. Required iff the type of the action is SetStorageClass." + }, + "type": { + "type": "string", + "description": "Type of the action. Currently, only Delete, SetStorageClass, and AbortIncompleteMultipartUpload are supported." + } + } + }, + "condition": { + "type": "object", + "description": "The condition(s) under which the action will be taken.", + "properties": { + "age": { + "type": "integer", + "description": "Age of an object (in days). This condition is satisfied when an object reaches the specified age.", + "format": "int32" + }, + "createdBefore": { + "type": "string", + "description": "A date in RFC 3339 format with only the date part (for instance, \"2013-01-15\"). This condition is satisfied when an object is created before midnight of the specified date in UTC.", + "format": "date" + }, + "customTimeBefore": { + "type": "string", + "description": "A date in RFC 3339 format with only the date part (for instance, \"2013-01-15\"). This condition is satisfied when the custom time on an object is before this date in UTC.", + "format": "date" + }, + "daysSinceCustomTime": { + "type": "integer", + "description": "Number of days elapsed since the user-specified timestamp set on an object. The condition is satisfied if the days elapsed is at least this number. If no custom timestamp is specified on an object, the condition does not apply.", + "format": "int32" + }, + "daysSinceNoncurrentTime": { + "type": "integer", + "description": "Number of days elapsed since the noncurrent timestamp of an object. The condition is satisfied if the days elapsed is at least this number. This condition is relevant only for versioned objects. The value of the field must be a nonnegative integer. If it's zero, the object version will become eligible for Lifecycle action as soon as it becomes noncurrent.", + "format": "int32" + }, + "isLive": { + "type": "boolean", + "description": "Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects." + }, + "matchesPattern": { + "type": "string", + "description": "A regular expression that satisfies the RE2 syntax. This condition is satisfied when the name of the object matches the RE2 pattern. Note: This feature is currently in the \"Early Access\" launch stage and is only available to a whitelisted set of users; that means that this feature may be changed in backward-incompatible ways and that it is not guaranteed to be released." + }, + "matchesPrefix": { + "type": "array", + "description": "List of object name prefixes. This condition will be satisfied when at least one of the prefixes exactly matches the beginning of the object name.", + "items": { + "type": "string" + } + }, + "matchesSuffix": { + "type": "array", + "description": "List of object name suffixes. This condition will be satisfied when at least one of the suffixes exactly matches the end of the object name.", + "items": { + "type": "string" + } + }, + "matchesStorageClass": { + "type": "array", + "description": "Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, and DURABLE_REDUCED_AVAILABILITY.", + "items": { + "type": "string" + } + }, + "noncurrentTimeBefore": { + "type": "string", + "description": "A date in RFC 3339 format with only the date part (for instance, \"2013-01-15\"). This condition is satisfied when the noncurrent time on an object is before this date in UTC. This condition is relevant only for versioned objects.", + "format": "date" + }, + "numNewerVersions": { + "type": "integer", + "description": "Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object.", + "format": "int32" + } + } + } + } + } } - }, - "noncurrentTimeBefore": { - "type": "string", - "description": "A date in RFC 3339 format with only the date part (for instance, \"2013-01-15\"). This condition is satisfied when the noncurrent time on an object is before this date in UTC. This condition is relevant only for versioned objects.", - "format": "date" - }, - "numNewerVersions": { - "type": "integer", - "description": "Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object.", - "format": "int32" - } - } - } } - } - } - } }, "autoclass": { - "type": "object", - "description": "The bucket's Autoclass configuration.", - "properties": { - "enabled": { - "type": "boolean", - "description": "Whether or not Autoclass is enabled on this bucket" - }, - "toggleTime": { - "type": "string", - "description": "A date and time in RFC 3339 format representing the instant at which \"enabled\" was last toggled.", - "format": "date-time" - }, - "terminalStorageClass": { - "type": "string", - "description": "The storage class that objects in the bucket eventually transition to if they are not read for a certain length of time. Valid values are NEARLINE and ARCHIVE." - }, - "terminalStorageClassUpdateTime": { - "type": "string", - "description": "A date and time in RFC 3339 format representing the time of the most recent update to \"terminalStorageClass\".", - "format": "date-time" - } - } + "type": "object", + "description": "The bucket's Autoclass configuration.", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether or not Autoclass is enabled on this bucket" + }, + "toggleTime": { + "type": "string", + "description": "A date and time in RFC 3339 format representing the instant at which \"enabled\" was last toggled.", + "format": "date-time" + }, + "terminalStorageClass": { + "type": "string", + "description": "The storage class that objects in the bucket eventually transition to if they are not read for a certain length of time. Valid values are NEARLINE and ARCHIVE." + }, + "terminalStorageClassUpdateTime": { + "type": "string", + "description": "A date and time in RFC 3339 format representing the time of the most recent update to \"terminalStorageClass\".", + "format": "date-time" + } + } }, "location": { - "type": "string", - "description": "The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the developer's guide for the authoritative list." + "type": "string", + "description": "The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the developer's guide for the authoritative list." }, "locationType": { - "type": "string", - "description": "The type of the bucket location." + "type": "string", + "description": "The type of the bucket location." }, "logging": { - "type": "object", - "description": "The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs.", - "properties": { - "logBucket": { - "type": "string", - "description": "The destination bucket where the current bucket's logs should be placed." - }, - "logObjectPrefix": { - "type": "string", - "description": "A prefix for log object names." - } - } + "type": "object", + "description": "The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs.", + "properties": { + "logBucket": { + "type": "string", + "description": "The destination bucket where the current bucket's logs should be placed." + }, + "logObjectPrefix": { + "type": "string", + "description": "A prefix for log object names." + } + } }, "metageneration": { - "type": "string", - "description": "The metadata generation of this bucket.", - "format": "int64" + "type": "string", + "description": "The metadata generation of this bucket.", + "format": "int64" }, "name": { - "type": "string", - "description": "The name of the bucket.", - "annotations": { - "required": [ - "storage.buckets.insert" - ] - } + "type": "string", + "description": "The name of the bucket.", + "annotations": { + "required": [ + "storage.buckets.insert" + ] + } }, "owner": { - "type": "object", - "description": "The owner of the bucket. This is always the project team's owner group.", - "properties": { - "entity": { - "type": "string", - "description": "The entity, in the form project-owner-projectId." - }, - "entityId": { - "type": "string", - "description": "The ID for the entity." - } - } + "type": "object", + "description": "The owner of the bucket. This is always the project team's owner group.", + "properties": { + "entity": { + "type": "string", + "description": "The entity, in the form project-owner-projectId." + }, + "entityId": { + "type": "string", + "description": "The ID for the entity." + } + } }, "projectNumber": { - "type": "string", - "description": "The project number of the project the bucket belongs to.", - "format": "uint64" + "type": "string", + "description": "The project number of the project the bucket belongs to.", + "format": "uint64" }, "retentionPolicy": { - "type": "object", - "description": "The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION_DENIED error.", - "properties": { - "effectiveTime": { - "type": "string", - "description": "Server-determined value that indicates the time from which policy was enforced and effective. This value is in RFC 3339 format.", - "format": "date-time" - }, - "isLocked": { - "type": "boolean", - "description": "Once locked, an object retention policy cannot be modified." - }, - "retentionPeriod": { - "type": "string", - "description": "The duration in seconds that objects need to be retained. Retention duration must be greater than zero and less than 100 years. Note that enforcement of retention periods less than a day is not guaranteed. Such periods should only be used for testing purposes.", - "format": "int64" - } - } + "type": "object", + "description": "The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION_DENIED error.", + "properties": { + "effectiveTime": { + "type": "string", + "description": "Server-determined value that indicates the time from which policy was enforced and effective. This value is in RFC 3339 format.", + "format": "date-time" + }, + "isLocked": { + "type": "boolean", + "description": "Once locked, an object retention policy cannot be modified." + }, + "retentionPeriod": { + "type": "string", + "description": "The duration in seconds that objects need to be retained. Retention duration must be greater than zero and less than 100 years. Note that enforcement of retention periods less than a day is not guaranteed. Such periods should only be used for testing purposes.", + "format": "int64" + } + } }, "objectRetention": { - "type": "object", - "description": "The bucket's object retention config.", - "properties": { - "mode": { - "type": "string", - "description": "The bucket's object retention mode. Can be Enabled." - } - } + "type": "object", + "description": "The bucket's object retention config.", + "properties": { + "mode": { + "type": "string", + "description": "The bucket's object retention mode. Can be Enabled." + } + } }, "rpo": { - "type": "string", - "description": "The Recovery Point Objective (RPO) of this bucket. Set to ASYNC_TURBO to turn on Turbo Replication on a bucket." + "type": "string", + "description": "The Recovery Point Objective (RPO) of this bucket. Set to ASYNC_TURBO to turn on Turbo Replication on a bucket." }, "selfLink": { - "type": "string", - "description": "The URI of this bucket." + "type": "string", + "description": "The URI of this bucket." }, "softDeletePolicy": { - "type": "object", - "description": "The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted.", - "properties": { - "retentionDurationSeconds": { - "type": "string", - "description": "The duration in seconds that soft-deleted objects in the bucket will be retained and cannot be permanently deleted.", - "format": "int64" - }, - "effectiveTime": { - "type": "string", - "description": "Server-determined value that indicates the time from which the policy, or one with a greater retention, was effective. This value is in RFC 3339 format.", - "format": "date-time" - } - } + "type": "object", + "description": "The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted.", + "properties": { + "retentionDurationSeconds": { + "type": "string", + "description": "The duration in seconds that soft-deleted objects in the bucket will be retained and cannot be permanently deleted.", + "format": "int64" + }, + "effectiveTime": { + "type": "string", + "description": "Server-determined value that indicates the time from which the policy, or one with a greater retention, was effective. This value is in RFC 3339 format.", + "format": "date-time" + } + } }, "storageClass": { - "type": "string", - "description": "The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see storage classes." + "type": "string", + "description": "The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see storage classes." }, "timeCreated": { - "type": "string", - "description": "The creation time of the bucket in RFC 3339 format.", - "format": "date-time" + "type": "string", + "description": "The creation time of the bucket in RFC 3339 format.", + "format": "date-time" }, "updated": { - "type": "string", - "description": "The modification time of the bucket in RFC 3339 format.", - "format": "date-time" + "type": "string", + "description": "The modification time of the bucket in RFC 3339 format.", + "format": "date-time" }, "versioning": { - "type": "object", - "description": "The bucket's versioning configuration.", - "properties": { - "enabled": { - "type": "boolean", - "description": "While set to true, versioning is fully enabled for this bucket." - } - } + "type": "object", + "description": "The bucket's versioning configuration.", + "properties": { + "enabled": { + "type": "boolean", + "description": "While set to true, versioning is fully enabled for this bucket." + } + } }, "website": { - "type": "object", - "description": "The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples for more information.", - "properties": { - "mainPageSuffix": { - "type": "string", - "description": "If the requested object path is missing, the service will ensure the path has a trailing '/', append this suffix, and attempt to retrieve the resulting object. This allows the creation of index.html objects to represent directory pages." - }, - "notFoundPage": { - "type": "string", - "description": "If the requested object path is missing, and any mainPageSuffix object is missing, if applicable, the service will return the named object from this bucket as the content for a 404 Not Found result." - } - } + "type": "object", + "description": "The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples for more information.", + "properties": { + "mainPageSuffix": { + "type": "string", + "description": "If the requested object path is missing, the service will ensure the path has a trailing '/', append this suffix, and attempt to retrieve the resulting object. This allows the creation of index.html objects to represent directory pages." + }, + "notFoundPage": { + "type": "string", + "description": "If the requested object path is missing, and any mainPageSuffix object is missing, if applicable, the service will return the named object from this bucket as the content for a 404 Not Found result." + } + } }, "satisfiesPZS": { - "type": "boolean", - "description": "Reserved for future use." + "type": "boolean", + "description": "Reserved for future use." } - } - }, - "AnywhereCache": { - "id": "AnywhereCache", - "type": "object", - "description": "An Anywhere Cache instance.", - "properties": { +} +}, +"AnywhereCache": { +"id": "AnywhereCache", +"type": "object", +"description": "An Anywhere Cache instance.", +"properties": { "kind": { - "type": "string", - "description": "The kind of item this is. For Anywhere Cache, this is always storage#anywhereCache.", - "default": "storage#anywhereCache" + "type": "string", + "description": "The kind of item this is. For Anywhere Cache, this is always storage#anywhereCache.", + "default": "storage#anywhereCache" }, "id": { - "type": "string", - "description": "The ID of the resource, including the project number, bucket name and anywhere cache ID." + "type": "string", + "description": "The ID of the resource, including the project number, bucket name and anywhere cache ID." }, "selfLink": { - "type": "string", - "description": "The link to this cache instance." + "type": "string", + "description": "The link to this cache instance." }, "bucket": { - "type": "string", - "description": "The name of the bucket containing this cache instance." + "type": "string", + "description": "The name of the bucket containing this cache instance." }, "anywhereCacheId": { - "type": "string", - "description": "The ID of the Anywhere cache instance." + "type": "string", + "description": "The ID of the Anywhere cache instance." + }, + "zone": { + "type": "string", + "description": "The zone in which the cache instance is running. For example, us-central1-a." }, "state": { - "type": "string", - "description": "The current state of the cache instance." + "type": "string", + "description": "The current state of the cache instance." }, "createTime": { - "type": "string", - "description": "The creation time of the cache instance in RFC 3339 format.", - "format": "date-time" + "type": "string", + "description": "The creation time of the cache instance in RFC 3339 format.", + "format": "date-time" }, "updateTime": { - "type": "string", - "description": "The modification time of the cache instance metadata in RFC 3339 format.", - "format": "date-time" + "type": "string", + "description": "The modification time of the cache instance metadata in RFC 3339 format.", + "format": "date-time" }, "ttl": { - "type": "string", - "description": "The TTL of all cache entries in whole seconds. e.g., \"7200s\". ", - "format": "google-duration" + "type": "string", + "description": "The TTL of all cache entries in whole seconds. e.g., \"7200s\". ", + "format": "google-duration" }, "admissionPolicy": { - "type": "string", - "description": "The cache-level entry admission policy." + "type": "string", + "description": "The cache-level entry admission policy." }, "pendingUpdate": { - "type": "boolean", - "description": "True if the cache instance has an active Update long-running operation." + "type": "boolean", + "description": "True if the cache instance has an active Update long-running operation." } - } - }, - "AnywhereCaches": { - "id": "AnywhereCaches", - "type": "object", - "description": "A list of Anywhere Caches.", - "properties": { +} +}, +"AnywhereCaches": { +"id": "AnywhereCaches", +"type": "object", +"description": "A list of Anywhere Caches.", +"properties": { "kind": { - "type": "string", - "description": "The kind of item this is. For lists of Anywhere Caches, this is always storage#anywhereCaches.", - "default": "storage#anywhereCaches" + "type": "string", + "description": "The kind of item this is. For lists of Anywhere Caches, this is always storage#anywhereCaches.", + "default": "storage#anywhereCaches" }, "nextPageToken": { - "type": "string", - "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results." + "type": "string", + "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results." }, "items": { - "type": "array", - "description": "The list of items.", - "items": { - "$ref": "AnywhereCache" - } + "type": "array", + "description": "The list of items.", + "items": { + "$ref": "AnywhereCache" + } } - } - }, - "BucketAccessControl": { - "id": "BucketAccessControl", - "type": "object", - "description": "An access-control entry.", - "properties": { +} +}, +"BucketAccessControl": { +"id": "BucketAccessControl", +"type": "object", +"description": "An access-control entry.", +"properties": { "bucket": { - "type": "string", - "description": "The name of the bucket." + "type": "string", + "description": "The name of the bucket." }, "domain": { - "type": "string", - "description": "The domain associated with the entity, if any." + "type": "string", + "description": "The domain associated with the entity, if any." }, "email": { - "type": "string", - "description": "The email address associated with the entity, if any." + "type": "string", + "description": "The email address associated with the entity, if any." }, "entity": { - "type": "string", - "description": "The entity holding the permission, in one of the following forms: \n- user-userId \n- user-email \n- group-groupId \n- group-email \n- domain-domain \n- project-team-projectId \n- allUsers \n- allAuthenticatedUsers Examples: \n- The user liz@example.com would be user-liz@example.com. \n- The group example@googlegroups.com would be group-example@googlegroups.com. \n- To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.", - "annotations": { - "required": [ - "storage.bucketAccessControls.insert" - ] - } + "type": "string", + "description": "The entity holding the permission, in one of the following forms: \n- user-userId \n- user-email \n- group-groupId \n- group-email \n- domain-domain \n- project-team-projectId \n- allUsers \n- allAuthenticatedUsers Examples: \n- The user liz@example.com would be user-liz@example.com. \n- The group example@googlegroups.com would be group-example@googlegroups.com. \n- To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.", + "annotations": { + "required": [ + "storage.bucketAccessControls.insert" + ] + } }, "entityId": { - "type": "string", - "description": "The ID for the entity, if any." + "type": "string", + "description": "The ID for the entity, if any." }, "etag": { - "type": "string", - "description": "HTTP 1.1 Entity tag for the access-control entry." + "type": "string", + "description": "HTTP 1.1 Entity tag for the access-control entry." }, "id": { - "type": "string", - "description": "The ID of the access-control entry." + "type": "string", + "description": "The ID of the access-control entry." }, "kind": { - "type": "string", - "description": "The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl.", - "default": "storage#bucketAccessControl" + "type": "string", + "description": "The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl.", + "default": "storage#bucketAccessControl" }, "projectTeam": { - "type": "object", - "description": "The project team associated with the entity, if any.", - "properties": { - "projectNumber": { - "type": "string", - "description": "The project number." - }, - "team": { - "type": "string", - "description": "The team." - } - } + "type": "object", + "description": "The project team associated with the entity, if any.", + "properties": { + "projectNumber": { + "type": "string", + "description": "The project number." + }, + "team": { + "type": "string", + "description": "The team." + } + } }, "role": { - "type": "string", - "description": "The access permission for the entity.", - "annotations": { - "required": [ - "storage.bucketAccessControls.insert" - ] - } + "type": "string", + "description": "The access permission for the entity.", + "annotations": { + "required": [ + "storage.bucketAccessControls.insert" + ] + } }, "selfLink": { - "type": "string", - "description": "The link to this access-control entry." + "type": "string", + "description": "The link to this access-control entry." } - } - }, - "BucketAccessControls": { - "id": "BucketAccessControls", - "type": "object", - "description": "An access-control list.", - "properties": { +} +}, +"BucketAccessControls": { +"id": "BucketAccessControls", +"type": "object", +"description": "An access-control list.", +"properties": { "items": { - "type": "array", - "description": "The list of items.", - "items": { - "$ref": "BucketAccessControl" - } + "type": "array", + "description": "The list of items.", + "items": { + "$ref": "BucketAccessControl" + } }, "kind": { - "type": "string", - "description": "The kind of item this is. For lists of bucket access control entries, this is always storage#bucketAccessControls.", - "default": "storage#bucketAccessControls" + "type": "string", + "description": "The kind of item this is. For lists of bucket access control entries, this is always storage#bucketAccessControls.", + "default": "storage#bucketAccessControls" } - } - }, - "Buckets": { - "id": "Buckets", - "type": "object", - "description": "A list of buckets.", - "properties": { +} +}, +"Buckets": { +"id": "Buckets", +"type": "object", +"description": "A list of buckets.", +"properties": { "items": { - "type": "array", - "description": "The list of items.", - "items": { - "$ref": "Bucket" - } + "type": "array", + "description": "The list of items.", + "items": { + "$ref": "Bucket" + } }, "kind": { - "type": "string", - "description": "The kind of item this is. For lists of buckets, this is always storage#buckets.", - "default": "storage#buckets" + "type": "string", + "description": "The kind of item this is. For lists of buckets, this is always storage#buckets.", + "default": "storage#buckets" }, "nextPageToken": { - "type": "string", - "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results." + "type": "string", + "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results." } - } - }, - "Channel": { - "id": "Channel", - "type": "object", - "description": "An notification channel used to watch for resource changes.", - "properties": { +} +}, +"Channel": { +"id": "Channel", +"type": "object", +"description": "An notification channel used to watch for resource changes.", +"properties": { "address": { - "type": "string", - "description": "The address where notifications are delivered for this channel." + "type": "string", + "description": "The address where notifications are delivered for this channel." }, "expiration": { - "type": "string", - "description": "Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.", - "format": "int64" + "type": "string", + "description": "Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.", + "format": "int64" }, "id": { - "type": "string", - "description": "A UUID or similar unique string that identifies this channel." + "type": "string", + "description": "A UUID or similar unique string that identifies this channel." }, "kind": { - "type": "string", - "description": "Identifies this as a notification channel used to watch for changes to a resource, which is \"api#channel\".", - "default": "api#channel" + "type": "string", + "description": "Identifies this as a notification channel used to watch for changes to a resource, which is \"api#channel\".", + "default": "api#channel" }, "params": { - "type": "object", - "description": "Additional parameters controlling delivery channel behavior. Optional.", - "additionalProperties": { - "type": "string", - "description": "Declares a new parameter by name." - } + "type": "object", + "description": "Additional parameters controlling delivery channel behavior. Optional.", + "additionalProperties": { + "type": "string", + "description": "Declares a new parameter by name." + } }, "payload": { - "type": "boolean", - "description": "A Boolean value to indicate whether payload is wanted. Optional." + "type": "boolean", + "description": "A Boolean value to indicate whether payload is wanted. Optional." }, "resourceId": { - "type": "string", - "description": "An opaque ID that identifies the resource being watched on this channel. Stable across different API versions." + "type": "string", + "description": "An opaque ID that identifies the resource being watched on this channel. Stable across different API versions." }, "resourceUri": { - "type": "string", - "description": "A version-specific identifier for the watched resource." + "type": "string", + "description": "A version-specific identifier for the watched resource." }, "token": { - "type": "string", - "description": "An arbitrary string delivered to the target address with each notification delivered over this channel. Optional." + "type": "string", + "description": "An arbitrary string delivered to the target address with each notification delivered over this channel. Optional." }, "type": { - "type": "string", - "description": "The type of delivery mechanism used for this channel." + "type": "string", + "description": "The type of delivery mechanism used for this channel." } - } - }, - "ComposeRequest": { - "id": "ComposeRequest", - "type": "object", - "description": "A Compose request.", - "properties": { +} +}, +"ComposeRequest": { +"id": "ComposeRequest", +"type": "object", +"description": "A Compose request.", +"properties": { "destination": { - "$ref": "Object", - "description": "Properties of the resulting object." + "$ref": "Object", + "description": "Properties of the resulting object." }, "kind": { - "type": "string", - "description": "The kind of item this is.", - "default": "storage#composeRequest" + "type": "string", + "description": "The kind of item this is.", + "default": "storage#composeRequest" }, "sourceObjects": { - "type": "array", - "description": "The list of source objects that will be concatenated into a single object.", - "items": { - "type": "object", - "properties": { - "generation": { - "type": "string", - "description": "The generation of this object to use as the source.", - "format": "int64" - }, - "name": { - "type": "string", - "description": "The source object's name. All source objects must reside in the same bucket.", + "type": "array", + "description": "The list of source objects that will be concatenated into a single object.", + "items": { + "type": "object", + "properties": { + "generation": { + "type": "string", + "description": "The generation of this object to use as the source.", + "format": "int64" + }, + "name": { + "type": "string", + "description": "The source object's name. All source objects must reside in the same bucket.", + "annotations": { + "required": [ + "storage.objects.compose" + ] + } + }, + "objectPreconditions": { + "type": "object", + "description": "Conditions that must be met for this operation to execute.", + "properties": { + "ifGenerationMatch": { + "type": "string", + "description": "Only perform the composition if the generation of the source object that would be used matches this value. If this value and a generation are both specified, they must be the same value or the call will fail.", + "format": "int64" + } + } + } + } + }, "annotations": { - "required": [ - "storage.objects.compose" - ] + "required": [ + "storage.objects.compose" + ] } - }, - "objectPreconditions": { + } +} +}, + "Folder": { + "id": "Folder", "type": "object", - "description": "Conditions that must be met for this operation to execute.", + "description": "A folder. Only available in buckets with hierarchical namespace enabled.", "properties": { - "ifGenerationMatch": { - "type": "string", - "description": "Only perform the composition if the generation of the source object that would be used matches this value. If this value and a generation are both specified, they must be the same value or the call will fail.", - "format": "int64" - } + "bucket": { + "type": "string", + "description": "The name of the bucket containing this folder." + }, + "id": { + "type": "string", + "description": "The ID of the folder, including the bucket name, folder name." + }, + "kind": { + "type": "string", + "description": "The kind of item this is. For folders, this is always storage#folder.", + "default": "storage#folder" + }, + "metageneration": { + "type": "string", + "description": "The version of the metadata for this folder. Used for preconditions and for detecting changes in metadata.", + "format": "int64" + }, + "name": { + "type": "string", + "description": "The name of the folder. Required if not specified by URL parameter." + }, + "selfLink": { + "type": "string", + "description": "The link to this folder." + }, + "createTime": { + "type": "string", + "description": "The creation time of the folder in RFC 3339 format.", + "format": "date-time" + }, + "updateTime": { + "type": "string", + "description": "The modification time of the folder metadata in RFC 3339 format.", + "format": "date-time" + }, + "pendingRenameInfo": { + "type": "object", + "description": "Only present if the folder is part of an ongoing rename folder operation. Contains information which can be used to query the operation status.", + "properties": { + "operationId": { + "type": "string", + "description": "The ID of the rename folder operation." + } + } + } } - } - } - }, - "annotations": { - "required": [ - "storage.objects.compose" - ] - } - } - } - }, - "Expr": { - "id": "Expr", - "type": "object", - "description": "Represents an expression text. Example: title: \"User account presence\" description: \"Determines whether the request has a user account\" expression: \"size(request.user) > 0\"", - "properties": { - "description": { - "type": "string", - "description": "An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI." - }, - "expression": { - "type": "string", - "description": "Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported." - }, - "location": { - "type": "string", - "description": "An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file." - }, - "title": { - "type": "string", - "description": "An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression." - } - } - }, - "GoogleLongrunningOperation": { - "description": "This resource represents a long-running operation that is the result of a network API call.", - "id": "GoogleLongrunningOperation", - "properties": { - "done": { - "description": "If the value is \"false\", it means the operation is still in progress. If \"true\", the operation is completed, and either \"error\" or \"response\" is available.", - "type": "boolean" - }, - "error": { - "$ref": "GoogleRpcStatus", - "description": "The error result of the operation in case of failure or cancellation." - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", - "type": "object" }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the \"name\" should be a resource name ending with \"operations/{operationId}\".", - "type": "string" + "Folders": { + "id": "Folders", + "type": "object", + "description": "A list of folders.", + "properties": { + "items": { + "type": "array", + "description": "The list of items.", + "items": { + "$ref": "Folder" + } + }, + "kind": { + "type": "string", + "description": "The kind of item this is. For lists of folders, this is always storage#folders.", + "default": "storage#folders" + }, + "nextPageToken": { + "type": "string", + "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results." + } + } }, - "response": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as \"Delete\", the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type \"XxxResponse\", where \"Xxx\" is the original method name. For example, if the original method name is \"TakeSnapshot()\", the inferred response type is \"TakeSnapshotResponse\".", - "type": "object" - } - }, - "type": "object" - }, - "GoogleLongrunningListOperationsResponse": { - "description": "The response message for storage.buckets.operations.list.", - "id": "GoogleLongrunningListOperationsResponse", - "properties": { - "nextPageToken": { - "type": "string", - "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results." - }, - "operations": { - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "GoogleLongrunningOperation" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleRpcStatus": { - "description": "The \"Status\" type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each \"Status\" message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", - "id": "GoogleRpcStatus", - "properties": { - "code": { - "description": "The status code, which should be an enum value of google.rpc.Code.", - "format": "int32", - "type": "integer" - }, - "details": { - "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "A developer-facing error message, which should be in English.", - "type": "string" - } - }, - "type": "object" - }, - "HmacKey": { - "id": "HmacKey", - "type": "object", - "description": "JSON template to produce a JSON-style HMAC Key resource for Create responses.", - "properties": { - "kind": { - "type": "string", - "description": "The kind of item this is. For HMAC keys, this is always storage#hmacKey.", - "default": "storage#hmacKey" + "Expr": { + "id": "Expr", + "type": "object", + "description": "Represents an expression text. Example: title: \"User account presence\" description: \"Determines whether the request has a user account\" expression: \"size(request.user) > 0\"", + "properties": { + "description": { + "type": "string", + "description": "An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI." + }, + "expression": { + "type": "string", + "description": "Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported." + }, + "location": { + "type": "string", + "description": "An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file." + }, + "title": { + "type": "string", + "description": "An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression." + } + } }, - "metadata": { - "$ref": "HmacKeyMetadata", - "description": "Key metadata." + "GoogleLongrunningOperation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "GoogleLongrunningOperation", + "properties": { + "done": { + "description": "If the value is \"false\", it means the operation is still in progress. If \"true\", the operation is completed, and either \"error\" or \"response\" is available.", + "type": "boolean" + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the \"name\" should be a resource name ending with \"operations/{operationId}\".", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as \"Delete\", the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type \"XxxResponse\", where \"Xxx\" is the original method name. For example, if the original method name is \"TakeSnapshot()\", the inferred response type is \"TakeSnapshotResponse\".", + "type": "object" + } + }, + "type": "object" }, - "secret": { - "type": "string", - "description": "HMAC secret key material." - } - } - }, - "HmacKeyMetadata": { - "id": "HmacKeyMetadata", - "type": "object", - "description": "JSON template to produce a JSON-style HMAC Key metadata resource.", - "properties": { - "accessId": { - "type": "string", - "description": "The ID of the HMAC Key." + "GoogleLongrunningListOperationsResponse": { + "description": "The response message for storage.buckets.operations.list.", + "id": "GoogleLongrunningListOperationsResponse", + "properties": { + "nextPageToken": { + "type": "string", + "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results." + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "GoogleLongrunningOperation" + }, + "type": "array" + } + }, + "type": "object" }, - "etag": { - "type": "string", - "description": "HTTP 1.1 Entity tag for the HMAC key." + "GoogleRpcStatus": { + "description": "The \"Status\" type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each \"Status\" message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "GoogleRpcStatus", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English.", + "type": "string" + } + }, + "type": "object" }, - "id": { - "type": "string", - "description": "The ID of the HMAC key, including the Project ID and the Access ID." + "HmacKey": { + "id": "HmacKey", + "type": "object", + "description": "JSON template to produce a JSON-style HMAC Key resource for Create responses.", + "properties": { + "kind": { + "type": "string", + "description": "The kind of item this is. For HMAC keys, this is always storage#hmacKey.", + "default": "storage#hmacKey" + }, + "metadata": { + "$ref": "HmacKeyMetadata", + "description": "Key metadata." + }, + "secret": { + "type": "string", + "description": "HMAC secret key material." + } + } }, - "kind": { - "type": "string", - "description": "The kind of item this is. For HMAC Key metadata, this is always storage#hmacKeyMetadata.", - "default": "storage#hmacKeyMetadata" + "HmacKeyMetadata": { + "id": "HmacKeyMetadata", + "type": "object", + "description": "JSON template to produce a JSON-style HMAC Key metadata resource.", + "properties": { + "accessId": { + "type": "string", + "description": "The ID of the HMAC Key." + }, + "etag": { + "type": "string", + "description": "HTTP 1.1 Entity tag for the HMAC key." + }, + "id": { + "type": "string", + "description": "The ID of the HMAC key, including the Project ID and the Access ID." + }, + "kind": { + "type": "string", + "description": "The kind of item this is. For HMAC Key metadata, this is always storage#hmacKeyMetadata.", + "default": "storage#hmacKeyMetadata" + }, + "projectId": { + "type": "string", + "description": "Project ID owning the service account to which the key authenticates." + }, + "selfLink": { + "type": "string", + "description": "The link to this resource." + }, + "serviceAccountEmail": { + "type": "string", + "description": "The email address of the key's associated service account." + }, + "state": { + "type": "string", + "description": "The state of the key. Can be one of ACTIVE, INACTIVE, or DELETED." + }, + "timeCreated": { + "type": "string", + "description": "The creation time of the HMAC key in RFC 3339 format.", + "format": "date-time" + }, + "updated": { + "type": "string", + "description": "The last modification time of the HMAC key metadata in RFC 3339 format.", + "format": "date-time" + } + } }, - "projectId": { - "type": "string", - "description": "Project ID owning the service account to which the key authenticates." + "HmacKeysMetadata": { + "id": "HmacKeysMetadata", + "type": "object", + "description": "A list of hmacKeys.", + "properties": { + "items": { + "type": "array", + "description": "The list of items.", + "items": { + "$ref": "HmacKeyMetadata" + } + }, + "kind": { + "type": "string", + "description": "The kind of item this is. For lists of hmacKeys, this is always storage#hmacKeysMetadata.", + "default": "storage#hmacKeysMetadata" + }, + "nextPageToken": { + "type": "string", + "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results." + } + } }, - "selfLink": { - "type": "string", - "description": "The link to this resource." + "ManagedFolder": { + "id": "ManagedFolder", + "type": "object", + "description": "A managed folder.", + "properties": { + "bucket": { + "type": "string", + "description": "The name of the bucket containing this managed folder." + }, + "id": { + "type": "string", + "description": "The ID of the managed folder, including the bucket name and managed folder name." + }, + "kind": { + "type": "string", + "description": "The kind of item this is. For managed folders, this is always storage#managedFolder.", + "default": "storage#managedFolder" + }, + "metageneration": { + "type": "string", + "description": "The version of the metadata for this managed folder. Used for preconditions and for detecting changes in metadata.", + "format": "int64" + }, + "name": { + "type": "string", + "description": "The name of the managed folder. Required if not specified by URL parameter." + }, + "selfLink": { + "type": "string", + "description": "The link to this managed folder." + }, + "createTime": { + "type": "string", + "description": "The creation time of the managed folder in RFC 3339 format.", + "format": "date-time" + }, + "updateTime": { + "type": "string", + "description": "The last update time of the managed folder metadata in RFC 3339 format.", + "format": "date-time" + } + } }, - "serviceAccountEmail": { - "type": "string", - "description": "The email address of the key's associated service account." + "ManagedFolders": { + "id": "ManagedFolders", + "type": "object", + "description": "A list of managed folders.", + "properties": { + "items": { + "type": "array", + "description": "The list of items.", + "items": { + "$ref": "ManagedFolder" + } + }, + "kind": { + "type": "string", + "description": "The kind of item this is. For lists of managed folders, this is always storage#managedFolders.", + "default": "storage#managedFolders" + }, + "nextPageToken": { + "type": "string", + "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results." + } + } }, - "state": { - "type": "string", - "description": "The state of the key. Can be one of ACTIVE, INACTIVE, or DELETED." + "Notification": { + "id": "Notification", + "type": "object", + "description": "A subscription to receive Google PubSub notifications.", + "properties": { + "custom_attributes": { + "type": "object", + "description": "An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription.", + "additionalProperties": { + "type": "string" + } + }, + "etag": { + "type": "string", + "description": "HTTP 1.1 Entity tag for this subscription notification." + }, + "event_types": { + "type": "array", + "description": "If present, only send notifications about listed event types. If empty, sent notifications for all event types.", + "items": { + "type": "string" + } + }, + "id": { + "type": "string", + "description": "The ID of the notification." + }, + "kind": { + "type": "string", + "description": "The kind of item this is. For notifications, this is always storage#notification.", + "default": "storage#notification" + }, + "object_name_prefix": { + "type": "string", + "description": "If present, only apply this notification configuration to object names that begin with this prefix." + }, + "payload_format": { + "type": "string", + "description": "The desired content of the Payload.", + "default": "JSON_API_V1", + "annotations": { + "required": [ + "storage.notifications.insert" + ] + } + }, + "selfLink": { + "type": "string", + "description": "The canonical URL of this notification." + }, + "topic": { + "type": "string", + "description": "The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'", + "annotations": { + "required": [ + "storage.notifications.insert" + ] + } + } + } }, - "timeCreated": { - "type": "string", - "description": "The creation time of the HMAC key in RFC 3339 format.", - "format": "date-time" + "Notifications": { + "id": "Notifications", + "type": "object", + "description": "A list of notification subscriptions.", + "properties": { + "items": { + "type": "array", + "description": "The list of items.", + "items": { + "$ref": "Notification" + } + }, + "kind": { + "type": "string", + "description": "The kind of item this is. For lists of notifications, this is always storage#notifications.", + "default": "storage#notifications" + } + } }, - "updated": { - "type": "string", - "description": "The last modification time of the HMAC key metadata in RFC 3339 format.", - "format": "date-time" - } - } - }, - "HmacKeysMetadata": { - "id": "HmacKeysMetadata", - "type": "object", - "description": "A list of hmacKeys.", - "properties": { - "items": { - "type": "array", - "description": "The list of items.", - "items": { - "$ref": "HmacKeyMetadata" - } + "Object": { + "id": "Object", + "type": "object", + "description": "An object.", + "properties": { + "acl": { + "type": "array", + "description": "Access controls on the object.", + "items": { + "$ref": "ObjectAccessControl" + }, + "annotations": { + "required": [ + "storage.objects.update" + ] + } + }, + "bucket": { + "type": "string", + "description": "The name of the bucket containing this object." + }, + "cacheControl": { + "type": "string", + "description": "Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600." + }, + "componentCount": { + "type": "integer", + "description": "Number of underlying components that make up this object. Components are accumulated by compose operations.", + "format": "int32" + }, + "contentDisposition": { + "type": "string", + "description": "Content-Disposition of the object data." + }, + "contentEncoding": { + "type": "string", + "description": "Content-Encoding of the object data." + }, + "contentLanguage": { + "type": "string", + "description": "Content-Language of the object data." + }, + "contentType": { + "type": "string", + "description": "Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream." + }, + "crc32c": { + "type": "string", + "description": "CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices." + }, + "customTime": { + "type": "string", + "description": "A timestamp in RFC 3339 format specified by the user for an object.", + "format": "date-time" + }, + "customerEncryption": { + "type": "object", + "description": "Metadata of customer-supplied encryption key, if the object is encrypted by such a key.", + "properties": { + "encryptionAlgorithm": { + "type": "string", + "description": "The encryption algorithm." + }, + "keySha256": { + "type": "string", + "description": "SHA256 hash value of the encryption key." + } + } + }, + "etag": { + "type": "string", + "description": "HTTP 1.1 Entity tag for the object." + }, + "eventBasedHold": { + "type": "boolean", + "description": "Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false." + }, + "generation": { + "type": "string", + "description": "The content generation of this object. Used for object versioning.", + "format": "int64" + }, + "id": { + "type": "string", + "description": "The ID of the object, including the bucket name, object name, and generation number." + }, + "kind": { + "type": "string", + "description": "The kind of item this is. For objects, this is always storage#object.", + "default": "storage#object" + }, + "kmsKeyName": { + "type": "string", + "description": "Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request." + }, + "md5Hash": { + "type": "string", + "description": "MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices." + }, + "mediaLink": { + "type": "string", + "description": "Media download link." + }, + "metadata": { + "type": "object", + "description": "User-provided metadata, in key/value pairs.", + "additionalProperties": { + "type": "string", + "description": "An individual metadata entry." + } + }, + "metageneration": { + "type": "string", + "description": "The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.", + "format": "int64" + }, + "name": { + "type": "string", + "description": "The name of the object. Required if not specified by URL parameter." + }, + "owner": { + "type": "object", + "description": "The owner of the object. This will always be the uploader of the object.", + "properties": { + "entity": { + "type": "string", + "description": "The entity, in the form user-userId." + }, + "entityId": { + "type": "string", + "description": "The ID for the entity." + } + } + }, + "retentionExpirationTime": { + "type": "string", + "description": "A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold).", + "format": "date-time" + }, + "retention": { + "type": "object", + "description": "A collection of object level retention parameters.", + "properties": { + "retainUntilTime": { + "type": "string", + "description": "A time in RFC 3339 format until which object retention protects this object.", + "format": "date-time" + }, + "mode": { + "type": "string", + "description": "The bucket's object retention mode, can only be Unlocked or Locked." + } + } + }, + "selfLink": { + "type": "string", + "description": "The link to this object." + }, + "size": { + "type": "string", + "description": "Content-Length of the data in bytes.", + "format": "uint64" + }, + "storageClass": { + "type": "string", + "description": "Storage class of the object." + }, + "temporaryHold": { + "type": "boolean", + "description": "Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object." + }, + "timeCreated": { + "type": "string", + "description": "The creation time of the object in RFC 3339 format.", + "format": "date-time" + }, + "timeDeleted": { + "type": "string", + "description": "The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.", + "format": "date-time" + }, + "softDeleteTime": { + "type": "string", + "description": "The time at which the object became soft-deleted in RFC 3339 format.", + "format": "date-time" + }, + "hardDeleteTime": { + "type": "string", + "description": "This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket.", + "format": "date-time" + }, + "timeStorageClassUpdated": { + "type": "string", + "description": "The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.", + "format": "date-time" + }, + "updated": { + "type": "string", + "description": "The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration.", + "format": "date-time" + } + } }, - "kind": { - "type": "string", - "description": "The kind of item this is. For lists of hmacKeys, this is always storage#hmacKeysMetadata.", - "default": "storage#hmacKeysMetadata" + "ObjectAccessControl": { + "id": "ObjectAccessControl", + "type": "object", + "description": "An access-control entry.", + "properties": { + "bucket": { + "type": "string", + "description": "The name of the bucket." + }, + "domain": { + "type": "string", + "description": "The domain associated with the entity, if any." + }, + "email": { + "type": "string", + "description": "The email address associated with the entity, if any." + }, + "entity": { + "type": "string", + "description": "The entity holding the permission, in one of the following forms: \n- user-userId \n- user-email \n- group-groupId \n- group-email \n- domain-domain \n- project-team-projectId \n- allUsers \n- allAuthenticatedUsers Examples: \n- The user liz@example.com would be user-liz@example.com. \n- The group example@googlegroups.com would be group-example@googlegroups.com. \n- To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.", + "annotations": { + "required": [ + "storage.defaultObjectAccessControls.insert", + "storage.objectAccessControls.insert" + ] + } + }, + "entityId": { + "type": "string", + "description": "The ID for the entity, if any." + }, + "etag": { + "type": "string", + "description": "HTTP 1.1 Entity tag for the access-control entry." + }, + "generation": { + "type": "string", + "description": "The content generation of the object, if applied to an object.", + "format": "int64" + }, + "id": { + "type": "string", + "description": "The ID of the access-control entry." + }, + "kind": { + "type": "string", + "description": "The kind of item this is. For object access control entries, this is always storage#objectAccessControl.", + "default": "storage#objectAccessControl" + }, + "object": { + "type": "string", + "description": "The name of the object, if applied to an object." + }, + "projectTeam": { + "type": "object", + "description": "The project team associated with the entity, if any.", + "properties": { + "projectNumber": { + "type": "string", + "description": "The project number." + }, + "team": { + "type": "string", + "description": "The team." + } + } + }, + "role": { + "type": "string", + "description": "The access permission for the entity.", + "annotations": { + "required": [ + "storage.defaultObjectAccessControls.insert", + "storage.objectAccessControls.insert" + ] + } + }, + "selfLink": { + "type": "string", + "description": "The link to this access-control entry." + } + } }, - "nextPageToken": { - "type": "string", - "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results." + "ObjectAccessControls": { + "id": "ObjectAccessControls", + "type": "object", + "description": "An access-control list.", + "properties": { + "items": { + "type": "array", + "description": "The list of items.", + "items": { + "$ref": "ObjectAccessControl" + } + }, + "kind": { + "type": "string", + "description": "The kind of item this is. For lists of object access control entries, this is always storage#objectAccessControls.", + "default": "storage#objectAccessControls" + } + } + }, + "Objects": { + "id": "Objects", + "type": "object", + "description": "A list of objects.", + "properties": { + "items": { + "type": "array", + "description": "The list of items.", + "items": { + "$ref": "Object" + } + }, + "kind": { + "type": "string", + "description": "The kind of item this is. For lists of objects, this is always storage#objects.", + "default": "storage#objects" + }, + "nextPageToken": { + "type": "string", + "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results." + }, + "prefixes": { + "type": "array", + "description": "The list of prefixes of objects matching-but-not-listed up to and including the requested delimiter.", + "items": { + "type": "string" + } + } + } + }, + "Policy": { + "id": "Policy", + "type": "object", + "description": "A bucket/object/managedFolder IAM policy.", + "properties": { + "bindings": { + "type": "array", + "description": "An association between a role, which comes with a set of permissions, and members who may assume that role.", + "items": { + "type": "object", + "properties": { + "condition": { + "$ref": "Expr", + "description": "The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently." + }, + "members": { + "type": "array", + "description": "A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows: \n- allUsers \u2014 A special identifier that represents anyone on the internet; with or without a Google account. \n- allAuthenticatedUsers \u2014 A special identifier that represents anyone who is authenticated with a Google account or a service account. \n- user:emailid \u2014 An email address that represents a specific account. For example, user:alice@gmail.com or user:joe@example.com. \n- serviceAccount:emailid \u2014 An email address that represents a service account. For example, serviceAccount:my-other-app@appspot.gserviceaccount.com . \n- group:emailid \u2014 An email address that represents a Google group. For example, group:admins@example.com. \n- domain:domain \u2014 A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com. \n- projectOwner:projectid \u2014 Owners of the given project. For example, projectOwner:my-example-project \n- projectEditor:projectid \u2014 Editors of the given project. For example, projectEditor:my-example-project \n- projectViewer:projectid \u2014 Viewers of the given project. For example, projectViewer:my-example-project", + "items": { + "type": "string" + }, + "annotations": { + "required": [ + "storage.buckets.setIamPolicy", + "storage.objects.setIamPolicy", + "storage.managedFolders.setIamPolicy" + ] + } + }, + "role": { + "type": "string", + "description": "The role to which members belong. Two types of roles are supported: new IAM roles, which grant permissions that do not map directly to those provided by ACLs, and legacy IAM roles, which do map directly to ACL permissions. All roles are of the format roles/storage.specificRole.\nThe new IAM roles are: \n- roles/storage.admin \u2014 Full control of Google Cloud Storage resources. \n- roles/storage.objectViewer \u2014 Read-Only access to Google Cloud Storage objects. \n- roles/storage.objectCreator \u2014 Access to create objects in Google Cloud Storage. \n- roles/storage.objectAdmin \u2014 Full control of Google Cloud Storage objects. The legacy IAM roles are: \n- roles/storage.legacyObjectReader \u2014 Read-only access to objects without listing. Equivalent to an ACL entry on an object with the READER role. \n- roles/storage.legacyObjectOwner \u2014 Read/write access to existing objects without listing. Equivalent to an ACL entry on an object with the OWNER role. \n- roles/storage.legacyBucketReader \u2014 Read access to buckets with object listing. Equivalent to an ACL entry on a bucket with the READER role. \n- roles/storage.legacyBucketWriter \u2014 Read access to buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the WRITER role. \n- roles/storage.legacyBucketOwner \u2014 Read and write access to existing buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the OWNER role.", + "annotations": { + "required": [ + "storage.buckets.setIamPolicy", + "storage.objects.setIamPolicy", + "storage.managedFolders.setIamPolicy" + ] + } + } + } + }, + "annotations": { + "required": [ + "storage.buckets.setIamPolicy", + "storage.objects.setIamPolicy", + "storage.managedFolders.setIamPolicy" + ] + } + }, + "etag": { + "type": "string", + "description": "HTTP 1.1 Entity tag for the policy.", + "format": "byte" + }, + "kind": { + "type": "string", + "description": "The kind of item this is. For policies, this is always storage#policy. This field is ignored on input.", + "default": "storage#policy" + }, + "resourceId": { + "type": "string", + "description": "The ID of the resource to which this policy belongs. Will be of the form projects/_/buckets/bucket for buckets, projects/_/buckets/bucket/objects/object for objects, and projects/_/buckets/bucket/managedFolders/managedFolder. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/_/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input." + }, + "version": { + "type": "integer", + "description": "The IAM policy format version.", + "format": "int32" + } + } + }, + "RewriteResponse": { + "id": "RewriteResponse", + "type": "object", + "description": "A rewrite response.", + "properties": { + "done": { + "type": "boolean", + "description": "true if the copy is finished; otherwise, false if the copy is in progress. This property is always present in the response." + }, + "kind": { + "type": "string", + "description": "The kind of item this is.", + "default": "storage#rewriteResponse" + }, + "objectSize": { + "type": "string", + "description": "The total size of the object being copied in bytes. This property is always present in the response.", + "format": "int64" + }, + "resource": { + "$ref": "Object", + "description": "A resource containing the metadata for the copied-to object. This property is present in the response only when copying completes." + }, + "rewriteToken": { + "type": "string", + "description": "A token to use in subsequent requests to continue copying data. This token is present in the response only when there is more data to copy." + }, + "totalBytesRewritten": { + "type": "string", + "description": "The total bytes written so far, which can be used to provide a waiting user with a progress indicator. This property is always present in the response.", + "format": "int64" + } + } + }, + "ServiceAccount": { + "id": "ServiceAccount", + "type": "object", + "description": "A subscription to receive Google PubSub notifications.", + "properties": { + "email_address": { + "type": "string", + "description": "The ID of the notification." + }, + "kind": { + "type": "string", + "description": "The kind of item this is. For notifications, this is always storage#notification.", + "default": "storage#serviceAccount" + } + } + }, + "TestIamPermissionsResponse": { + "id": "TestIamPermissionsResponse", + "type": "object", + "description": "A storage.(buckets|objects|managedFolders).testIamPermissions response.", + "properties": { + "kind": { + "type": "string", + "description": "The kind of item this is.", + "default": "storage#testIamPermissionsResponse" + }, + "permissions": { + "type": "array", + "description": "The permissions held by the caller. Permissions are always of the format storage.resource.capability, where resource is one of buckets, objects, or managedFolders. The supported permissions are as follows: \n- storage.buckets.delete \u2014 Delete bucket. \n- storage.buckets.get \u2014 Read bucket metadata. \n- storage.buckets.getIamPolicy \u2014 Read bucket IAM policy. \n- storage.buckets.create \u2014 Create bucket. \n- storage.buckets.list \u2014 List buckets. \n- storage.buckets.setIamPolicy \u2014 Update bucket IAM policy. \n- storage.buckets.update \u2014 Update bucket metadata. \n- storage.objects.delete \u2014 Delete object. \n- storage.objects.get \u2014 Read object data and metadata. \n- storage.objects.getIamPolicy \u2014 Read object IAM policy. \n- storage.objects.create \u2014 Create object. \n- storage.objects.list \u2014 List objects. \n- storage.objects.setIamPolicy \u2014 Update object IAM policy. \n- storage.objects.update \u2014 Update object metadata. \n- storage.managedFolders.delete \u2014 Delete managed folder. \n- storage.managedFolders.get \u2014 Read managed folder metadata. \n- storage.managedFolders.getIamPolicy \u2014 Read managed folder IAM policy. \n- storage.managedFolders.create \u2014 Create managed folder. \n- storage.managedFolders.list \u2014 List managed folders. \n- storage.managedFolders.setIamPolicy \u2014 Update managed folder IAM policy.", + "items": { + "type": "string" + } + } + } + }, + "BulkRestoreObjectsRequest": { + "id": "BulkRestoreObjectsRequest", + "type": "object", + "description": "A bulk restore objects request.", + "properties": { + "allowOverwrite": { + "type": "boolean", + "description": "If false (default), the restore will not overwrite live objects with the same name at the destination. This means some deleted objects may be skipped. If true, live objects will be overwritten resulting in a noncurrent object (if versioning is enabled). If versioning is not enabled, overwriting the object will result in a soft-deleted object. In either case, if a noncurrent object already exists with the same name, a live version can be written without issue." + }, + "softDeletedAfterTime": { + "type": "string", + "description": "Restores only the objects that were soft-deleted after this time.", + "format": "date-time" + }, + "softDeletedBeforeTime": { + "type": "string", + "description": "Restores only the objects that were soft-deleted before this time.", + "format": "date-time" + }, + "matchGlobs": { + "type": "array", + "description": "Restores only the objects matching any of the specified glob(s). If this parameter is not specified, all objects will be restored within the specified time range.", + "items": { + "type": "string" + } + }, + "copySourceAcl": { + "type": "boolean", + "description": "If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. The default is false." + } + } + } +}, +"resources": { + "anywhereCaches": { + "methods": { + "insert": { + "id": "storage.anywhereCaches.insert", + "path": "b/{bucket}/anywhereCaches", + "httpMethod": "POST", + "description": "Creates an Anywhere Cache instance.", + "parameters": { + "bucket": { + "type": "string", + "description": "Name of the parent bucket.", + "required": true, + "location": "path" + } +}, +"parameterOrder": [ + "bucket" +], +"request": { + "$ref": "AnywhereCache" +}, +"response": { + "$ref": "GoogleLongrunningOperation" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"update": { +"id": "storage.anywhereCaches.update", +"path": "b/{bucket}/anywhereCaches/{anywhereCacheId}", +"httpMethod": "PATCH", +"description": "Updates the config(ttl and admissionPolicy) of an Anywhere Cache instance.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of the parent bucket.", + "required": true, + "location": "path" + }, + "anywhereCacheId": { + "type": "string", + "description": "The ID of requested Anywhere Cache instance.", + "required": true, + "location": "path" + } +}, +"parameterOrder": [ + "bucket", + "anywhereCacheId" +], +"request": { + "$ref": "AnywhereCache" +}, +"response": { + "$ref": "GoogleLongrunningOperation" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"get": { +"id": "storage.anywhereCaches.get", +"path": "b/{bucket}/anywhereCaches/{anywhereCacheId}", +"httpMethod": "GET", +"description": "Returns the metadata of an Anywhere Cache instance.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of the parent bucket.", + "required": true, + "location": "path" + }, + "anywhereCacheId": { + "type": "string", + "description": "The ID of requested Anywhere Cache instance.", + "required": true, + "location": "path" + } +}, +"parameterOrder": [ + "bucket", + "anywhereCacheId" +], +"response": { + "$ref": "AnywhereCache" +}, +"scopes": [ + "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" +] +}, +"list": { +"id": "storage.anywhereCaches.list", + "path": "b/{bucket}/anywhereCaches", + "httpMethod": "GET", + "description": "Returns a list of Anywhere Cache instances of the bucket matching the criteria.", + "parameters": { + "bucket": { + "type": "string", + "description": "Name of the parent bucket.", + "required": true, + "location": "path" + }, + "pageSize": { + "type": "integer", + "description": "Maximum number of items to return in a single page of responses. Maximum 1000.", + "format": "int32", + "minimum": "0", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "A previously-returned page token representing part of the larger set of results to view.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket" +], +"response": { + "$ref": "AnywhereCaches" +}, +"scopes": [ + "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" +] +}, +"pause": { +"id": "storage.anywhereCaches.pause", +"path": "b/{bucket}/anywhereCaches/{anywhereCacheId}/pause", +"httpMethod": "POST", +"description": "Pauses an Anywhere Cache instance.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of the parent bucket.", + "required": true, + "location": "path" + }, + "anywhereCacheId": { + "type": "string", + "description": "The ID of requested Anywhere Cache instance.", + "required": true, + "location": "path" + } +}, +"parameterOrder": [ + "bucket", + "anywhereCacheId" +], +"response": { + "$ref": "AnywhereCache" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"resume": { +"id": "storage.anywhereCaches.resume", +"path": "b/{bucket}/anywhereCaches/{anywhereCacheId}/resume", +"httpMethod": "POST", +"description": "Resumes a paused or disabled Anywhere Cache instance.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of the parent bucket.", + "required": true, + "location": "path" + }, + "anywhereCacheId": { + "type": "string", + "description": "The ID of requested Anywhere Cache instance.", + "required": true, + "location": "path" + } +}, +"parameterOrder": [ + "bucket", + "anywhereCacheId" +], +"response": { + "$ref": "AnywhereCache" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"disable": { +"id": "storage.anywhereCaches.disable", +"path": "b/{bucket}/anywhereCaches/{anywhereCacheId}/disable", +"httpMethod": "POST", +"description": "Disables an Anywhere Cache instance.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of the parent bucket.", + "required": true, + "location": "path" + }, + "anywhereCacheId": { + "type": "string", + "description": "The ID of requested Anywhere Cache instance.", + "required": true, + "location": "path" + } +}, +"parameterOrder": [ + "bucket", + "anywhereCacheId" +], +"response": { + "$ref": "AnywhereCache" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" +] +} +} +}, +"bucketAccessControls": { +"methods": { +"delete": { +"id": "storage.bucketAccessControls.delete", +"path": "b/{bucket}/acl/{entity}", +"httpMethod": "DELETE", +"description": "Permanently deletes the ACL entry for the specified entity on the specified bucket.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "entity": { + "type": "string", + "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket", + "entity" +], +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"get": { +"id": "storage.bucketAccessControls.get", +"path": "b/{bucket}/acl/{entity}", +"httpMethod": "GET", +"description": "Returns the ACL entry for the specified entity on the specified bucket.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "entity": { + "type": "string", + "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket", + "entity" +], +"response": { + "$ref": "BucketAccessControl" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"insert": { +"id": "storage.bucketAccessControls.insert", +"path": "b/{bucket}/acl", +"httpMethod": "POST", +"description": "Creates a new ACL entry on the specified bucket.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket" +], +"request": { + "$ref": "BucketAccessControl" +}, +"response": { + "$ref": "BucketAccessControl" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"list": { +"id": "storage.bucketAccessControls.list", +"path": "b/{bucket}/acl", +"httpMethod": "GET", +"description": "Retrieves ACL entries on the specified bucket.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket" +], +"response": { + "$ref": "BucketAccessControls" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"patch": { +"id": "storage.bucketAccessControls.patch", +"path": "b/{bucket}/acl/{entity}", +"httpMethod": "PATCH", +"description": "Patches an ACL entry on the specified bucket.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "entity": { + "type": "string", + "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket", + "entity" +], +"request": { + "$ref": "BucketAccessControl" +}, +"response": { + "$ref": "BucketAccessControl" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"update": { +"id": "storage.bucketAccessControls.update", +"path": "b/{bucket}/acl/{entity}", +"httpMethod": "PUT", +"description": "Updates an ACL entry on the specified bucket.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "entity": { + "type": "string", + "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket", + "entity" +], +"request": { + "$ref": "BucketAccessControl" +}, +"response": { + "$ref": "BucketAccessControl" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" +] +} +} +}, +"buckets": { +"methods": { +"delete": { +"id": "storage.buckets.delete", +"path": "b/{bucket}", +"httpMethod": "DELETE", +"description": "Permanently deletes an empty bucket.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "ifMetagenerationMatch": { + "type": "string", + "description": "If set, only deletes the bucket if its metageneration matches this value.", + "format": "int64", + "location": "query" + }, + "ifMetagenerationNotMatch": { + "type": "string", + "description": "If set, only deletes the bucket if its metageneration does not match this value.", + "format": "int64", + "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket" +], +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"get": { +"id": "storage.buckets.get", +"path": "b/{bucket}", +"httpMethod": "GET", +"description": "Returns metadata for the specified bucket.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "ifMetagenerationMatch": { + "type": "string", + "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.", + "format": "int64", + "location": "query" + }, + "ifMetagenerationNotMatch": { + "type": "string", + "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.", + "format": "int64", + "location": "query" + }, + "projection": { + "type": "string", + "description": "Set of properties to return. Defaults to noAcl.", + "enum": [ + "full", + "noAcl" + ], + "enumDescriptions": [ + "Include all properties.", + "Omit owner, acl and defaultObjectAcl properties." + ], + "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket" +], +"response": { + "$ref": "Bucket" +}, +"scopes": [ + "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" +] +}, +"getIamPolicy": { +"id": "storage.buckets.getIamPolicy", +"path": "b/{bucket}/iam", +"httpMethod": "GET", +"description": "Returns an IAM policy for the specified bucket.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "optionsRequestedPolicyVersion": { + "type": "integer", + "description": "The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for an older version that doesn't support part of the requested IAM policy, the request fails.", + "format": "int32", + "minimum": "1", + "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket" +], +"response": { + "$ref": "Policy" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"insert": { +"id": "storage.buckets.insert", +"path": "b", +"httpMethod": "POST", +"description": "Creates a new bucket.", +"parameters": { + "predefinedAcl": { + "type": "string", + "description": "Apply a predefined set of access controls to this bucket.", + "enum": [ + "authenticatedRead", + "private", + "projectPrivate", + "publicRead", + "publicReadWrite" + ], + "enumDescriptions": [ + "Project team owners get OWNER access, and allAuthenticatedUsers get READER access.", + "Project team owners get OWNER access.", + "Project team members get access according to their roles.", + "Project team owners get OWNER access, and allUsers get READER access.", + "Project team owners get OWNER access, and allUsers get WRITER access." + ], + "location": "query" + }, + "predefinedDefaultObjectAcl": { + "type": "string", + "description": "Apply a predefined set of default object access controls to this bucket.", + "enum": [ + "authenticatedRead", + "bucketOwnerFullControl", + "bucketOwnerRead", + "private", + "projectPrivate", + "publicRead" + ], + "enumDescriptions": [ + "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", + "Object owner gets OWNER access, and project team owners get OWNER access.", + "Object owner gets OWNER access, and project team owners get READER access.", + "Object owner gets OWNER access.", + "Object owner gets OWNER access, and project team members get access according to their roles.", + "Object owner gets OWNER access, and allUsers get READER access." + ], + "location": "query" + }, + "project": { + "type": "string", + "description": "A valid API project identifier.", + "required": true, + "location": "query" + }, + "projection": { + "type": "string", + "description": "Set of properties to return. Defaults to noAcl, unless the bucket resource specifies acl or defaultObjectAcl properties, when it defaults to full.", + "enum": [ + "full", + "noAcl" + ], + "enumDescriptions": [ + "Include all properties.", + "Omit owner, acl and defaultObjectAcl properties." + ], + "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request.", + "location": "query" + }, + "enableObjectRetention": { + "type": "boolean", + "description": "When set to true, object retention is enabled for this bucket.", + "default": "false", + "location": "query" + } +}, +"parameterOrder": [ + "project" +], +"request": { + "$ref": "Bucket" +}, +"response": { + "$ref": "Bucket" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"list": { +"id": "storage.buckets.list", +"path": "b", +"httpMethod": "GET", +"description": "Retrieves a list of buckets for a given project.", +"parameters": { + "maxResults": { + "type": "integer", + "description": "Maximum number of buckets to return in a single response. The service will use this parameter or 1,000 items, whichever is smaller.", + "default": "1000", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "A previously-returned page token representing part of the larger set of results to view.", + "location": "query" + }, + "prefix": { + "type": "string", + "description": "Filter results to buckets whose names begin with this prefix.", + "location": "query" + }, + "project": { + "type": "string", + "description": "A valid API project identifier.", + "required": true, + "location": "query" + }, + "projection": { + "type": "string", + "description": "Set of properties to return. Defaults to noAcl.", + "enum": [ + "full", + "noAcl" + ], + "enumDescriptions": [ + "Include all properties.", + "Omit owner, acl and defaultObjectAcl properties." + ], + "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request.", + "location": "query" + } +}, +"parameterOrder": [ + "project" +], +"response": { + "$ref": "Buckets" +}, +"scopes": [ + "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" +] +}, +"lockRetentionPolicy": { +"id": "storage.buckets.lockRetentionPolicy", +"path": "b/{bucket}/lockRetentionPolicy", +"httpMethod": "POST", +"description": "Locks retention policy on a bucket.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "ifMetagenerationMatch": { + "type": "string", + "description": "Makes the operation conditional on whether bucket's current metageneration matches the given value.", + "required": true, + "format": "int64", + "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket", + "ifMetagenerationMatch" +], +"response": { + "$ref": "Bucket" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"patch": { +"id": "storage.buckets.patch", +"path": "b/{bucket}", +"httpMethod": "PATCH", +"description": "Patches a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "ifMetagenerationMatch": { + "type": "string", + "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.", + "format": "int64", + "location": "query" + }, + "ifMetagenerationNotMatch": { + "type": "string", + "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.", + "format": "int64", + "location": "query" + }, + "predefinedAcl": { + "type": "string", + "description": "Apply a predefined set of access controls to this bucket.", + "enum": [ + "authenticatedRead", + "private", + "projectPrivate", + "publicRead", + "publicReadWrite" + ], + "enumDescriptions": [ + "Project team owners get OWNER access, and allAuthenticatedUsers get READER access.", + "Project team owners get OWNER access.", + "Project team members get access according to their roles.", + "Project team owners get OWNER access, and allUsers get READER access.", + "Project team owners get OWNER access, and allUsers get WRITER access." + ], + "location": "query" + }, + "predefinedDefaultObjectAcl": { + "type": "string", + "description": "Apply a predefined set of default object access controls to this bucket.", + "enum": [ + "authenticatedRead", + "bucketOwnerFullControl", + "bucketOwnerRead", + "private", + "projectPrivate", + "publicRead" + ], + "enumDescriptions": [ + "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", + "Object owner gets OWNER access, and project team owners get OWNER access.", + "Object owner gets OWNER access, and project team owners get READER access.", + "Object owner gets OWNER access.", + "Object owner gets OWNER access, and project team members get access according to their roles.", + "Object owner gets OWNER access, and allUsers get READER access." + ], + "location": "query" + }, + "projection": { + "type": "string", + "description": "Set of properties to return. Defaults to full.", + "enum": [ + "full", + "noAcl" + ], + "enumDescriptions": [ + "Include all properties.", + "Omit owner, acl and defaultObjectAcl properties." + ], + "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket" +], +"request": { + "$ref": "Bucket" +}, +"response": { + "$ref": "Bucket" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"setIamPolicy": { +"id": "storage.buckets.setIamPolicy", +"path": "b/{bucket}/iam", +"httpMethod": "PUT", +"description": "Updates an IAM policy for the specified bucket.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket" +], +"request": { + "$ref": "Policy" +}, +"response": { + "$ref": "Policy" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"testIamPermissions": { +"id": "storage.buckets.testIamPermissions", +"path": "b/{bucket}/iam/testPermissions", +"httpMethod": "GET", +"description": "Tests a set of permissions on the given bucket to see which, if any, are held by the caller.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "permissions": { + "type": "string", + "description": "Permissions to test.", + "required": true, + "repeated": true, + "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket", + "permissions" +], +"response": { + "$ref": "TestIamPermissionsResponse" +}, +"scopes": [ + "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" +] +}, +"update": { +"id": "storage.buckets.update", +"path": "b/{bucket}", +"httpMethod": "PUT", +"description": "Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "ifMetagenerationMatch": { + "type": "string", + "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.", + "format": "int64", + "location": "query" + }, + "ifMetagenerationNotMatch": { + "type": "string", + "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.", + "format": "int64", + "location": "query" + }, + "predefinedAcl": { + "type": "string", + "description": "Apply a predefined set of access controls to this bucket.", + "enum": [ + "authenticatedRead", + "private", + "projectPrivate", + "publicRead", + "publicReadWrite" + ], + "enumDescriptions": [ + "Project team owners get OWNER access, and allAuthenticatedUsers get READER access.", + "Project team owners get OWNER access.", + "Project team members get access according to their roles.", + "Project team owners get OWNER access, and allUsers get READER access.", + "Project team owners get OWNER access, and allUsers get WRITER access." + ], + "location": "query" + }, + "predefinedDefaultObjectAcl": { + "type": "string", + "description": "Apply a predefined set of default object access controls to this bucket.", + "enum": [ + "authenticatedRead", + "bucketOwnerFullControl", + "bucketOwnerRead", + "private", + "projectPrivate", + "publicRead" + ], + "enumDescriptions": [ + "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", + "Object owner gets OWNER access, and project team owners get OWNER access.", + "Object owner gets OWNER access, and project team owners get READER access.", + "Object owner gets OWNER access.", + "Object owner gets OWNER access, and project team members get access according to their roles.", + "Object owner gets OWNER access, and allUsers get READER access." + ], + "location": "query" + }, + "projection": { + "type": "string", + "description": "Set of properties to return. Defaults to full.", + "enum": [ + "full", + "noAcl" + ], + "enumDescriptions": [ + "Include all properties.", + "Omit owner, acl and defaultObjectAcl properties." + ], + "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket" +], +"request": { + "$ref": "Bucket" +}, +"response": { + "$ref": "Bucket" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed.", +"path": "b/{bucket}/operations/{operationId}/cancel", +"httpMethod": "POST", +"id": "storage.buckets.operations.cancel", +"parameterOrder": [ + "bucket", + "operationId" +], +"parameters": { + "bucket": { + "description": "The parent bucket of the operation resource.", + "location": "path", + "required": true, + "type": "string" + }, + "operationId": { + "description": "The ID of the operation resource.", + "location": "path", + "required": true, + "type": "string" + } +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation.", +"path": "b/{bucket}/operations/{operationId}", +"httpMethod": "GET", +"id": "storage.buckets.operations.get", +"parameterOrder": [ + "bucket", + "operationId" +], +"parameters": { + "bucket": { + "description": "The parent bucket of the operation resource.", + "location": "path", + "required": true, + "type": "string" + }, + "operationId": { + "description": "The ID of the operation resource.", + "location": "path", + "required": true, + "type": "string" + } +}, +"response": { + "$ref": "GoogleLongrunningOperation" +}, +"scopes": [ + "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" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request.", +"path": "b/{bucket}/operations", +"httpMethod": "GET", +"id": "storage.buckets.operations.list", +"parameterOrder": [ + "bucket" +], +"parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "bucket": { + "description": "Name of the bucket in which to look for operations.", + "location": "path", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "Maximum number of items to return in a single page of responses. Fewer total results may be returned than requested. The service uses this parameter or 100 items, whichever is smaller.", + "minimum": "0", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A previously-returned page token representing part of the larger set of results to view.", + "location": "query", + "type": "string" + } +}, +"response": { + "$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ + "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" +] +} +} +}, +"channels": { +"methods": { +"stop": { +"id": "storage.channels.stop", +"path": "channels/stop", +"httpMethod": "POST", +"description": "Stop watching resources through this channel", +"request": { + "$ref": "Channel", + "parameterName": "resource" +}, +"scopes": [ + "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" +] +} +} +}, +"defaultObjectAccessControls": { +"methods": { +"delete": { +"id": "storage.defaultObjectAccessControls.delete", +"path": "b/{bucket}/defaultObjectAcl/{entity}", +"httpMethod": "DELETE", +"description": "Permanently deletes the default object ACL entry for the specified entity on the specified bucket.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "entity": { + "type": "string", + "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket", + "entity" +], +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"get": { +"id": "storage.defaultObjectAccessControls.get", +"path": "b/{bucket}/defaultObjectAcl/{entity}", +"httpMethod": "GET", +"description": "Returns the default object ACL entry for the specified entity on the specified bucket.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "entity": { + "type": "string", + "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket", + "entity" +], +"response": { + "$ref": "ObjectAccessControl" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"insert": { +"id": "storage.defaultObjectAccessControls.insert", +"path": "b/{bucket}/defaultObjectAcl", +"httpMethod": "POST", +"description": "Creates a new default object ACL entry on the specified bucket.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket" +], +"request": { + "$ref": "ObjectAccessControl" +}, +"response": { + "$ref": "ObjectAccessControl" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"list": { +"id": "storage.defaultObjectAccessControls.list", +"path": "b/{bucket}/defaultObjectAcl", +"httpMethod": "GET", +"description": "Retrieves default object ACL entries on the specified bucket.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "ifMetagenerationMatch": { + "type": "string", + "description": "If present, only return default ACL listing if the bucket's current metageneration matches this value.", + "format": "int64", + "location": "query" + }, + "ifMetagenerationNotMatch": { + "type": "string", + "description": "If present, only return default ACL listing if the bucket's current metageneration does not match the given value.", + "format": "int64", + "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket" +], +"response": { + "$ref": "ObjectAccessControls" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"patch": { +"id": "storage.defaultObjectAccessControls.patch", +"path": "b/{bucket}/defaultObjectAcl/{entity}", +"httpMethod": "PATCH", +"description": "Patches a default object ACL entry on the specified bucket.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "entity": { + "type": "string", + "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket", + "entity" +], +"request": { + "$ref": "ObjectAccessControl" +}, +"response": { + "$ref": "ObjectAccessControl" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"update": { +"id": "storage.defaultObjectAccessControls.update", +"path": "b/{bucket}/defaultObjectAcl/{entity}", +"httpMethod": "PUT", +"description": "Updates a default object ACL entry on the specified bucket.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "entity": { + "type": "string", + "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket", + "entity" +], +"request": { + "$ref": "ObjectAccessControl" +}, +"response": { + "$ref": "ObjectAccessControl" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" +] +} +} +}, + "folders": { + "methods": { + "delete": { + "id": "storage.folders.delete", + "path": "b/{bucket}/folders/{folder}", + "httpMethod": "DELETE", + "description": "Permanently deletes a folder. Only applicable to buckets with hierarchical namespace enabled.", + "parameters": { + "bucket": { + "type": "string", + "description": "Name of the bucket in which the folder resides.", + "required": true, + "location": "path" + }, + "folder": { + "type": "string", + "description": "Name of a folder.", + "required": true, + "location": "path" + }, + "ifMetagenerationMatch": { + "type": "string", + "description": "If set, only deletes the folder if its metageneration matches this value.", + "format": "int64", + "location": "query" + }, + "ifMetagenerationNotMatch": { + "type": "string", + "description": "If set, only deletes the folder if its metageneration does not match this value.", + "format": "int64", + "location": "query" + } + }, + "parameterOrder": [ + "bucket", + "folder" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" + ] + }, + "get": { + "id": "storage.folders.get", + "path": "b/{bucket}/folders/{folder}", + "httpMethod": "GET", + "description": "Returns metadata for the specified folder. Only applicable to buckets with hierarchical namespace enabled.", + "parameters": { + "bucket": { + "type": "string", + "description": "Name of the bucket in which the folder resides.", + "required": true, + "location": "path" + }, + "folder": { + "type": "string", + "description": "Name of a folder.", + "required": true, + "location": "path" + }, + "ifMetagenerationMatch": { + "type": "string", + "description": "Makes the return of the folder metadata conditional on whether the folder's current metageneration matches the given value.", + "format": "int64", + "location": "query" + }, + "ifMetagenerationNotMatch": { + "type": "string", + "description": "Makes the return of the folder metadata conditional on whether the folder's current metageneration does not match the given value.", + "format": "int64", + "location": "query" + } + }, + "parameterOrder": [ + "bucket", + "folder" + ], + "response": { + "$ref": "Folder" + }, + "scopes": [ + "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" + ] + }, + "insert": { + "id": "storage.folders.insert", + "path": "b/{bucket}/folders", + "httpMethod": "POST", + "description": "Creates a new folder. Only applicable to buckets with hierarchical namespace enabled.", + "parameters": { + "bucket": { + "type": "string", + "description": "Name of the bucket in which the folder resides.", + "required": true, + "location": "path" + }, + "recursive": { + "type": "boolean", + "description": "If true, any parent folder which doesn\u2019t exist will be created automatically.", + "location": "query" + } + }, + "parameterOrder": [ + "bucket" + ], + "request": { + "$ref": "Folder" + }, + "response": { + "$ref": "Folder" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" + ] + }, + "list": { + "id": "storage.folders.list", + "path": "b/{bucket}/folders", + "httpMethod": "GET", + "description": "Retrieves a list of folders matching the criteria. Only applicable to buckets with hierarchical namespace enabled.", + "parameters": { + "bucket": { + "type": "string", + "description": "Name of the bucket in which to look for folders.", + "required": true, + "location": "path" + }, + "delimiter": { + "type": "string", + "description": "Returns results in a directory-like mode. The only supported value is '/'. If set, items will only contain folders that either exactly match the prefix, or are one level below the prefix.", + "location": "query" + }, + "endOffset": { + "type": "string", + "description": "Filter results to folders whose names are lexicographically before endOffset. If startOffset is also set, the folders listed will have names between startOffset (inclusive) and endOffset (exclusive).", + "location": "query" + }, + "pageSize": { + "type": "integer", + "description": "Maximum number of items to return in a single page of responses.", + "format": "int32", + "minimum": "0", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "A previously-returned page token representing part of the larger set of results to view.", + "location": "query" + }, + "prefix": { + "type": "string", + "description": "Filter results to folders whose paths begin with this prefix. If set, the value must either be an empty string or end with a '/'.", + "location": "query" + }, + "startOffset": { + "type": "string", + "description": "Filter results to folders whose names are lexicographically equal to or after startOffset. If endOffset is also set, the folders listed will have names between startOffset (inclusive) and endOffset (exclusive).", + "location": "query" + } + }, + "parameterOrder": [ + "bucket" + ], + "response": { + "$ref": "Folders" + }, + "scopes": [ + "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" + ] + }, + "rename": { + "id": "storage.folders.rename", + "path": "b/{bucket}/folders/{sourceFolder}/renameTo/folders/{destinationFolder}", + "httpMethod": "POST", + "description": "Renames a source folder to a destination folder. Only applicable to buckets with hierarchical namespace enabled.", + "parameters": { + "bucket": { + "type": "string", + "description": "Name of the bucket in which the folders are in.", + "required": true, + "location": "path" + }, + "destinationFolder": { + "type": "string", + "description": "Name of the destination folder.", + "required": true, + "location": "path" + }, + "ifSourceMetagenerationMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the source object's current metageneration matches the given value.", + "format": "int64", + "location": "query" + }, + "ifSourceMetagenerationNotMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the source object's current metageneration does not match the given value.", + "format": "int64", + "location": "query" + }, + "sourceFolder": { + "type": "string", + "description": "Name of the source folder.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "bucket", + "sourceFolder", + "destinationFolder" + ], + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" + ] + } + } + }, + "managedFolders": { + "methods": { + "delete": { + "id": "storage.managedFolders.delete", + "path": "b/{bucket}/managedFolders/{managedFolder}", + "httpMethod": "DELETE", + "description": "Permanently deletes a managed folder.", + "parameters": { + "bucket": { + "type": "string", + "description": "Name of the bucket containing the managed folder.", + "required": true, + "location": "path" + }, + "managedFolder": { + "type": "string", + "description": "The managed folder name/path.", + "required": true, + "location": "path" + }, + "ifMetagenerationMatch": { + "type": "string", + "description": "If set, only deletes the managed folder if its metageneration matches this value.", + "format": "int64", + "location": "query" + }, + "ifMetagenerationNotMatch": { + "type": "string", + "description": "If set, only deletes the managed folder if its metageneration does not match this value.", + "format": "int64", + "location": "query" + }, + "allowNonEmpty": { + "type": "boolean", + "description": "Allows the deletion of a managed folder even if it is not empty. A managed folder is empty if there are no objects or managed folders that it applies to. Callers must have storage.managedFolders.setIamPolicy permission.", + "location": "query" + } + }, + "parameterOrder": [ + "bucket", + "managedFolder" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" + ] +}, +"get": { + "id": "storage.managedFolders.get", + "path": "b/{bucket}/managedFolders/{managedFolder}", + "httpMethod": "GET", + "description": "Returns metadata of the specified managed folder.", + "parameters": { + "bucket": { + "type": "string", + "description": "Name of the bucket containing the managed folder.", + "required": true, + "location": "path" + }, + "managedFolder": { + "type": "string", + "description": "The managed folder name/path.", + "required": true, + "location": "path" + }, + "ifMetagenerationMatch": { + "type": "string", + "description": "Makes the return of the managed folder metadata conditional on whether the managed folder's current metageneration matches the given value.", + "format": "int64", + "location": "query" + }, + "ifMetagenerationNotMatch": { + "type": "string", + "description": "Makes the return of the managed folder metadata conditional on whether the managed folder's current metageneration does not match the given value.", + "format": "int64", + "location": "query" + } + }, + "parameterOrder": [ + "bucket", + "managedFolder" + ], + "response": { + "$ref": "ManagedFolder" + }, + "scopes": [ + "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" + ] +}, +"getIamPolicy": { + "id": "storage.managedFolders.getIamPolicy", + "path": "b/{bucket}/managedFolders/{managedFolder}/iam", + "httpMethod": "GET", + "description": "Returns an IAM policy for the specified managed folder.", + "parameters": { + "bucket": { + "type": "string", + "description": "Name of the bucket containing the managed folder.", + "required": true, + "location": "path" + }, + "optionsRequestedPolicyVersion": { + "type": "integer", + "description": "The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for an older version that doesn't support part of the requested IAM policy, the request fails.", + "format": "int32", + "minimum": "1", + "location": "query" + }, + "managedFolder": { + "type": "string", + "description": "The managed folder name/path.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } + }, + "parameterOrder": [ + "bucket", + "managedFolder" + ], + "response": { + "$ref": "Policy" + }, + "scopes": [ + "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" + ] +}, +"insert": { + "id": "storage.managedFolders.insert", + "path": "b/{bucket}/managedFolders", + "httpMethod": "POST", + "description": "Creates a new managed folder.", + "parameters": { + "bucket": { + "type": "string", + "description": "Name of the bucket containing the managed folder.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "bucket" + ], + "request": { + "$ref": "ManagedFolder" + }, + "response": { + "$ref": "ManagedFolder" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" + ] +}, +"list": { + "id": "storage.managedFolders.list", + "path": "b/{bucket}/managedFolders", + "httpMethod": "GET", + "description": "Lists managed folders in the given bucket.", + "parameters": { + "bucket": { + "type": "string", + "description": "Name of the bucket containing the managed folder.", + "required": true, + "location": "path" + }, + "pageSize": { + "type": "integer", + "description": "Maximum number of items to return in a single page of responses.", + "format": "int32", + "minimum": "0", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "A previously-returned page token representing part of the larger set of results to view.", + "location": "query" + }, + "prefix": { + "type": "string", + "description": "The managed folder name/path prefix to filter the output list of results.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket" +], +"response": { + "$ref": "ManagedFolders" +}, +"scopes": [ + "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" +] +}, +"setIamPolicy": { +"id": "storage.managedFolders.setIamPolicy", +"path": "b/{bucket}/managedFolders/{managedFolder}/iam", +"httpMethod": "PUT", +"description": "Updates an IAM policy for the specified managed folder.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of the bucket containing the managed folder.", + "required": true, + "location": "path" + }, + "managedFolder": { + "type": "string", + "description": "The managed folder name/path.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket", + "managedFolder" +], +"request": { + "$ref": "Policy" +}, +"response": { + "$ref": "Policy" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"testIamPermissions": { +"id": "storage.managedFolders.testIamPermissions", +"path": "b/{bucket}/managedFolders/{managedFolder}/iam/testPermissions", +"httpMethod": "GET", +"description": "Tests a set of permissions on the given managed folder to see which, if any, are held by the caller.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of the bucket containing the managed folder.", + "required": true, + "location": "path" + }, + "managedFolder": { + "type": "string", + "description": "The managed folder name/path.", + "required": true, + "location": "path" + }, + "permissions": { + "type": "string", + "description": "Permissions to test.", + "required": true, + "repeated": true, + "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket", + "managedFolder", + "permissions" +], +"response": { + "$ref": "TestIamPermissionsResponse" +}, +"scopes": [ + "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" +] +} +} +}, +"notifications": { +"methods": { +"delete": { +"id": "storage.notifications.delete", +"path": "b/{bucket}/notificationConfigs/{notification}", +"httpMethod": "DELETE", +"description": "Permanently deletes a notification subscription.", +"parameters": { + "bucket": { + "type": "string", + "description": "The parent bucket of the notification.", + "required": true, + "location": "path" + }, + "notification": { + "type": "string", + "description": "ID of the notification to delete.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket", + "notification" +], +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"get": { +"id": "storage.notifications.get", +"path": "b/{bucket}/notificationConfigs/{notification}", +"httpMethod": "GET", +"description": "View a notification configuration.", +"parameters": { + "bucket": { + "type": "string", + "description": "The parent bucket of the notification.", + "required": true, + "location": "path" + }, + "notification": { + "type": "string", + "description": "Notification ID", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket", + "notification" +], +"response": { + "$ref": "Notification" +}, +"scopes": [ + "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" +] +}, +"insert": { +"id": "storage.notifications.insert", +"path": "b/{bucket}/notificationConfigs", +"httpMethod": "POST", +"description": "Creates a notification subscription for a given bucket.", +"parameters": { + "bucket": { + "type": "string", + "description": "The parent bucket of the notification.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket" +], +"request": { + "$ref": "Notification" +}, +"response": { + "$ref": "Notification" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"list": { +"id": "storage.notifications.list", +"path": "b/{bucket}/notificationConfigs", +"httpMethod": "GET", +"description": "Retrieves a list of notification subscriptions for a given bucket.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a Google Cloud Storage bucket.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket" +], +"response": { + "$ref": "Notifications" +}, +"scopes": [ + "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" +] +} +} +}, +"objectAccessControls": { +"methods": { +"delete": { +"id": "storage.objectAccessControls.delete", +"path": "b/{bucket}/o/{object}/acl/{entity}", +"httpMethod": "DELETE", +"description": "Permanently deletes the ACL entry for the specified entity on the specified object.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "entity": { + "type": "string", + "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", + "required": true, + "location": "path" + }, + "generation": { + "type": "string", + "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", + "format": "int64", + "location": "query" + }, + "object": { + "type": "string", + "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket", + "object", + "entity" +], +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"get": { +"id": "storage.objectAccessControls.get", +"path": "b/{bucket}/o/{object}/acl/{entity}", +"httpMethod": "GET", +"description": "Returns the ACL entry for the specified entity on the specified object.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "entity": { + "type": "string", + "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", + "required": true, + "location": "path" + }, + "generation": { + "type": "string", + "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", + "format": "int64", + "location": "query" + }, + "object": { + "type": "string", + "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket", + "object", + "entity" +], +"response": { + "$ref": "ObjectAccessControl" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"insert": { +"id": "storage.objectAccessControls.insert", +"path": "b/{bucket}/o/{object}/acl", +"httpMethod": "POST", +"description": "Creates a new ACL entry on the specified object.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "generation": { + "type": "string", + "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", + "format": "int64", + "location": "query" + }, + "object": { + "type": "string", + "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket", + "object" +], +"request": { + "$ref": "ObjectAccessControl" +}, +"response": { + "$ref": "ObjectAccessControl" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"list": { +"id": "storage.objectAccessControls.list", +"path": "b/{bucket}/o/{object}/acl", +"httpMethod": "GET", +"description": "Retrieves ACL entries on the specified object.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "generation": { + "type": "string", + "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", + "format": "int64", + "location": "query" + }, + "object": { + "type": "string", + "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket", + "object" +], +"response": { + "$ref": "ObjectAccessControls" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"patch": { +"id": "storage.objectAccessControls.patch", +"path": "b/{bucket}/o/{object}/acl/{entity}", +"httpMethod": "PATCH", +"description": "Patches an ACL entry on the specified object.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "entity": { + "type": "string", + "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", + "required": true, + "location": "path" + }, + "generation": { + "type": "string", + "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", + "format": "int64", + "location": "query" + }, + "object": { + "type": "string", + "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket", + "object", + "entity" +], +"request": { + "$ref": "ObjectAccessControl" +}, +"response": { + "$ref": "ObjectAccessControl" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"update": { +"id": "storage.objectAccessControls.update", +"path": "b/{bucket}/o/{object}/acl/{entity}", +"httpMethod": "PUT", +"description": "Updates an ACL entry on the specified object.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of a bucket.", + "required": true, + "location": "path" + }, + "entity": { + "type": "string", + "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", + "required": true, + "location": "path" + }, + "generation": { + "type": "string", + "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", + "format": "int64", + "location": "query" + }, + "object": { + "type": "string", + "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket", + "object", + "entity" +], +"request": { + "$ref": "ObjectAccessControl" +}, +"response": { + "$ref": "ObjectAccessControl" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" +] +} +} +}, +"objects": { +"methods": { +"compose": { +"id": "storage.objects.compose", +"path": "b/{destinationBucket}/o/{destinationObject}/compose", +"httpMethod": "POST", +"description": "Concatenates a list of existing objects into a new object in the same bucket.", +"parameters": { + "destinationBucket": { + "type": "string", + "description": "Name of the bucket containing the source objects. The destination object is stored in this bucket.", + "required": true, + "location": "path" + }, + "destinationObject": { + "type": "string", + "description": "Name of the new object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", + "required": true, + "location": "path" + }, + "destinationPredefinedAcl": { + "type": "string", + "description": "Apply a predefined set of access controls to the destination object.", + "enum": [ + "authenticatedRead", + "bucketOwnerFullControl", + "bucketOwnerRead", + "private", + "projectPrivate", + "publicRead" + ], + "enumDescriptions": [ + "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", + "Object owner gets OWNER access, and project team owners get OWNER access.", + "Object owner gets OWNER access, and project team owners get READER access.", + "Object owner gets OWNER access.", + "Object owner gets OWNER access, and project team members get access according to their roles.", + "Object owner gets OWNER access, and allUsers get READER access." + ], + "location": "query" + }, + "ifGenerationMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", + "format": "int64", + "location": "query" + }, + "ifMetagenerationMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", + "format": "int64", + "location": "query" + }, + "kmsKeyName": { + "type": "string", + "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.", + "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "destinationBucket", + "destinationObject" +], +"request": { + "$ref": "ComposeRequest" +}, +"response": { + "$ref": "Object" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"copy": { +"id": "storage.objects.copy", +"path": "b/{sourceBucket}/o/{sourceObject}/copyTo/b/{destinationBucket}/o/{destinationObject}", +"httpMethod": "POST", +"description": "Copies a source object to a destination object. Optionally overrides metadata.", +"parameters": { + "destinationBucket": { + "type": "string", + "description": "Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", + "required": true, + "location": "path" + }, + "destinationKmsKeyName": { + "type": "string", + "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.", + "location": "query" + }, + "destinationObject": { + "type": "string", + "description": "Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any.", + "required": true, + "location": "path" + }, + "destinationPredefinedAcl": { + "type": "string", + "description": "Apply a predefined set of access controls to the destination object.", + "enum": [ + "authenticatedRead", + "bucketOwnerFullControl", + "bucketOwnerRead", + "private", + "projectPrivate", + "publicRead" + ], + "enumDescriptions": [ + "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", + "Object owner gets OWNER access, and project team owners get OWNER access.", + "Object owner gets OWNER access, and project team owners get READER access.", + "Object owner gets OWNER access.", + "Object owner gets OWNER access, and project team members get access according to their roles.", + "Object owner gets OWNER access, and allUsers get READER access." + ], + "location": "query" + }, + "ifGenerationMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the destination object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", + "format": "int64", + "location": "query" + }, + "ifGenerationNotMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the destination object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", + "format": "int64", + "location": "query" + }, + "ifMetagenerationMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the destination object's current metageneration matches the given value.", + "format": "int64", + "location": "query" + }, + "ifMetagenerationNotMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the destination object's current metageneration does not match the given value.", + "format": "int64", + "location": "query" + }, + "ifSourceGenerationMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the source object's current generation matches the given value.", + "format": "int64", + "location": "query" + }, + "ifSourceGenerationNotMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the source object's current generation does not match the given value.", + "format": "int64", + "location": "query" + }, + "ifSourceMetagenerationMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the source object's current metageneration matches the given value.", + "format": "int64", + "location": "query" + }, + "ifSourceMetagenerationNotMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the source object's current metageneration does not match the given value.", + "format": "int64", + "location": "query" + }, + "projection": { + "type": "string", + "description": "Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.", + "enum": [ + "full", + "noAcl" + ], + "enumDescriptions": [ + "Include all properties.", + "Omit the owner, acl property." + ], + "location": "query" + }, + "sourceBucket": { + "type": "string", + "description": "Name of the bucket in which to find the source object.", + "required": true, + "location": "path" + }, + "sourceGeneration": { + "type": "string", + "description": "If present, selects a specific revision of the source object (as opposed to the latest version, the default).", + "format": "int64", + "location": "query" + }, + "sourceObject": { + "type": "string", + "description": "Name of the source object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "sourceBucket", + "sourceObject", + "destinationBucket", + "destinationObject" +], +"request": { + "$ref": "Object" +}, +"response": { + "$ref": "Object" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"delete": { +"id": "storage.objects.delete", +"path": "b/{bucket}/o/{object}", +"httpMethod": "DELETE", +"description": "Deletes an object and its metadata. Deletions are permanent if versioning is not enabled for the bucket, or if the generation parameter is used.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of the bucket in which the object resides.", + "required": true, + "location": "path" + }, + "generation": { + "type": "string", + "description": "If present, permanently deletes a specific revision of this object (as opposed to the latest version, the default).", + "format": "int64", + "location": "query" + }, + "ifGenerationMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", + "format": "int64", + "location": "query" + }, + "ifGenerationNotMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", + "format": "int64", + "location": "query" + }, + "ifMetagenerationMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", + "format": "int64", + "location": "query" + }, + "ifMetagenerationNotMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.", + "format": "int64", + "location": "query" + }, + "object": { + "type": "string", + "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket", + "object" +], +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"get": { +"id": "storage.objects.get", +"path": "b/{bucket}/o/{object}", +"httpMethod": "GET", +"description": "Retrieves an object or its metadata.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of the bucket in which the object resides.", + "required": true, + "location": "path" + }, + "generation": { + "type": "string", + "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", + "format": "int64", + "location": "query" + }, + "ifGenerationMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", + "format": "int64", + "location": "query" + }, + "ifGenerationNotMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", + "format": "int64", + "location": "query" + }, + "ifMetagenerationMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", + "format": "int64", + "location": "query" + }, + "ifMetagenerationNotMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.", + "format": "int64", + "location": "query" + }, + "object": { + "type": "string", + "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", + "required": true, + "location": "path" + }, + "projection": { + "type": "string", + "description": "Set of properties to return. Defaults to noAcl.", + "enum": [ + "full", + "noAcl" + ], + "enumDescriptions": [ + "Include all properties.", + "Omit the owner, acl property." + ], + "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + }, + "softDeleted": { + "type": "boolean", + "description": "If true, only soft-deleted object versions will be listed. The default is false. For more information, see Soft Delete.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket", + "object" +], +"response": { + "$ref": "Object" +}, +"scopes": [ + "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" +], +"supportsMediaDownload": true, +"useMediaDownloadService": true +}, +"getIamPolicy": { +"id": "storage.objects.getIamPolicy", +"path": "b/{bucket}/o/{object}/iam", +"httpMethod": "GET", +"description": "Returns an IAM policy for the specified object.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of the bucket in which the object resides.", + "required": true, + "location": "path" + }, + "generation": { + "type": "string", + "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", + "format": "int64", + "location": "query" + }, + "object": { + "type": "string", + "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" } - } - }, - "ManagedFolder": { - "id": "ManagedFolder", - "type": "object", - "description": "A managed folder.", - "properties": { +}, +"parameterOrder": [ + "bucket", + "object" +], +"response": { + "$ref": "Policy" +}, +"scopes": [ + "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" +] +}, +"insert": { +"id": "storage.objects.insert", +"path": "b/{bucket}/o", +"httpMethod": "POST", +"description": "Stores a new object and metadata.", +"parameters": { "bucket": { - "type": "string", - "description": "The name of the bucket containing this managed folder." + "type": "string", + "description": "Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.", + "required": true, + "location": "path" }, - "id": { - "type": "string", - "description": "The ID of the managed folder, including the bucket name and managed folder name." + "contentEncoding": { + "type": "string", + "description": "If set, sets the contentEncoding property of the final object to this value. Setting this parameter is equivalent to setting the contentEncoding metadata property. This can be useful when uploading an object with uploadType=media to indicate the encoding of the content being uploaded.", + "location": "query" }, - "kind": { - "type": "string", - "description": "The kind of item this is. For managed folders, this is always storage#managedFolder.", - "default": "storage#managedFolder" + "ifGenerationMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", + "format": "int64", + "location": "query" }, - "metageneration": { - "type": "string", - "description": "The version of the metadata for this managed folder. Used for preconditions and for detecting changes in metadata.", - "format": "int64" + "ifGenerationNotMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", + "format": "int64", + "location": "query" }, - "name": { - "type": "string", - "description": "The name of the managed folder. Required if not specified by URL parameter." + "ifMetagenerationMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", + "format": "int64", + "location": "query" }, - "selfLink": { - "type": "string", - "description": "The link to this managed folder." + "ifMetagenerationNotMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.", + "format": "int64", + "location": "query" }, - "createTime": { - "type": "string", - "description": "The creation time of the managed folder in RFC 3339 format.", - "format": "date-time" + "kmsKeyName": { + "type": "string", + "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.", + "location": "query" }, - "updateTime": { - "type": "string", - "description": "The last update time of the managed folder metadata in RFC 3339 format.", - "format": "date-time" + "name": { + "type": "string", + "description": "Name of the object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", + "location": "query" + }, + "predefinedAcl": { + "type": "string", + "description": "Apply a predefined set of access controls to this object.", + "enum": [ + "authenticatedRead", + "bucketOwnerFullControl", + "bucketOwnerRead", + "private", + "projectPrivate", + "publicRead" + ], + "enumDescriptions": [ + "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", + "Object owner gets OWNER access, and project team owners get OWNER access.", + "Object owner gets OWNER access, and project team owners get READER access.", + "Object owner gets OWNER access.", + "Object owner gets OWNER access, and project team members get access according to their roles.", + "Object owner gets OWNER access, and allUsers get READER access." + ], + "location": "query" + }, + "projection": { + "type": "string", + "description": "Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.", + "enum": [ + "full", + "noAcl" + ], + "enumDescriptions": [ + "Include all properties.", + "Omit the owner, acl property." + ], + "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" } - } - }, - "ManagedFolders": { - "id": "ManagedFolders", - "type": "object", - "description": "A list of managed folders.", - "properties": { - "items": { - "type": "array", - "description": "The list of items.", - "items": { - "$ref": "ManagedFolder" - } +}, +"parameterOrder": [ + "bucket" +], +"request": { + "$ref": "Object" +}, +"response": { + "$ref": "Object" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" +], +"supportsMediaUpload": true, +"mediaUpload": { + "accept": [ + "*/*" + ], + "protocols": { + "simple": { + "multipart": true, + "path": "/upload/storage/v1/b/{bucket}/o" + }, + "resumable": { + "multipart": true, + "path": "/resumable/upload/storage/v1/b/{bucket}/o" + } + } +} +}, +"list": { +"id": "storage.objects.list", +"path": "b/{bucket}/o", +"httpMethod": "GET", +"description": "Retrieves a list of objects matching the criteria.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of the bucket in which to look for objects.", + "required": true, + "location": "path" }, - "kind": { - "type": "string", - "description": "The kind of item this is. For lists of managed folders, this is always storage#managedFolders.", - "default": "storage#managedFolders" + "delimiter": { + "type": "string", + "description": "Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted.", + "location": "query" }, - "nextPageToken": { - "type": "string", - "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results." - } - } - }, - "Notification": { - "id": "Notification", - "type": "object", - "description": "A subscription to receive Google PubSub notifications.", - "properties": { - "custom_attributes": { - "type": "object", - "description": "An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription.", - "additionalProperties": { - "type": "string" - } + "endOffset": { + "type": "string", + "description": "Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).", + "location": "query" }, - "etag": { - "type": "string", - "description": "HTTP 1.1 Entity tag for this subscription notification." + "includeTrailingDelimiter": { + "type": "boolean", + "description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.", + "location": "query" }, - "event_types": { - "type": "array", - "description": "If present, only send notifications about listed event types. If empty, sent notifications for all event types.", - "items": { - "type": "string" - } + "maxResults": { + "type": "integer", + "description": "Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller.", + "default": "1000", + "format": "uint32", + "minimum": "0", + "location": "query" }, - "id": { - "type": "string", - "description": "The ID of the notification." + "pageToken": { + "type": "string", + "description": "A previously-returned page token representing part of the larger set of results to view.", + "location": "query" }, - "kind": { - "type": "string", - "description": "The kind of item this is. For notifications, this is always storage#notification.", - "default": "storage#notification" - }, - "object_name_prefix": { - "type": "string", - "description": "If present, only apply this notification configuration to object names that begin with this prefix." - }, - "payload_format": { - "type": "string", - "description": "The desired content of the Payload.", - "default": "JSON_API_V1", - "annotations": { - "required": [ - "storage.notifications.insert" - ] - } + "prefix": { + "type": "string", + "description": "Filter results to objects whose names begin with this prefix.", + "location": "query" }, - "selfLink": { - "type": "string", - "description": "The canonical URL of this notification." - }, - "topic": { - "type": "string", - "description": "The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'", - "annotations": { - "required": [ - "storage.notifications.insert" - ] - } - } - } - }, - "Notifications": { - "id": "Notifications", - "type": "object", - "description": "A list of notification subscriptions.", - "properties": { - "items": { - "type": "array", - "description": "The list of items.", - "items": { - "$ref": "Notification" - } + "projection": { + "type": "string", + "description": "Set of properties to return. Defaults to noAcl.", + "enum": [ + "full", + "noAcl" + ], + "enumDescriptions": [ + "Include all properties.", + "Omit the owner, acl property." + ], + "location": "query" + }, + "startOffset": { + "type": "string", + "description": "Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).", + "location": "query" }, - "kind": { - "type": "string", - "description": "The kind of item this is. For lists of notifications, this is always storage#notifications.", - "default": "storage#notifications" - } - } - }, - "Object": { - "id": "Object", - "type": "object", - "description": "An object.", - "properties": { - "acl": { - "type": "array", - "description": "Access controls on the object.", - "items": { - "$ref": "ObjectAccessControl" - }, - "annotations": { - "required": [ - "storage.objects.update" - ] - } + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" }, + "versions": { + "type": "boolean", + "description": "If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.", + "location": "query" + }, + "matchGlob": { + "type": "string", + "description": "Filter results to objects and prefixes that match this glob pattern.", + "location": "query" + }, + "softDeleted": { + "type": "boolean", + "description": "If true, only soft-deleted object versions will be listed. The default is false. For more information, see Soft Delete.", + "location": "query" + }, + "includeFoldersAsPrefixes": { + "type": "boolean", + "description": "Only applicable if delimiter is set to '/'. If true, will also include folders and managed folders (besides objects) in the returned prefixes.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket" +], +"response": { + "$ref": "Objects" +}, +"scopes": [ + "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" +], +"supportsSubscription": true +}, +"patch": { +"id": "storage.objects.patch", +"path": "b/{bucket}/o/{object}", +"httpMethod": "PATCH", +"description": "Patches an object's metadata.", +"parameters": { "bucket": { - "type": "string", - "description": "The name of the bucket containing this object." + "type": "string", + "description": "Name of the bucket in which the object resides.", + "required": true, + "location": "path" }, - "cacheControl": { - "type": "string", - "description": "Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600." + "generation": { + "type": "string", + "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", + "format": "int64", + "location": "query" }, - "componentCount": { - "type": "integer", - "description": "Number of underlying components that make up this object. Components are accumulated by compose operations.", - "format": "int32" + "ifGenerationMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", + "format": "int64", + "location": "query" }, - "contentDisposition": { - "type": "string", - "description": "Content-Disposition of the object data." + "ifGenerationNotMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", + "format": "int64", + "location": "query" }, - "contentEncoding": { - "type": "string", - "description": "Content-Encoding of the object data." - }, - "contentLanguage": { - "type": "string", - "description": "Content-Language of the object data." - }, - "contentType": { - "type": "string", - "description": "Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream." - }, - "crc32c": { - "type": "string", - "description": "CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices." - }, - "customTime": { - "type": "string", - "description": "A timestamp in RFC 3339 format specified by the user for an object.", - "format": "date-time" - }, - "customerEncryption": { - "type": "object", - "description": "Metadata of customer-supplied encryption key, if the object is encrypted by such a key.", - "properties": { - "encryptionAlgorithm": { - "type": "string", - "description": "The encryption algorithm." - }, - "keySha256": { - "type": "string", - "description": "SHA256 hash value of the encryption key." - } - } + "ifMetagenerationMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", + "format": "int64", + "location": "query" }, - "etag": { - "type": "string", - "description": "HTTP 1.1 Entity tag for the object." + "ifMetagenerationNotMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.", + "format": "int64", + "location": "query" }, - "eventBasedHold": { - "type": "boolean", - "description": "Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false." + "overrideUnlockedRetention": { + "type": "boolean", + "description": "Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked.", + "location": "query" }, - "generation": { - "type": "string", - "description": "The content generation of this object. Used for object versioning.", - "format": "int64" + "object": { + "type": "string", + "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", + "required": true, + "location": "path" }, - "id": { - "type": "string", - "description": "The ID of the object, including the bucket name, object name, and generation number." + "predefinedAcl": { + "type": "string", + "description": "Apply a predefined set of access controls to this object.", + "enum": [ + "authenticatedRead", + "bucketOwnerFullControl", + "bucketOwnerRead", + "private", + "projectPrivate", + "publicRead" + ], + "enumDescriptions": [ + "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", + "Object owner gets OWNER access, and project team owners get OWNER access.", + "Object owner gets OWNER access, and project team owners get READER access.", + "Object owner gets OWNER access.", + "Object owner gets OWNER access, and project team members get access according to their roles.", + "Object owner gets OWNER access, and allUsers get READER access." + ], + "location": "query" + }, + "projection": { + "type": "string", + "description": "Set of properties to return. Defaults to full.", + "enum": [ + "full", + "noAcl" + ], + "enumDescriptions": [ + "Include all properties.", + "Omit the owner, acl property." + ], + "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request, for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket", + "object" +], +"request": { + "$ref": "Object" +}, +"response": { + "$ref": "Object" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"rewrite": { +"id": "storage.objects.rewrite", +"path": "b/{sourceBucket}/o/{sourceObject}/rewriteTo/b/{destinationBucket}/o/{destinationObject}", +"httpMethod": "POST", +"description": "Rewrites a source object to a destination object. Optionally overrides metadata.", +"parameters": { + "destinationBucket": { + "type": "string", + "description": "Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.", + "required": true, + "location": "path" }, - "kind": { - "type": "string", - "description": "The kind of item this is. For objects, this is always storage#object.", - "default": "storage#object" + "destinationKmsKeyName": { + "type": "string", + "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.", + "location": "query" }, - "kmsKeyName": { - "type": "string", - "description": "Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request." + "destinationObject": { + "type": "string", + "description": "Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", + "required": true, + "location": "path" }, - "md5Hash": { - "type": "string", - "description": "MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices." + "destinationPredefinedAcl": { + "type": "string", + "description": "Apply a predefined set of access controls to the destination object.", + "enum": [ + "authenticatedRead", + "bucketOwnerFullControl", + "bucketOwnerRead", + "private", + "projectPrivate", + "publicRead" + ], + "enumDescriptions": [ + "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", + "Object owner gets OWNER access, and project team owners get OWNER access.", + "Object owner gets OWNER access, and project team owners get READER access.", + "Object owner gets OWNER access.", + "Object owner gets OWNER access, and project team members get access according to their roles.", + "Object owner gets OWNER access, and allUsers get READER access." + ], + "location": "query" + }, + "ifGenerationMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", + "format": "int64", + "location": "query" }, - "mediaLink": { - "type": "string", - "description": "Media download link." + "ifGenerationNotMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", + "format": "int64", + "location": "query" }, - "metadata": { - "type": "object", - "description": "User-provided metadata, in key/value pairs.", - "additionalProperties": { - "type": "string", - "description": "An individual metadata entry." - } + "ifMetagenerationMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the destination object's current metageneration matches the given value.", + "format": "int64", + "location": "query" }, - "metageneration": { - "type": "string", - "description": "The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.", - "format": "int64" + "ifMetagenerationNotMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the destination object's current metageneration does not match the given value.", + "format": "int64", + "location": "query" }, - "name": { - "type": "string", - "description": "The name of the object. Required if not specified by URL parameter." + "ifSourceGenerationMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the source object's current generation matches the given value.", + "format": "int64", + "location": "query" }, - "owner": { - "type": "object", - "description": "The owner of the object. This will always be the uploader of the object.", - "properties": { - "entity": { - "type": "string", - "description": "The entity, in the form user-userId." - }, - "entityId": { - "type": "string", - "description": "The ID for the entity." - } - } - }, - "retentionExpirationTime": { - "type": "string", - "description": "A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold).", - "format": "date-time" - }, - "retention": { - "type": "object", - "description": "A collection of object level retention parameters.", - "properties": { - "retainUntilTime": { - "type": "string", - "description": "A time in RFC 3339 format until which object retention protects this object.", - "format": "date-time" - }, - "mode": { - "type": "string", - "description": "The bucket's object retention mode, can only be Unlocked or Locked." - } - } + "ifSourceGenerationNotMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the source object's current generation does not match the given value.", + "format": "int64", + "location": "query" }, - "selfLink": { - "type": "string", - "description": "The link to this object." + "ifSourceMetagenerationMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the source object's current metageneration matches the given value.", + "format": "int64", + "location": "query" }, - "size": { - "type": "string", - "description": "Content-Length of the data in bytes.", - "format": "uint64" + "ifSourceMetagenerationNotMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the source object's current metageneration does not match the given value.", + "format": "int64", + "location": "query" }, - "storageClass": { - "type": "string", - "description": "Storage class of the object." + "maxBytesRewrittenPerCall": { + "type": "string", + "description": "The maximum number of bytes that will be rewritten per rewrite request. Most callers shouldn't need to specify this parameter - it is primarily in place to support testing. If specified the value must be an integral multiple of 1 MiB (1048576). Also, this only applies to requests where the source and destination span locations and/or storage classes. Finally, this value must not change across rewrite calls else you'll get an error that the rewriteToken is invalid.", + "format": "int64", + "location": "query" }, - "temporaryHold": { - "type": "boolean", - "description": "Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object." + "projection": { + "type": "string", + "description": "Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.", + "enum": [ + "full", + "noAcl" + ], + "enumDescriptions": [ + "Include all properties.", + "Omit the owner, acl property." + ], + "location": "query" }, - "timeCreated": { - "type": "string", - "description": "The creation time of the object in RFC 3339 format.", - "format": "date-time" - }, - "timeDeleted": { - "type": "string", - "description": "The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.", - "format": "date-time" - }, - "softDeleteTime": { - "type": "string", - "description": "The time at which the object became soft-deleted in RFC 3339 format.", - "format": "date-time" - }, - "hardDeleteTime": { - "type": "string", - "description": "This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket.", - "format": "date-time" - }, - "timeStorageClassUpdated": { - "type": "string", - "description": "The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.", - "format": "date-time" + "rewriteToken": { + "type": "string", + "description": "Include this field (from the previous rewrite response) on each rewrite request after the first one, until the rewrite response 'done' flag is true. Calls that provide a rewriteToken can omit all other request fields, but if included those fields must match the values provided in the first rewrite request.", + "location": "query" }, - "updated": { - "type": "string", - "description": "The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration.", - "format": "date-time" + "sourceBucket": { + "type": "string", + "description": "Name of the bucket in which to find the source object.", + "required": true, + "location": "path" + }, + "sourceGeneration": { + "type": "string", + "description": "If present, selects a specific revision of the source object (as opposed to the latest version, the default).", + "format": "int64", + "location": "query" + }, + "sourceObject": { + "type": "string", + "description": "Name of the source object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" } - } - }, - "ObjectAccessControl": { - "id": "ObjectAccessControl", - "type": "object", - "description": "An access-control entry.", - "properties": { +}, +"parameterOrder": [ + "sourceBucket", + "sourceObject", + "destinationBucket", + "destinationObject" +], +"request": { + "$ref": "Object" +}, +"response": { + "$ref": "RewriteResponse" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"setIamPolicy": { +"id": "storage.objects.setIamPolicy", +"path": "b/{bucket}/o/{object}/iam", +"httpMethod": "PUT", +"description": "Updates an IAM policy for the specified object.", +"parameters": { "bucket": { - "type": "string", - "description": "The name of the bucket." + "type": "string", + "description": "Name of the bucket in which the object resides.", + "required": true, + "location": "path" }, - "domain": { - "type": "string", - "description": "The domain associated with the entity, if any." + "generation": { + "type": "string", + "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", + "format": "int64", + "location": "query" }, - "email": { - "type": "string", - "description": "The email address associated with the entity, if any." + "object": { + "type": "string", + "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", + "required": true, + "location": "path" }, - "entity": { - "type": "string", - "description": "The entity holding the permission, in one of the following forms: \n- user-userId \n- user-email \n- group-groupId \n- group-email \n- domain-domain \n- project-team-projectId \n- allUsers \n- allAuthenticatedUsers Examples: \n- The user liz@example.com would be user-liz@example.com. \n- The group example@googlegroups.com would be group-example@googlegroups.com. \n- To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.", - "annotations": { - "required": [ - "storage.defaultObjectAccessControls.insert", - "storage.objectAccessControls.insert" - ] - } + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket", + "object" +], +"request": { + "$ref": "Policy" +}, +"response": { + "$ref": "Policy" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"testIamPermissions": { +"id": "storage.objects.testIamPermissions", +"path": "b/{bucket}/o/{object}/iam/testPermissions", +"httpMethod": "GET", +"description": "Tests a set of permissions on the given object to see which, if any, are held by the caller.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of the bucket in which the object resides.", + "required": true, + "location": "path" }, - "entityId": { - "type": "string", - "description": "The ID for the entity, if any." + "generation": { + "type": "string", + "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", + "format": "int64", + "location": "query" }, - "etag": { - "type": "string", - "description": "HTTP 1.1 Entity tag for the access-control entry." + "object": { + "type": "string", + "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", + "required": true, + "location": "path" }, - "generation": { - "type": "string", - "description": "The content generation of the object, if applied to an object.", - "format": "int64" + "permissions": { + "type": "string", + "description": "Permissions to test.", + "required": true, + "repeated": true, + "location": "query" }, - "id": { - "type": "string", - "description": "The ID of the access-control entry." + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" + } +}, +"parameterOrder": [ + "bucket", + "object", + "permissions" +], +"response": { + "$ref": "TestIamPermissionsResponse" +}, +"scopes": [ + "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" +] +}, +"update": { +"id": "storage.objects.update", +"path": "b/{bucket}/o/{object}", +"httpMethod": "PUT", +"description": "Updates an object's metadata.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of the bucket in which the object resides.", + "required": true, + "location": "path" }, - "kind": { - "type": "string", - "description": "The kind of item this is. For object access control entries, this is always storage#objectAccessControl.", - "default": "storage#objectAccessControl" + "generation": { + "type": "string", + "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", + "format": "int64", + "location": "query" }, - "object": { - "type": "string", - "description": "The name of the object, if applied to an object." + "ifGenerationMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", + "format": "int64", + "location": "query" }, - "projectTeam": { - "type": "object", - "description": "The project team associated with the entity, if any.", - "properties": { - "projectNumber": { - "type": "string", - "description": "The project number." - }, - "team": { - "type": "string", - "description": "The team." - } - } + "ifGenerationNotMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", + "format": "int64", + "location": "query" }, - "role": { - "type": "string", - "description": "The access permission for the entity.", - "annotations": { - "required": [ - "storage.defaultObjectAccessControls.insert", - "storage.objectAccessControls.insert" - ] - } + "ifMetagenerationMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", + "format": "int64", + "location": "query" }, - "selfLink": { - "type": "string", - "description": "The link to this access-control entry." - } - } - }, - "ObjectAccessControls": { - "id": "ObjectAccessControls", - "type": "object", - "description": "An access-control list.", - "properties": { - "items": { - "type": "array", - "description": "The list of items.", - "items": { - "$ref": "ObjectAccessControl" - } + "ifMetagenerationNotMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.", + "format": "int64", + "location": "query" }, - "kind": { - "type": "string", - "description": "The kind of item this is. For lists of object access control entries, this is always storage#objectAccessControls.", - "default": "storage#objectAccessControls" - } - } - }, - "Objects": { - "id": "Objects", - "type": "object", - "description": "A list of objects.", - "properties": { - "items": { - "type": "array", - "description": "The list of items.", - "items": { - "$ref": "Object" - } + "overrideUnlockedRetention": { + "type": "boolean", + "description": "Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked.", + "location": "query" }, - "kind": { - "type": "string", - "description": "The kind of item this is. For lists of objects, this is always storage#objects.", - "default": "storage#objects" + "object": { + "type": "string", + "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", + "required": true, + "location": "path" }, - "nextPageToken": { - "type": "string", - "description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results." - }, - "prefixes": { - "type": "array", - "description": "The list of prefixes of objects matching-but-not-listed up to and including the requested delimiter.", - "items": { - "type": "string" - } + "predefinedAcl": { + "type": "string", + "description": "Apply a predefined set of access controls to this object.", + "enum": [ + "authenticatedRead", + "bucketOwnerFullControl", + "bucketOwnerRead", + "private", + "projectPrivate", + "publicRead" + ], + "enumDescriptions": [ + "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", + "Object owner gets OWNER access, and project team owners get OWNER access.", + "Object owner gets OWNER access, and project team owners get READER access.", + "Object owner gets OWNER access.", + "Object owner gets OWNER access, and project team members get access according to their roles.", + "Object owner gets OWNER access, and allUsers get READER access." + ], + "location": "query" + }, + "projection": { + "type": "string", + "description": "Set of properties to return. Defaults to full.", + "enum": [ + "full", + "noAcl" + ], + "enumDescriptions": [ + "Include all properties.", + "Omit the owner, acl property." + ], + "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" } - } - }, - "Policy": { - "id": "Policy", - "type": "object", - "description": "A bucket/object/managedFolder IAM policy.", - "properties": { - "bindings": { - "type": "array", - "description": "An association between a role, which comes with a set of permissions, and members who may assume that role.", - "items": { - "type": "object", - "properties": { - "condition": { - "$ref": "Expr", - "description": "The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently." - }, - "members": { - "type": "array", - "description": "A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows: \n- allUsers \u2014 A special identifier that represents anyone on the internet; with or without a Google account. \n- allAuthenticatedUsers \u2014 A special identifier that represents anyone who is authenticated with a Google account or a service account. \n- user:emailid \u2014 An email address that represents a specific account. For example, user:alice@gmail.com or user:joe@example.com. \n- serviceAccount:emailid \u2014 An email address that represents a service account. For example, serviceAccount:my-other-app@appspot.gserviceaccount.com . \n- group:emailid \u2014 An email address that represents a Google group. For example, group:admins@example.com. \n- domain:domain \u2014 A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com. \n- projectOwner:projectid \u2014 Owners of the given project. For example, projectOwner:my-example-project \n- projectEditor:projectid \u2014 Editors of the given project. For example, projectEditor:my-example-project \n- projectViewer:projectid \u2014 Viewers of the given project. For example, projectViewer:my-example-project", - "items": { - "type": "string" - }, - "annotations": { - "required": [ - "storage.buckets.setIamPolicy", - "storage.objects.setIamPolicy", - "storage.managedFolders.setIamPolicy" - ] - } - }, - "role": { +}, +"parameterOrder": [ + "bucket", + "object" +], +"request": { + "$ref": "Object" +}, +"response": { + "$ref": "Object" +}, +"scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"watchAll": { +"id": "storage.objects.watchAll", +"path": "b/{bucket}/o/watch", +"httpMethod": "POST", +"description": "Watch for changes on all objects in a bucket.", +"parameters": { + "bucket": { "type": "string", - "description": "The role to which members belong. Two types of roles are supported: new IAM roles, which grant permissions that do not map directly to those provided by ACLs, and legacy IAM roles, which do map directly to ACL permissions. All roles are of the format roles/storage.specificRole.\nThe new IAM roles are: \n- roles/storage.admin \u2014 Full control of Google Cloud Storage resources. \n- roles/storage.objectViewer \u2014 Read-Only access to Google Cloud Storage objects. \n- roles/storage.objectCreator \u2014 Access to create objects in Google Cloud Storage. \n- roles/storage.objectAdmin \u2014 Full control of Google Cloud Storage objects. The legacy IAM roles are: \n- roles/storage.legacyObjectReader \u2014 Read-only access to objects without listing. Equivalent to an ACL entry on an object with the READER role. \n- roles/storage.legacyObjectOwner \u2014 Read/write access to existing objects without listing. Equivalent to an ACL entry on an object with the OWNER role. \n- roles/storage.legacyBucketReader \u2014 Read access to buckets with object listing. Equivalent to an ACL entry on a bucket with the READER role. \n- roles/storage.legacyBucketWriter \u2014 Read access to buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the WRITER role. \n- roles/storage.legacyBucketOwner \u2014 Read and write access to existing buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the OWNER role.", - "annotations": { - "required": [ - "storage.buckets.setIamPolicy", - "storage.objects.setIamPolicy", - "storage.managedFolders.setIamPolicy" - ] - } - } - } - }, - "annotations": { - "required": [ - "storage.buckets.setIamPolicy", - "storage.objects.setIamPolicy", - "storage.managedFolders.setIamPolicy" - ] - } + "description": "Name of the bucket in which to look for objects.", + "required": true, + "location": "path" }, - "etag": { - "type": "string", - "description": "HTTP 1.1 Entity tag for the policy.", - "format": "byte" + "delimiter": { + "type": "string", + "description": "Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted.", + "location": "query" }, - "kind": { - "type": "string", - "description": "The kind of item this is. For policies, this is always storage#policy. This field is ignored on input.", - "default": "storage#policy" + "endOffset": { + "type": "string", + "description": "Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).", + "location": "query" }, - "resourceId": { - "type": "string", - "description": "The ID of the resource to which this policy belongs. Will be of the form projects/_/buckets/bucket for buckets, projects/_/buckets/bucket/objects/object for objects, and projects/_/buckets/bucket/managedFolders/managedFolder. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/_/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input." + "includeTrailingDelimiter": { + "type": "boolean", + "description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.", + "location": "query" }, - "version": { - "type": "integer", - "description": "The IAM policy format version.", - "format": "int32" - } - } - }, - "RewriteResponse": { - "id": "RewriteResponse", - "type": "object", - "description": "A rewrite response.", - "properties": { - "done": { - "type": "boolean", - "description": "true if the copy is finished; otherwise, false if the copy is in progress. This property is always present in the response." + "maxResults": { + "type": "integer", + "description": "Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller.", + "default": "1000", + "format": "uint32", + "minimum": "0", + "location": "query" }, - "kind": { - "type": "string", - "description": "The kind of item this is.", - "default": "storage#rewriteResponse" + "pageToken": { + "type": "string", + "description": "A previously-returned page token representing part of the larger set of results to view.", + "location": "query" }, - "objectSize": { - "type": "string", - "description": "The total size of the object being copied in bytes. This property is always present in the response.", - "format": "int64" + "prefix": { + "type": "string", + "description": "Filter results to objects whose names begin with this prefix.", + "location": "query" }, - "resource": { - "$ref": "Object", - "description": "A resource containing the metadata for the copied-to object. This property is present in the response only when copying completes." + "projection": { + "type": "string", + "description": "Set of properties to return. Defaults to noAcl.", + "enum": [ + "full", + "noAcl" + ], + "enumDescriptions": [ + "Include all properties.", + "Omit the owner, acl property." + ], + "location": "query" + }, + "startOffset": { + "type": "string", + "description": "Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).", + "location": "query" }, - "rewriteToken": { - "type": "string", - "description": "A token to use in subsequent requests to continue copying data. This token is present in the response only when there is more data to copy." + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" }, - "totalBytesRewritten": { - "type": "string", - "description": "The total bytes written so far, which can be used to provide a waiting user with a progress indicator. This property is always present in the response.", - "format": "int64" + "versions": { + "type": "boolean", + "description": "If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.", + "location": "query" } - } - }, - "ServiceAccount": { - "id": "ServiceAccount", - "type": "object", - "description": "A subscription to receive Google PubSub notifications.", - "properties": { - "email_address": { - "type": "string", - "description": "The ID of the notification." +}, +"parameterOrder": [ + "bucket" +], +"request": { + "$ref": "Channel", + "parameterName": "resource" +}, +"response": { + "$ref": "Channel" +}, +"scopes": [ + "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" +], +"supportsSubscription": true +}, +"restore": { +"id": "storage.objects.restore", +"path": "b/{bucket}/o/{object}/restore", +"httpMethod": "POST", +"description": "Restores a soft-deleted object.", +"parameters": { + "bucket": { + "type": "string", + "description": "Name of the bucket in which the object resides.", + "required": true, + "location": "path" }, - "kind": { - "type": "string", - "description": "The kind of item this is. For notifications, this is always storage#notification.", - "default": "storage#serviceAccount" - } - } - }, - "TestIamPermissionsResponse": { - "id": "TestIamPermissionsResponse", - "type": "object", - "description": "A storage.(buckets|objects|managedFolders).testIamPermissions response.", - "properties": { - "kind": { - "type": "string", - "description": "The kind of item this is.", - "default": "storage#testIamPermissionsResponse" + "generation": { + "type": "string", + "description": "Selects a specific revision of this object.", + "required": true, + "format": "int64", + "location": "query" }, - "permissions": { - "type": "array", - "description": "The permissions held by the caller. Permissions are always of the format storage.resource.capability, where resource is one of buckets, objects, or managedFolders. The supported permissions are as follows: \n- storage.buckets.delete \u2014 Delete bucket. \n- storage.buckets.get \u2014 Read bucket metadata. \n- storage.buckets.getIamPolicy \u2014 Read bucket IAM policy. \n- storage.buckets.create \u2014 Create bucket. \n- storage.buckets.list \u2014 List buckets. \n- storage.buckets.setIamPolicy \u2014 Update bucket IAM policy. \n- storage.buckets.update \u2014 Update bucket metadata. \n- storage.objects.delete \u2014 Delete object. \n- storage.objects.get \u2014 Read object data and metadata. \n- storage.objects.getIamPolicy \u2014 Read object IAM policy. \n- storage.objects.create \u2014 Create object. \n- storage.objects.list \u2014 List objects. \n- storage.objects.setIamPolicy \u2014 Update object IAM policy. \n- storage.objects.update \u2014 Update object metadata. \n- storage.managedFolders.delete \u2014 Delete managed folder. \n- storage.managedFolders.get \u2014 Read managed folder metadata. \n- storage.managedFolders.getIamPolicy \u2014 Read managed folder IAM policy. \n- storage.managedFolders.create \u2014 Create managed folder. \n- storage.managedFolders.list \u2014 List managed folders. \n- storage.managedFolders.setIamPolicy \u2014 Update managed folder IAM policy.", - "items": { - "type": "string" - } - } - } - }, - "BulkRestoreObjectsRequest": { - "id": "BulkRestoreObjectsRequest", - "type": "object", - "description": "A bulk restore objects request.", - "properties": { - "allowOverwrite": { - "type": "boolean", - "description": "If false (default), the restore will not overwrite live objects with the same name at the destination. This means some deleted objects may be skipped. If true, live objects will be overwritten resulting in a noncurrent object (if versioning is enabled). If versioning is not enabled, overwriting the object will result in a soft-deleted object. In either case, if a noncurrent object already exists with the same name, a live version can be written without issue." - }, - "softDeletedAfterTime": { - "type": "string", - "description": "Restores only the objects that were soft-deleted after this time.", - "format": "date-time" - }, - "softDeletedBeforeTime": { - "type": "string", - "description": "Restores only the objects that were soft-deleted before this time.", - "format": "date-time" - }, - "matchGlobs": { - "type": "array", - "description": "Restores only the objects matching any of the specified glob(s). If this parameter is not specified, all objects will be restored within the specified time range.", - "items": { - "type": "string" - } + "object": { + "type": "string", + "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", + "required": true, + "location": "path" + }, + "ifGenerationMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's one live generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", + "format": "int64", + "location": "query" + }, + "ifGenerationNotMatch": { + "type": "string", + "description": "Makes the operation conditional on whether none of the object's live generations match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", + "format": "int64", + "location": "query" + }, + "ifMetagenerationMatch": { + "type": "string", + "description": "Makes the operation conditional on whether the object's one live metageneration matches the given value.", + "format": "int64", + "location": "query" + }, + "ifMetagenerationNotMatch": { + "type": "string", + "description": "Makes the operation conditional on whether none of the object's live metagenerations match the given value.", + "format": "int64", + "location": "query" }, "copySourceAcl": { - "type": "boolean", - "description": "If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. The default is false." - } - } - } - }, - "resources": { - "anywhereCache": { - "methods": { - "insert": { - "id": "storage.anywhereCaches.insert", - "path": "b/{bucket}/anywhereCaches", - "httpMethod": "POST", - "description": "Creates an Anywhere Cache instance.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the partent bucket", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "bucket" - ], - "request": { - "$ref": "AnywhereCache" - }, - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - }, - "update": { - "id": "storage.anywhereCaches.update", - "path": "b/{bucket}/anywhereCaches/{anywhereCacheId}", - "httpMethod": "PATCH", - "description": "Updates the config(ttl and admissionPolicy) of an Anywhere Cache instance.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the partent bucket", - "required": true, - "location": "path" - }, - "anywhereCacheId": { - "type": "string", - "description": "The ID of requested Anywhere Cache instance.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "bucket", - "anywhereCacheId" - ], - "request": { - "$ref": "AnywhereCache" - }, - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - }, - "get": { - "id": "storage.anywhereCaches.get", - "path": "b/{bucket}/anywhereCaches/{anywhereCacheId}", - "httpMethod": "GET", - "description": "Returns the metadata of an Anywhere Cache instance.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the partent bucket", - "required": true, - "location": "path" - }, - "anywhereCacheId": { - "type": "string", - "description": "The ID of requested Anywhere Cache instance.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "bucket", - "anywhereCacheId" - ], - "response": { - "$ref": "AnywhereCache" - }, - "scopes": [ - "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" - ] - }, - "list": { - "id": "storage.anywhereCaches.list", - "path": "b/{bucket}/anywhereCache", - "httpMethod": "GET", - "description": "Returns a list of Anywhere Cache instances of the bucket matching the criteria.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the partent bucket", - "required": true, - "location": "path" - }, - "pageSize": { - "type": "integer", - "description": "Maximum number of items return in a single page of responses. Maximum 1000.", - "format": "int32", - "minimum": "0", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "A previously-returned page token representing part of the larger set of results to view.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket" - ], - "response": { - "$ref": "AnywhereCaches" - }, - "scopes": [ - "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" - ] - }, - "pause": { - "id": "storage.anywhereCaches.pause", - "path": "b/{bucket}/anywhereCaches/{anywhereCacheId}/pause", - "httpMethod": "POST", - "description": "Pauses an Anywhere Cache instance.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the partent bucket", - "required": true, - "location": "path" - }, - "anywhereCacheId": { - "type": "string", - "description": "The ID of requested Anywhere Cache instance.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "bucket", - "anywhereCacheId" - ], - "response": { - "$ref": "AnywhereCache" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - }, - "resume": { - "id": "storage.anywhereCaches.resume", - "path": "b/{bucket}/anywhereCaches/{anywhereCacheId}/resume", - "httpMethod": "POST", - "description": "Resumes a paused or disabled Anywhere Cache instance.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the partent bucket", - "required": true, - "location": "path" - }, - "anywhereCacheId": { - "type": "string", - "description": "The ID of requested Anywhere Cache instance.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "bucket", - "anywhereCacheId" - ], - "response": { - "$ref": "AnywhereCache" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - }, - "disable": { - "id": "storage.anywhereCaches.disable", - "path": "b/{bucket}/anywhereCaches/{anywhereCacheId}/disable", - "httpMethod": "POST", - "description": "Disables an Anywhere Cache instance.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the partent bucket", - "required": true, - "location": "path" - }, - "anywhereCacheId": { - "type": "string", - "description": "The ID of requested Anywhere Cache instance.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "bucket", - "anywhereCacheId" - ], - "response": { - "$ref": "AnywhereCache" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - } - } - }, - "bucketAccessControls": { - "methods": { - "delete": { - "id": "storage.bucketAccessControls.delete", - "path": "b/{bucket}/acl/{entity}", - "httpMethod": "DELETE", - "description": "Permanently deletes the ACL entry for the specified entity on the specified bucket.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "entity": { - "type": "string", - "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "entity" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - }, - "get": { - "id": "storage.bucketAccessControls.get", - "path": "b/{bucket}/acl/{entity}", - "httpMethod": "GET", - "description": "Returns the ACL entry for the specified entity on the specified bucket.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "entity": { - "type": "string", - "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "entity" - ], - "response": { - "$ref": "BucketAccessControl" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - }, - "insert": { - "id": "storage.bucketAccessControls.insert", - "path": "b/{bucket}/acl", - "httpMethod": "POST", - "description": "Creates a new ACL entry on the specified bucket.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket" - ], - "request": { - "$ref": "BucketAccessControl" - }, - "response": { - "$ref": "BucketAccessControl" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - }, - "list": { - "id": "storage.bucketAccessControls.list", - "path": "b/{bucket}/acl", - "httpMethod": "GET", - "description": "Retrieves ACL entries on the specified bucket.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket" - ], - "response": { - "$ref": "BucketAccessControls" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - }, - "patch": { - "id": "storage.bucketAccessControls.patch", - "path": "b/{bucket}/acl/{entity}", - "httpMethod": "PATCH", - "description": "Patches an ACL entry on the specified bucket.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "entity": { - "type": "string", - "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "entity" - ], - "request": { - "$ref": "BucketAccessControl" - }, - "response": { - "$ref": "BucketAccessControl" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - }, - "update": { - "id": "storage.bucketAccessControls.update", - "path": "b/{bucket}/acl/{entity}", - "httpMethod": "PUT", - "description": "Updates an ACL entry on the specified bucket.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "entity": { - "type": "string", - "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "entity" - ], - "request": { - "$ref": "BucketAccessControl" - }, - "response": { - "$ref": "BucketAccessControl" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - } - } - }, - "buckets": { - "methods": { - "delete": { - "id": "storage.buckets.delete", - "path": "b/{bucket}", - "httpMethod": "DELETE", - "description": "Permanently deletes an empty bucket.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "ifMetagenerationMatch": { - "type": "string", - "description": "If set, only deletes the bucket if its metageneration matches this value.", - "format": "int64", - "location": "query" - }, - "ifMetagenerationNotMatch": { - "type": "string", - "description": "If set, only deletes the bucket if its metageneration does not match this value.", - "format": "int64", - "location": "query" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - }, - "get": { - "id": "storage.buckets.get", - "path": "b/{bucket}", - "httpMethod": "GET", - "description": "Returns metadata for the specified bucket.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "ifMetagenerationMatch": { - "type": "string", - "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.", - "format": "int64", - "location": "query" - }, - "ifMetagenerationNotMatch": { - "type": "string", - "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.", - "format": "int64", - "location": "query" - }, - "projection": { - "type": "string", - "description": "Set of properties to return. Defaults to noAcl.", - "enum": [ - "full", - "noAcl" - ], - "enumDescriptions": [ - "Include all properties.", - "Omit owner, acl and defaultObjectAcl properties." - ], - "location": "query" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket" - ], - "response": { - "$ref": "Bucket" - }, - "scopes": [ - "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" - ] - }, - "getIamPolicy": { - "id": "storage.buckets.getIamPolicy", - "path": "b/{bucket}/iam", - "httpMethod": "GET", - "description": "Returns an IAM policy for the specified bucket.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "optionsRequestedPolicyVersion": { - "type": "integer", - "description": "The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for an older version that doesn't support part of the requested IAM policy, the request fails.", - "format": "int32", - "minimum": "1", - "location": "query" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket" - ], - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - }, - "insert": { - "id": "storage.buckets.insert", - "path": "b", - "httpMethod": "POST", - "description": "Creates a new bucket.", - "parameters": { - "predefinedAcl": { - "type": "string", - "description": "Apply a predefined set of access controls to this bucket.", - "enum": [ - "authenticatedRead", - "private", - "projectPrivate", - "publicRead", - "publicReadWrite" - ], - "enumDescriptions": [ - "Project team owners get OWNER access, and allAuthenticatedUsers get READER access.", - "Project team owners get OWNER access.", - "Project team members get access according to their roles.", - "Project team owners get OWNER access, and allUsers get READER access.", - "Project team owners get OWNER access, and allUsers get WRITER access." - ], - "location": "query" - }, - "predefinedDefaultObjectAcl": { - "type": "string", - "description": "Apply a predefined set of default object access controls to this bucket.", - "enum": [ - "authenticatedRead", - "bucketOwnerFullControl", - "bucketOwnerRead", - "private", - "projectPrivate", - "publicRead" - ], - "enumDescriptions": [ - "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", - "Object owner gets OWNER access, and project team owners get OWNER access.", - "Object owner gets OWNER access, and project team owners get READER access.", - "Object owner gets OWNER access.", - "Object owner gets OWNER access, and project team members get access according to their roles.", - "Object owner gets OWNER access, and allUsers get READER access." - ], - "location": "query" - }, - "project": { - "type": "string", - "description": "A valid API project identifier.", - "required": true, - "location": "query" - }, - "projection": { - "type": "string", - "description": "Set of properties to return. Defaults to noAcl, unless the bucket resource specifies acl or defaultObjectAcl properties, when it defaults to full.", - "enum": [ - "full", - "noAcl" - ], - "enumDescriptions": [ - "Include all properties.", - "Omit owner, acl and defaultObjectAcl properties." - ], - "location": "query" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request.", - "location": "query" - }, - "enableObjectRetention": { - "type": "boolean", - "description": "When set to true, object retention is enabled for this bucket.", - "default": "false", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "request": { - "$ref": "Bucket" - }, - "response": { - "$ref": "Bucket" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - }, - "list": { - "id": "storage.buckets.list", - "path": "b", - "httpMethod": "GET", - "description": "Retrieves a list of buckets for a given project.", - "parameters": { - "maxResults": { - "type": "integer", - "description": "Maximum number of buckets to return in a single response. The service will use this parameter or 1,000 items, whichever is smaller.", - "default": "1000", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "A previously-returned page token representing part of the larger set of results to view.", - "location": "query" - }, - "prefix": { - "type": "string", - "description": "Filter results to buckets whose names begin with this prefix.", - "location": "query" - }, - "project": { - "type": "string", - "description": "A valid API project identifier.", - "required": true, - "location": "query" - }, - "projection": { - "type": "string", - "description": "Set of properties to return. Defaults to noAcl.", - "enum": [ - "full", - "noAcl" - ], - "enumDescriptions": [ - "Include all properties.", - "Omit owner, acl and defaultObjectAcl properties." - ], - "location": "query" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request.", - "location": "query" - } - }, - "parameterOrder": [ - "project" - ], - "response": { - "$ref": "Buckets" - }, - "scopes": [ - "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" - ] - }, - "lockRetentionPolicy": { - "id": "storage.buckets.lockRetentionPolicy", - "path": "b/{bucket}/lockRetentionPolicy", - "httpMethod": "POST", - "description": "Locks retention policy on a bucket.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "ifMetagenerationMatch": { - "type": "string", - "description": "Makes the operation conditional on whether bucket's current metageneration matches the given value.", - "required": true, - "format": "int64", - "location": "query" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "ifMetagenerationMatch" - ], - "response": { - "$ref": "Bucket" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - }, - "patch": { - "id": "storage.buckets.patch", - "path": "b/{bucket}", - "httpMethod": "PATCH", - "description": "Patches a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "ifMetagenerationMatch": { - "type": "string", - "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.", - "format": "int64", - "location": "query" - }, - "ifMetagenerationNotMatch": { - "type": "string", - "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.", - "format": "int64", - "location": "query" - }, - "predefinedAcl": { - "type": "string", - "description": "Apply a predefined set of access controls to this bucket.", - "enum": [ - "authenticatedRead", - "private", - "projectPrivate", - "publicRead", - "publicReadWrite" - ], - "enumDescriptions": [ - "Project team owners get OWNER access, and allAuthenticatedUsers get READER access.", - "Project team owners get OWNER access.", - "Project team members get access according to their roles.", - "Project team owners get OWNER access, and allUsers get READER access.", - "Project team owners get OWNER access, and allUsers get WRITER access." - ], - "location": "query" - }, - "predefinedDefaultObjectAcl": { - "type": "string", - "description": "Apply a predefined set of default object access controls to this bucket.", - "enum": [ - "authenticatedRead", - "bucketOwnerFullControl", - "bucketOwnerRead", - "private", - "projectPrivate", - "publicRead" - ], - "enumDescriptions": [ - "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", - "Object owner gets OWNER access, and project team owners get OWNER access.", - "Object owner gets OWNER access, and project team owners get READER access.", - "Object owner gets OWNER access.", - "Object owner gets OWNER access, and project team members get access according to their roles.", - "Object owner gets OWNER access, and allUsers get READER access." - ], - "location": "query" - }, - "projection": { - "type": "string", - "description": "Set of properties to return. Defaults to full.", - "enum": [ - "full", - "noAcl" - ], - "enumDescriptions": [ - "Include all properties.", - "Omit owner, acl and defaultObjectAcl properties." - ], - "location": "query" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket" - ], - "request": { - "$ref": "Bucket" - }, - "response": { - "$ref": "Bucket" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - }, - "setIamPolicy": { - "id": "storage.buckets.setIamPolicy", - "path": "b/{bucket}/iam", - "httpMethod": "PUT", - "description": "Updates an IAM policy for the specified bucket.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket" - ], - "request": { - "$ref": "Policy" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - }, - "testIamPermissions": { - "id": "storage.buckets.testIamPermissions", - "path": "b/{bucket}/iam/testPermissions", - "httpMethod": "GET", - "description": "Tests a set of permissions on the given bucket to see which, if any, are held by the caller.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "permissions": { - "type": "string", - "description": "Permissions to test.", - "required": true, - "repeated": true, - "location": "query" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "permissions" - ], - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "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" - ] - }, - "update": { - "id": "storage.buckets.update", - "path": "b/{bucket}", - "httpMethod": "PUT", - "description": "Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "ifMetagenerationMatch": { - "type": "string", - "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.", - "format": "int64", - "location": "query" - }, - "ifMetagenerationNotMatch": { - "type": "string", - "description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.", - "format": "int64", - "location": "query" - }, - "predefinedAcl": { - "type": "string", - "description": "Apply a predefined set of access controls to this bucket.", - "enum": [ - "authenticatedRead", - "private", - "projectPrivate", - "publicRead", - "publicReadWrite" - ], - "enumDescriptions": [ - "Project team owners get OWNER access, and allAuthenticatedUsers get READER access.", - "Project team owners get OWNER access.", - "Project team members get access according to their roles.", - "Project team owners get OWNER access, and allUsers get READER access.", - "Project team owners get OWNER access, and allUsers get WRITER access." - ], - "location": "query" - }, - "predefinedDefaultObjectAcl": { - "type": "string", - "description": "Apply a predefined set of default object access controls to this bucket.", - "enum": [ - "authenticatedRead", - "bucketOwnerFullControl", - "bucketOwnerRead", - "private", - "projectPrivate", - "publicRead" - ], - "enumDescriptions": [ - "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", - "Object owner gets OWNER access, and project team owners get OWNER access.", - "Object owner gets OWNER access, and project team owners get READER access.", - "Object owner gets OWNER access.", - "Object owner gets OWNER access, and project team members get access according to their roles.", - "Object owner gets OWNER access, and allUsers get READER access." - ], - "location": "query" - }, - "projection": { - "type": "string", - "description": "Set of properties to return. Defaults to full.", - "enum": [ - "full", - "noAcl" - ], - "enumDescriptions": [ - "Include all properties.", - "Omit owner, acl and defaultObjectAcl properties." - ], - "location": "query" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket" - ], - "request": { - "$ref": "Bucket" - }, - "response": { - "$ref": "Bucket" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - } - } - }, - "operations": { - "methods": { - "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed.", - "path": "b/{bucket}/operations/{operationId}/cancel", - "httpMethod": "POST", - "id": "storage.buckets.operations.cancel", - "parameterOrder": [ - "bucket", - "operationId" - ], - "parameters": { - "bucket": { - "description": "The parent bucket of the operation resource.", - "location": "path", - "required": true, - "type": "string" - }, - "operationId": { - "description": "The ID of the operation resource.", - "location": "path", - "required": true, - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - }, - "get": { - "description": "Gets the latest state of a long-running operation.", - "path": "b/{bucket}/operations/{operationId}", - "httpMethod": "GET", - "id": "storage.buckets.operations.get", - "parameterOrder": [ - "bucket", - "operationId" - ], - "parameters": { - "bucket": { - "description": "The parent bucket of the operation resource.", - "location": "path", - "required": true, - "type": "string" - }, - "operationId": { - "description": "The ID of the operation resource.", - "location": "path", - "required": true, - "type": "string" - } - }, - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "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" - ] - }, - "list": { - "description": "Lists operations that match the specified filter in the request.", - "path": "b/{bucket}/operations", - "httpMethod": "GET", - "id": "storage.buckets.operations.list", - "parameterOrder": [ - "bucket" - ], - "parameters": { - "filter": { - "description": "A filter to narrow down results to a preferred subset. The filtering language is documented in more detail in [AIP-160](https://google.aip.dev/160).", - "location": "query", - "type": "string" - }, - "bucket": { - "description": "Name of the bucket in which to look for operations.", - "location": "path", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "Maximum number of items to return in a single page of responses. Fewer total results may be returned than requested. The service uses this parameter or 100 items, whichever is smaller.", - "minimum": "0", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "A previously-returned page token representing part of the larger set of results to view.", - "location": "query", - "type": "string" - } - }, - "response": { - "$ref": "GoogleLongrunningListOperationsResponse" - }, - "scopes": [ - "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" - ] - } - } - }, - "channels": { - "methods": { - "stop": { - "id": "storage.channels.stop", - "path": "channels/stop", - "httpMethod": "POST", - "description": "Stop watching resources through this channel", - "request": { - "$ref": "Channel", - "parameterName": "resource" - }, - "scopes": [ - "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" - ] - } - } - }, - "defaultObjectAccessControls": { - "methods": { - "delete": { - "id": "storage.defaultObjectAccessControls.delete", - "path": "b/{bucket}/defaultObjectAcl/{entity}", - "httpMethod": "DELETE", - "description": "Permanently deletes the default object ACL entry for the specified entity on the specified bucket.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "entity": { - "type": "string", - "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "entity" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - }, - "get": { - "id": "storage.defaultObjectAccessControls.get", - "path": "b/{bucket}/defaultObjectAcl/{entity}", - "httpMethod": "GET", - "description": "Returns the default object ACL entry for the specified entity on the specified bucket.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "entity": { - "type": "string", - "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "entity" - ], - "response": { - "$ref": "ObjectAccessControl" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - }, - "insert": { - "id": "storage.defaultObjectAccessControls.insert", - "path": "b/{bucket}/defaultObjectAcl", - "httpMethod": "POST", - "description": "Creates a new default object ACL entry on the specified bucket.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket" - ], - "request": { - "$ref": "ObjectAccessControl" - }, - "response": { - "$ref": "ObjectAccessControl" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - }, - "list": { - "id": "storage.defaultObjectAccessControls.list", - "path": "b/{bucket}/defaultObjectAcl", - "httpMethod": "GET", - "description": "Retrieves default object ACL entries on the specified bucket.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "ifMetagenerationMatch": { - "type": "string", - "description": "If present, only return default ACL listing if the bucket's current metageneration matches this value.", - "format": "int64", - "location": "query" - }, - "ifMetagenerationNotMatch": { - "type": "string", - "description": "If present, only return default ACL listing if the bucket's current metageneration does not match the given value.", - "format": "int64", - "location": "query" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket" - ], - "response": { - "$ref": "ObjectAccessControls" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - }, - "patch": { - "id": "storage.defaultObjectAccessControls.patch", - "path": "b/{bucket}/defaultObjectAcl/{entity}", - "httpMethod": "PATCH", - "description": "Patches a default object ACL entry on the specified bucket.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "entity": { - "type": "string", - "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "entity" - ], - "request": { - "$ref": "ObjectAccessControl" - }, - "response": { - "$ref": "ObjectAccessControl" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - }, - "update": { - "id": "storage.defaultObjectAccessControls.update", - "path": "b/{bucket}/defaultObjectAcl/{entity}", - "httpMethod": "PUT", - "description": "Updates a default object ACL entry on the specified bucket.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "entity": { - "type": "string", - "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "entity" - ], - "request": { - "$ref": "ObjectAccessControl" - }, - "response": { - "$ref": "ObjectAccessControl" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - } - } - }, - "managedFolders": { - "methods": { - "delete": { - "id": "storage.managedFolders.delete", - "path": "b/{bucket}/managedFolders/{managedFolder}", - "httpMethod": "DELETE", - "description": "Permanently deletes a managed folder.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the bucket containing the managed folder.", - "required": true, - "location": "path" - }, - "managedFolder": { - "type": "string", - "description": "The managed folder name/path.", - "required": true, - "location": "path" - }, - "ifMetagenerationMatch": { - "type": "string", - "description": "If set, only deletes the managed folder if its metageneration matches this value.", - "format": "int64", - "location": "query" - }, - "ifMetagenerationNotMatch": { - "type": "string", - "description": "If set, only deletes the managed folder if its metageneration does not match this value.", - "format": "int64", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "managedFolder" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - }, - "get": { - "id": "storage.managedFolders.get", - "path": "b/{bucket}/managedFolders/{managedFolder}", - "httpMethod": "GET", - "description": "Returns metadata of the specified managed folder.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the bucket containing the managed folder.", - "required": true, - "location": "path" - }, - "managedFolder": { - "type": "string", - "description": "The managed folder name/path.", - "required": true, - "location": "path" - }, - "ifMetagenerationMatch": { - "type": "string", - "description": "Makes the return of the managed folder metadata conditional on whether the managed folder's current metageneration matches the given value.", - "format": "int64", - "location": "query" - }, - "ifMetagenerationNotMatch": { - "type": "string", - "description": "Makes the return of the managed folder metadata conditional on whether the managed folder's current metageneration does not match the given value.", - "format": "int64", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "managedFolder" - ], - "response": { - "$ref": "ManagedFolder" - }, - "scopes": [ - "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" - ] - }, - "getIamPolicy": { - "id": "storage.managedFolders.getIamPolicy", - "path": "b/{bucket}/managedFolders/{managedFolder}/iam", - "httpMethod": "GET", - "description": "Returns an IAM policy for the specified managed folder.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the bucket containing the managed folder.", - "required": true, - "location": "path" - }, - "optionsRequestedPolicyVersion": { - "type": "integer", - "description": "The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for an older version that doesn't support part of the requested IAM policy, the request fails.", - "format": "int32", - "minimum": "1", - "location": "query" - }, - "managedFolder": { - "type": "string", - "description": "The managed folder name/path.", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "managedFolder" - ], - "response": { - "$ref": "Policy" - }, - "scopes": [ - "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" - ] - }, - "insert": { - "id": "storage.managedFolders.insert", - "path": "b/{bucket}/managedFolders", - "httpMethod": "POST", - "description": "Creates a new managed folder.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the bucket containing the managed folder.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "bucket" - ], - "request": { - "$ref": "ManagedFolder" - }, - "response": { - "$ref": "ManagedFolder" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - }, - "list": { - "id": "storage.managedFolders.list", - "path": "b/{bucket}/managedFolders", - "httpMethod": "GET", - "description": "Lists managed folders in the given bucket.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the bucket containing the managed folder.", - "required": true, - "location": "path" - }, - "pageSize": { - "type": "integer", - "description": "Maximum number of items return in a single page of responses.", - "format": "int32", - "minimum": "0", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "A previously-returned page token representing part of the larger set of results to view.", - "location": "query" - }, - "prefix": { - "type": "string", - "description": "The managed folder name/path prefix to filter the output list of results.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket" - ], - "response": { - "$ref": "ManagedFolders" - }, - "scopes": [ - "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" - ] - }, - "setIamPolicy": { - "id": "storage.managedFolders.setIamPolicy", - "path": "b/{bucket}/managedFolders/{managedFolder}/iam", - "httpMethod": "PUT", - "description": "Updates an IAM policy for the specified managed folder.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the bucket containing the managed folder.", - "required": true, - "location": "path" - }, - "managedFolder": { - "type": "string", - "description": "The managed folder name/path.", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "managedFolder" - ], - "request": { - "$ref": "Policy" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - }, - "testIamPermissions": { - "id": "storage.managedFolders.testIamPermissions", - "path": "b/{bucket}/managedFolders/{managedFolder}/iam/testPermissions", - "httpMethod": "GET", - "description": "Tests a set of permissions on the given managed folder to see which, if any, are held by the caller.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the bucket containing the managed folder.", - "required": true, - "location": "path" - }, - "managedFolder": { - "type": "string", - "description": "The managed folder name/path.", - "required": true, - "location": "path" - }, - "permissions": { - "type": "string", - "description": "Permissions to test.", - "required": true, - "repeated": true, - "location": "query" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "managedFolder", - "permissions" - ], - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "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" - ] - } - } - }, - "notifications": { - "methods": { - "delete": { - "id": "storage.notifications.delete", - "path": "b/{bucket}/notificationConfigs/{notification}", - "httpMethod": "DELETE", - "description": "Permanently deletes a notification subscription.", - "parameters": { - "bucket": { - "type": "string", - "description": "The parent bucket of the notification.", - "required": true, - "location": "path" - }, - "notification": { - "type": "string", - "description": "ID of the notification to delete.", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "notification" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - }, - "get": { - "id": "storage.notifications.get", - "path": "b/{bucket}/notificationConfigs/{notification}", - "httpMethod": "GET", - "description": "View a notification configuration.", - "parameters": { - "bucket": { - "type": "string", - "description": "The parent bucket of the notification.", - "required": true, - "location": "path" - }, - "notification": { - "type": "string", - "description": "Notification ID", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "notification" - ], - "response": { - "$ref": "Notification" - }, - "scopes": [ - "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" - ] - }, - "insert": { - "id": "storage.notifications.insert", - "path": "b/{bucket}/notificationConfigs", - "httpMethod": "POST", - "description": "Creates a notification subscription for a given bucket.", - "parameters": { - "bucket": { - "type": "string", - "description": "The parent bucket of the notification.", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket" - ], - "request": { - "$ref": "Notification" - }, - "response": { - "$ref": "Notification" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - }, - "list": { - "id": "storage.notifications.list", - "path": "b/{bucket}/notificationConfigs", - "httpMethod": "GET", - "description": "Retrieves a list of notification subscriptions for a given bucket.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a Google Cloud Storage bucket.", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket" - ], - "response": { - "$ref": "Notifications" - }, - "scopes": [ - "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" - ] - } - } - }, - "objectAccessControls": { - "methods": { - "delete": { - "id": "storage.objectAccessControls.delete", - "path": "b/{bucket}/o/{object}/acl/{entity}", - "httpMethod": "DELETE", - "description": "Permanently deletes the ACL entry for the specified entity on the specified object.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "entity": { - "type": "string", - "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", - "required": true, - "location": "path" - }, - "generation": { - "type": "string", - "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", - "format": "int64", - "location": "query" - }, - "object": { - "type": "string", - "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "object", - "entity" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - }, - "get": { - "id": "storage.objectAccessControls.get", - "path": "b/{bucket}/o/{object}/acl/{entity}", - "httpMethod": "GET", - "description": "Returns the ACL entry for the specified entity on the specified object.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "entity": { - "type": "string", - "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", - "required": true, - "location": "path" - }, - "generation": { - "type": "string", - "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", - "format": "int64", - "location": "query" - }, - "object": { - "type": "string", - "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "object", - "entity" - ], - "response": { - "$ref": "ObjectAccessControl" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - }, - "insert": { - "id": "storage.objectAccessControls.insert", - "path": "b/{bucket}/o/{object}/acl", - "httpMethod": "POST", - "description": "Creates a new ACL entry on the specified object.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "generation": { - "type": "string", - "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", - "format": "int64", - "location": "query" - }, - "object": { - "type": "string", - "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "object" - ], - "request": { - "$ref": "ObjectAccessControl" - }, - "response": { - "$ref": "ObjectAccessControl" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - }, - "list": { - "id": "storage.objectAccessControls.list", - "path": "b/{bucket}/o/{object}/acl", - "httpMethod": "GET", - "description": "Retrieves ACL entries on the specified object.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "generation": { - "type": "string", - "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", - "format": "int64", - "location": "query" - }, - "object": { - "type": "string", - "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "object" - ], - "response": { - "$ref": "ObjectAccessControls" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - }, - "patch": { - "id": "storage.objectAccessControls.patch", - "path": "b/{bucket}/o/{object}/acl/{entity}", - "httpMethod": "PATCH", - "description": "Patches an ACL entry on the specified object.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "entity": { - "type": "string", - "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", - "required": true, - "location": "path" - }, - "generation": { - "type": "string", - "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", - "format": "int64", - "location": "query" - }, - "object": { - "type": "string", - "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "object", - "entity" - ], - "request": { - "$ref": "ObjectAccessControl" - }, - "response": { - "$ref": "ObjectAccessControl" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - }, - "update": { - "id": "storage.objectAccessControls.update", - "path": "b/{bucket}/o/{object}/acl/{entity}", - "httpMethod": "PUT", - "description": "Updates an ACL entry on the specified object.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of a bucket.", - "required": true, - "location": "path" - }, - "entity": { - "type": "string", - "description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", - "required": true, - "location": "path" - }, - "generation": { - "type": "string", - "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", - "format": "int64", - "location": "query" - }, - "object": { - "type": "string", - "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "object", - "entity" - ], - "request": { - "$ref": "ObjectAccessControl" - }, - "response": { - "$ref": "ObjectAccessControl" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - } - } - }, - "objects": { - "methods": { - "compose": { - "id": "storage.objects.compose", - "path": "b/{destinationBucket}/o/{destinationObject}/compose", - "httpMethod": "POST", - "description": "Concatenates a list of existing objects into a new object in the same bucket.", - "parameters": { - "destinationBucket": { - "type": "string", - "description": "Name of the bucket containing the source objects. The destination object is stored in this bucket.", - "required": true, - "location": "path" - }, - "destinationObject": { - "type": "string", - "description": "Name of the new object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - "required": true, - "location": "path" - }, - "destinationPredefinedAcl": { - "type": "string", - "description": "Apply a predefined set of access controls to the destination object.", - "enum": [ - "authenticatedRead", - "bucketOwnerFullControl", - "bucketOwnerRead", - "private", - "projectPrivate", - "publicRead" - ], - "enumDescriptions": [ - "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", - "Object owner gets OWNER access, and project team owners get OWNER access.", - "Object owner gets OWNER access, and project team owners get READER access.", - "Object owner gets OWNER access.", - "Object owner gets OWNER access, and project team members get access according to their roles.", - "Object owner gets OWNER access, and allUsers get READER access." - ], - "location": "query" - }, - "ifGenerationMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", - "format": "int64", - "location": "query" - }, - "ifMetagenerationMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", - "format": "int64", - "location": "query" - }, - "kmsKeyName": { - "type": "string", - "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.", - "location": "query" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "destinationBucket", - "destinationObject" - ], - "request": { - "$ref": "ComposeRequest" - }, - "response": { - "$ref": "Object" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - }, - "copy": { - "id": "storage.objects.copy", - "path": "b/{sourceBucket}/o/{sourceObject}/copyTo/b/{destinationBucket}/o/{destinationObject}", - "httpMethod": "POST", - "description": "Copies a source object to a destination object. Optionally overrides metadata.", - "parameters": { - "destinationBucket": { - "type": "string", - "description": "Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - "required": true, - "location": "path" - }, - "destinationKmsKeyName": { - "type": "string", - "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.", - "location": "query" - }, - "destinationObject": { - "type": "string", - "description": "Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any.", - "required": true, - "location": "path" - }, - "destinationPredefinedAcl": { - "type": "string", - "description": "Apply a predefined set of access controls to the destination object.", - "enum": [ - "authenticatedRead", - "bucketOwnerFullControl", - "bucketOwnerRead", - "private", - "projectPrivate", - "publicRead" - ], - "enumDescriptions": [ - "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", - "Object owner gets OWNER access, and project team owners get OWNER access.", - "Object owner gets OWNER access, and project team owners get READER access.", - "Object owner gets OWNER access.", - "Object owner gets OWNER access, and project team members get access according to their roles.", - "Object owner gets OWNER access, and allUsers get READER access." - ], - "location": "query" - }, - "ifGenerationMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the destination object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", - "format": "int64", - "location": "query" - }, - "ifGenerationNotMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the destination object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", - "format": "int64", - "location": "query" - }, - "ifMetagenerationMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the destination object's current metageneration matches the given value.", - "format": "int64", - "location": "query" - }, - "ifMetagenerationNotMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the destination object's current metageneration does not match the given value.", - "format": "int64", - "location": "query" - }, - "ifSourceGenerationMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the source object's current generation matches the given value.", - "format": "int64", - "location": "query" - }, - "ifSourceGenerationNotMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the source object's current generation does not match the given value.", - "format": "int64", - "location": "query" - }, - "ifSourceMetagenerationMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the source object's current metageneration matches the given value.", - "format": "int64", - "location": "query" - }, - "ifSourceMetagenerationNotMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the source object's current metageneration does not match the given value.", - "format": "int64", - "location": "query" - }, - "projection": { - "type": "string", - "description": "Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.", - "enum": [ - "full", - "noAcl" - ], - "enumDescriptions": [ - "Include all properties.", - "Omit the owner, acl property." - ], - "location": "query" - }, - "sourceBucket": { - "type": "string", - "description": "Name of the bucket in which to find the source object.", - "required": true, - "location": "path" - }, - "sourceGeneration": { - "type": "string", - "description": "If present, selects a specific revision of the source object (as opposed to the latest version, the default).", - "format": "int64", - "location": "query" - }, - "sourceObject": { - "type": "string", - "description": "Name of the source object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "sourceBucket", - "sourceObject", - "destinationBucket", - "destinationObject" - ], - "request": { - "$ref": "Object" - }, - "response": { - "$ref": "Object" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - }, - "delete": { - "id": "storage.objects.delete", - "path": "b/{bucket}/o/{object}", - "httpMethod": "DELETE", - "description": "Deletes an object and its metadata. Deletions are permanent if versioning is not enabled for the bucket, or if the generation parameter is used.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the bucket in which the object resides.", - "required": true, - "location": "path" - }, - "generation": { - "type": "string", - "description": "If present, permanently deletes a specific revision of this object (as opposed to the latest version, the default).", - "format": "int64", - "location": "query" - }, - "ifGenerationMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", - "format": "int64", - "location": "query" - }, - "ifGenerationNotMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", - "format": "int64", - "location": "query" - }, - "ifMetagenerationMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", - "format": "int64", - "location": "query" - }, - "ifMetagenerationNotMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.", - "format": "int64", - "location": "query" - }, - "object": { - "type": "string", - "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "object" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - }, - "get": { - "id": "storage.objects.get", - "path": "b/{bucket}/o/{object}", - "httpMethod": "GET", - "description": "Retrieves an object or its metadata.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the bucket in which the object resides.", - "required": true, - "location": "path" - }, - "generation": { - "type": "string", - "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", - "format": "int64", - "location": "query" - }, - "ifGenerationMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", - "format": "int64", - "location": "query" - }, - "ifGenerationNotMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", - "format": "int64", - "location": "query" - }, - "ifMetagenerationMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", - "format": "int64", - "location": "query" - }, - "ifMetagenerationNotMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.", - "format": "int64", - "location": "query" - }, - "object": { - "type": "string", - "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - "required": true, - "location": "path" - }, - "projection": { - "type": "string", - "description": "Set of properties to return. Defaults to noAcl.", - "enum": [ - "full", - "noAcl" - ], - "enumDescriptions": [ - "Include all properties.", - "Omit the owner, acl property." - ], - "location": "query" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - }, - "softDeleted": { - "type": "boolean", - "description": "If true, only soft-deleted object versions will be listed. The default is false. For more information, see Soft Delete.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "object" - ], - "response": { - "$ref": "Object" - }, - "scopes": [ - "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" - ], - "supportsMediaDownload": true, - "useMediaDownloadService": true - }, - "getIamPolicy": { - "id": "storage.objects.getIamPolicy", - "path": "b/{bucket}/o/{object}/iam", - "httpMethod": "GET", - "description": "Returns an IAM policy for the specified object.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the bucket in which the object resides.", - "required": true, - "location": "path" - }, - "generation": { - "type": "string", - "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", - "format": "int64", - "location": "query" - }, - "object": { - "type": "string", - "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "object" - ], - "response": { - "$ref": "Policy" - }, - "scopes": [ - "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" - ] - }, - "insert": { - "id": "storage.objects.insert", - "path": "b/{bucket}/o", - "httpMethod": "POST", - "description": "Stores a new object and metadata.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.", - "required": true, - "location": "path" - }, - "contentEncoding": { - "type": "string", - "description": "If set, sets the contentEncoding property of the final object to this value. Setting this parameter is equivalent to setting the contentEncoding metadata property. This can be useful when uploading an object with uploadType=media to indicate the encoding of the content being uploaded.", - "location": "query" - }, - "ifGenerationMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", - "format": "int64", - "location": "query" - }, - "ifGenerationNotMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", - "format": "int64", - "location": "query" - }, - "ifMetagenerationMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", - "format": "int64", - "location": "query" - }, - "ifMetagenerationNotMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.", - "format": "int64", - "location": "query" - }, - "kmsKeyName": { - "type": "string", - "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.", - "location": "query" - }, - "name": { - "type": "string", - "description": "Name of the object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - "location": "query" - }, - "predefinedAcl": { - "type": "string", - "description": "Apply a predefined set of access controls to this object.", - "enum": [ - "authenticatedRead", - "bucketOwnerFullControl", - "bucketOwnerRead", - "private", - "projectPrivate", - "publicRead" - ], - "enumDescriptions": [ - "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", - "Object owner gets OWNER access, and project team owners get OWNER access.", - "Object owner gets OWNER access, and project team owners get READER access.", - "Object owner gets OWNER access.", - "Object owner gets OWNER access, and project team members get access according to their roles.", - "Object owner gets OWNER access, and allUsers get READER access." - ], - "location": "query" - }, - "projection": { - "type": "string", - "description": "Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.", - "enum": [ - "full", - "noAcl" - ], - "enumDescriptions": [ - "Include all properties.", - "Omit the owner, acl property." - ], - "location": "query" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket" - ], - "request": { - "$ref": "Object" - }, - "response": { - "$ref": "Object" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_write" - ], - "supportsMediaUpload": true, - "mediaUpload": { - "accept": [ - "*/*" - ], - "protocols": { - "simple": { - "multipart": true, - "path": "/upload/storage/v1/b/{bucket}/o" - }, - "resumable": { - "multipart": true, - "path": "/resumable/upload/storage/v1/b/{bucket}/o" - } - } - } - }, - "list": { - "id": "storage.objects.list", - "path": "b/{bucket}/o", - "httpMethod": "GET", - "description": "Retrieves a list of objects matching the criteria.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the bucket in which to look for objects.", - "required": true, - "location": "path" - }, - "delimiter": { - "type": "string", - "description": "Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted.", - "location": "query" - }, - "endOffset": { - "type": "string", - "description": "Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).", - "location": "query" - }, - "includeTrailingDelimiter": { - "type": "boolean", - "description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller.", - "default": "1000", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "A previously-returned page token representing part of the larger set of results to view.", - "location": "query" - }, - "prefix": { - "type": "string", - "description": "Filter results to objects whose names begin with this prefix.", - "location": "query" - }, - "projection": { - "type": "string", - "description": "Set of properties to return. Defaults to noAcl.", - "enum": [ - "full", - "noAcl" - ], - "enumDescriptions": [ - "Include all properties.", - "Omit the owner, acl property." - ], - "location": "query" - }, - "startOffset": { - "type": "string", - "description": "Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).", - "location": "query" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - }, - "versions": { - "type": "boolean", - "description": "If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.", - "location": "query" - }, - "matchGlob": { - "type": "string", - "description": "Filter results to objects and prefixes that match this glob pattern.", - "location": "query" - }, - "softDeleted": { - "type": "boolean", - "description": "If true, only soft-deleted object versions will be listed. The default is false. For more information, see Soft Delete.", - "location": "query" - }, - "includeFoldersAsPrefixes": { - "type": "boolean", - "description": "Only applicable if delimiter is set to '/'. If true, will also include folders and managed folders (besides objects) in the returned prefixes.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket" - ], - "response": { - "$ref": "Objects" - }, - "scopes": [ - "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" - ], - "supportsSubscription": true - }, - "patch": { - "id": "storage.objects.patch", - "path": "b/{bucket}/o/{object}", - "httpMethod": "PATCH", - "description": "Patches an object's metadata.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the bucket in which the object resides.", - "required": true, - "location": "path" - }, - "generation": { - "type": "string", - "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", - "format": "int64", - "location": "query" - }, - "ifGenerationMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", - "format": "int64", - "location": "query" - }, - "ifGenerationNotMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", - "format": "int64", - "location": "query" - }, - "ifMetagenerationMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", - "format": "int64", - "location": "query" - }, - "ifMetagenerationNotMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.", - "format": "int64", - "location": "query" - }, - "overrideUnlockedRetention": { - "type": "boolean", - "description": "Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked.", - "location": "query" - }, - "object": { - "type": "string", - "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - "required": true, - "location": "path" - }, - "predefinedAcl": { - "type": "string", - "description": "Apply a predefined set of access controls to this object.", - "enum": [ - "authenticatedRead", - "bucketOwnerFullControl", - "bucketOwnerRead", - "private", - "projectPrivate", - "publicRead" - ], - "enumDescriptions": [ - "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", - "Object owner gets OWNER access, and project team owners get OWNER access.", - "Object owner gets OWNER access, and project team owners get READER access.", - "Object owner gets OWNER access.", - "Object owner gets OWNER access, and project team members get access according to their roles.", - "Object owner gets OWNER access, and allUsers get READER access." - ], - "location": "query" - }, - "projection": { - "type": "string", - "description": "Set of properties to return. Defaults to full.", - "enum": [ - "full", - "noAcl" - ], - "enumDescriptions": [ - "Include all properties.", - "Omit the owner, acl property." - ], - "location": "query" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request, for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "object" - ], - "request": { - "$ref": "Object" - }, - "response": { - "$ref": "Object" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - }, - "rewrite": { - "id": "storage.objects.rewrite", - "path": "b/{sourceBucket}/o/{sourceObject}/rewriteTo/b/{destinationBucket}/o/{destinationObject}", - "httpMethod": "POST", - "description": "Rewrites a source object to a destination object. Optionally overrides metadata.", - "parameters": { - "destinationBucket": { - "type": "string", - "description": "Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.", - "required": true, - "location": "path" - }, - "destinationKmsKeyName": { - "type": "string", - "description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.", - "location": "query" - }, - "destinationObject": { - "type": "string", - "description": "Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - "required": true, - "location": "path" - }, - "destinationPredefinedAcl": { - "type": "string", - "description": "Apply a predefined set of access controls to the destination object.", - "enum": [ - "authenticatedRead", - "bucketOwnerFullControl", - "bucketOwnerRead", - "private", - "projectPrivate", - "publicRead" - ], - "enumDescriptions": [ - "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", - "Object owner gets OWNER access, and project team owners get OWNER access.", - "Object owner gets OWNER access, and project team owners get READER access.", - "Object owner gets OWNER access.", - "Object owner gets OWNER access, and project team members get access according to their roles.", - "Object owner gets OWNER access, and allUsers get READER access." - ], - "location": "query" - }, - "ifGenerationMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", - "format": "int64", - "location": "query" - }, - "ifGenerationNotMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", - "format": "int64", - "location": "query" - }, - "ifMetagenerationMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the destination object's current metageneration matches the given value.", - "format": "int64", - "location": "query" - }, - "ifMetagenerationNotMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the destination object's current metageneration does not match the given value.", - "format": "int64", - "location": "query" - }, - "ifSourceGenerationMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the source object's current generation matches the given value.", - "format": "int64", - "location": "query" - }, - "ifSourceGenerationNotMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the source object's current generation does not match the given value.", - "format": "int64", - "location": "query" - }, - "ifSourceMetagenerationMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the source object's current metageneration matches the given value.", - "format": "int64", - "location": "query" - }, - "ifSourceMetagenerationNotMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the source object's current metageneration does not match the given value.", - "format": "int64", - "location": "query" - }, - "maxBytesRewrittenPerCall": { - "type": "string", - "description": "The maximum number of bytes that will be rewritten per rewrite request. Most callers shouldn't need to specify this parameter - it is primarily in place to support testing. If specified the value must be an integral multiple of 1 MiB (1048576). Also, this only applies to requests where the source and destination span locations and/or storage classes. Finally, this value must not change across rewrite calls else you'll get an error that the rewriteToken is invalid.", - "format": "int64", - "location": "query" - }, - "projection": { - "type": "string", - "description": "Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.", - "enum": [ - "full", - "noAcl" - ], - "enumDescriptions": [ - "Include all properties.", - "Omit the owner, acl property." - ], - "location": "query" - }, - "rewriteToken": { - "type": "string", - "description": "Include this field (from the previous rewrite response) on each rewrite request after the first one, until the rewrite response 'done' flag is true. Calls that provide a rewriteToken can omit all other request fields, but if included those fields must match the values provided in the first rewrite request.", - "location": "query" - }, - "sourceBucket": { - "type": "string", - "description": "Name of the bucket in which to find the source object.", - "required": true, - "location": "path" - }, - "sourceGeneration": { - "type": "string", - "description": "If present, selects a specific revision of the source object (as opposed to the latest version, the default).", - "format": "int64", - "location": "query" - }, - "sourceObject": { - "type": "string", - "description": "Name of the source object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "sourceBucket", - "sourceObject", - "destinationBucket", - "destinationObject" - ], - "request": { - "$ref": "Object" - }, - "response": { - "$ref": "RewriteResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - }, - "setIamPolicy": { - "id": "storage.objects.setIamPolicy", - "path": "b/{bucket}/o/{object}/iam", - "httpMethod": "PUT", - "description": "Updates an IAM policy for the specified object.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the bucket in which the object resides.", - "required": true, - "location": "path" - }, - "generation": { - "type": "string", - "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", - "format": "int64", - "location": "query" - }, - "object": { - "type": "string", - "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "object" - ], - "request": { - "$ref": "Policy" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - }, - "testIamPermissions": { - "id": "storage.objects.testIamPermissions", - "path": "b/{bucket}/o/{object}/iam/testPermissions", - "httpMethod": "GET", - "description": "Tests a set of permissions on the given object to see which, if any, are held by the caller.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the bucket in which the object resides.", - "required": true, - "location": "path" - }, - "generation": { - "type": "string", - "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", - "format": "int64", - "location": "query" - }, - "object": { - "type": "string", - "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - "required": true, - "location": "path" - }, - "permissions": { - "type": "string", - "description": "Permissions to test.", - "required": true, - "repeated": true, - "location": "query" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "object", - "permissions" - ], - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "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" - ] - }, - "update": { - "id": "storage.objects.update", - "path": "b/{bucket}/o/{object}", - "httpMethod": "PUT", - "description": "Updates an object's metadata.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the bucket in which the object resides.", - "required": true, - "location": "path" - }, - "generation": { - "type": "string", - "description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", - "format": "int64", - "location": "query" - }, - "ifGenerationMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", - "format": "int64", - "location": "query" - }, - "ifGenerationNotMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", - "format": "int64", - "location": "query" - }, - "ifMetagenerationMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", - "format": "int64", - "location": "query" - }, - "ifMetagenerationNotMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.", - "format": "int64", - "location": "query" - }, - "overrideUnlockedRetention": { - "type": "boolean", - "description": "Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked.", - "location": "query" - }, - "object": { - "type": "string", - "description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", - "required": true, - "location": "path" - }, - "predefinedAcl": { - "type": "string", - "description": "Apply a predefined set of access controls to this object.", - "enum": [ - "authenticatedRead", - "bucketOwnerFullControl", - "bucketOwnerRead", - "private", - "projectPrivate", - "publicRead" - ], - "enumDescriptions": [ - "Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", - "Object owner gets OWNER access, and project team owners get OWNER access.", - "Object owner gets OWNER access, and project team owners get READER access.", - "Object owner gets OWNER access.", - "Object owner gets OWNER access, and project team members get access according to their roles.", - "Object owner gets OWNER access, and allUsers get READER access." - ], - "location": "query" - }, - "projection": { - "type": "string", - "description": "Set of properties to return. Defaults to full.", - "enum": [ - "full", - "noAcl" - ], - "enumDescriptions": [ - "Include all properties.", - "Omit the owner, acl property." - ], - "location": "query" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "object" - ], - "request": { - "$ref": "Object" - }, - "response": { - "$ref": "Object" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - }, - "watchAll": { - "id": "storage.objects.watchAll", - "path": "b/{bucket}/o/watch", - "httpMethod": "POST", - "description": "Watch for changes on all objects in a bucket.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the bucket in which to look for objects.", - "required": true, - "location": "path" - }, - "delimiter": { - "type": "string", - "description": "Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted.", - "location": "query" - }, - "endOffset": { - "type": "string", - "description": "Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).", - "location": "query" - }, - "includeTrailingDelimiter": { - "type": "boolean", - "description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.", - "location": "query" - }, - "maxResults": { - "type": "integer", - "description": "Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller.", - "default": "1000", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "A previously-returned page token representing part of the larger set of results to view.", - "location": "query" - }, - "prefix": { - "type": "string", - "description": "Filter results to objects whose names begin with this prefix.", - "location": "query" - }, - "projection": { - "type": "string", - "description": "Set of properties to return. Defaults to noAcl.", - "enum": [ - "full", - "noAcl" - ], - "enumDescriptions": [ - "Include all properties.", - "Omit the owner, acl property." - ], - "location": "query" - }, - "startOffset": { - "type": "string", - "description": "Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).", - "location": "query" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - }, - "versions": { - "type": "boolean", - "description": "If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket" - ], - "request": { - "$ref": "Channel", - "parameterName": "resource" - }, - "response": { - "$ref": "Channel" - }, - "scopes": [ - "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" - ], - "supportsSubscription": true - }, - "restore": { - "id": "storage.objects.restore", - "path": "b/{bucket}/o/{object}/restore", - "httpMethod": "POST", - "description": "Restores a soft-deleted object.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the bucket in which the object resides.", - "required": true, - "location": "path" - }, - "generation": { - "type": "string", - "description": "Selects a specific revision of this object.", - "required": true, - "format": "int64", - "location": "query" - }, - "object": { - "type": "string", - "description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", - "required": true, - "location": "path" - }, - "ifGenerationMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's one live generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", - "format": "int64", - "location": "query" - }, - "ifGenerationNotMatch": { - "type": "string", - "description": "Makes the operation conditional on whether none of the object's live generations match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", - "format": "int64", - "location": "query" - }, - "ifMetagenerationMatch": { - "type": "string", - "description": "Makes the operation conditional on whether the object's one live metageneration matches the given value.", - "format": "int64", - "location": "query" - }, - "ifMetagenerationNotMatch": { - "type": "string", - "description": "Makes the operation conditional on whether none of the object's live metagenerations match the given value.", - "format": "int64", - "location": "query" - }, - "copySourceAcl": { - "type": "boolean", - "description": "If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. The default is false.", - "location": "query" - }, - "projection": { - "type": "string", - "description": "Set of properties to return. Defaults to full.", - "enum": [ - "full", - "noAcl" - ], - "enumDescriptions": [ - "Include all properties.", - "Omit the owner, acl property." - ], - "location": "query" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request. Required for Requester Pays buckets.", - "location": "query" - } - }, - "parameterOrder": [ - "bucket", - "object" - ], - "request": { - "$ref": "Object" - }, - "response": { - "$ref": "Object" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] + "type": "boolean", + "description": "If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. The default is false.", + "location": "query" }, - "bulkRestore": { - "id": "storage.objects.bulkRestore", - "path": "b/{bucket}/o/bulkRestore", - "httpMethod": "POST", - "description": "Initiates a long-running bulk restore operation on the specified bucket.", - "parameters": { - "bucket": { - "type": "string", - "description": "Name of the bucket in which the object resides.", - "required": true, - "location": "path" - } - }, - "parameterOrder": [ - "bucket" - ], - "request": { - "$ref": "BulkRestoreObjectsRequest" - }, - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_write" - ] + "projection": { + "type": "string", + "description": "Set of properties to return. Defaults to full.", + "enum": [ + "full", + "noAcl" + ], + "enumDescriptions": [ + "Include all properties.", + "Omit the owner, acl property." + ], + "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request. Required for Requester Pays buckets.", + "location": "query" } - } - }, - "projects": { - "resources": { - "hmacKeys": { - "methods": { - "create": { - "id": "storage.projects.hmacKeys.create", - "path": "projects/{projectId}/hmacKeys", - "httpMethod": "POST", - "description": "Creates a new HMAC key for the specified service account.", - "parameters": { - "projectId": { - "type": "string", - "description": "Project ID owning the service account.", - "required": true, - "location": "path" - }, - "serviceAccountEmail": { - "type": "string", - "description": "Email address of the service account.", - "required": true, - "location": "query" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request.", - "location": "query" - } - }, - "parameterOrder": [ - "projectId", - "serviceAccountEmail" - ], - "response": { - "$ref": "HmacKey" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - }, - "delete": { - "id": "storage.projects.hmacKeys.delete", - "path": "projects/{projectId}/hmacKeys/{accessId}", - "httpMethod": "DELETE", - "description": "Deletes an HMAC key.", - "parameters": { - "accessId": { - "type": "string", - "description": "Name of the HMAC key to be deleted.", - "required": true, - "location": "path" - }, - "projectId": { - "type": "string", - "description": "Project ID owning the requested key", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request.", - "location": "query" - } - }, - "parameterOrder": [ - "projectId", - "accessId" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control", - "https://www.googleapis.com/auth/devstorage.read_write" - ] - }, - "get": { - "id": "storage.projects.hmacKeys.get", - "path": "projects/{projectId}/hmacKeys/{accessId}", - "httpMethod": "GET", - "description": "Retrieves an HMAC key's metadata", - "parameters": { - "accessId": { - "type": "string", - "description": "Name of the HMAC key.", - "required": true, - "location": "path" - }, - "projectId": { - "type": "string", - "description": "Project ID owning the service account of the requested key.", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request.", - "location": "query" - } - }, - "parameterOrder": [ - "projectId", - "accessId" - ], - "response": { - "$ref": "HmacKeyMetadata" - }, - "scopes": [ - "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" - ] - }, - "list": { - "id": "storage.projects.hmacKeys.list", - "path": "projects/{projectId}/hmacKeys", - "httpMethod": "GET", - "description": "Retrieves a list of HMAC keys matching the criteria.", - "parameters": { - "maxResults": { - "type": "integer", - "description": "Maximum number of items to return in a single page of responses. The service uses this parameter or 250 items, whichever is smaller. The max number of items per page will also be limited by the number of distinct service accounts in the response. If the number of service accounts in a single response is too high, the page will truncated and a next page token will be returned.", - "default": "250", - "format": "uint32", - "minimum": "0", - "location": "query" - }, - "pageToken": { - "type": "string", - "description": "A previously-returned page token representing part of the larger set of results to view.", - "location": "query" - }, - "projectId": { - "type": "string", - "description": "Name of the project in which to look for HMAC keys.", - "required": true, - "location": "path" - }, - "serviceAccountEmail": { - "type": "string", - "description": "If present, only keys for the given service account are returned.", - "location": "query" +}, +"parameterOrder": [ + "bucket", + "object", + "generation" + ], + "response": { + "$ref": "Object" }, - "showDeletedKeys": { - "type": "boolean", - "description": "Whether or not to show keys in the DELETED state.", - "location": "query" + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" + ] + }, + "bulkRestore": { + "id": "storage.objects.bulkRestore", + "path": "b/{bucket}/o/bulkRestore", + "httpMethod": "POST", + "description": "Initiates a long-running bulk restore operation on the specified bucket.", + "parameters": { + "bucket": { + "type": "string", + "description": "Name of the bucket in which the object resides.", + "required": true, + "location": "path" + } }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request.", - "location": "query" - } - }, - "parameterOrder": [ - "projectId" - ], - "response": { - "$ref": "HmacKeysMetadata" - }, - "scopes": [ - "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" - ] - }, - "update": { - "id": "storage.projects.hmacKeys.update", - "path": "projects/{projectId}/hmacKeys/{accessId}", - "httpMethod": "PUT", - "description": "Updates the state of an HMAC key. See the HMAC Key resource descriptor for valid states.", - "parameters": { - "accessId": { - "type": "string", - "description": "Name of the HMAC key being updated.", - "required": true, - "location": "path" + "parameterOrder": [ + "bucket" + ], + "request": { + "$ref": "BulkRestoreObjectsRequest" }, - "projectId": { - "type": "string", - "description": "Project ID owning the service account of the updated key.", - "required": true, - "location": "path" + "response": { + "$ref": "GoogleLongrunningOperation" }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request.", - "location": "query" + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" + ] + } +} +}, +"projects": { +"resources": { + "hmacKeys": { + "methods": { + "create": { + "id": "storage.projects.hmacKeys.create", + "path": "projects/{projectId}/hmacKeys", + "httpMethod": "POST", + "description": "Creates a new HMAC key for the specified service account.", + "parameters": { + "projectId": { + "type": "string", + "description": "Project ID owning the service account.", + "required": true, + "location": "path" + }, + "serviceAccountEmail": { + "type": "string", + "description": "Email address of the service account.", + "required": true, + "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request.", + "location": "query" + } + }, + "parameterOrder": [ + "projectId", + "serviceAccountEmail" + ], + "response": { + "$ref": "HmacKey" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" + ] + }, + "delete": { + "id": "storage.projects.hmacKeys.delete", + "path": "projects/{projectId}/hmacKeys/{accessId}", + "httpMethod": "DELETE", + "description": "Deletes an HMAC key.", + "parameters": { + "accessId": { + "type": "string", + "description": "Name of the HMAC key to be deleted.", + "required": true, + "location": "path" + }, + "projectId": { + "type": "string", + "description": "Project ID owning the requested key", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request.", + "location": "query" + } + }, + "parameterOrder": [ + "projectId", + "accessId" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_write" + ] + }, + "get": { + "id": "storage.projects.hmacKeys.get", + "path": "projects/{projectId}/hmacKeys/{accessId}", + "httpMethod": "GET", + "description": "Retrieves an HMAC key's metadata", + "parameters": { + "accessId": { + "type": "string", + "description": "Name of the HMAC key.", + "required": true, + "location": "path" + }, + "projectId": { + "type": "string", + "description": "Project ID owning the service account of the requested key.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request.", + "location": "query" + } + }, + "parameterOrder": [ + "projectId", + "accessId" + ], + "response": { + "$ref": "HmacKeyMetadata" + }, + "scopes": [ + "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" + ] + }, + "list": { + "id": "storage.projects.hmacKeys.list", + "path": "projects/{projectId}/hmacKeys", + "httpMethod": "GET", + "description": "Retrieves a list of HMAC keys matching the criteria.", + "parameters": { + "maxResults": { + "type": "integer", + "description": "Maximum number of items to return in a single page of responses. The service uses this parameter or 250 items, whichever is smaller. The max number of items per page will also be limited by the number of distinct service accounts in the response. If the number of service accounts in a single response is too high, the page will truncated and a next page token will be returned.", + "default": "250", + "format": "uint32", + "minimum": "0", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "A previously-returned page token representing part of the larger set of results to view.", + "location": "query" + }, + "projectId": { + "type": "string", + "description": "Name of the project in which to look for HMAC keys.", + "required": true, + "location": "path" + }, + "serviceAccountEmail": { + "type": "string", + "description": "If present, only keys for the given service account are returned.", + "location": "query" + }, + "showDeletedKeys": { + "type": "boolean", + "description": "Whether or not to show keys in the DELETED state.", + "location": "query" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request.", + "location": "query" + } + }, + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "HmacKeysMetadata" + }, + "scopes": [ + "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" + ] + }, + "update": { + "id": "storage.projects.hmacKeys.update", + "path": "projects/{projectId}/hmacKeys/{accessId}", + "httpMethod": "PUT", + "description": "Updates the state of an HMAC key. See the HMAC Key resource descriptor for valid states.", + "parameters": { + "accessId": { + "type": "string", + "description": "Name of the HMAC key being updated.", + "required": true, + "location": "path" + }, + "projectId": { + "type": "string", + "description": "Project ID owning the service account of the updated key.", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request.", + "location": "query" + } + }, + "parameterOrder": [ + "projectId", + "accessId" + ], + "request": { + "$ref": "HmacKeyMetadata" + }, + "response": { + "$ref": "HmacKeyMetadata" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" + ] + } } - }, - "parameterOrder": [ - "projectId", - "accessId" - ], - "request": { - "$ref": "HmacKeyMetadata" - }, - "response": { - "$ref": "HmacKeyMetadata" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - } - } }, "serviceAccount": { - "methods": { - "get": { - "id": "storage.projects.serviceAccount.get", - "path": "projects/{projectId}/serviceAccount", - "httpMethod": "GET", - "description": "Get the email address of this project's Google Cloud Storage service account.", - "parameters": { - "projectId": { - "type": "string", - "description": "Project ID", - "required": true, - "location": "path" - }, - "userProject": { - "type": "string", - "description": "The project to be billed for this request.", - "location": "query" + "methods": { + "get": { + "id": "storage.projects.serviceAccount.get", + "path": "projects/{projectId}/serviceAccount", + "httpMethod": "GET", + "description": "Get the email address of this project's Google Cloud Storage service account.", + "parameters": { + "projectId": { + "type": "string", + "description": "Project ID", + "required": true, + "location": "path" + }, + "userProject": { + "type": "string", + "description": "The project to be billed for this request.", + "location": "query" + } + }, + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "ServiceAccount" + }, + "scopes": [ + "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" + ] + } } - }, - "parameterOrder": [ - "projectId" - ], - "response": { - "$ref": "ServiceAccount" - }, - "scopes": [ - "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" - ] - } - } } - } - } - }, - "revision": "20231028", - "etag": "\"39383633393336373936373236333033393737\"" +} +} +}, + "revision": "20240501", + "etag": "\"3135313638313632393935373531333737363832\"" }